From 91ec2eccac3175cf17a9617184fb6f7e13dd65d4 Mon Sep 17 00:00:00 2001 From: "Heekyoung, Oh" Date: Mon, 20 Mar 2017 18:48:53 +0900 Subject: [PATCH] [TIC-Web] Update Image Section - Update CSS Change-Id: I384ce0ea6eb66274831120368419d84940a8db56 Signed-off-by: Heekyoung, Oh --- config.json | 3 ++- controller/dbpool.js | 35 +++++-------------------------- controller/dbquery.js | 6 ------ public/src/css/style.css | 29 ++++++++++--------------- public/src/index.html | 12 ++++++++--- public/src/js/page/job.js | 6 +++--- public/src/js/widget/ImageItem.js | 2 +- public/src/js/widget/JobTableEmptyItem.js | 2 +- public/src/js/widget/JobTableItem.js | 2 +- 9 files changed, 33 insertions(+), 64 deletions(-) diff --git a/config.json b/config.json index fa8638c..0677e99 100644 --- a/config.json +++ b/config.json @@ -18,7 +18,8 @@ "MAX": 5, "MIN": 1, "IDLETIMEOUT": 500000, - "REAPINTERVAL": 500 + "REAPINTERVAL": 500, + "MAXWAITINGCLIENTS": 20 } }, "TIC_CORE": { diff --git a/controller/dbpool.js b/controller/dbpool.js index 3dac94e..eb93ac4 100644 --- a/controller/dbpool.js +++ b/controller/dbpool.js @@ -37,21 +37,6 @@ function dbPool () { logger.info('DB Connection Success !'); resolve(mariasqlClient); }); - - // mariasqlClient.on('connect', function () { - // logger.info('DB - connect'); - // resolve(client); - // }) - // .on('error', function (err) { - // logger.info('DB - error'); - // reject(err); - // }).on('close', function (hadError) { - // logger.info('DB - close'); - // resolve(); - // }).on('ready', function () { - // logger.info('DB - ready'); - // resolve(mariasqlClient); - // }); }); }, @@ -61,9 +46,9 @@ function dbPool () { resolve(); }); client.disconnect(); + client.end(); + client._handle = null; }); - // cliend.end(); - // client._handle = null; }, validate: function (client) { @@ -78,14 +63,10 @@ function dbPool () { reapIntervalMillis: AppConfig.DATABASE.POOL.REAPINTERVAL, + maxWaitingClients: AppConfig.DATABASE.POOL.MAXWAITINGCLIENTS, + returnToHead: true }); - - // self.pool.drain().then(function () { - // self.pool.clear(); - // }); - - }; dbPool.prototype.query = function query (query, params) { @@ -111,16 +92,10 @@ dbPool.prototype.query = function query (query, params) { return resolve(meta); }); }).catch(function (err) { + logger.error(err.message); return reject(err); }); }); }; - -// process.on('exit', function () { -// dbPool.drain(function () { -// dbpool.clear(); -// }); -// }); - module.exports = dbPool; \ No newline at end of file diff --git a/controller/dbquery.js b/controller/dbquery.js index 60f9683..4349372 100644 --- a/controller/dbquery.js +++ b/controller/dbquery.js @@ -5,15 +5,9 @@ var JL = require('jsnlog').JL; var logger = JL('dbquery.js'); var _ = require('lodash'); -// var sequelize = require('./dbpool'); var dbpool = require('./dbpool'); var pool = new dbpool({}); -// function fnCallback() {}; -// setInterval(function () { -// pool.query('show tables', {}); -// console.log(process.memoryUsage()); -// }, 1000); process.on('exit', function () { pool.drain(function () { diff --git a/public/src/css/style.css b/public/src/css/style.css index 2c515af..f74765e 100644 --- a/public/src/css/style.css +++ b/public/src/css/style.css @@ -169,9 +169,10 @@ body { display: table-cell; } #tic-job-list { - height: calc(100vh - 210px); + height: calc(100vh - 285px); display: inline-block; width: 100%; + text-align: center; } #tic-job-section .panel-heading .pull-right { margin-top: -20px; @@ -207,6 +208,13 @@ body { #tic-job-list .btncancel { background-color: darkslategray; } +.empty_job_table_row > td { + height: 40px; + overflow: hidden; +} +.job_table_row { + width: 100%; +} .extended_job_table_row { border: 1px solid #eee; border-radius: 3px; @@ -223,7 +231,7 @@ td.extended_job_table_container > div { overflow: auto; } td.extended_job_table_container { - height: 10vh; + height: 13vh; } tr.extended_job_table_row:hover { background-color: rgba(13, 19, 14, 0.71); @@ -231,25 +239,11 @@ tr.extended_job_table_row:hover { tr.extended_job_table_row:hover td { background-color: transparent; } -#tic-job-table { - height: calc(100vh - 320px); - text-overflow: ellipsis; - text-align: center; - table-layout: auto; -} #tic-job-table th { text-align: center; height: 38px; vertical-align: middle; } -#tic-job-table tr { - height: 38px; -} -#tic-job-table td { - height: 38px; - vertical-align: middle; - padding: 1px; -} #tic-job-list-pagination { float: right; @@ -298,7 +292,7 @@ tr.extended_job_table_row:hover td { text-overflow: ellipsis; white-space:nowrap; overflow: hidden; - display: table-cell; + display: table-row; } .image-list-btndownload { min-width: 10px; @@ -325,7 +319,6 @@ tr.extended_job_table_row:hover td { float: left; display: table; padding-top: 20px; - height: 4vh; } #tic-image-list-content { height: calc(100vh - 320px); diff --git a/public/src/index.html b/public/src/index.html index 94f88ef..a5cd664 100644 --- a/public/src/index.html +++ b/public/src/index.html @@ -200,7 +200,7 @@
- +
@@ -218,12 +218,18 @@
#
-
+ +
+
+
    +
  • +
  • +
diff --git a/public/src/js/page/job.js b/public/src/js/page/job.js index cb2f823..5709706 100644 --- a/public/src/js/page/job.js +++ b/public/src/js/page/job.js @@ -239,7 +239,7 @@ define([ // log new JobLog({ - msg: 'Image created successfully.', + msg: 'An image was created successfully.', jobId: jobId }); @@ -345,12 +345,12 @@ define([ // log new JobLog({ - msg: 'Failed to create image.', + msg: 'Failed to create an image.', jobId: jobId }); // notification popup - Util.showAlertDialog('Failed to create image. The #ID is ' + jobId + '.'); + Util.showAlertDialog('Failed to create an image. The #ID is ' + jobId + '.'); // button enabled $('#tic-package-create').prop('disabled', false); diff --git a/public/src/js/widget/ImageItem.js b/public/src/js/widget/ImageItem.js index aa294c9..d2cb4e2 100644 --- a/public/src/js/widget/ImageItem.js +++ b/public/src/js/widget/ImageItem.js @@ -15,7 +15,7 @@ define([ var strItem = [ '
  • ', '
    ', - '
    #<%= jobId %>. <%= imageFileName %>
    ', + '
    (<%= jobId %>)  <%= imageFileName %>
    ', '', '', '', diff --git a/public/src/js/widget/JobTableEmptyItem.js b/public/src/js/widget/JobTableEmptyItem.js index a21e7e2..47dd97c 100644 --- a/public/src/js/widget/JobTableEmptyItem.js +++ b/public/src/js/widget/JobTableEmptyItem.js @@ -10,7 +10,7 @@ define([ 'use strict'; var strEmptyRow = [ - '', + '', 'There is no data.', '' ]; diff --git a/public/src/js/widget/JobTableItem.js b/public/src/js/widget/JobTableItem.js index d2f15f9..3353960 100644 --- a/public/src/js/widget/JobTableItem.js +++ b/public/src/js/widget/JobTableItem.js @@ -10,7 +10,7 @@ define([ 'use strict'; var strRow = [ - '', + '', '<%= jobNum %>', '', 'Download', -- 2.7.4