incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [7/7] git commit: BLUR-377 Fixed issue with back and forward buttons on search for blur console closes BLUR-377
Date Sun, 26 Oct 2014 20:16:39 GMT
BLUR-377 Fixed issue with back and forward buttons on search for blur console closes BLUR-377


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

Branch: refs/heads/master
Commit: 0fb15dfb0ecf80a5c358f3ddcd18306af871e0cf
Parents: 897e95b
Author: Chris Rohr <rohr.chris@gmail.com>
Authored: Sun Oct 26 16:16:06 2014 -0400
Committer: Chris Rohr <rohr.chris@gmail.com>
Committed: Sun Oct 26 16:16:06 2014 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/blurconsole.queries.js   |  2 +-
 .../src/main/webapp/js/blurconsole.search.js    | 28 +++++++++++++++++---
 .../src/main/webapp/js/blurconsole.shell.js     |  2 ++
 blur-console/src/main/webapp/public/index.html  |  2 +-
 ...rconsole.c993c0b1cda5fe574572a29c27f660c3.js | 27 -------------------
 ...rconsole.f74c82c84f27229f0c9bc37b2c57ea82.js | 27 +++++++++++++++++++
 .../src/main/webapp/public/js/blurconsole.js    |  6 ++---
 ...sole.js.2c30ff82585b96f59a6624e640395ff3.map |  1 -
 ...sole.js.48bca05a3a37b5604a6f955c6c799f26.map |  1 +
 .../main/webapp/public/js/blurconsole.js.map    |  2 +-
 10 files changed, 61 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/0fb15dfb/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 e847b67..60daf4e 100644
--- a/blur-console/src/main/webapp/js/blurconsole.queries.js
+++ b/blur-console/src/main/webapp/js/blurconsole.queries.js
@@ -28,7 +28,7 @@ blurconsole.queries = (function() {
     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: 'Time Started', width: '0%', style: 'white-space:nowrap', key: function(row)
{
+      { 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();
       } },

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/0fb15dfb/blur-console/src/main/webapp/js/blurconsole.search.js
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/js/blurconsole.search.js b/blur-console/src/main/webapp/js/blurconsole.search.js
index b2f7485..c51123f 100644
--- a/blur-console/src/main/webapp/js/blurconsole.search.js
+++ b/blur-console/src/main/webapp/js/blurconsole.search.js
@@ -234,8 +234,10 @@ blurconsole.search = (function () {
   function _updateOptionDisplay() {
     var displayText = '';
     displayText += configMap.superQueryMap[stateMap.$rowRecordOption];
-    displayText += '<br/>User: ';
-    displayText += stateMap.$userOption;
+    if (stateMap.$userOption && stateMap.$userOption !== 'null') {
+      displayText += '<br/>User: ';
+      displayText += stateMap.$userOption;
+    }
     jqueryMap.$optionsDisplay.html(displayText);
   }
 
@@ -558,8 +560,28 @@ blurconsole.search = (function () {
     _unregisterPageEvents();
   }
 
+  function anchorChanged() {
+    var anchorMap = $.uriAnchor.makeAnchorMap();
+    if (anchorMap._tab && anchorMap._tab.query) {
+      stateMap.$currentQuery = anchorMap._tab.query;
+      jqueryMap.$queryField.val(stateMap.$currentQuery);
+      stateMap.$currentTable = anchorMap._tab.table;
+      jqueryMap.$tableField.val(stateMap.$currentTable);
+      stateMap.$rowRecordOption = anchorMap._tab.rr;
+      stateMap.$userOption = anchorMap._tab.user;
+      _updateOptionDisplay();
+      _sendSearch();
+    } else {
+      stateMap.$currentQuery = null;
+      jqueryMap.$queryField.val('');
+      jqueryMap.$resultsHolder.html('');
+      jqueryMap.$countHolder.html('');
+    }
+  }
+
   return {
     initModule : initModule,
-    unloadModule : unloadModule
+    unloadModule : unloadModule,
+    anchorChanged : anchorChanged
   };
 }());
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/0fb15dfb/blur-console/src/main/webapp/js/blurconsole.shell.js
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/js/blurconsole.shell.js b/blur-console/src/main/webapp/js/blurconsole.shell.js
index 6675361..0c063c8 100644
--- a/blur-console/src/main/webapp/js/blurconsole.shell.js
+++ b/blur-console/src/main/webapp/js/blurconsole.shell.js
@@ -73,6 +73,8 @@ blurconsole.shell = (function () {
           tab : 'dashboard'
         });
       }
+    } else if (blurconsole[tab].anchorChanged) {
+      blurconsole[tab].anchorChanged();
     }
 
     return true;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/0fb15dfb/blur-console/src/main/webapp/public/index.html
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/public/index.html b/blur-console/src/main/webapp/public/index.html
index 1606cd4..f04f8ba 100644
--- a/blur-console/src/main/webapp/public/index.html
+++ b/blur-console/src/main/webapp/public/index.html
@@ -64,7 +64,7 @@ under the License.
       </ul>
     </nav>
     <div id="blurconsole"></div>
-    <script src="js/blurconsole.c993c0b1cda5fe574572a29c27f660c3.js"></script>
+    <script src="js/blurconsole.f74c82c84f27229f0c9bc37b2c57ea82.js"></script>
     <script src="/service/config.js"></script>
     <script type="text/javascript">
       $(function () { blurconsole.initModule( $('#blurconsole') ); });


Mime
View raw message