ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject [1/2] ambari git commit: AMBARI-9118 Merge "Admin > Stack and Upgrade" and "Admin > Versions" pages. (atkach)
Date Wed, 14 Jan 2015 12:15:18 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b0a345635 -> c59df55e5


http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/app/views/main/admin/stack_versions/repo_version_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_versions/repo_version_view.js b/ambari-web/app/views/main/admin/stack_versions/repo_version_view.js
deleted file mode 100644
index 17a74f2..0000000
--- a/ambari-web/app/views/main/admin/stack_versions/repo_version_view.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/** Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-var filters = require('views/common/filter_view');
-var sort = require('views/common/sort_view');
-
-App.RepoVersionsView = App.TableView.extend({
-  templateName: require('templates/main/admin/stack_versions/repo_versions'),
-
-  content: function () {
-    return this.get('controller.content');
-  }.property('controller.content'),
-
-  /**
-   * return filtered number of all content number information displayed on the page footer bar
-   * @returns {String}
-   */
-  filteredContentInfo: function () {
-    return this.t('tableView.filters.filteredConfigVersionInfo').format(this.get('filteredCount'), this.get('content.length'));
-  }.property('filteredCount', 'content.length'),
-
-  /**
-   * associations between stack version property and column index
-   * @type {Array}
-   */
-  colPropAssoc: function () {
-    var associations = [];
-    associations[1] = 'displayName';
-    associations[2] = 'operatingSystems';
-    return associations;
-  }.property(),
-
-  sortView: sort.wrapperView,
-  repoVersionSort: sort.fieldView.extend({
-    column: 1,
-    name: 'displayName',
-    displayName: Em.I18n.t('admin.stackVersions.table.header.version'),
-    type: 'version',
-    classNames: ['first']
-  }),
-  osSort: sort.fieldView.extend({
-    column: 2,
-    name: 'operatingSystems.length',
-    displayName: Em.I18n.t('admin.stackVersions.table.header.os'),
-    type: 'number'
-  }),
-
-  repoVersionFilterView: filters.createTextView({
-    column: 1,
-    fieldType: 'filter-input-width',
-    onChangeValue: function () {
-      this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string');
-    }
-  }),
-
-  osFilterView: filters.createSelectView({
-    column: 2,
-    fieldType: 'filter-input-width',
-    content: function () {
-      var names = App.OS.find().mapProperty('osType').uniq();
-      return [
-        {
-          value: '',
-          label: Em.I18n.t('common.all')
-        }
-      ].concat(names.map(function (name) {
-          return {
-            value: name,
-            label: name
-          }
-        }));
-    }.property('App.router.mainStackVersionsController.dataIsLoaded'),
-    onChangeValue: function () {
-      this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'os');
-    }
-  }),
-
-  didInsertElement: function() {
-    this.get('controller').load();
-  },
-
-  RepositoryVersionView: Em.View.extend({
-    tagName: 'tr'
-  })
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/app/views/main/admin/stack_versions/stack_version_details_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_versions/stack_version_details_view.js b/ambari-web/app/views/main/admin/stack_versions/stack_version_details_view.js
deleted file mode 100644
index 9d7ce66..0000000
--- a/ambari-web/app/views/main/admin/stack_versions/stack_version_details_view.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.MainStackVersionsDetailsView = Em.View.extend({
-
-  templateName: require('templates/main/admin/stack_versions/stack_version_details'),
-
-  content: function() {
-    return this.get('controller.content');
-  }.property('controller.content'),
-
-  /**
-   * message on install button depending on status
-   * <code>INSTALL_FAILED<code>/INIT
-   * @type {String}
-   */
-  installButtonMsg: function() {
-    return this.get('content.stackVersion.state') == 'INSTALL_FAILED'
-      ? Em.I18n.t('admin.stackVersions.details.hosts.btn.reinstall')
-      : Em.I18n.t('admin.stackVersions.details.hosts.btn.install').format(this.get('controller.hostsToInstall'));
-  }.property('content.stackVersion.state', 'parentView.content.stackVersion.initHosts.length'),
-
-  /**
-   * class on install button depending on status
-   * <code>INSTALL_FAILED<code>/INIT
-   * @type {String}
-   */
-  installButtonClass: function() {
-    return this.get('content.stackVersion.state') == 'INSTALL_FAILED' ? 'btn-danger' : 'btn-success';
-  }.property('content.stackVersion.state'),
-
-  /**
-   * property is used as width for progres bar
-   * @type {String}
-   */
-  progress: function() {
-    return "width:" + this.get('controller.progress') + "%";
-  }.property('controller.progress'),
-
-  /**
-   * hosts with stack versions in not installed state
-   * when stack version for repoversion is not created returns all hosts in cluster
-   */
-  notInstalledHosts: function() {
-    return this.get('content.stackVersion') ? this.get('content.stackVersion.notInstalledHosts') : App.get('allHostNames');
-  }.property('content.stackVersion.notInstalledHosts.length', 'App.allHostNames'),
-
-  /**
-   * hosts with stack versions in installed state
-   * when stack version for repoversion is not created returns an empty array
-   */
-  installedHosts: function() {
-    return this.get('content.stackVersion') ? this.get('content.stackVersion.installedHosts') : [];
-  }.property('content.stackVersion.installedHosts.length'),
-
-  /**
-   * hosts with stack versions in current state
-   * when stack version for repoversion is not created returns an empty array
-   */
-  currentHosts: function() {
-    return this.get('content.stackVersion') ? this.get('content.stackVersion.currentHosts') : [];
-  }.property('content.stackVersion.currentHosts.length'),
-
-  /**
-   * true if there are no hosts without this repoversion
-   * @type {boolean}
-   */
-  noInitHosts: function() {
-    return this.get('content.stackVersion') ? this.get('content.stackVersion.noInitHosts') : false;
-  }.property('content.stackVersion.noInitHosts'),
-
-  /**
-   * true if there are no hosts with this repoversion
-   * @type {boolean}
-   */
-  noInstalledHosts:  function() {
-    return this.get('content.stackVersion') ? this.get('content.stackVersion.noInstalledHosts') : true;
-  }.property('content.stackVersion.noInstalledHosts'),
-
-  /**
-   * true if there are no hosts with this repoversion as current
-   * @type {boolean}
-   */
-  noCurrentHosts: function() {
-    return this.get('content.stackVersion') ? this.get('content.stackVersion.noCurrentHosts') : true;
-  }.property('content.stackVersion.noCurrentHosts'),
-
-  /**
-   * map containing version (id, label)
-   * this is used as param for <code>showHosts<code> method
-   * @type {Object}
-   */
-  versionStateMap: {
-    'current': {
-      'id': 'current',
-      'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.current')
-    },
-    'installed': {
-      'id': 'installed',
-      'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.installed')
-    },
-    'not_installed': {
-      'id': 'installing',
-      'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.not_installed')
-    }
-  },
-
-  /**
-   * runs <code>showHostsListPopup<code> from <code>repoVersionsManagementController<code>
-   * to open popup with hosts that has this repo version
-   * in not_installed state
-   */
-  showNotInstalledHosts: function() {
-    App.router.get('repoVersionsManagementController').showHostsListPopup(this.get('versionStateMap.not_installed'),
-      this.get('content.repositoryVersion'), this.get('notInstalledHosts'));
-  },
-
-  /**
-   * runs <code>showHostsListPopup<code> from <code>repoVersionsManagementController<code>
-   * to open popup with hosts that has this repo version
-   * in installed state
-   */
-  showInstalledHosts: function() {
-    App.router.get('repoVersionsManagementController').showHostsListPopup(this.get('versionStateMap.installed'),
-      this.get('content.repositoryVersion'), this.get('installedHosts'));
-  },
-
-  /**
-   * runs <code>showHostsListPopup<code> from <code>repoVersionsManagementController<code>
-   * to open popup with hosts that has this repo version
-   * in current state
-   */
-  showCurrentHosts: function() {
-    App.router.get('repoVersionsManagementController').showHostsListPopup(this.get('versionStateMap.current'),
-      this.get('content.repositoryVersion'), this.get('currentHosts'));
-  },
-
-  didInsertElement: function() {
-    App.get('router.mainStackVersionsController').set('isPolling', true);
-    if (!App.RepositoryVersion.find().findProperty('id', this.get('content.id'))) {
-      App.get('router.mainStackVersionsController').load();
-    }
-    App.get('router.mainStackVersionsController').doPolling();
-    this.get('controller').doPolling();
-  },
-
-  willDestroyElement: function () {
-    App.get('router.mainStackVersionsController').set('isPolling', false);
-    clearTimeout(App.get('router.mainStackVersionsController.timeoutRef'));
-    clearTimeout(this.get('controller.timeoutRef'));
-  }
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/app/views/main/admin/stack_versions/stack_version_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_versions/stack_version_view.js b/ambari-web/app/views/main/admin/stack_versions/stack_version_view.js
deleted file mode 100644
index bee2a1b..0000000
--- a/ambari-web/app/views/main/admin/stack_versions/stack_version_view.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-var filters = require('views/common/filter_view');
-var sort = require('views/common/sort_view');
-
-App.MainStackVersionsView = App.TableView.extend({
-  templateName: require('templates/main/admin/stack_versions/stack_versions'),
-
-  content: function () {
-    return this.get('controller.content');
-  }.property('controller.content'),
-
-  /**
-   * return filtered number of all content number information displayed on the page footer bar
-   * @type {String}
-   */
-  filteredContentInfo: function () {
-    return this.t('tableView.filters.filteredConfigVersionInfo').format(this.get('filteredCount'), this.get('content.length'));
-  }.property('filteredCount', 'content.length'),
-
-  /**
-   * associations between stack version property and column index
-   * @type {Array}
-   */
-  colPropAssoc: function () {
-    var associations = [];
-    associations[1] = 'repositoryVersion.displayName';
-    associations[2] = 'repositoryVersion.operatingSystems';
-    associations[3] = 'installedHosts.length';
-    associations[4] = 'currentHosts.length';
-    return associations;
-  }.property(),
-
-  sortView: sort.wrapperView,
-  stackVersionSort: sort.fieldView.extend({
-    column: 1,
-    name: 'repositoryVersion.displayName',
-    displayName: Em.I18n.t('admin.stackVersions.table.header.version'),
-    type: 'version',
-    classNames: ['first']
-  }),
-  osSort: sort.fieldView.extend({
-    column: 2,
-    name: 'repositoryVersion.operatingSystems.length',
-    displayName: Em.I18n.t('admin.stackVersions.table.header.os'),
-    type: 'number'
-  }),
-  installedSort: sort.fieldView.extend({
-    column: 3,
-    name: 'installedHosts.length',
-    displayName: Em.I18n.t('admin.stackVersions.table.header.installed'),
-    type: "number"
-  }),
-  currentSort: sort.fieldView.extend({
-    column: 4,
-    name: 'currentHosts.length',
-    displayName: Em.I18n.t('admin.stackVersions.table.header.current'),
-    type: "number"
-  }),
-
-  stackVersionFilterView: filters.createTextView({
-    column: 1,
-    fieldType: 'filter-input-width',
-    onChangeValue: function () {
-      this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string');
-    }
-  }),
-
-  osFilterView: filters.createSelectView({
-    column: 2,
-    fieldType: 'filter-input-width',
-    content: function () {
-      var names = App.OS.find().mapProperty('osType').uniq();
-      return [
-        {
-          value: '',
-          label: Em.I18n.t('common.all')
-        }
-      ].concat(names.map(function (name) {
-          return {
-            value: name,
-            label: name
-          }
-        }));
-    }.property('App.router.mainStackVersionsController.dataIsLoaded'),
-    onChangeValue: function () {
-      this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'os');
-    }
-  }),
-
-  installedFilterView: filters.createTextView({
-    column: 3,
-    fieldType: 'filter-input-width',
-    onChangeValue: function () {
-      this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string');
-    }
-  }),
-
-  currentFilterView: filters.createTextView({
-    column: 4,
-    fieldType: 'filter-input-width',
-    onChangeValue: function () {
-      this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string');
-    }
-  }),
-
-  didInsertElement: function() {
-    this.set('controller.isPolling', true);
-    this.get('controller').load();
-    this.get('controller').doPolling();
-  },
-
-  willDestroyElement: function () {
-    this.set('controller.isPolling', false);
-    clearTimeout(this.get('controller.timeoutRef'));
-  },
-
-  StackVersionView: Em.View.extend({
-    tagName: 'tr',
-
-    versionStateMap: {
-      'current': {
-        'id': 'current',
-        'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.current')
-      },
-      'installed': {
-        'id': 'installed',
-        'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.installed')
-      },
-      'not_installed': {
-        'id': 'installing',
-        'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.not_installed')
-      }
-    },
-  })
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/app/views/main/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/menu.js b/ambari-web/app/views/main/menu.js
index 5f318da..205fe96 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -123,13 +123,6 @@ App.MainMenuView = Em.CollectionView.extend({
           url: 'stack',
           label: Em.I18n.t('admin.stackUpgrade.title')
         });
-        if (App.get('supports.stackUpgrade')) {
-          categories.push({
-            name: 'adminStackVersions.index',
-            url: 'versions',
-            label: Em.I18n.t('common.versions')
-          });
-        }
         categories.push({
           name: 'adminServiceAccounts',
           url: 'serviceAccounts',

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index 3fea58c..792adc5 100644
--- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -27,129 +27,6 @@ describe('App.MainAdminStackAndUpgradeController', function() {
     setDBProperty: Em.K
   });
 
-  describe("#services", function () {
-    before(function () {
-      sinon.stub(App.StackService, 'find').returns([
-        Em.Object.create({serviceName: 'S1', isInstalled: false}),
-        Em.Object.create({serviceName: 'S2', isInstalled: false})
-      ]);
-      sinon.stub(App.Service, 'find').returns([
-        Em.Object.create({serviceName: 'S1'})
-      ]);
-    });
-    after(function () {
-      App.StackService.find.restore();
-      App.Service.find.restore();
-    });
-    it("", function () {
-      controller.propertyDidChange('services');
-      expect(controller.get('services')).to.eql([
-        Em.Object.create({serviceName: 'S1', isInstalled: true}),
-        Em.Object.create({serviceName: 'S2', isInstalled: false})
-      ])
-    });
-  });
-
-  describe("#goToAddService()" , function() {
-    beforeEach(function() {
-      sinon.stub(App.get('router'), 'transitionTo', Em.K);
-    });
-    afterEach(function() {
-     App.get('router').transitionTo.restore();
-    });
-    it("routes to Add Service Wizard", function() {
-      controller.goToAddService({context: "serviceName"});
-      expect(App.get('router').transitionTo.calledOnce).to.be.true;
-      expect(controller.get('serviceToInstall')).to.be.equal("serviceName");
-    });
-  });
-
-  describe("#loadVersionsInfo()", function() {
-    before(function () {
-      sinon.stub(App.ajax, 'send', Em.K);
-    });
-    after(function () {
-      App.ajax.send.restore();
-    });
-    it("make ajax call", function() {
-      controller.loadVersionsInfo();
-      expect(App.ajax.send.getCall(0).args[0]).to.eql({
-        name: 'admin.stack_versions.all',
-        sender: controller,
-        data: {},
-        success: 'loadVersionsInfoSuccessCallback'
-      })
-    });
-  });
-
-  describe("#loadVersionsInfoSuccessCallback()", function() {
-    beforeEach(function(){
-      sinon.stub(controller, 'parseVersionsData', function (data) {
-        return data;
-      });
-    });
-    afterEach(function(){
-      controller.parseVersionsData.restore();
-    });
-    it("target version installed and higher than current", function() {
-      var data = [
-        {
-          "state": "CURRENT",
-          "repository_version": "2.2.0.1-885"
-        },
-        {
-          "state": "INSTALLED",
-          "repository_version": "2.2.1.1-885"
-        }
-      ];
-      controller.loadVersionsInfoSuccessCallback(data);
-      expect(controller.get('currentVersion')).to.eql({
-        "state": "CURRENT",
-        "repository_version": "2.2.0.1-885"
-      });
-      expect(controller.get('targetVersions')).to.eql([{
-        "state": "INSTALLED",
-        "repository_version": "2.2.1.1-885"
-      }]);
-    });
-    it("target version installed and lower than current", function() {
-      var data = [
-        {
-          "state": "CURRENT",
-          "repository_version": "2.2.0.1-885"
-        },
-        {
-          "state": "INSTALLED",
-          "repository_version" : "2.2.0.1-885"
-        }
-      ];
-      controller.loadVersionsInfoSuccessCallback(data);
-      expect(controller.get('currentVersion')).to.eql({
-        "state": "CURRENT",
-        "repository_version": "2.2.0.1-885"
-      });
-      expect(controller.get('targetVersions')).to.be.empty;
-    });
-    it("target version not installed and lower than current", function() {
-      var data = [
-        {
-          "state": "CURRENT",
-          "repository_version": "2.2.0.1-885"
-        },
-        {
-          "state": "INIT",
-          "repository_version" : "2.2.0.1-885"
-        }
-      ];
-      controller.loadVersionsInfoSuccessCallback(data);
-      expect(controller.get('currentVersion')).to.eql({
-        "state": "CURRENT",
-        "repository_version": "2.2.0.1-885"
-      });
-      expect(controller.get('targetVersions')).to.be.empty;
-    });
-  });
-
   describe("#loadUpgradeData()", function() {
     beforeEach(function () {
       sinon.stub(App.ajax, 'send').returns({
@@ -238,10 +115,10 @@ describe('App.MainAdminStackAndUpgradeController', function() {
       App.ajax.send.restore();
     });
     it("make ajax call", function() {
-      controller.runPreUpgradeCheck({
-        value: '2.2',
-        label: 'HDP-2.2'
-      });
+      controller.runPreUpgradeCheck(Em.Object.create({
+        repositoryVersion: '2.2',
+        displayName: 'HDP-2.2'
+      }));
       expect(App.ajax.send.getCall(0).args[0]).to.eql({
         name: "admin.rolling_upgrade.pre_upgrade_check",
         sender: controller,
@@ -322,34 +199,6 @@ describe('App.MainAdminStackAndUpgradeController', function() {
     });
   });
 
-  describe("#parseVersionsData()", function() {
-    it("", function() {
-      var data = {
-        items: [
-          {
-            ClusterStackVersions: {},
-            repository_versions: [
-              {
-                RepositoryVersions: {
-                  repository_version: '2.2',
-                  display_name: 'v1',
-                  id: '1'
-                }
-              }
-            ]
-          }
-        ]
-      };
-      expect(controller.parseVersionsData(data)).to.eql([
-        {
-          "repository_name": "v1",
-          "repository_id": "1",
-          "repository_version": "2.2"
-        }
-      ]);
-    });
-  });
-
   describe("#upgrade()", function() {
     before(function () {
       sinon.stub(App.ajax, 'send', Em.K);

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/test/controllers/main/admin/stack_version/repo_version_management_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_version/repo_version_management_controller_test.js b/ambari-web/test/controllers/main/admin/stack_version/repo_version_management_controller_test.js
deleted file mode 100644
index 34862bd..0000000
--- a/ambari-web/test/controllers/main/admin/stack_version/repo_version_management_controller_test.js
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-require('controllers/main/admin/stack_versions/stack_versions_controller');
-var controller;
-
-describe('App.RepoVersionsManagementController', function () {
-
-  beforeEach(function () {
-    controller = App.RepoVersionsManagementController.create({});
-  });
-
-  describe('#getUrl()', function () {
-    beforeEach(function() {
-      controller.reopen({
-        'mockStackUrl': 'mockStackUrl',
-        'mockRepoUrl': 'mockRepoUrl',
-        'realStackUrl': 'realStackUrl',
-        'realRepoUrl': 'realRepoUrl',
-        'realUpdateUrl': 'realUpdateUrl'
-      });
-    });
-    afterEach(function() {
-      App.set('testMode', false);
-    });
-
-    it('gets url for testMode for stackVersion', function () {
-      App.set('testMode', true);
-      expect(controller.getUrl(true)).to.be.equal('mockStackUrl');
-    });
-    it('gets url for testMode for repoVersion', function () {
-      App.set('testMode', true);
-      expect(controller.getUrl(false)).to.equal('mockRepoUrl');
-    });
-    it('gets url for stackVersion', function () {
-      App.set('testMode', false);
-      expect(controller.getUrl(true, true)).to.be.equal('realStackUrl');
-    });
-    it('gets url for repoVersion', function () {
-      App.set('testMode', false);
-      expect(controller.getUrl(false, true)).to.be.equal('realRepoUrl');
-    });
-    it('gets url to upadte stackVersion', function () {
-      App.set('testMode', false);
-      expect(controller.getUrl(true)).to.be.equal('realUpdateUrl');
-    });
-
-  });
-
-  describe('#load()', function () {
-    it('loads data to model by running loadStackVersionsToModel', function () {
-      sinon.stub(controller, 'loadStackVersionsToModel').returns($.Deferred().resolve());
-      sinon.stub(controller, 'loadRepoVersionsToModel').returns($.Deferred().resolve());
-
-      controller.load();
-      expect(controller.loadStackVersionsToModel.calledWith(true)).to.be.true;
-      expect(controller.loadRepoVersionsToModel.calledOnce).to.be.true;
-
-      controller.loadStackVersionsToModel.restore();
-      controller.loadRepoVersionsToModel.restore();
-    });
-  });
-
-  describe('#loadRepoVersionsToModel()', function () {
-    it('loads data to model', function () {
-      sinon.stub(App.HttpClient, 'get', Em.K);
-      sinon.stub(controller, 'getUrl', Em.K);
-
-      controller.loadRepoVersionsToModel();
-      expect(App.HttpClient.get.calledOnce).to.be.true;
-      expect(controller.getUrl.calledWith(false, true)).to.be.true;
-
-      controller.getUrl.restore();
-      App.HttpClient.get.restore();
-    });
-  });
-
-  describe('#loadStackVersionsToModel()', function () {
-    beforeEach(function() {
-      sinon.stub(App.HttpClient, 'get', Em.K);
-      sinon.stub(controller, 'getUrl', Em.K);
-    });
-
-    afterEach(function() {
-      controller.getUrl.restore();
-      App.HttpClient.get.restore();
-    });
-    it('loads all data to model', function () {
-      controller.loadStackVersionsToModel(true);
-      expect(App.HttpClient.get.calledOnce).to.be.true;
-      expect(controller.getUrl.calledWith(true, true)).to.be.true;
-    });
-
-    it('loads update data to model', function () {
-      controller.loadStackVersionsToModel(false);
-      expect(App.HttpClient.get.calledOnce).to.be.true;
-      expect(controller.getUrl.calledWith(true, false)).to.be.true;
-    });
-  });
-
-  describe('#filterHostsByStack()', function () {
-    beforeEach(function() {
-      sinon.stub(App.router.get('mainHostController'), 'filterByStack', Em.K);
-      sinon.stub(App.router, 'transitionTo', Em.K);
-    });
-    afterEach(function() {
-      App.router.get('mainHostController').filterByStack.restore();
-      App.router.transitionTo.restore();
-    });
-    [{
-        version: "version1",
-        state: "state1",
-        m: 'go to hosts filtered by host stack version and host stack state',
-        runAll: true
-      },
-      {
-        version: null,
-        state: "state1",
-        m: 'doesn\'t do anything because version is missing'
-      },
-      {
-        version: "version1",
-        state: null,
-        m: 'doesn\'t do anything because state is missing'
-      }
-    ].forEach(function(t) {
-        it(t.m, function () {
-          controller.filterHostsByStack(t.version, t.state);
-          if (t.runAll) {
-            expect(App.router.get('mainHostController').filterByStack.calledWith(t.version, t.state)).to.be.true;
-            expect(App.router.transitionTo.calledWith('hosts.index')).to.be.true;
-          } else {
-            expect(App.router.get('mainHostController').filterByStack.calledOnce).to.be.false;
-            expect(App.router.transitionTo.calledOnce).to.be.false;
-          }
-
-        });
-      });
-  });
-
-  describe('#showHostsListPopup()', function () {
-    it('show list of hosts for current version in choosen state', function () {
-      sinon.stub(controller, 'filterHostsByStack', Em.K);
-
-      controller.showHostsListPopup({id: "state", label: "label"}, "version", ["host"]).onPrimary();
-      expect(controller.filterHostsByStack.calledWith("version", "state")).to.be.true;
-
-      controller.filterHostsByStack.restore();
-    });
-  });
-
-  describe('#showHosts()', function () {
-    it('show list of hosts for current version in choosen state', function () {
-      sinon.stub(controller, 'showHostsListPopup', Em.K);
-
-      controller.showHosts({contexts: [{id: "state", label: "label"}, "version", ["host"]]});
-      expect(controller.showHostsListPopup.calledWith({id: "state", label: "label"}, "version", ["host"])).to.be.true;
-
-      controller.showHostsListPopup.restore();
-    });
-  });
-
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/test/controllers/main/admin/stack_version/repo_versions_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_version/repo_versions_controller_test.js b/ambari-web/test/controllers/main/admin/stack_version/repo_versions_controller_test.js
deleted file mode 100644
index 993fa37..0000000
--- a/ambari-web/test/controllers/main/admin/stack_version/repo_versions_controller_test.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-require('controllers/main/admin/stack_versions/repo_versions_controller');
-var controller;
-
-describe('App.RepoVersionsController', function () {
-
-  beforeEach(function () {
-    controller = App.RepoVersionsController.create();
-  });
-
-
-  describe('#installRepoVersion', function () {
-    beforeEach(function() {
-      sinon.stub(App.get('router.mainStackVersionsDetailsController'), 'installRepoVersion', Em.K);
-    });
-    afterEach(function() {
-      App.get('router.mainStackVersionsDetailsController').installRepoVersion.restore();
-    });
-    it("runs installRepoVersion of mainStackVersionsDetailsController", function() {
-      controller.installRepoVersion();
-      expect(App.get('router.mainStackVersionsDetailsController').installRepoVersion.calledOnce).to.be.true;
-    });
-  });
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js b/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js
deleted file mode 100644
index 4e288bf..0000000
--- a/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-require('controllers/main/admin/stack_versions/stack_version_details_controller');
-var controller;
-
-describe('App.MainStackVersionsDetailsController', function () {
-
-  beforeEach(function () {
-    controller = App.MainStackVersionsDetailsController.create({});
-  });
-
-  describe('#showProgressPopup', function () {
-    beforeEach(function() {
-      sinon.stub(App.router.get('highAvailabilityProgressPopupController'), 'initPopup', Em.K);
-      App.set('testMode', true);
-    });
-    afterEach(function() {
-      App.router.get('highAvailabilityProgressPopupController').initPopup.restore();
-      App.set('testMode', false);
-    });
-    it("runs initPopup", function() {
-      controller.reopen({'content': { 'displayName': "v1"}});
-      var popupTitle = Em.I18n.t('admin.stackVersions.details.install.hosts.popup.title').format("v1");
-      var requestIds =[1];
-      controller.showProgressPopup();
-      expect(App.router.get('highAvailabilityProgressPopupController').initPopup.calledWith(popupTitle, requestIds, controller)).to.be.true;
-    });
-  });
-
-  describe("#doPolling()", function () {
-    beforeEach(function () {
-      sinon.stub(controller, 'updateProgress', Em.K);
-      sinon.spy(controller, 'doPolling');
-      this.clock = sinon.useFakeTimers();
-    });
-    afterEach(function () {
-      controller.updateProgress.restore();
-      controller.doPolling.restore();
-      this.clock.restore();
-    });
-    it("installInProgress false", function () {
-      controller.set('installInProgress', false);
-      controller.doPolling();
-      expect(controller.updateProgress.calledOnce).to.be.true;
-      expect(controller.doPolling.calledOnce).to.be.true;
-    });
-    it("installInProgress true", function () {
-      controller.set('installInProgress', true);
-      controller.doPolling();
-      this.clock.tick(App.componentsUpdateInterval);
-      expect(controller.doPolling.called).to.be.true;
-      expect(controller.updateProgress.called).to.be.true;
-    });
-  });
-
-  describe('#updateProgress', function () {
-    beforeEach(function () {
-      sinon.stub(App.ajax, 'send', Em.K);
-      sinon.stub(App.db, 'get').withArgs('repoVersion','id').returns(1)
-    });
-    afterEach(function () {
-      App.ajax.send.restore();
-      App.db.get.restore();
-    });
-    it("runs get request to get install progress", function () {
-      controller.updateProgress();
-      expect(App.ajax.send.getCall(0).args[0].data).to.deep.eql({
-        requestId: 1
-      });
-    });
-  });
-
-  describe('#updateProgressSuccess', function () {
-    it("saves progress state t othe controller", function () {
-      controller.updateProgressSuccess({Requests: {progress_percent: 10} , tasks: [{task: 1}]});
-      expect(controller.get('progress')).to.equal(10);
-      expect(controller.get('logs')).to.eql([{task: 1}])
-    });
-  });
-
-  describe('#installRepoVersion', function () {
-    beforeEach(function () {
-      sinon.stub(App.ajax, 'send', Em.K);
-    });
-    afterEach(function () {
-      App.ajax.send.restore();
-    });
-    it("runs post request to create stack version", function () {
-      var repoVersion = Em.Object.create({
-        stackVersionType: "HDP",
-        stackVersionNumber: "2.2",
-        repositoryVersion: "2.2.0.1"
-      });
-      controller.installRepoVersion({context: repoVersion});
-      expect(App.ajax.send.getCall(0).args[0].data.ClusterStackVersions).to.deep.eql({
-        "stack": "HDP",
-        "version": "2.2",
-        "repository_version": "2.2.0.1"
-      });
-    });
-  });
-
-  describe('#installRepoVersionSuccess()', function () {
-    var repoId = "1";
-    var requestId = "2";
-    var repoVersion = {id: repoId};
-    var route;
-    beforeEach(function() {
-      sinon.stub(App.db, 'set', Em.K);
-      sinon.stub(App.router, 'transitionTo', Em.K);
-      sinon.stub(App.RepositoryVersion, 'find', function() {
-        return repoVersion;
-      });
-      sinon.stub(App.get('router.repoVersionsManagementController'), 'loadStackVersionsToModel', function() {
-        return $.Deferred().resolve()});
-      route = App.get('router.currentState.name');
-    });
-
-    afterEach(function() {
-      App.db.set.restore();
-      App.router.transitionTo.restore();
-      App.RepositoryVersion.find.restore();
-      App.get('router.repoVersionsManagementController').loadStackVersionsToModel.restore();
-      App.set('router.currentState.name', route);
-    });
-    it('success callback for install stack version without redirect', function () {
-      controller.installRepoVersionSuccess({Requests: {id: requestId}}, null, {id: repoId});
-      expect(App.db.set.calledWith('repoVersion', 'id', [requestId])).to.be.true;
-      expect(App.get('router.repoVersionsManagementController').loadStackVersionsToModel.calledWith(true)).to.be.true;
-      expect(App.RepositoryVersion.find.calledOnce).to.be.true;
-      expect(controller.get('content')).to.be.eql(repoVersion);
-    });
-
-    it('success callback for install stack version', function () {
-      App.set('router.currentState.name', "update");
-      controller.installRepoVersionSuccess({Requests: {id: requestId}}, null, {id: repoId});
-      expect(App.db.set.calledWith('repoVersion', 'id', [requestId])).to.be.true;
-      expect(App.get('router.repoVersionsManagementController').loadStackVersionsToModel.calledOnce).to.be.true;
-      expect(App.RepositoryVersion.find.called).to.be.true;
-      expect(App.router.transitionTo.calledWith('main.admin.adminStackVersions.version', repoVersion)).to.be.true;
-    });
-  });
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/test/controllers/main/admin/stack_version/stack_versions_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_version/stack_versions_controller_test.js b/ambari-web/test/controllers/main/admin/stack_version/stack_versions_controller_test.js
deleted file mode 100644
index 4b38e58..0000000
--- a/ambari-web/test/controllers/main/admin/stack_version/stack_versions_controller_test.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-require('controllers/main/admin/stack_versions/stack_versions_controller');
-var controller;
-
-describe('App.MainStackVersionsController', function () {
-
-  beforeEach(function () {
-    controller = App.MainStackVersionsController.create();
-  });
-
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
index 8fcb6a6..9ccff43 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
@@ -26,38 +26,4 @@ describe('App.UpgradeVersionBoxView', function () {
       upgrade: Em.K
     })
   });
-
-  describe("#versionName", function () {
-    it("version is null", function () {
-      view.set('version', null);
-      view.propertyDidChange('versionName');
-      expect(view.get('versionName')).to.be.empty;
-    });
-    it("version is loaded", function () {
-      view.set('version', Em.Object.create({
-        repository_name: 'HDP-2.2'
-      }));
-      view.propertyDidChange('versionName');
-      expect(view.get('versionName')).to.equal('HDP-2.2');
-    });
-  });
-
-  describe("#runAction()", function () {
-    beforeEach(function () {
-      sinon.spy(view.get('controller'), 'upgrade');
-    });
-    afterEach(function () {
-      view.get('controller').upgrade.restore();
-    });
-    it("call upgrade()", function () {
-      view.set('method', 'upgrade');
-      expect(view.runAction()).to.be.true;
-      expect(view.get('controller').upgrade.calledOnce).to.be.true;
-    });
-    it("no method should be called", function () {
-      view.set('method', null);
-      expect(view.runAction()).to.be.false;
-      expect(view.get('controller').upgrade.called).to.be.false;
-    });
-  });
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c59df55e/ambari-web/test/views/main/admin/stack_version/stack_version_details_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_version/stack_version_details_test.js b/ambari-web/test/views/main/admin/stack_version/stack_version_details_test.js
deleted file mode 100644
index 6798fd1..0000000
--- a/ambari-web/test/views/main/admin/stack_version/stack_version_details_test.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-require('views/main/admin/stack_versions/stack_version_view');
-var view;
-
-describe('App.MainStackVersionsDetailsView', function () {
-
-  var defaultRepoVersion = "2.2.1.0";
-  beforeEach(function () {
-    view = App.MainStackVersionsDetailsView.create({
-      "controller": {
-        "hostsToInstall" : 0,
-        "progress": 0,
-        "doPolling": Em.K
-      },
-      "content": {
-        "stackVersion":
-          {
-            "state" : "ANY"
-          },
-        'repositoryVersion': defaultRepoVersion
-      },
-      "currentHosts": ['currentHost'],
-      "installedHosts": ['installedHost'],
-      "notInstalledHosts": ['notInstalledHost']
-    });
-  });
-
-  describe('#installButtonMsg', function () {
-    it("install button msg for init state" , function() {
-      view.set("controller.hostsToInstall", 2);
-      view.set("content.stackVersion.state", "ANY");
-      expect(view.get('installButtonMsg')).to.equal(Em.I18n.t('admin.stackVersions.details.hosts.btn.install').format(2))
-    });
-
-    it("install button msg for install failed state" , function() {
-      view.set("content.stackVersion.state", "INSTALL_FAILED");
-      expect(view.get('installButtonMsg')).to.equal(Em.I18n.t('admin.stackVersions.details.hosts.btn.reinstall'))
-    });
-
-    it("install button msg for out of sync failed state" , function() {
-      view.set("controller.hostsToInstall", 1);
-      view.set("content.stackVersion.state", "OUT_OF_SYNC");
-      expect(view.get('installButtonMsg')).to.equal(Em.I18n.t('admin.stackVersions.details.hosts.btn.install').format(1))
-    });
-  });
-
-  describe('#installButtonClass', function () {
-    it("install button class for init state" , function() {
-      view.set("content.stackVersion.state", "ANY");
-      expect(view.get('installButtonClass')).to.equal('btn-success')
-    });
-
-    it("install button class install failed state" , function() {
-      view.set("content.stackVersion.state", "INSTALL_FAILED");
-      expect(view.get('installButtonClass')).to.equal('btn-danger')
-    });
-
-    it("install button class install out of sync state" , function() {
-      view.set("content.stackVersion.state", "OUT_OF_SYNC");
-      expect(view.get('installButtonClass')).to.equal('btn-success')
-    });
-  });
-
-  describe('#progress', function () {
-    it("this that is used as width of progress bar" , function() {
-      view.set("controller.progress", 20);
-      expect(view.get('progress')).to.equal('width:20%');
-    });
-  });
-
-  describe('#didInsertElement', function () {
-    beforeEach(function() {
-      sinon.stub(App.get('router.mainStackVersionsController'), 'set', Em.K);
-      sinon.stub(App.get('router.mainStackVersionsController'), 'load', Em.K);
-      sinon.stub(App.get('router.mainStackVersionsController'), 'doPolling', Em.K);
-      sinon.stub(view.get('controller'), 'doPolling', Em.K);
-      sinon.stub(App.RepositoryVersion, 'find', function() {
-        return [{id: 1}]
-      });
-    });
-    afterEach(function() {
-      App.get('router.mainStackVersionsController').set.restore();
-      App.get('router.mainStackVersionsController').load.restore();
-      App.get('router.mainStackVersionsController').doPolling.restore();
-      view.get('controller').doPolling.restore();
-      App.RepositoryVersion.find.restore();
-    });
-    it("runs polling and load when view is in dom" , function() {
-      view.set('content.id', 2);
-      view.didInsertElement();
-      expect(App.get('router.mainStackVersionsController').set.calledWith('isPolling', true)).to.be.true;
-      expect(App.get('router.mainStackVersionsController').load.calledOnce).to.be.true;
-      expect(App.get('router.mainStackVersionsController').doPolling.calledOnce).to.be.true;
-      expect(view.get('controller').doPolling.calledOnce).to.be.true;
-    });
-
-    it("runs polling when view is in dom" , function() {
-      view.set('content.id', 1);
-      view.didInsertElement();
-      expect(App.get('router.mainStackVersionsController').set.calledWith('isPolling', true)).to.be.true;
-      expect(App.get('router.mainStackVersionsController').load.calledOnce).to.be.false;
-      expect(App.get('router.mainStackVersionsController').doPolling.calledOnce).to.be.true;
-      expect(view.get('controller').doPolling.calledOnce).to.be.true;
-    });
-  });
-
-  describe('#willDestroyElement', function () {
-    beforeEach(function() {
-      sinon.stub(App.get('router.mainStackVersionsController'), 'set', Em.K);
-    });
-    afterEach(function() {
-      App.get('router.mainStackVersionsController').set.restore();
-    });
-    it("runs polling when view is in dom" , function() {
-      view.willDestroyElement();
-      expect(App.get('router.mainStackVersionsController').set.calledWith('isPolling', false)).to.be.true;
-    });
-  });
-
-  describe('#showNotInstalledHosts', function() {
-    beforeEach(function() {
-      sinon.stub(App.get('router.repoVersionsManagementController'), 'showHostsListPopup', Em.K);
-    });
-    afterEach(function () {
-      App.get('router.repoVersionsManagementController').showHostsListPopup.restore();
-    });
-
-    it("runs showHostsListPopup from repoVersionsManagementController", function () {
-      var state = {
-        'id': 'installing',
-        'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.not_installed')
-      };
-      view.showNotInstalledHosts();
-      expect(App.get('router.repoVersionsManagementController').showHostsListPopup.calledWith(state, defaultRepoVersion, ['notInstalledHost'])).to.be.true;
-    });
-  });
-
-  describe('#showInstalledHosts', function() {
-    beforeEach(function() {
-      sinon.stub(App.get('router.repoVersionsManagementController'), 'showHostsListPopup', Em.K);
-    });
-    afterEach(function () {
-      App.get('router.repoVersionsManagementController').showHostsListPopup.restore();
-    });
-
-    it("runs showHostsListPopup from repoVersionsManagementController", function () {
-      var state = {
-        'id': 'installed',
-        'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.installed')
-      };
-      view.showInstalledHosts();
-      expect(App.get('router.repoVersionsManagementController').showHostsListPopup.calledWith(state, defaultRepoVersion, ['installedHost'])).to.be.true;
-    });
-  });
-
-  describe('#showCurrentHosts', function() {
-    beforeEach(function() {
-      sinon.stub(App.get('router.repoVersionsManagementController'), 'showHostsListPopup', Em.K);
-    });
-    afterEach(function () {
-      App.get('router.repoVersionsManagementController').showHostsListPopup.restore();
-    });
-
-    it("runs showHostsListPopup from repoVersionsManagementController", function () {
-      var state = {
-        'id': 'current',
-        'label': Em.I18n.t('admin.stackVersions.hosts.popup.header.current')
-      };
-      view.showCurrentHosts();
-      expect(App.get('router.repoVersionsManagementController').showHostsListPopup.calledWith(state, defaultRepoVersion, ['currentHost'])).to.be.true;
-    });
-  });
-});


Mime
View raw message