Repository: lens
Updated Branches:
  refs/heads/master 42589c3fb -> 640904222


LENS-859 : When table metastore call fails, the UI just shows a loader 
indefinitely.


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

Branch: refs/heads/master
Commit: 6409042227d58ee975a5b0ba1923d555a0f289b9
Parents: 42589c3
Author: Ankeet Maini <[email protected]>
Authored: Mon Nov 9 15:18:53 2015 +0530
Committer: Deepak Kumar Barr <[email protected]>
Committed: Mon Nov 9 15:18:53 2015 +0530

----------------------------------------------------------------------
 lens-ui/app/components/TableTreeComponent.js | 3 ++-
 lens-ui/app/stores/TableStore.js             | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lens/blob/64090422/lens-ui/app/components/TableTreeComponent.js
----------------------------------------------------------------------
diff --git a/lens-ui/app/components/TableTreeComponent.js 
b/lens-ui/app/components/TableTreeComponent.js
index 59965d4..799dc9f 100644
--- a/lens-ui/app/components/TableTreeComponent.js
+++ b/lens-ui/app/components/TableTreeComponent.js
@@ -39,7 +39,8 @@ function getState (page, filterString, database) {
 
 function getTables (page, filterString, database) {
   // get all the native tables
-  let tables = TableStore.getTables(database);
+  // so that Object.keys does not throw up
+  let tables = TableStore.getTables(database) || {};
   let pageSize = 10;
   let allTables;
   let startIndex;

http://git-wip-us.apache.org/repos/asf/lens/blob/64090422/lens-ui/app/stores/TableStore.js
----------------------------------------------------------------------
diff --git a/lens-ui/app/stores/TableStore.js b/lens-ui/app/stores/TableStore.js
index ee35b84..5ef84fa 100644
--- a/lens-ui/app/stores/TableStore.js
+++ b/lens-ui/app/stores/TableStore.js
@@ -96,6 +96,10 @@ AppDispatcher.register((action) => {
       receiveTableDetails(action.payload);
       TableStore.emitChange();
       break;
+
+    case AdhocQueryConstants.RECEIVE_TABLES_FAILED:
+      TableStore.emitChange();
+      break;
   }
 });
 

Reply via email to