소스 검색

AMBARI-2692. Disable Show report for 0 issues. (Aleksandr Kovalenko via yusaku)

Yusaku Sako 12 년 전
부모
커밋
960e23825a
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      ambari-web/app/controllers/wizard/step3_controller.js
  2. 2 0
      ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs

+ 4 - 1
ambari-web/app/controllers/wizard/step3_controller.js

@@ -932,8 +932,11 @@ App.WizardStep3Controller = Em.Controller.extend({
           return this.get('warningsByHost').mapProperty('name');
         }.property('warningsByHost'),
         category: 'All Hosts',
+        categoryWarnings: function () {
+          return this.get('warningsByHost').findProperty('name', this.get('category')).warnings
+        }.property('warningsByHost', 'category'),
         content: function () {
-          var categoryWarnings = this.get('warningsByHost').findProperty('name', this.get('category')).warnings;
+          var categoryWarnings = this.get('categoryWarnings');
           return [
             Ember.Object.create({
               warnings: categoryWarnings.filterProperty('category', 'processes'),

+ 2 - 0
ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs

@@ -31,11 +31,13 @@
               selectionBinding="view.category"
               }}
     </div>
+    {{#if view.categoryWarnings.length}}
     <div class="span3 offset2">
       <a href="javascript.void(0)" title="Show Details" {{action openWarningsInDialog target="view"}}
          class="task-detail-open-dialog"><i
               class="icon-external-link"></i> {{t installer.step3.hostWarningsPopup.report}}</a>
     </div>
+    {{/if}}
   </div>
   <div class="accordion warnings-list" id="accordion2">
     {{#each category in view.content}}