incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-2692. Disable Show report for 0 issues. (Aleksandr Kovalenko via yusaku)
Date Tue, 23 Jul 2013 20:49:55 GMT
Updated Branches:
  refs/heads/trunk 633880b79 -> 960e23825


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


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/960e2382
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/960e2382
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/960e2382

Branch: refs/heads/trunk
Commit: 960e23825afcc0d0c03ed8f8e936c87bc3ca25fd
Parents: 633880b
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Tue Jul 23 13:49:46 2013 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Tue Jul 23 13:49:46 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step3_controller.js         | 5 ++++-
 ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/960e2382/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index ad01697..6483e7a 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/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'),

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/960e2382/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs b/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs
index 11d2de6..f84f53c 100644
--- a/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs
+++ b/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}}


Mime
View raw message