Ver Fonte

HUE-6512 [frontend] If Hue is down, infinite loop on non page refresh when doing an action

Enrico Berti há 8 anos atrás
pai
commit
3be5bd7
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      desktop/core/src/desktop/templates/hue.mako

+ 6 - 1
desktop/core/src/desktop/templates/hue.mako

@@ -795,7 +795,12 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
               },
               error: function (xhr) {
                 console.error('Route loading problem', xhr);
-                self.loadApp('500');
+                if (app !== '500'){
+                  self.loadApp('500');
+                }
+                else {
+                  $.jHueNotify.error("${ _('It looks like you are offline or an unknown error happened. Please refresh the page.') }")
+                }
               }
             });
           } else {