incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaven...@apache.org
Subject [13/20] git commit: Fixed BLUR-410 truncate long queries
Date Thu, 05 Mar 2015 23:45:29 GMT
Fixed BLUR-410 truncate long queries


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/ef5af6cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/ef5af6cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/ef5af6cb

Branch: refs/heads/master
Commit: ef5af6cbcc7bc1f909d738ed23d4efc005149834
Parents: 3d420d7
Author: Andrew Avenoso <andrew.va@gmail.com>
Authored: Thu Mar 5 15:37:15 2015 -0500
Committer: Andrew Avenoso <andrew.va@gmail.com>
Committed: Thu Mar 5 15:37:15 2015 -0500

----------------------------------------------------------------------
 .../src/main/webapp/js/blurconsole.b_utils.js   |    9 +-
 .../src/main/webapp/js/blurconsole.queries.js   |    7 +-
 .../main/webapp/less/blurconsole.queries.less   |    7 +
 ...console.2a648e83800e5f3413c3251cbe533ff3.css | 6613 -----------------
 ...console.3003bf5881f20abd06b59070a38c8d37.css | 6619 ++++++++++++++++++
 .../src/main/webapp/public/css/blurconsole.css  |    8 +-
 ...ole.css.5fa0e71593d7ef244172ddff242e3517.map |    1 -
 ...ole.css.951e46a333bf74da4046cf4ecc75e5e1.map |    1 +
 .../main/webapp/public/css/blurconsole.css.map  |    2 +-
 blur-console/src/main/webapp/public/index.html  |    4 +-
 ...rconsole.4ec0a9aa329d2e9862d6dd63b9959d2e.js |   28 -
 ...rconsole.5bcbaf86245458b03be6ef5c1d6282f0.js |   28 +
 .../src/main/webapp/public/js/blurconsole.js    |    6 +-
 ...sole.js.128301cff94d8baf216c4c5c3945b08e.map |    1 -
 ...sole.js.af6f514ba14876bd0ad5146ee55b0d66.map |    1 +
 .../main/webapp/public/js/blurconsole.js.map    |    2 +-
 16 files changed, 6682 insertions(+), 6655 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ef5af6cb/blur-console/src/main/webapp/js/blurconsole.b_utils.js
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/js/blurconsole.b_utils.js b/blur-console/src/main/webapp/js/blurconsole.b_utils.js
index 3f6804f..07c1b54 100644
--- a/blur-console/src/main/webapp/js/blurconsole.b_utils.js
+++ b/blur-console/src/main/webapp/js/blurconsole.b_utils.js
@@ -48,11 +48,14 @@ blurconsole.browserUtils = (function(){
       $.each(data, function(ir, row){
         tableMarkup += '<tr>';
         $.each(def, function(ic, col) {
+          tableMarkup += '<td';
           if(col.style) {
-            tableMarkup += '<td style="'+col.style+'">';
-          } else {
-            tableMarkup += '<td>';
+            tableMarkup += ' style="'+col.style+'"';
+          }
+          if(col.class) {
+            tableMarkup += ' class="'+col.class+'"';
           }
+          tableMarkup += '>';
           var val;
           if ($.isFunction(col.key)) {
             val = col.key(row);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ef5af6cb/blur-console/src/main/webapp/js/blurconsole.queries.js
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/js/blurconsole.queries.js b/blur-console/src/main/webapp/js/blurconsole.queries.js
index d4d5c3f..4e735a5 100644
--- a/blur-console/src/main/webapp/js/blurconsole.queries.js
+++ b/blur-console/src/main/webapp/js/blurconsole.queries.js
@@ -27,7 +27,7 @@ blurconsole.queries = (function() {
     states: ['Running', 'Interrupted', 'Complete', 'Back Pressure Interrupted'],
     queryDef: [
       { label: 'User', key: 'user', width: '0%', style: 'white-space:nowrap' },
-      { label: 'Query', key: 'query', style: 'text-overflow:ellipsis; overflow: hidden; max-width:1px;',
width: '100%' },
+      { label: 'Query', key: 'query', class: 'truncatedQuery', width: '100%' },
       { label: 'Started', width: '0%', style: 'white-space:nowrap', key: function(row) {
         var start = new Date(row.startTime);
         return start.toLocaleTimeString(); //start.getHours() + ':' + start.getMinutes()
+ ':' + start.getSeconds();
@@ -72,6 +72,7 @@ blurconsole.queries = (function() {
   function _registerPageEvents() {
     jqueryMap.$tableHolder.on('click', '.list-group-item', _showQueriesForTable);
     jqueryMap.$queryHolder.on('click', 'a.cancelTrigger', _cancelSelectedQuery);
+    jqueryMap.$queryHolder.on('click', 'td.truncatedQuery', _stopTruncating);
     jqueryMap.$filterHolder.on('click', '.filterTrigger', _filterQueries);
   }
 
@@ -101,6 +102,10 @@ blurconsole.queries = (function() {
     return false;
   }
 
+  function _stopTruncating(evt) {
+    $(evt.currentTarget).removeClass('truncatedQuery');
+  }
+
   function _cancelSelectedQuery(evt) {
     var uuid = $(evt.currentTarget).data('uuid'),
       query = $(evt.currentTarget).data('query'),

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ef5af6cb/blur-console/src/main/webapp/less/blurconsole.queries.less
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/less/blurconsole.queries.less b/blur-console/src/main/webapp/less/blurconsole.queries.less
index 35e8200..15f7d5f 100644
--- a/blur-console/src/main/webapp/less/blurconsole.queries.less
+++ b/blur-console/src/main/webapp/less/blurconsole.queries.less
@@ -19,4 +19,11 @@ under the License.
 
 #filterOptions {
   margin-bottom: 5px;
+}
+
+td.truncatedQuery {
+  text-overflow: ellipsis;
+  overflow: hidden;
+  max-width: 1px;
+  white-space: nowrap;
 }
\ No newline at end of file


Mime
View raw message