浏览代码

[ui] Avoid displaying service connectivity error in a popup (#2698)

Ying Chen 3 年之前
父节点
当前提交
d998f8d632

+ 5 - 1
desktop/core/src/desktop/js/jquery/plugins/jquery.notify.js

@@ -54,7 +54,11 @@ Plugin.prototype.show = function () {
   _this.options.message = _this.options.message.replace(/(<([^>]+)>)/gi, ''); // escape HTML messages
   _this.options.message = deXSS(_this.options.message); // escape XSS messages
 
-  if (/^(504|upstream connect error|Gateway Time-out)/.test(_this.options.message.trim())) {
+  if (
+    /^(504|upstream connect error|Gateway Time-out|Service connectivity error)/.test(
+      _this.options.message.trim()
+    )
+  ) {
     console.warn(_this.options.message);
     return;
   }

+ 5 - 1
desktop/core/src/desktop/static/desktop/js/jquery.notify.js

@@ -48,7 +48,11 @@
     var _this = this;
     var MARGIN = 4;
 
-    if (/^(504|upstream connect error|Gateway Time-out)/.test(_this.options.message.trim())) {
+    if (
+      /^(504|upstream connect error|Gateway Time-out|Service connectivity error)/.test(
+        _this.options.message.trim()
+      )
+    ) {
       console.warn(_this.options.message);
       return;
     }