Quellcode durchsuchen

AMBARI-9132. Rebalance HDFS doesn't work (alexantonenko)

Alex Antonenko vor 10 Jahren
Ursprung
Commit
daea86e2e6

+ 1 - 1
ambari-web/app/controllers/main/service/item.js

@@ -378,7 +378,7 @@ App.MainServiceItemController = Em.Controller.extend({
         this.hide();
       },
       bodyClass: Ember.View.extend({
-        templateName: require('templates/common/prompt_popup'),
+        templateName: require('templates/common/modal_popups/prompt_popup'),
         text: Em.I18n.t('services.service.actions.run.rebalanceHdfsNodes.prompt'),
         didInsertElement: function () {
           App.tooltip(this.$(".prompt-input"), {

+ 1 - 1
ambari-web/app/views/main/service/item.js

@@ -132,7 +132,7 @@ App.MainServiceItemView = Em.View.extend({
         action: this.get('controller.isSeveralClients') ? '' : 'downloadClientConfigs',
         label: Em.I18n.t('services.service.actions.downloadClientConfigs'),
         cssClass: 'icon-download-alt',
-        isHidden: this.get('controller.content.clientComponents').rejectProperty('totalCount', 0).length == 0,
+        isHidden: !!this.get('controller.content.clientComponents') ? this.get('controller.content.clientComponents').rejectProperty('totalCount', 0).length == 0 : false,
         disabled: false,
         hasSubmenu: this.get('controller.isSeveralClients'),
         submenuOptions: this.get('controller.clientComponents')

+ 1 - 1
ambari-web/package.json

@@ -20,7 +20,7 @@
   "devDependencies": {
     "phantomjs": "^1.9.2",
     "mocha":"1.9.0",
-    "mocha-phantomjs": "^3.1.6",
+    "mocha-phantomjs": "~3.1.6",
     "chai":"~1.9.0",
     "sinon":"=1.7.3",
     "sinon-chai":"~2.5.0",

+ 2 - 1
ambari-web/test/views/main/service/item_test.js

@@ -417,7 +417,8 @@ describe('App.MainServiceItemView', function () {
               serviceTypes: testCase.serviceTypes,
               passiveState: 'OFF'
             }),
-            isSeveralClients: false
+            isSeveralClients: false,
+            clientComponents: []
           }),
           mastersExcludedCommands: mastersExcludedCommands,
           hasConfigTab: hasConfigTab