step5_controller.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. var App = require('app');
  19. var numberUtils = require('utils/number_utils');
  20. App.WizardStep5Controller = Em.Controller.extend({
  21. name: "wizardStep5Controller",
  22. /**
  23. * Step title
  24. * Custom if <code>App.ReassignMasterController</code> is used
  25. * @type {string}
  26. */
  27. title: function () {
  28. if (this.get('content.controllerName') == 'reassignMasterController') {
  29. return Em.I18n.t('installer.step5.reassign.header');
  30. }
  31. return Em.I18n.t('installer.step5.header');
  32. }.property('content.controllerName'),
  33. /**
  34. * Is ReassignWizard used
  35. * @type {bool}
  36. */
  37. isReassignWizard: function () {
  38. return this.get('content.controllerName') == 'reassignMasterController';
  39. }.property('content.controllerName'),
  40. /**
  41. * Is AddServiceWizard used
  42. * @type {bool}
  43. */
  44. isAddServiceWizard: function () {
  45. return this.get('content.controllerName') == 'addServiceController';
  46. }.property('content.controllerName'),
  47. /**
  48. * Is Hive reassigning
  49. * @type {bool}
  50. */
  51. isReassignHive: function () {
  52. return this.get('servicesMasters').objectAt(0) && this.get('servicesMasters').objectAt(0).component_name == 'HIVE_SERVER' && this.get('isReassignWizard');
  53. }.property('isReassignWizard', 'servicesMasters'),
  54. /**
  55. * Master components which could be assigned to multiple hosts
  56. * @type {string[]}
  57. */
  58. multipleComponents: ['ZOOKEEPER_SERVER', 'HBASE_MASTER'],
  59. /**
  60. * Define state for submit button. Return true only for Reassign Master Wizard and if more than one master component was reassigned.
  61. * @type {bool}
  62. */
  63. isSubmitDisabled: function () {
  64. if (!this.get('isReassignWizard')) {
  65. return false;
  66. }
  67. var reassigned = 0;
  68. var arr1 = App.HostComponent.find().filterProperty('componentName', this.get('content.reassign.component_name')).mapProperty('host.hostName');
  69. var arr2 = this.get('servicesMasters').mapProperty('selectedHost');
  70. arr1.forEach(function (host) {
  71. if (!arr2.contains(host)) {
  72. reassigned++;
  73. }
  74. }, this);
  75. return reassigned !== 1;
  76. }.property('servicesMasters.@each.selectedHost'),
  77. /**
  78. * List of hosts
  79. * @type {Array}
  80. */
  81. hosts: [],
  82. /**
  83. * @type {Object|null}
  84. */
  85. componentToRebalance: null,
  86. /**
  87. * @type {number}
  88. */
  89. rebalanceComponentHostsCounter: 0,
  90. /**
  91. * @type {Ember.Enumerable}
  92. */
  93. servicesMasters: [],
  94. /**
  95. * @type {Ember.Enumerable}
  96. */
  97. selectedServicesMasters: [],
  98. /**
  99. * Check if HIVE_SERVER component exist (also checks if this is not reassign)
  100. * @type {bool}
  101. */
  102. hasHiveServer: function () {
  103. return this.get('selectedServicesMasters').someProperty('component_name', 'HIVE_SERVER') && !this.get('isReassignWizard');
  104. }.property('selectedServicesMasters'),
  105. /**
  106. * List of host with assigned masters
  107. * Format:
  108. * <code>
  109. * [
  110. * {
  111. * host_name: '',
  112. * hostInfo: {},
  113. * masterServices: []
  114. * },
  115. * ....
  116. * ]
  117. * </code>
  118. * @type {Ember.Enumerable}
  119. */
  120. masterHostMapping: function () {
  121. var mapping = [], mappingObject, mappedHosts, hostObj;
  122. //get the unique assigned hosts and find the master services assigned to them
  123. mappedHosts = this.get("selectedServicesMasters").mapProperty("selectedHost").uniq();
  124. mappedHosts.forEach(function (item) {
  125. hostObj = this.get("hosts").findProperty("host_name", item);
  126. mappingObject = Em.Object.create({
  127. host_name: item,
  128. hostInfo: hostObj.host_info,
  129. masterServices: this.get("selectedServicesMasters").filterProperty("selectedHost", item)
  130. });
  131. mapping.pushObject(mappingObject);
  132. }, this);
  133. return mapping.sortProperty('host_name');
  134. }.property("selectedServicesMasters.@each.selectedHost"),
  135. /**
  136. * Count of hosts without masters
  137. * @type {number}
  138. */
  139. remainingHosts: function () {
  140. return (this.get("hosts.length") - this.get("masterHostMapping.length"));
  141. }.property("selectedServicesMasters.@each.selectedHost"),
  142. /**
  143. * Clear controller data (hosts, masters etc)
  144. * @method clearStep
  145. */
  146. clearStep: function () {
  147. this.set('hosts', []);
  148. this.set('selectedServicesMasters', []);
  149. this.set('servicesMasters', []);
  150. },
  151. /**
  152. * Load controller data (hosts, host components etc)
  153. * @method loadStep
  154. */
  155. loadStep: function () {
  156. console.log("WizardStep5Controller: Loading step5: Assign Masters");
  157. this.clearStep();
  158. this.renderHostInfo();
  159. this.renderComponents(this.loadComponents());
  160. this.updateComponent('ZOOKEEPER_SERVER');
  161. if (App.supports.multipleHBaseMasters) {
  162. this.updateComponent('HBASE_MASTER');
  163. }
  164. if (!this.get("selectedServicesMasters").filterProperty('isInstalled', false).length) {
  165. console.log('no master components to add');
  166. App.router.send('next');
  167. }
  168. },
  169. /**
  170. * Used to set showAddControl flag for ZOOKEEPER_SERVER and HBASE_SERVER
  171. * @method updateComponent
  172. */
  173. updateComponent: function (componentName) {
  174. var component = this.last(componentName);
  175. if(!component) {
  176. return;
  177. }
  178. var services = this.get('content.services').filterProperty('isInstalled', true).mapProperty('serviceName');
  179. var currentService = componentName.split('_')[0];
  180. var showControl = !services.contains(currentService);
  181. if (showControl) {
  182. if (this.get("selectedServicesMasters").filterProperty("component_name", componentName).length < this.get("hosts.length") && !this.get('isReassignWizard')) {
  183. component.set('showAddControl', true);
  184. } else {
  185. component.set('showRemoveControl', false);
  186. }
  187. }
  188. },
  189. /**
  190. * Load active host list to <code>hosts</code> variable
  191. * @method renderHostInfo
  192. */
  193. renderHostInfo: function () {
  194. var hostInfo = this.get('content.hosts');
  195. var result = [];
  196. for (var index in hostInfo) {
  197. var _host = hostInfo[index];
  198. if (_host.bootStatus === 'REGISTERED') {
  199. result.push(Em.Object.create({
  200. host_name: _host.name,
  201. cpu: _host.cpu,
  202. memory: _host.memory,
  203. disk_info: _host.disk_info,
  204. host_info: Em.I18n.t('installer.step5.hostInfo').fmt(_host.name, numberUtils.bytesToSize(_host.memory, 1, 'parseFloat', 1024), _host.cpu)
  205. }));
  206. }
  207. }
  208. this.set("hosts", result);
  209. this.sortHosts(this.get('hosts'));
  210. },
  211. /**
  212. * Sort list of host-objects by properties (memory - desc, cpu - desc, hostname - asc)
  213. * @param {object[]} hosts
  214. */
  215. sortHosts: function (hosts) {
  216. hosts.sort(function (a, b) {
  217. if (a.get('memory') == b.get('memory')) {
  218. if (a.get('cpu') == b.get('cpu')) {
  219. return a.get('host_name').localeCompare(b.get('host_name')); // hostname asc
  220. }
  221. return b.get('cpu') - a.get('cpu'); // cores desc
  222. }
  223. return b.get('memory') - a.get('memory'); // ram desc
  224. });
  225. },
  226. /**
  227. * Load services info to appropriate variable and return masterComponentHosts
  228. * @return {Object[]}
  229. */
  230. loadComponents: function () {
  231. var services = this.get('content.services').filterProperty('isSelected', true).mapProperty('serviceName'); //list of shown services
  232. var masterComponents = App.StackServiceComponent.find().filterProperty('isShownOnInstallerAssignMasterPage', true); //get full list from mock data
  233. var masterHosts = this.get('content.masterComponentHosts'); //saved to local storage info
  234. var resultComponents = [];
  235. var servicesLength = services.length;
  236. for (var index = 0; index < servicesLength; index++) {
  237. var componentInfo = masterComponents.filterProperty('serviceName', services[index]);
  238. componentInfo.forEach(function (_componentInfo) {
  239. if (_componentInfo.get('componentName') == 'ZOOKEEPER_SERVER' || _componentInfo.get('componentName') == 'HBASE_MASTER') {
  240. var savedComponents = masterHosts.filterProperty('component', _componentInfo.get('componentName'));
  241. if (savedComponents.length) {
  242. savedComponents.forEach(function (item) {
  243. var multipleMasterHost = {};
  244. multipleMasterHost.display_name = _componentInfo.get('displayName');
  245. multipleMasterHost.component_name = _componentInfo.get('componentName');
  246. multipleMasterHost.selectedHost = item.hostName;
  247. multipleMasterHost.serviceId = services[index];
  248. multipleMasterHost.isInstalled = item.isInstalled;
  249. multipleMasterHost.isHiveCoHost = false;
  250. resultComponents.push(multipleMasterHost);
  251. })
  252. } else {
  253. var zooHosts = this.selectHost(_componentInfo.get('componentName'));
  254. zooHosts.forEach(function (_host) {
  255. var multipleMasterHost = {};
  256. multipleMasterHost.display_name = _componentInfo.get('displayName');
  257. multipleMasterHost.component_name = _componentInfo.get('componentName');
  258. multipleMasterHost.selectedHost = _host;
  259. multipleMasterHost.serviceId = services[index];
  260. multipleMasterHost.isInstalled = false;
  261. multipleMasterHost.isHiveCoHost = false;
  262. resultComponents.push(multipleMasterHost);
  263. });
  264. }
  265. } else {
  266. var savedComponent = masterHosts.findProperty('component', _componentInfo.get('componentName'));
  267. var componentObj = {};
  268. componentObj.component_name = _componentInfo.get('componentName');
  269. componentObj.display_name = _componentInfo.get('displayName');
  270. componentObj.selectedHost = savedComponent ? savedComponent.hostName : this.selectHost(_componentInfo.get('componentName')); // call the method that plays selectNode algorithm or fetches from server
  271. componentObj.isInstalled = savedComponent ? savedComponent.isInstalled : false;
  272. componentObj.serviceId = services[index];
  273. componentObj.isHiveCoHost = ['HIVE_METASTORE', 'WEBHCAT_SERVER'].contains(_componentInfo.get('componentName')) && !this.get('isReassignWizard');
  274. resultComponents.push(componentObj);
  275. }
  276. }, this);
  277. }
  278. return resultComponents;
  279. },
  280. /**
  281. * Put master components to <code>selectedServicesMasters</code>, which will be automatically rendered in template
  282. * @param {Ember.Enumerable} masterComponents
  283. * @method renderComponents
  284. */
  285. renderComponents: function (masterComponents) {
  286. var services = this.get('content.services').filterProperty('isInstalled', true).mapProperty('serviceName'); //list of shown services
  287. var showRemoveControlZk = !services.contains('ZOOKEEPER') && masterComponents.filterProperty('component_name', 'ZOOKEEPER_SERVER').length > 1;
  288. var showRemoveControlHb = !services.contains('HBASE') && masterComponents.filterProperty('component_name', 'HBASE_MASTER').length > 1;
  289. var zid = 1, hid = 1, nid = 1, result = [], self = this;
  290. masterComponents.forEach(function (item) {
  291. if (item.component_name == 'SECONDARY_NAMENODE') {
  292. if (self.get('isAddServiceWizard')) {
  293. if (App.get('isHaEnabled')) {
  294. return;
  295. }
  296. }
  297. }
  298. var componentObj = Em.Object.create(item);
  299. console.log("TRACE: render master component name is: " + item.component_name);
  300. if (item.component_name === "ZOOKEEPER_SERVER") {
  301. componentObj.set('zId', zid++);
  302. componentObj.set("showRemoveControl", showRemoveControlZk);
  303. }
  304. else {
  305. if (App.supports.multipleHBaseMasters && item.component_name === "HBASE_MASTER") {
  306. componentObj.set('zId', hid++);
  307. componentObj.set("showRemoveControl", showRemoveControlHb);
  308. }
  309. else {
  310. if (item.component_name === "NAMENODE") {
  311. componentObj.set('zId', nid++);
  312. }
  313. }
  314. }
  315. result.push(componentObj);
  316. }, this);
  317. this.set("selectedServicesMasters", result);
  318. if (this.get('isReassignWizard')) {
  319. var components = result.filterProperty('component_name', this.get('content.reassign.component_name'));
  320. components.setEach('isInstalled', false);
  321. this.set('servicesMasters', components);
  322. }
  323. else {
  324. this.set('servicesMasters', result);
  325. }
  326. },
  327. /**
  328. * Update host for components HIVE_METASTORE and WEBHCAT_SERVER according to host with HIVE_SERVER
  329. * @method updateHiveCoHosts
  330. */
  331. updateHiveCoHosts: function () {
  332. var hiveServer = this.get('selectedServicesMasters').findProperty('component_name', 'HIVE_SERVER'),
  333. hiveMetastore = this.get('selectedServicesMasters').findProperty('component_name', 'HIVE_METASTORE'),
  334. webHCatServer = this.get('selectedServicesMasters').findProperty('component_name', 'WEBHCAT_SERVER');
  335. if (hiveServer && hiveMetastore && webHCatServer) {
  336. if (!this.get('isReassignHive') && this.get('servicesMasters').objectAt(0) && !(this.get('servicesMasters').objectAt(0).component_name == 'HIVE_METASTORE')) {
  337. hiveMetastore.set('selectedHost', hiveServer.get('selectedHost'))
  338. }
  339. webHCatServer.set('selectedHost', hiveServer.get('selectedHost'));
  340. }
  341. }.observes('selectedServicesMasters.@each.selectedHost'),
  342. /**
  343. * select and return host for component by scheme
  344. * Scheme is an object that has keys which compared to number of hosts,
  345. * if key more that number of hosts, then return value of that key.
  346. * Value is index of host in hosts array.
  347. *
  348. * @param {number} noOfHosts
  349. * @param {object} selectionScheme
  350. * @return {string}
  351. * @method getHostForComponent
  352. */
  353. getHostForComponent: function (noOfHosts, selectionScheme) {
  354. var hosts = this.get('hosts');
  355. if (hosts.length === 1 || $.isEmptyObject(selectionScheme)) {
  356. return hosts[0];
  357. } else {
  358. for (var i in selectionScheme) {
  359. if (window.isFinite(i)) {
  360. if (noOfHosts < window.parseInt(i)) {
  361. return hosts[selectionScheme[i]];
  362. }
  363. }
  364. }
  365. return hosts[selectionScheme['else']]
  366. }
  367. },
  368. /**
  369. * Get list of hostnames for ZK Server
  370. * @param {number} noOfHosts
  371. * @returns {string[]}
  372. * @method getZooKeeperServer
  373. */
  374. getZooKeeperServer: function (noOfHosts) {
  375. var hosts = this.get('hosts');
  376. if (noOfHosts < 3) {
  377. return [hosts[0].host_name];
  378. } else {
  379. return [hosts[0].host_name, hosts[1].host_name, hosts[2].host_name];
  380. }
  381. },
  382. /**
  383. * Get hostname based on number of available hosts
  384. * @param {number} noOfHosts
  385. * @returns {string}
  386. * @method getServerHost
  387. */
  388. getServerHost: function (noOfHosts) {
  389. var hostNames = this.get('hosts').mapProperty('host_name');
  390. var hostExcAmbari = hostNames.without(location.hostname);
  391. if (noOfHosts > 1) {
  392. return hostExcAmbari[0];
  393. } else {
  394. return hostNames[0];
  395. }
  396. },
  397. /**
  398. * Return hostName of masterNode for specified service
  399. * @param componentName
  400. * @return {string|string[]}
  401. * @method selectHost
  402. */
  403. selectHost: function (componentName) {
  404. var noOfHosts = this.get('hosts').length;
  405. if (componentName === 'KERBEROS_SERVER')
  406. return this.getHostForComponent(noOfHosts, {"3": 1, "6": 1, "31": 3, "else": 5}).host_name;
  407. if (componentName === 'NAMENODE')
  408. return this.getHostForComponent(noOfHosts, {"else": 0}).host_name;
  409. if (componentName === 'SECONDARY_NAMENODE')
  410. return this.getHostForComponent(noOfHosts, {"else": 1}).host_name;
  411. if (componentName === 'HBASE_MASTER')
  412. return [this.getHostForComponent(noOfHosts, {"3": 0, "6": 0, "31": 2, "else": 3}).host_name];
  413. if (componentName === 'ZOOKEEPER_SERVER')
  414. return this.getZooKeeperServer(noOfHosts);
  415. if (['JOBTRACKER', 'HISTORYSERVER', 'RESOURCEMANAGER', 'APP_TIMELINE_SERVER'].contains(componentName))
  416. return this.getHostForComponent(noOfHosts, {"3": 1, "6": 1, "31": 1, "else": 2}).host_name;
  417. if (['OOZIE_SERVER', 'FALCON_SERVER'].contains(componentName))
  418. return this.getHostForComponent(noOfHosts, {"3": 1, "6": 1, "31": 2, "else": 3}).host_name;
  419. if (['HIVE_SERVER', 'HIVE_METASTORE', 'WEBHCAT_SERVER'].contains(componentName))
  420. return this.getHostForComponent(noOfHosts, {"3": 1, "6": 1, "31": 2, "else": 4}).host_name;
  421. if (['STORM_UI_SERVER', 'DRPC_SERVER', 'STORM_REST_API', 'NIMBUS', 'GANGLIA_SERVER', 'NAGIOS_SERVER', 'HUE_SERVER'].contains(componentName))
  422. return this.getServerHost(noOfHosts);
  423. return '';
  424. },
  425. /**
  426. * On change callback for selects
  427. * @param {string} componentName
  428. * @param {string} selectedHost
  429. * @param {number} zId
  430. * @method assignHostToMaster
  431. */
  432. assignHostToMaster: function (componentName, selectedHost, zId) {
  433. if (selectedHost && componentName) {
  434. if (zId) {
  435. this.get('selectedServicesMasters').filterProperty('component_name', componentName).findProperty("zId", zId).set("selectedHost", selectedHost);
  436. } else {
  437. this.get('selectedServicesMasters').findProperty("component_name", componentName).set("selectedHost", selectedHost);
  438. }
  439. }
  440. },
  441. /**
  442. * Returns last component of selected type
  443. * @param {string} componentName
  444. * @return {Em.Object|null}
  445. * @method last
  446. */
  447. last: function (componentName) {
  448. return this.get("selectedServicesMasters").filterProperty("component_name", componentName).get("lastObject");
  449. },
  450. /**
  451. * Add new component to ZooKeeper Server and Hbase master
  452. * @param {string} componentName
  453. * @return {bool} true - added, false - not added
  454. * @method addComponent
  455. */
  456. addComponent: function (componentName) {
  457. /*
  458. * Logic: If ZooKeeper or Hbase service is selected then there can be
  459. * minimum 1 ZooKeeper or Hbase master in total, and
  460. * maximum 1 ZooKeeper or Hbase on every host
  461. */
  462. var maxNumMasters = this.get("hosts.length"),
  463. currentMasters = this.get("selectedServicesMasters").filterProperty("component_name", componentName),
  464. newMaster = null,
  465. masterHosts = null,
  466. suggestedHost = null,
  467. i = 0,
  468. lastMaster = null;
  469. if (!currentMasters.length) {
  470. console.log('ALERT: Zookeeper service was not selected');
  471. return false;
  472. }
  473. if (currentMasters.get("length") < maxNumMasters) {
  474. currentMasters.set("lastObject.showAddControl", false);
  475. currentMasters.set("lastObject.showRemoveControl", true);
  476. //create a new zookeeper based on an existing one
  477. newMaster = Em.Object.create({});
  478. lastMaster = currentMasters.get("lastObject");
  479. newMaster.set("display_name", lastMaster.get("display_name"));
  480. newMaster.set("component_name", lastMaster.get("component_name"));
  481. newMaster.set("selectedHost", lastMaster.get("selectedHost"));
  482. newMaster.set("isInstalled", false);
  483. if (currentMasters.get("length") === (maxNumMasters - 1)) {
  484. newMaster.set("showAddControl", false);
  485. } else {
  486. newMaster.set("showAddControl", true);
  487. }
  488. newMaster.set("showRemoveControl", true);
  489. //get recommended host for the new Zookeeper server
  490. masterHosts = currentMasters.mapProperty("selectedHost").uniq();
  491. for (i = 0; i < this.get("hosts.length"); i++) {
  492. if (!(masterHosts.contains(this.get("hosts")[i].get("host_name")))) {
  493. suggestedHost = this.get("hosts")[i].get("host_name");
  494. break;
  495. }
  496. }
  497. newMaster.set("selectedHost", suggestedHost);
  498. newMaster.set("zId", (currentMasters.get("lastObject.zId") + 1));
  499. this.get("selectedServicesMasters").insertAt(this.get("selectedServicesMasters").indexOf(lastMaster) + 1, newMaster);
  500. this.set('componentToRebalance', componentName);
  501. this.incrementProperty('rebalanceComponentHostsCounter');
  502. return true;
  503. }
  504. return false;//if no more zookeepers can be added
  505. },
  506. /**
  507. * Remove component from ZooKeeper server or Hbase Master
  508. * @param {string} componentName
  509. * @param {number} zId
  510. * @return {bool} true - removed, false - no
  511. * @method removeComponent
  512. */
  513. removeComponent: function (componentName, zId) {
  514. var currentMasters = this.get("selectedServicesMasters").filterProperty("component_name", componentName);
  515. //work only if the Zookeeper service is selected in previous step
  516. if (currentMasters.length <= 1) {
  517. return false;
  518. }
  519. this.get("selectedServicesMasters").removeAt(this.get("selectedServicesMasters").indexOf(currentMasters.findProperty("zId", zId)));
  520. currentMasters = this.get("selectedServicesMasters").filterProperty("component_name", componentName);
  521. if (currentMasters.get("length") < this.get("hosts.length")) {
  522. currentMasters.set("lastObject.showAddControl", true);
  523. }
  524. if (currentMasters.get("length") === 1) {
  525. currentMasters.set("lastObject.showRemoveControl", false);
  526. }
  527. this.set('componentToRebalance', componentName);
  528. this.incrementProperty('rebalanceComponentHostsCounter');
  529. return true;
  530. },
  531. /**
  532. * Submit button click handler
  533. * @metohd submit
  534. */
  535. submit: function () {
  536. if (!this.get('isSubmitDisabled')) {
  537. App.router.send('next');
  538. }
  539. }
  540. });