浏览代码

AMBARI-3538 Reassign Master: Some command labels links to empty host progress pop-up. (akovalenko)

Aleksandr Kovalenko 11 年之前
父节点
当前提交
d6aca0b4da

+ 8 - 0
ambari-web/app/styles/application.less

@@ -482,6 +482,14 @@ h1 {
           cursor: pointer;
         }
       }
+      .active-text{
+        a{
+          pointer-events: none;
+          text-decoration: none;
+          color: #0088cc;
+          cursor: auto;
+        }
+      }
       .retry {
         cursor: pointer;
         margin-left: 15px;

+ 4 - 3
ambari-web/app/views/main/admin/highAvailability/progress_view.js

@@ -81,7 +81,8 @@ App.HighAvailabilityProgressPageView = Em.View.extend({
     }.property('content.progress'),
 
     onStatus: function () {
-      this.set('linkClass', 'active-link');
+      var linkClass = !!this.get('content.hosts.length') ? 'active-link' : 'active-text';
+      this.set('linkClass', linkClass);
       if (this.get('content.status') === 'IN_PROGRESS') {
         this.set('icon', 'icon-cog');
         this.set('iconColor', 'text-info');
@@ -96,7 +97,7 @@ App.HighAvailabilityProgressPageView = Em.View.extend({
         this.set('iconColor', '');
         this.set('linkClass', 'not-active-link');
       }
-    }.observes('content.status'),
+    }.observes('content.status', 'content.hosts.length'),
 
     showProgressBar: function () {
       return this.get('content.status') === "IN_PROGRESS";
@@ -107,7 +108,7 @@ App.HighAvailabilityProgressPageView = Em.View.extend({
      * @param event
      */
     hostsLogPopup: function(event){
-      if(event.contexts[0].linkClass != "not-active-link"){
+      if(!!this.get('content.hosts.length')){
         var serviceName = event.contexts[0].title;
         var controller = this.get("controller");
         App.HostPopup.initPopup(serviceName, controller);