Quellcode durchsuchen

AMBARI-11519. Show properties with issues takes me to a screen with no properties shown (Richard Zang via srimanth)

Srimanth Gunturi vor 10 Jahren
Ursprung
Commit
340e7dab1f
1 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
  1. 12 0
      ambari-web/app/controllers/wizard/step7_controller.js

+ 12 - 0
ambari-web/app/controllers/wizard/step7_controller.js

@@ -1421,5 +1421,17 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
 
 
   toggleIssuesFilter: function () {
   toggleIssuesFilter: function () {
     this.get('filterColumns').findProperty('attributeName', 'hasIssues').toggleProperty('selected');
     this.get('filterColumns').findProperty('attributeName', 'hasIssues').toggleProperty('selected');
+
+    // if currently selected service does not have issue, jump to the first service with issue.
+    if (this.get('selectedService.errorCount') == 0 )
+    {
+      var errorServices = this.get('stepConfigs').filterProperty('errorCount');
+      if (errorServices.length > 0)
+      {
+        var service = errorServices[0];
+        this.set('selectedService', service);
+        $('a[href="#' + service.serviceName + '"]').tab('show');
+      }
+    }
   }
   }
 });
 });