Просмотр исходного кода

AMBARI-9924. Alerts popup: status tooltip doesn't appear after a few seconds (alexantonenko)

Alex Antonenko 10 лет назад
Родитель
Сommit
1475c7a953
1 измененных файлов с 10 добавлено и 3 удалено
  1. 10 3
      ambari-web/app/controllers/main/alert_definitions_controller.js

+ 10 - 3
ambari-web/app/controllers/main/alert_definitions_controller.js

@@ -196,6 +196,15 @@ App.MainAlertDefinitionsController = Em.ArrayController.extend({
           this.set('filteredContent', this.get('content'));
         }.observes('content.length'),
 
+        refreshTooltips: function () {
+          this.ensureTooltip();
+        }.observes('contents.length'),
+
+        ensureTooltip: function () {
+          Em.run.next(this, function () {
+            App.tooltip($(".timeago"));
+          });
+        },
         /**
          * Router transition to alert definition details page
          * @param event
@@ -232,9 +241,7 @@ App.MainAlertDefinitionsController = Em.ArrayController.extend({
 
         didInsertElement: function () {
           this.filter();
-          Em.run.next(this, function () {
-            App.tooltip($(".timeago"));
-          });
+          this.ensureTooltip();
         }
       })
     });