浏览代码

[core] Show server error messages when fetching terms fails in the assist panel column stats

Johan Ahlen 10 年之前
父节点
当前提交
0c3da7a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      desktop/core/src/desktop/templates/ko_components.mako

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

@@ -585,14 +585,14 @@ from desktop.views import _ko
                 percent: (parseFloat(term[1]) / parseFloat(data.terms[0][1])) * 100
                 percent: (parseFloat(term[1]) / parseFloat(data.terms[0][1])) * 100
               }
               }
             }));
             }));
+          } else if (data && data.message) {
+            $(document).trigger("error", data.message);
           } else {
           } else {
-            $("#tableAnalysis").hide();
             $(document).trigger("error", "${ _('There was a problem loading the terms.') }");
             $(document).trigger("error", "${ _('There was a problem loading the terms.') }");
           }
           }
           self.loadingTerms(false);
           self.loadingTerms(false);
         }, function (e) {
         }, function (e) {
           if (e.status == 500) {
           if (e.status == 500) {
-            $("#tableAnalysis").hide();
             $(document).trigger("error", "${ _('There was a problem loading the terms.') }");
             $(document).trigger("error", "${ _('There was a problem loading the terms.') }");
           }
           }
           self.loadingTerms(false);
           self.loadingTerms(false);