Browse Source

[core] Show error messages from table and columns stat refresh in the assist panel

Johan Ahlen 10 years ago
parent
commit
f372756

+ 1 - 1
desktop/core/src/desktop/static/desktop/css/hue3.css

@@ -1012,7 +1012,7 @@ div.box {
   margin-left: -200px;
   width: 400px;
   text-align: center;
-  z-index: 8000;
+  z-index: 11000;
   word-break: break-word;
 }
 

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/assistHelper.js

@@ -78,7 +78,7 @@ AssistHelper.prototype.refreshTableStats = function(databaseName, tableName, suc
     if (data.status == 0 && data.watch_url) {
       pollRefresh(data.watch_url);
     } else {
-      errorCallback();
+      errorCallback(data.message);
     }
   }).fail(errorCallback);
 };

+ 2 - 2
desktop/core/src/desktop/templates/ko_components.mako

@@ -529,9 +529,9 @@ from desktop.views import _ko
           if (shouldFetchTerms) {
             self.fetchTerms();
           }
-        }, function() {
-          $(document).trigger("error", "${ _('There was a problem refreshing the stats.') }");
+        }, function(message) {
           self.refreshing(false);
+          $(document).trigger("error", message || "${ _('There was a problem refreshing the stats.') }");
         });
       };