add_controller.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  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. App.AddHostController = Em.Controller.extend({
  20. name: 'addHostController',
  21. /**
  22. * All wizards data will be stored in this variable
  23. *
  24. * cluster - cluster name
  25. * hosts - hosts, ssh key, repo info, etc.
  26. * services - services list
  27. * hostsInfo - list of selected hosts
  28. * slaveComponentHosts, hostSlaveComponents - info about slave hosts
  29. * masterComponentHosts - info about master hosts
  30. * config??? - to be described later
  31. */
  32. content: Em.Object.create({
  33. cluster: null,
  34. hosts: null,
  35. services: null,
  36. hostsInfo: null,
  37. slaveComponentHosts: null,
  38. hostSlaveComponents: null,
  39. masterComponentHosts: null,
  40. hostToMasterComponent : null,
  41. serviceConfigProperties: null
  42. }),
  43. /**
  44. * Used for hiding back button in wizard
  45. */
  46. hideBackButton: true,
  47. isStepDisabled: [],
  48. totalSteps: 9,
  49. init: function () {
  50. this.isStepDisabled.pushObject(Ember.Object.create({
  51. step: 1,
  52. value: false
  53. }));
  54. for (var i = 2; i <= this.totalSteps; i++) {
  55. this.isStepDisabled.pushObject(Ember.Object.create({
  56. step: i,
  57. value: true
  58. }));
  59. }
  60. },
  61. setStepsEnable: function () {
  62. for (var i = 2; i <= this.totalSteps; i++) {
  63. var step = this.get('isStepDisabled').findProperty('step', i);
  64. if (i <= this.get('currentStep')) {
  65. step.set('value', false);
  66. } else {
  67. step.set('value', true);
  68. }
  69. }
  70. }.observes('currentStep'),
  71. /**
  72. * Return current step of Add Host Wizard
  73. */
  74. currentStep: function () {
  75. return App.get('router').getWizardCurrentStep('addHost');
  76. }.property(),
  77. clusters: null,
  78. /**
  79. * Set current step to new value.
  80. * Method moved from App.router.setInstallerCurrentStep
  81. * @param currentStep
  82. * @param completed
  83. */
  84. setCurrentStep: function (currentStep, completed) {
  85. App.db.setWizardCurrentStep('addHost', currentStep, completed);
  86. this.set('currentStep', currentStep);
  87. },
  88. isStep1: function () {
  89. return this.get('currentStep') == 1;
  90. }.property('currentStep'),
  91. isStep2: function () {
  92. return this.get('currentStep') == 2;
  93. }.property('currentStep'),
  94. isStep3: function () {
  95. return this.get('currentStep') == 3;
  96. }.property('currentStep'),
  97. isStep4: function () {
  98. return this.get('currentStep') == 4;
  99. }.property('currentStep'),
  100. isStep5: function () {
  101. return this.get('currentStep') == 5;
  102. }.property('currentStep'),
  103. isStep6: function () {
  104. return this.get('currentStep') == 6;
  105. }.property('currentStep'),
  106. isStep7: function () {
  107. return this.get('currentStep') == 7;
  108. }.property('currentStep'),
  109. isStep8: function () {
  110. return this.get('currentStep') == 8;
  111. }.property('currentStep'),
  112. isStep9: function () {
  113. return this.get('currentStep') == 9;
  114. }.property('currentStep'),
  115. isStep10: function () {
  116. return this.get('currentStep') == 10;
  117. }.property('currentStep'),
  118. gotoStep: function (step) {
  119. if (this.get('isStepDisabled').findProperty('step', step).get('value') === false) {
  120. App.router.send('gotoStep' + step);
  121. }
  122. },
  123. gotoStep1: function () {
  124. this.gotoStep(1);
  125. },
  126. gotoStep2: function () {
  127. this.gotoStep(2);
  128. },
  129. gotoStep3: function () {
  130. this.gotoStep(3);
  131. },
  132. gotoStep4: function () {
  133. this.gotoStep(4);
  134. },
  135. gotoStep5: function () {
  136. this.gotoStep(5);
  137. },
  138. gotoStep6: function () {
  139. this.gotoStep(6);
  140. },
  141. gotoStep7: function () {
  142. this.gotoStep(7);
  143. },
  144. gotoStep8: function () {
  145. this.gotoStep(8);
  146. },
  147. gotoStep9: function () {
  148. this.gotoStep(9);
  149. },
  150. gotoStep10: function () {
  151. this.gotoStep(10);
  152. },
  153. /**
  154. * Load clusterInfo(step1) to model
  155. */
  156. loadClusterInfo: function(){
  157. var cStatus = App.db.getClusterStatus() || {status: "", isCompleted: false};
  158. var cluster = {
  159. name: App.db.getClusterName() || "",
  160. status: cStatus.status,
  161. isCompleted: cStatus.isCompleted
  162. };
  163. this.set('content.cluster', cluster);
  164. console.log("AddHostController:loadClusterInfo: loaded data ", cluster);
  165. },
  166. /**
  167. * Save all info about claster to model
  168. * @param stepController Step1WizardController
  169. */
  170. saveClusterInfo: function (stepController) {
  171. var cluster = stepController.get('content.cluster');
  172. var clusterStatus = {
  173. status: cluster.status,
  174. isCompleted: cluster.isCompleted
  175. }
  176. App.db.setClusterName(cluster.name);
  177. App.db.setClusterStatus(clusterStatus);
  178. console.log("AddHostController:saveClusterInfo: saved data ", cluster);
  179. //probably next line is extra work - need to check it
  180. this.set('content.cluster', cluster);
  181. },
  182. /**
  183. * save status of the cluster. This is called from step8 and step9 to persist install and start requestId
  184. * @param clusterStatus object with status, isCompleted, requestId, isInstallError and isStartError field.
  185. */
  186. saveClusterStatus: function (clusterStatus) {
  187. this.set('content.cluster', clusterStatus);
  188. App.db.setClusterStatus(clusterStatus);
  189. },
  190. /**
  191. * Temporary function for wizardStep9, before back-end integration
  192. */
  193. setInfoForStep9: function () {
  194. var hostInfo = App.db.getHosts();
  195. for (var index in hostInfo) {
  196. hostInfo[index].status = "pending";
  197. hostInfo[index].message = 'Waiting';
  198. hostInfo[index].progress = '0';
  199. }
  200. App.db.setHosts(hostInfo);
  201. },
  202. /**
  203. * Load all data for <code>Specify Host(install step2)</code> step
  204. * Data Example:
  205. * {
  206. * hostNames: '',
  207. * manualInstall: false,
  208. * sshKey: '',
  209. * passphrase: '',
  210. * confirmPassphrase: '',
  211. * localRepo: false,
  212. * localRepoPath: ''
  213. * }
  214. */
  215. loadInstallOptions: function () {
  216. if (!this.content.hosts) {
  217. this.content.hosts = Em.Object.create();
  218. }
  219. var hostsInfo = Em.Object.create();
  220. hostsInfo.oldHostNames = App.Host.find().getEach('id').join(" <br/>");
  221. hostsInfo.hostNames = App.db.getAllHostNames() || ''; //empty string if undefined
  222. var installType = App.db.getInstallType();
  223. //false if installType not equals 'manual'
  224. hostsInfo.manualInstall = installType && installType.installType === 'manual' || false;
  225. var softRepo = App.db.getSoftRepo();
  226. if (softRepo && softRepo.repoType === 'local') {
  227. hostsInfo.localRepo = true;
  228. hostsInfo.localRepopath = softRepo.repoPath;
  229. } else {
  230. hostsInfo.localRepo = false;
  231. hostsInfo.localRepoPath = '';
  232. }
  233. hostsInfo.sshKey = '';
  234. hostsInfo.passphrase = '';
  235. hostsInfo.confirmPassphrase = '';
  236. this.set('content.hosts', hostsInfo);
  237. console.log("AddHostController:loadHosts: loaded data ", hostsInfo);
  238. },
  239. /**
  240. * Save data, which user filled, to main controller
  241. * @param stepController App.WizardStep2Controller
  242. */
  243. saveHosts: function (stepController) {
  244. //TODO: put data to content.hosts and only then save it)
  245. //App.db.setBootStatus(false);
  246. App.db.setAllHostNames(stepController.get('hostNames'));
  247. App.db.setHosts(stepController.getHostInfo());
  248. if (stepController.get('manualInstall') === false) {
  249. App.db.setInstallType({installType: 'ambari' });
  250. } else {
  251. App.db.setInstallType({installType: 'manual' });
  252. }
  253. if (stepController.get('localRepo') === false) {
  254. App.db.setSoftRepo({ 'repoType': 'remote', 'repoPath': null});
  255. } else {
  256. App.db.setSoftRepo({ 'repoType': 'local', 'repoPath': stepController.get('localRepoPath') });
  257. }
  258. },
  259. /**
  260. * Remove host from model. Used at <code>Confirm hosts(step2)</code> step
  261. * @param hosts Array of hosts, which we want to delete
  262. */
  263. removeHosts: function (hosts) {
  264. //todo Replace this code with real logic
  265. App.db.removeHosts(hosts);
  266. },
  267. /**
  268. * Save data, which user filled, to main controller
  269. * @param stepController App.WizardStep3Controller
  270. */
  271. saveConfirmedHosts: function (stepController) {
  272. var hostInfo = {};
  273. stepController.get('content.hostsInfo').forEach(function (_host) {
  274. hostInfo[_host.name] = {
  275. name: _host.name,
  276. cpu: _host.cpu,
  277. memory: _host.memory,
  278. bootStatus: _host.bootStatus
  279. };
  280. });
  281. console.log('addHostController:saveConfirmedHosts: save hosts ', hostInfo);
  282. App.db.setHosts(hostInfo);
  283. this.set('content.hostsInfo', hostInfo);
  284. },
  285. /**
  286. * Load confirmed hosts.
  287. * Will be used at <code>Assign Masters(step5)</code> step
  288. */
  289. loadConfirmedHosts: function(){
  290. this.set('content.hostsInfo', App.db.getHosts());
  291. },
  292. /**
  293. * Save data after installation to main controller
  294. * @param stepController App.WizardStep9Controller
  295. */
  296. saveInstalledHosts: function (stepController) {
  297. var hosts = stepController.get('hosts');
  298. var hostInfo = App.db.getHosts();
  299. for (var index in hostInfo) {
  300. hostInfo[index].status = "pending";
  301. var host = hosts.findProperty('name', hostInfo[index].name);
  302. if (host) {
  303. hostInfo[index].status = host.status;
  304. hostInfo[index].message = host.message;
  305. hostInfo[index].progress = host.progress;
  306. }
  307. }
  308. App.db.setHosts(hostInfo);
  309. console.log('addHostController:saveInstalledHosts: save hosts ', hostInfo);
  310. },
  311. /**
  312. * Remove all data for hosts
  313. */
  314. clearHosts: function () {
  315. var hosts = this.get('content').get('hosts');
  316. if (hosts) {
  317. hosts.hostNames = '';
  318. hosts.manualInstall = false;
  319. hosts.localRepo = '';
  320. hosts.localRepopath = '';
  321. hosts.sshKey = '';
  322. hosts.passphrase = '';
  323. hosts.confirmPassphrase = '';
  324. }
  325. },
  326. /**
  327. * Load services data. Will be used at <code>Select services(step4)</code> step
  328. */
  329. loadServices: function () {
  330. var servicesInfo = App.db.getService();
  331. servicesInfo.forEach(function (item, index) {
  332. servicesInfo[index] = Em.Object.create(item);
  333. });
  334. this.set('content.services', servicesInfo);
  335. console.log('addHostController.loadServices: loaded data ', servicesInfo);
  336. console.log('selected services ', servicesInfo.filterProperty('isSelected', true).mapProperty('serviceName'));
  337. },
  338. /**
  339. * Save data to model
  340. * @param stepController App.WizardStep4Controller
  341. */
  342. saveServices: function (stepController) {
  343. var serviceNames = [];
  344. // we can also do it without stepController since all data,
  345. // changed at page, automatically changes in model(this.content.services)
  346. App.db.setService(stepController.get('content'));
  347. stepController.filterProperty('isSelected', true).forEach(function (item) {
  348. serviceNames.push(item.serviceName);
  349. });
  350. App.db.setSelectedServiceNames(serviceNames);
  351. console.log('addHostController.saveServices: saved data ', serviceNames);
  352. },
  353. /**
  354. * Save Master Component Hosts data to Main Controller
  355. * @param stepController App.WizardStep5Controller
  356. */
  357. saveMasterComponentHosts: function (stepController) {
  358. var obj = stepController.get('selectedServicesMasters');
  359. var masterComponentHosts = [];
  360. obj.forEach(function (_component) {
  361. masterComponentHosts.push({
  362. display_name: _component.display_name,
  363. component: _component.component_name,
  364. hostName: _component.selectedHost
  365. });
  366. });
  367. console.log("AddHostController.saveComponentHosts: saved hosts ", masterComponentHosts);
  368. App.db.setMasterComponentHosts(masterComponentHosts);
  369. this.set('content.masterComponentHosts', masterComponentHosts);
  370. var hosts = masterComponentHosts.mapProperty('hostName').uniq();
  371. var hostsMasterServicesMapping = [];
  372. hosts.forEach(function (_host) {
  373. var componentsOnHost = masterComponentHosts.filterProperty('hostName', _host).mapProperty('component');
  374. hostsMasterServicesMapping.push({
  375. hostname: _host,
  376. components: componentsOnHost
  377. });
  378. }, this);
  379. console.log("AddHostController.setHostToMasterComponent: saved hosts ", hostsMasterServicesMapping);
  380. App.db.setHostToMasterComponent(hostsMasterServicesMapping);
  381. this.set('content.hostToMasterComponent', hostsMasterServicesMapping);
  382. },
  383. /**
  384. * Load master component hosts data for using in required step controllers
  385. */
  386. loadMasterComponentHosts: function () {
  387. var masterComponentHosts = App.db.getMasterComponentHosts();
  388. this.set("content.masterComponentHosts", masterComponentHosts);
  389. console.log("AddHostController.loadMasterComponentHosts: loaded hosts ", masterComponentHosts);
  390. var hostsMasterServicesMapping = App.db.getHostToMasterComponent();
  391. this.set("content.hostToMasterComponent", hostsMasterServicesMapping);
  392. console.log("AddHostController.loadHostToMasterComponent: loaded hosts ", hostsMasterServicesMapping);
  393. },
  394. /**
  395. * Save slaveHostComponents to main controller
  396. * @param stepController
  397. */
  398. saveSlaveComponentHosts: function (stepController) {
  399. var hosts = stepController.get('hosts');
  400. var isMrSelected = stepController.get('isMrSelected');
  401. var isHbSelected = stepController.get('isHbSelected');
  402. App.db.setHostSlaveComponents(hosts);
  403. this.set('content.hostSlaveComponents', hosts);
  404. var dataNodeHosts = [];
  405. var taskTrackerHosts = [];
  406. var regionServerHosts = [];
  407. var clientHosts = [];
  408. hosts.forEach(function (host) {
  409. if (host.get('isDataNode')) {
  410. dataNodeHosts.push({
  411. hostname: host.hostname,
  412. group: 'Default'
  413. });
  414. }
  415. if (isMrSelected && host.get('isTaskTracker')) {
  416. taskTrackerHosts.push({
  417. hostname: host.hostname,
  418. group: 'Default'
  419. });
  420. }
  421. if (isHbSelected && host.get('isRegionServer')) {
  422. regionServerHosts.push({
  423. hostname: host.hostname,
  424. group: 'Default'
  425. });
  426. }
  427. if (host.get('isClient')) {
  428. clientHosts.pushObject({
  429. hostname: host.hostname,
  430. group: 'Default'
  431. });
  432. }
  433. }, this);
  434. var slaveComponentHosts = [];
  435. slaveComponentHosts.push({
  436. componentName: 'DATANODE',
  437. displayName: 'DataNode',
  438. hosts: dataNodeHosts
  439. });
  440. if (isMrSelected) {
  441. slaveComponentHosts.push({
  442. componentName: 'TASKTRACKER',
  443. displayName: 'TaskTracker',
  444. hosts: taskTrackerHosts
  445. });
  446. }
  447. if (isHbSelected) {
  448. slaveComponentHosts.push({
  449. componentName: 'HBASE_REGIONSERVER',
  450. displayName: 'RegionServer',
  451. hosts: regionServerHosts
  452. });
  453. }
  454. slaveComponentHosts.pushObject({
  455. componentName: 'CLIENT',
  456. displayName: 'client',
  457. hosts: clientHosts
  458. });
  459. App.db.setSlaveComponentHosts(slaveComponentHosts);
  460. this.set('content.slaveComponentHosts', slaveComponentHosts);
  461. },
  462. /**
  463. * Load master component hosts data for using in required step controllers
  464. */
  465. loadSlaveComponentHosts: function () {
  466. var slaveComponentHosts = App.db.getSlaveComponentHosts();
  467. this.set("content.slaveComponentHosts", slaveComponentHosts);
  468. console.log("AddHostController.loadSlaveComponentHosts: loaded hosts ", slaveComponentHosts);
  469. var hostSlaveComponents = App.db.getHostSlaveComponents();
  470. this.set('content.hostSlaveComponents', hostSlaveComponents);
  471. console.log("AddHostController.loadSlaveComponentHosts: loaded hosts ", hostSlaveComponents);
  472. },
  473. /**
  474. * Save config properties
  475. * @param stepController Step7WizardController
  476. */
  477. saveServiceConfigProperties: function (stepController) {
  478. var serviceConfigProperties = [];
  479. stepController.get('stepConfigs').forEach(function (_content) {
  480. _content.get('configs').forEach(function (_configProperties) {
  481. var configProperty = {
  482. name: _configProperties.get('name'),
  483. value: _configProperties.get('value')
  484. };
  485. serviceConfigProperties.push(configProperty);
  486. }, this);
  487. }, this);
  488. App.db.setServiceConfigProperties(serviceConfigProperties);
  489. this.set('content.serviceConfigProperties', serviceConfigProperties);
  490. },
  491. /**
  492. * Load serviceConfigProperties to model
  493. */
  494. loadServiceConfigProperties: function () {
  495. var serviceConfigProperties = App.db.getServiceConfigProperties();
  496. this.set('content.serviceConfigProperties', serviceConfigProperties);
  497. console.log("AddHostController.loadServiceConfigProperties: loaded config ", serviceConfigProperties);
  498. },
  499. /**
  500. * Load information about hosts with clients components
  501. */
  502. loadClients: function(){
  503. var clients = App.db.getClientsForSelectedServices();
  504. this.set('content.clients', clients);
  505. console.log("AddHostController.loadClients: loaded list ", clients);
  506. },
  507. /**
  508. * Generate clients list for selected services and save it to model
  509. * @param stepController step4WizardController
  510. */
  511. saveClients: function(stepController){
  512. var clients = [];
  513. var serviceComponents = require('data/service_components');
  514. stepController.get('content').filterProperty('isSelected',true).forEach(function (_service) {
  515. var client = serviceComponents.filterProperty('service_name', _service.serviceName).findProperty('isClient', true);
  516. if (client) {
  517. clients.pushObject({
  518. component_name: client.component_name,
  519. display_name: client.display_name
  520. });
  521. }
  522. }, this);
  523. App.db.setClientsForSelectedServices(clients);
  524. this.set('content.clients', clients);
  525. console.log("AddHostController.saveClients: saved list ", clients);
  526. },
  527. /**
  528. * Load HostToMasterComponent array
  529. */
  530. loadHostToMasterComponent: function(){
  531. var list = App.db.getHostToMasterComponent();
  532. this.set('content.hostToMasterComponent', list);
  533. console.log("AddHostController.loadHostToMasterComponent: loaded list ", list);
  534. },
  535. /**
  536. * Load data for all steps until <code>current step</code>
  537. */
  538. loadAllPriorSteps: function () {
  539. var step = this.get('currentStep');
  540. switch (step) {
  541. case '8':
  542. case '7':
  543. case '6':
  544. this.loadServiceConfigProperties();
  545. case '5':
  546. this.loadClients();
  547. case '4':
  548. this.loadMasterComponentHosts();
  549. this.loadSlaveComponentHosts();
  550. this.loadHostToMasterComponent();
  551. this.loadConfirmedHosts();
  552. case '3':
  553. this.loadClients();
  554. this.loadServices();
  555. case '2':
  556. this.loadConfirmedHosts();
  557. case '1':
  558. this.loadInstallOptions();
  559. case '0':
  560. this.loadClusterInfo();
  561. }
  562. },
  563. /**
  564. * Generate clients list for selected services and save it to model
  565. * @param stepController step8WizardController or step9WizardController
  566. */
  567. installServices: function () {
  568. var self = this;
  569. var clusterName = this.get('content.cluster.name');
  570. var url = '/api/clusters/' + clusterName + '/services?state=INIT';
  571. var data = '{"ServiceInfo": {"state": "INSTALLED"}}';
  572. $.ajax({
  573. type: 'PUT',
  574. url: url,
  575. data: data,
  576. async: false,
  577. dataType: 'text',
  578. timeout: 5000,
  579. success: function (data) {
  580. var jsonData = jQuery.parseJSON(data);
  581. console.log("TRACE: STep8 -> In success function for the installService call");
  582. console.log("TRACE: STep8 -> value of the url is: " + url);
  583. if (jsonData) {
  584. var requestId = jsonData.href.match(/.*\/(.*)$/)[1];
  585. console.log('requestId is: ' + requestId);
  586. var clusterStatus = {
  587. status: 'PENDING',
  588. requestId: requestId,
  589. isInstallError: false,
  590. isCompleted: false
  591. };
  592. self.saveClusterStatus(clusterStatus);
  593. } else {
  594. console.log('ERROR: Error occurred in parsing JSON data');
  595. }
  596. },
  597. error: function (request, ajaxOptions, error) {
  598. console.log("TRACE: STep8 -> In error function for the installService call");
  599. console.log("TRACE: STep8 -> value of the url is: " + url);
  600. console.log("TRACE: STep8 -> error code status is: " + request.status);
  601. console.log('Step8: Error message is: ' + request.responseText);
  602. var clusterStatus = {
  603. status: 'PENDING',
  604. isInstallError: true,
  605. isCompleted: false
  606. };
  607. self.saveClusterStatus(clusterStatus);
  608. },
  609. statusCode: require('data/statusCodes')
  610. });
  611. },
  612. /**
  613. * Remove all loaded data.
  614. * Created as copy for App.router.clearAllSteps
  615. */
  616. clearAllSteps: function () {
  617. this.clearHosts();
  618. //todo it)
  619. }
  620. });