Explorar o código

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

Johan Ahlen %!s(int64=10) %!d(string=hai) anos
pai
achega
0c3da7a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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
               }
             }));
+          } else if (data && data.message) {
+            $(document).trigger("error", data.message);
           } else {
-            $("#tableAnalysis").hide();
             $(document).trigger("error", "${ _('There was a problem loading the terms.') }");
           }
           self.loadingTerms(false);
         }, function (e) {
           if (e.status == 500) {
-            $("#tableAnalysis").hide();
             $(document).trigger("error", "${ _('There was a problem loading the terms.') }");
           }
           self.loadingTerms(false);