[TIC-Web] Update Image Section 57/119857/2
authorHeekyoung, Oh <heekyoung.oh@samsung.com>
Mon, 20 Mar 2017 09:48:53 +0000 (18:48 +0900)
committerHeekyoung, Oh <heekyoung.oh@samsung.com>
Tue, 21 Mar 2017 02:08:01 +0000 (11:08 +0900)
- Update CSS

Change-Id: I384ce0ea6eb66274831120368419d84940a8db56
Signed-off-by: Heekyoung, Oh <heekyoung.oh@samsung.com>
config.json
controller/dbpool.js
controller/dbquery.js
public/src/css/style.css
public/src/index.html
public/src/js/page/job.js
public/src/js/widget/ImageItem.js
public/src/js/widget/JobTableEmptyItem.js
public/src/js/widget/JobTableItem.js

index fa8638c..0677e99 100644 (file)
@@ -18,7 +18,8 @@
             "MAX": 5,
             "MIN": 1,
             "IDLETIMEOUT": 500000,
-            "REAPINTERVAL": 500
+            "REAPINTERVAL": 500,
+            "MAXWAITINGCLIENTS": 20
         }
     },
     "TIC_CORE": {
index 3dac94e..eb93ac4 100644 (file)
@@ -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
index 60f9683..4349372 100644 (file)
@@ -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 () {
index 2c515af..f74765e 100644 (file)
@@ -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);
index 94f88ef..a5cd664 100644 (file)
                                 <div id="tic-job-list">
                                     <div id="tic-job-list-content">
                                         <div>
-                                            <table class="table table-hover table-bordered" id="tic-job-table">
+                                            <table class="table table-hover table-bordered ui-responsive" id="tic-job-table">
                                                 <thead>
                                                     <tr class="filters text-center">
                                                         <th>#</th>
                                             </table>
                                         </div>
                                     </div>
-                                    <div id="tic-job-list-pagination">
+                                    <!--<div id="tic-job-list-pagination">
                                         <ul class="pagination pagination-sm">
                                             <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span></a></li>
                                             <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-right"></span></a></li>
                                         </ul>
-                                    </div>
+                                    </div>-->
+                                </div>
+                                <div id="tic-job-list-pagination">
+                                    <ul class="pagination pagination-sm">
+                                        <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span></a></li>
+                                        <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-right"></span></a></li>
+                                    </ul>
                                 </div>
                             </div>
                         </div>
index cb2f823..5709706 100644 (file)
@@ -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);
index aa294c9..d2cb4e2 100644 (file)
@@ -15,7 +15,7 @@ define([
     var strItem = [
         '<li class="list-group-item image-item">',
             '<div class="image-item-title">',
-                '<div class="image-list-name" title="<%= jobId %>_<%= imageFileName %>">#<%= jobId %>.  <%= imageFileName %></div>',
+                '<div class="image-list-name" title="<%= jobId %>_<%= imageFileName %>">(<%= jobId %>)&nbsp;&nbsp;<%= imageFileName %></div>',
                 '<div class="image-list-name-btndownload"><a class="image-list-btndownload" href="<%= imagePath %>" title="<%= imageFileName %>" date-name="<%= imageFileName %>">Download</a></div>',
                 '<div class="image-list-name-btndownload"><a class="image-list-btndownload <%= classJobKsPath %>" href="<%= ksPath %>" title="<%= ksFileName %>" date-name="<%= ksFileName %>">KS</a></div>',
                 '<div class="image-list-name-btndownload"><a class="image-list-btndownload btnbiglog" data-link="<%= logPath %>" data-jobid="<%= jobId %>" title="Log" date-name="<%= logFileName %>">Log</a></div>',
index a21e7e2..47dd97c 100644 (file)
@@ -10,7 +10,7 @@ define([
     'use strict';
 
     var strEmptyRow = [
-        '<tr id="job_table_row_<%= rowNum %>">',
+        '<tr id="job_table_row_<%= rowNum %>" class="empty_job_table_row">',
             '<td colspan="9">There is no data.</td>',
         '</tr>'
     ];
index d2f15f9..3353960 100644 (file)
@@ -10,7 +10,7 @@ define([
     'use strict';
 
     var strRow = [
-        '<tr id="job_table_row_<%= jobNum %>">',
+        '<tr id="job_table_row_<%= jobNum %>" class="job_table_row">',
             '<td><%= jobNum %></td>',
             '<td class="<%= classJobStatus %>" title="<%= jobStatus %>"></td>',
             '<td><a class="tic-job-list-btn btndownload <%= classJobImageDownload %>" href="<%= jobImagePath %>" title="<%= jobImageName %>">Download</a></td>',