Browse Source

AMBARI-4529. Expand/contract caret icons not showing. (xiwang via yusaku)

Yusaku Sako 11 years ago
parent
commit
6d9f7e8717

+ 17 - 8
ambari-web/app/controllers/wizard/step3_controller.js

@@ -1053,7 +1053,8 @@ App.WizardStep3Controller = Em.Controller.extend({
                 type: Em.I18n.t('common.issues'),
                 emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.repositories'),
                 action: Em.I18n.t('installer.step3.hostWarningsPopup.action.invalid'),
-                category: 'repositories'
+                category: 'repositories',
+                isCollapsed: true
              }),
              Ember.Object.create({
                warnings: categoryWarnings.filterProperty('category', 'firewall'),
@@ -1062,7 +1063,8 @@ App.WizardStep3Controller = Em.Controller.extend({
                type: Em.I18n.t('common.issues'),
                emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.firewall'),
                action: Em.I18n.t('installer.step3.hostWarningsPopup.action.running'),
-               category: 'firewall'
+               category: 'firewall',
+               isCollapsed: true
              }),
              Ember.Object.create({
                warnings: categoryWarnings.filterProperty('category', 'processes'),
@@ -1071,7 +1073,8 @@ App.WizardStep3Controller = Em.Controller.extend({
                type: Em.I18n.t('common.process'),
                emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.processes'),
                action: Em.I18n.t('installer.step3.hostWarningsPopup.action.running'),
-               category: 'process'
+               category: 'process',
+               isCollapsed: true
              }),
              Ember.Object.create({
               warnings: categoryWarnings.filterProperty('category', 'packages'),
@@ -1080,7 +1083,8 @@ App.WizardStep3Controller = Em.Controller.extend({
               type: Em.I18n.t('common.package'),
               emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.packages'),
               action: Em.I18n.t('installer.step3.hostWarningsPopup.action.installed'),
-              category: 'package'
+              category: 'package',
+              isCollapsed: true
             }),
              Ember.Object.create({
               warnings: categoryWarnings.filterProperty('category', 'fileFolders'),
@@ -1089,7 +1093,8 @@ App.WizardStep3Controller = Em.Controller.extend({
               type: Em.I18n.t('common.path'),
               emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.filesAndFolders'),
               action: Em.I18n.t('installer.step3.hostWarningsPopup.action.exists'),
-              category: 'fileFolders'
+              category: 'fileFolders',
+              isCollapsed: true
             }),
              Ember.Object.create({
               warnings: categoryWarnings.filterProperty('category', 'services'),
@@ -1098,7 +1103,8 @@ App.WizardStep3Controller = Em.Controller.extend({
               type: Em.I18n.t('common.service'),
               emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.services'),
               action: Em.I18n.t('installer.step3.hostWarningsPopup.action.notRunning'),
-              category: 'service'
+              category: 'service',
+              isCollapsed: true
             }),
              Ember.Object.create({
               warnings: categoryWarnings.filterProperty('category', 'users'),
@@ -1107,7 +1113,8 @@ App.WizardStep3Controller = Em.Controller.extend({
               type: Em.I18n.t('common.user'),
               emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.users'),
               action: Em.I18n.t('installer.step3.hostWarningsPopup.action.exists'),
-              category: 'user'
+              category: 'user',
+              isCollapsed: true
             }),
             Ember.Object.create({
               warnings: categoryWarnings.filterProperty('category', 'misc'),
@@ -1116,7 +1123,8 @@ App.WizardStep3Controller = Em.Controller.extend({
               type: Em.I18n.t('installer.step3.hostWarningsPopup.misc.umask'),
               emptyName: Em.I18n.t('installer.step3.hostWarningsPopup.empty.misc'),
               action: Em.I18n.t('installer.step3.hostWarningsPopup.action.exists'),
-              category: 'misc'
+              category: 'misc',
+              isCollapsed: true
             })
           ]
         }.property('category', 'warningsByHost'),
@@ -1135,6 +1143,7 @@ App.WizardStep3Controller = Em.Controller.extend({
 
         onToggleBlock: function (category) {
           this.$('#' + category.context.category).toggle('blind', 500);
+          category.context.set("isCollapsed", !category.context.get("isCollapsed"));
         },
         warningsNotice: function () {
           var warnings = this.get('warnings');

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

@@ -39,14 +39,14 @@
   <div class="accordion warnings-list" id="accordion2">
     {{#each category in view.content}}
     <div class="accordion-group block">
-      <div class="accordion-heading">
+      <div class="accordion-heading" {{action onToggleBlock category}}>
         <i {{bindAttr class=":pull-left :accordion-toggle category.isCollapsed:icon-caret-right:icon-caret-down"}}></i>
         {{#if category.warnings.length}}
         <i class="pull-right accordion-toggle icon-warning-sign"></i>
         {{else}}
         <i class="pull-right accordion-toggle icon-ok"></i>
         {{/if}}
-        <a class="accordion-toggle" {{action onToggleBlock category}}>
+        <a class="accordion-toggle">
           {{category.title}} ({{category.warnings.length}})
         </a>
       </div>