From 7502fe84d4724265661600dac3d9897f2c8884bd Mon Sep 17 00:00:00 2001 From: "Heekyoung, Oh" Date: Tue, 4 Apr 2017 18:57:06 +0900 Subject: [PATCH] [TIC-Web] Update The Section For The Jobs - Update the css for the button for the log. - when job was inprogressing, it highlighted. Change-Id: Id893a628b8815ab23b4960039c4ef0ebb7387d4b Signed-off-by: Heekyoung, Oh --- public/src/css/style.css | 42 +++++++++++++++++++++++++++++++++++- public/src/js/page/job.js | 16 ++++++++++++++ public/src/js/widget/JobTableItem.js | 2 +- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/public/src/css/style.css b/public/src/css/style.css index 1eadbfa..f3a6132 100644 --- a/public/src/css/style.css +++ b/public/src/css/style.css @@ -201,10 +201,50 @@ body { } #tic-job-list .btnnotactive { pointer-events: none; - cursor: defulat; + cursor: default; background-color: rgba(47, 45, 45, 0.48); opacity: 0.6; } +#tic-job-list .btnbiglog { + cursor: pointer; +} +#tic-job-list .btnlogactive { + background-color: blue; + animation-name: btnlogflash; + animation-duration: 1s; + animation-timing-function: linear; + animation-iteration-count: infinite; + + /* Chrome 4+, Safari 4+, Opera 15+ */ + -webkit-animation-name: btnlogflash; + -webkit-animation-duration: 1s; + -webkit-animation-timing-function: linear; + -webkit-animation-iteration-count: infinite; + + /* Firefox 5+ */ + -moz-animation-name: btnlogflash; + -moz-animation-duration: 1s; + -moz-animation-timing-function: linear; + -moz-animation-iteration-count: infinite +} +@keyframes btnlogflash { + 0% { opacity: 1.0 } + 50% { opacity: 0.5 } + 100% { opacity: 1.0 } +} +/* Chrome 4+, Safari 4+, Opera 15+ */ +@-webkit-keyframes btnlogflash { + 0% { opacity: 1.0 } + 50% { opacity: 0.5 } + 100% { opacity: 1.0 } +} +/* Firefox 5+ */ +@-moz-keyframes btnlogflash { + 0% { opacity: 1.0 } + 50% { opacity: 0.5 } + 100% { opacity: 1.0 } +} + .empty_job_table_row > td { height: 40px; overflow: hidden; diff --git a/public/src/js/page/job.js b/public/src/js/page/job.js index 9e00774..81572bd 100644 --- a/public/src/js/page/job.js +++ b/public/src/js/page/job.js @@ -185,12 +185,26 @@ define([ } function _initSocket() { + function _btnLogBlink (jobId, bBlink) { + var btnLogSelector, btnLogElem; + btnLogSelector = '#tic-job-list #extended_job_table_row_' + jobId + ' .btnbiglog'; + btnLogElem = $(btnLogSelector); + if (!btnLogElem.hasClass('btnlogactive')) { + if (bBlink) { + btnLogElem.addClass('btnlogactive'); + } else { + btnLogElem.removeClass('btnlogactive'); + } + } + } + /** * when running on mic * * AppConfig.EVENT.SOCKET.FS_IMAGE_ADD_TO = 'ws/fs/image/add/to' */ client.on(AppConfig.EVENT.SOCKET.FS_IMAGE_ADD_TO, function (dataObj) { + _btnLogBlink(dataObj.jobId, true); return new JobLog(dataObj); }); @@ -219,6 +233,7 @@ define([ }); logger.info(AppConfig.EVENT.SOCKET.FS_IMAGE_ADD_FINISH); + _btnLogBlink(dataObj.jobId, false); function onError(err) { if (err) { @@ -323,6 +338,7 @@ define([ // notification popup Util.showAlertDialog('Failed to create an image. The #ID is ' + jobId + '.'); + _btnLogBlink(dataObj.jobId, false); // update the status msgObj = { diff --git a/public/src/js/widget/JobTableItem.js b/public/src/js/widget/JobTableItem.js index 3f41058..518ac7f 100644 --- a/public/src/js/widget/JobTableItem.js +++ b/public/src/js/widget/JobTableItem.js @@ -31,7 +31,7 @@ define([ '<%= jobUptime %>', 'Cancel', 'KS', - 'Log', + 'Log', '', '', '', -- 2.7.4