You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2014/01/09 18:07:14 UTC

git commit: AMBARI-4248. Mirroring: provide Manage Clusters Dialog. (akovalenko)

Updated Branches:
  refs/heads/trunk 4e53fa2a3 -> 24e58d5c6


AMBARI-4248. Mirroring: provide Manage Clusters Dialog.  (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/24e58d5c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24e58d5c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24e58d5c

Branch: refs/heads/trunk
Commit: 24e58d5c61278da363108c0a0a4a41d009c0da2f
Parents: 4e53fa2
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Thu Jan 9 19:06:36 2014 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Thu Jan 9 19:06:36 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers.js                   |   1 +
 .../mirroring/manage_clusters_controller.js     |  53 +++++++++
 .../controllers/main/mirroring_controller.js    |  20 +++-
 ambari-web/app/messages.js                      |  19 ++-
 ambari-web/app/models/authentication.js         |   4 +-
 ambari-web/app/styles/application.less          |  20 ++++
 .../common/configs/capacity_scheduler.hbs       |   2 +-
 ambari-web/app/templates/login.hbs              |   2 +-
 .../app/templates/main/admin/advanced.hbs       |   2 +-
 .../app/templates/main/mirroring/datasets.hbs   |   6 +-
 .../main/mirroring/manage_clusters.hbs          | 115 +++++++++++++++++++
 ambari-web/app/views.js                         |   1 +
 .../app/views/main/admin/advanced/password.js   |   2 +-
 .../main/mirroring/manage_clusters_view.js      | 103 +++++++++++++++++
 14 files changed, 335 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index 48c288f..fd894c0 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -115,6 +115,7 @@ require('controllers/main/mirroring/jobs_controller');
 require('controllers/main/mirroring/targetClusterController');
 require('controllers/main/mirroring/testConnection_controller');
 require('controllers/main/mirroring/testConnectionResults_controller');
+require('controllers/main/mirroring/manage_clusters_controller');
 require('controllers/wizard/slave_component_groups_controller');
 require('controllers/wizard/step0_controller');
 require('controllers/wizard/step1_controller');

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/controllers/main/mirroring/manage_clusters_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/mirroring/manage_clusters_controller.js b/ambari-web/app/controllers/main/mirroring/manage_clusters_controller.js
new file mode 100644
index 0000000..0f62cc0
--- /dev/null
+++ b/ambari-web/app/controllers/main/mirroring/manage_clusters_controller.js
@@ -0,0 +1,53 @@
+/**
+ * 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.MainMirroringManageClustersController = Em.ArrayController.extend({
+  name: 'mainMirroringManageClustersController',
+
+  ambariSelected: true,
+
+  ambariServerSelected: false,
+
+  interfacesSelected: false,
+
+  ambariDisabled: function () {
+    return !this.get('ambariSelected');
+  }.property('ambariSelected'),
+
+  ambariServerDisabled: function () {
+    return !this.get('ambariServerSelected');
+  }.property('ambariServerSelected'),
+
+  interfacesDisabled: function () {
+    return !this.get('interfacesSelected');
+  }.property('interfacesSelected'),
+
+  clearStep: function () {
+    this.set('ambariSelected', true);
+    this.set('ambariServerSelected', false);
+    this.set('interfacesSelected', false);
+  },
+
+  addCluster: function() {},
+
+  removeCluster: function() {},
+
+  testConnection: function() {}
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/controllers/main/mirroring_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/mirroring_controller.js b/ambari-web/app/controllers/main/mirroring_controller.js
index 0cf2a84..459b43f 100644
--- a/ambari-web/app/controllers/main/mirroring_controller.js
+++ b/ambari-web/app/controllers/main/mirroring_controller.js
@@ -27,6 +27,24 @@ App.MainMirroringController = Em.ArrayController.extend({
 
   targetClusters: function () {
     return App.TargetCluster.find();
-  }.property()
+  }.property(),
+
+  manageClusters: function () {
+    App.ModalPopup.show({
+      header: Em.I18n.t('mirroring.dataset.manageClusters'),
+      bodyClass: App.MainMirroringManageClusterstView.extend({
+        controllerBinding: 'App.router.mainMirroringManageClustersController'
+      }),
+      primary: Em.I18n.t('common.save'),
+      secondary: null,
+      onPrimary: function () {
+        this.hide();
+      },
+      didInsertElement: function () {
+        this._super();
+        this.fitHeight();
+      }
+    });
+  }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index c1248bd..9d6667b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -167,6 +167,10 @@ Em.I18n.translations = {
   'common.actions': 'Actions',
   'common.maintenance': 'Maintenance',
   'common.selected': 'Selected',
+  'common.password': 'Password',
+  'common.url': 'URL',
+  'common.advanced': 'Advanced',
+
   'maintenance.turnOn':'Turn On Maintenance Mode',
   'maintenance.turnOff':'Turn Off Maintenance Mode',
 
@@ -206,7 +210,6 @@ Em.I18n.translations = {
 
   'login.header':'Sign in',
   'login.username':'Username',
-  'login.password':'Password',
   'login.loginButton':'Sign in',
   'login.error':'Invalid username/password combination.',
   
@@ -637,7 +640,6 @@ Em.I18n.translations = {
   'form.create':'Create',
   'form.save':'Save',
   'form.cancel':'Cancel',
-  'form.password':'Password',
   'form.passwordRetype':'Retype Password',
   'form.saveSuccess':'Successfully saved.',
   'form.saveError':'Sorry, errors occurred.',
@@ -646,7 +648,6 @@ Em.I18n.translations = {
   'form.validator.invalidIp':'Please enter valid ip address',
   'form.validator.configKey':'Invalid Key. Only alphanumerics, hyphens, underscores, and periods are allowed.',
 
-  'admin.advanced.title':'Advanced',
   'admin.advanced.caution':'This section is for advanced user only.<br/>Proceed with caution.',
   'admin.advanced.button.uninstallIncludingData':'Uninstall cluster including all data.',
   'admin.advanced.button.uninstallKeepData':'Uninstall cluster but keep data.',
@@ -673,7 +674,6 @@ Em.I18n.translations = {
   'admin.authentication.form.usernameAttribute':'Username Attribute',
 
   'admin.authentication.form.userDN':'User DN',
-  'admin.authentication.form.password':'Password',
   'admin.authentication.form.configurationTest':'Configuration Test',
   'admin.authentication.form.testConfiguration':'Test Configuration',
 
@@ -906,7 +906,6 @@ Em.I18n.translations = {
   'admin.users.privileges':'Admin',
   'admin.users.type':'Type',
   'admin.users.action':'Action',
-  'admin.users.password':'Password',
   'admin.users.passwordRetype':'Retype Password',
   'admin.users.username':'Username',
   'admin.users.createSuccess': 'User successfully created.',
@@ -1704,6 +1703,16 @@ Em.I18n.translations = {
   'mirroring.dataset.toggle.active':'Activate',
   'mirroring.dataset.toggle.suspended':'Suspend',
 
+  'mirroring.manageClusters.ambariServer':'Ambari Server',
+  'mirroring.manageClusters.testConnection':'Test Connection',
+  'mirroring.manageClusters.interfaces':'Interfaces',
+  'mirroring.manageClusters.execute':'Execute',
+  'mirroring.manageClusters.readonly':'Readonly',
+  'mirroring.manageClusters.workflow':'Workflow',
+  'mirroring.manageClusters.staging':'Staging',
+  'mirroring.manageClusters.working':'Working',
+  'mirroring.manageClusters.temp':'Temp',
+
   'mirroring.targetcluster.nameNodeWebUrl':'NameNode Web UI',
   'mirroring.targetcluster.nameNodeRpcUrl':'NameNode RPC',
   'mirroring.targetcluster.oozieServerUrl':'Oozie Server',

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/models/authentication.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/authentication.js b/ambari-web/app/models/authentication.js
index a56e151..ba63a89 100644
--- a/ambari-web/app/models/authentication.js
+++ b/ambari-web/app/models/authentication.js
@@ -69,7 +69,7 @@ App.AuthenticationForm = App.Form.extend({
     { name:"bindUser", displayName:Em.I18n.t('admin.authentication.form.bindUserDN'), isRequired:function () {
       return this.get('form.field.bindMethod.value');
     }.property('form.field.bindMethod.value')},
-    { name:"password", displayName:Em.I18n.t('form.password'), displayType:"password",
+    { name:"password", displayName:Em.I18n.t('common.password'), displayType:"password",
       isRequired:function () {
         return this.get('form.field.bindMethod.value');
       }.property('form.field.bindMethod.value') },
@@ -90,7 +90,7 @@ App.AuthenticationForm = App.Form.extend({
     },
 
     { name:"userDN", displayName:Em.I18n.t('admin.authentication.form.userDN') },
-    { name:"userPassword", displayName:Em.I18n.t('admin.authentication.form.password'), displayType:'password'}
+    { name:"userPassword", displayName:Em.I18n.t('common.password'), displayType:'password'}
   ],
   fields:[],
   testConfiguration:function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index c05d3d6..ab97c5e 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -3865,6 +3865,26 @@ ul.filter {
   }
 }
 
+#mirroring-manage-clusters {
+  .cluster-select {
+    width: 100%;
+    height: 250px;
+    margin-bottom: 0;
+  }
+  .control-label-manage-clusters {
+    float: left;
+    width: 80px;
+    padding-top: 5px;
+  }
+  .control-group {
+    margin-left: 15px;
+    margin-bottom: 10px;
+  }
+  .accordion-inner {
+    padding: 9px 0;
+  }
+}
+
 .dataset-delete {
   width: 15%;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/capacity_scheduler.hbs b/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
index 78c5ba8..836c878 100644
--- a/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
+++ b/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
@@ -56,7 +56,7 @@
         </div>
         <div class="row-fluid">
             <div class="span8">
-                <div><strong>{{t admin.advanced.title}}</strong></div>
+                <div><strong>{{t common.advanced}}</strong></div>
                 <form class="form-horizontal" autocomplete="off">
                   {{#each view.advancedConfigs}}
                     {{#if isVisible}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/templates/login.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/login.hbs b/ambari-web/app/templates/login.hbs
index d6d6059..2413daf 100644
--- a/ambari-web/app/templates/login.hbs
+++ b/ambari-web/app/templates/login.hbs
@@ -25,7 +25,7 @@
     {{/if}}
     <label>{{t login.username}}</label>
     {{view view.loginTextField valueBinding="loginName" class="span4"}}
-    <label>{{t login.password}}</label>
+    <label>{{t common.password}}</label>
     {{view view.passTextField type="password" valueBinding="password" class="span4"}}
         <button class="btn btn-success" {{action "submit" target="controller"}}>{{t login.loginButton}}</button>
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/templates/main/admin/advanced.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/advanced.hbs b/ambari-web/app/templates/main/admin/advanced.hbs
index 053884c..95600e6 100644
--- a/ambari-web/app/templates/main/admin/advanced.hbs
+++ b/ambari-web/app/templates/main/admin/advanced.hbs
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-<h5>{{t admin.advanced.title}}<i class="icon-question-sign"></i></h5>
+<h5>{{t common.advanced}}<i class="icon-question-sign"></i></h5>
 <div class="row">
   {{t admin.advanced.caution}}
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/templates/main/mirroring/datasets.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/mirroring/datasets.hbs b/ambari-web/app/templates/main/mirroring/datasets.hbs
index d421344..b3072cd 100644
--- a/ambari-web/app/templates/main/mirroring/datasets.hbs
+++ b/ambari-web/app/templates/main/mirroring/datasets.hbs
@@ -25,12 +25,12 @@
       <ul class="dropdown-menu pull-left">
         <li>
           <a href="javascript:void(null);">
-            <i class="icon-plus"></i>{{t mirroring.dataset.createDataset}}
+            <i class="icon-plus"></i>&nbsp;{{t mirroring.dataset.createDataset}}
           </a>
         </li>
         <li>
-          <a href="javascript:void(null);">
-            <i class="icon-cog"></i>{{t mirroring.dataset.manageClusters}}...
+          <a {{action manageClusters target="controller"}} href="javascript:void(null);">
+            <i class="icon-cog"></i>&nbsp;{{t mirroring.dataset.manageClusters}}...
           </a>
         </li>
       </ul>

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/templates/main/mirroring/manage_clusters.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/mirroring/manage_clusters.hbs b/ambari-web/app/templates/main/mirroring/manage_clusters.hbs
new file mode 100644
index 0000000..f5f4d03
--- /dev/null
+++ b/ambari-web/app/templates/main/mirroring/manage_clusters.hbs
@@ -0,0 +1,115 @@
+{{!
+* 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.
+}}
+<div id="mirroring-manage-clusters">
+  <div class="row-fluid">
+    <div class="span5">
+      {{view view.clusterSelect}}
+      <div class="btn-toolbar pull-right">
+        <button class="btn" {{action addCluster target="controller"}}><i class="icon-plus"></i></button>
+        <button class="btn" {{action removeCluster target="controller"}}><i class="icon-minus"></i></button>
+        <button class="btn"><i class="icon-cog"></i></button>
+      </div>
+    </div>
+    <div class="span7" style="padding-left: 15px">
+      <form class="form-horizontal">
+        <div class="control-group">
+          <label class="control-label-manage-clusters">{{t common.name}}</label>
+          {{view Ember.TextField class="span8"}}
+        </div>
+        <div class="control-group">
+          <label class="radio">
+            {{view view.ambariRadioButton checkedBinding="controller.ambariSelected"}}
+            {{t app.name}}
+          </label>
+
+          <div class="control-group">
+            <label class="control-label-manage-clusters">{{t common.name}}</label>
+            {{view view.ambariClusterSelect disabledBinding="controller.ambariDisabled"}}
+          </div>
+        </div>
+        <div class="control-group">
+          <label class="radio">
+            {{view view.ambariServerRadioButton checkedBinding="controller.ambariServerSelected"}}
+            {{t mirroring.manageClusters.ambariServer}}
+          </label>
+
+          <div class="control-group">
+            <label class="control-label-manage-clusters">{{t common.url}}</label>
+            {{view Ember.TextField class="span8" disabledBinding="controller.ambariServerDisabled"}}
+          </div>
+          <div class="control-group">
+            <label class="control-label-manage-clusters">{{t common.user}}</label>
+            {{view Ember.TextField class="span8" disabledBinding="controller.ambariServerDisabled"}}
+          </div>
+          <div class="control-group">
+            <label class="control-label-manage-clusters">{{t common.password}}</label>
+            {{view Ember.TextField class="span4" type="password" disabledBinding="controller.ambariServerDisabled"}}
+            {{view Ember.TextField class="span4" type="password" disabledBinding="controller.ambariServerDisabled"}}
+          </div>
+          <div class="control-group text-center">
+            <button class="btn btn-success" {{action testConnection target="controller"}} {{bindAttr disabled="controller.ambariServerDisabled"}}>{{t mirroring.manageClusters.testConnection}}</button>
+          </div>
+        </div>
+        <div class="control-group">
+          <label class="radio">
+            {{view view.interfacesRadioButton checkedBinding="controller.interfacesSelected"}}
+            {{t mirroring.manageClusters.interfaces}}
+          </label>
+
+          <div class="control-group">
+            <label class="control-label-manage-clusters">{{t mirroring.manageClusters.execute}}</label>
+            {{view Ember.TextField class="span8" disabledBinding="controller.interfacesDisabled"}}
+          </div>
+          <div class="control-group">
+            <label class="control-label-manage-clusters">{{t mirroring.manageClusters.readonly}}</label>
+            {{view Ember.TextField class="span8" disabledBinding="controller.interfacesDisabled"}}
+          </div>
+          <div class="control-group">
+            <label class="control-label-manage-clusters">{{t mirroring.manageClusters.workflow}}</label>
+            {{view Ember.TextField class="span8" disabledBinding="controller.interfacesDisabled"}}
+          </div>
+        </div>
+        <div class="accordion control-group" id="advanced-fields">
+          <div class="accordion-group">
+            <div class="accordion-heading">
+              <a class="accordion-toggle" data-toggle="collapse" data-parent="#advanced-fields" href="#collapse-fields">
+                <i class="icon-caret-down"></i> {{t common.advanced}}
+              </a>
+            </div>
+            <div id="collapse-fields" class="accordion-body collapse">
+              <div class="accordion-inner">
+                <div class="control-group">
+                  <label class="control-label-manage-clusters">{{t mirroring.manageClusters.staging}}</label>
+                  {{view Ember.TextField class="span8"}}
+                </div>
+                <div class="control-group">
+                  <label class="control-label-manage-clusters">{{t mirroring.manageClusters.working}}</label>
+                  {{view Ember.TextField class="span8"}}
+                </div>
+                <div class="control-group">
+                  <label class="control-label-manage-clusters">{{t mirroring.manageClusters.temp}}</label>
+                  {{view Ember.TextField class="span8"}}
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </form>
+    </div>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index b996407..f517ff9 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -216,6 +216,7 @@ require('views/main/mirroring/jobs_view');
 require('views/main/mirroring/targetClusterView');
 require('views/main/mirroring/testConnection_view');
 require('views/main/mirroring/testConnectionResults_view');
+require('views/main/mirroring/manage_clusters_view');
 require('views/installer');
 require('views/wizard/controls_view');
 require('views/wizard/step0_view');

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/views/main/admin/advanced/password.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/advanced/password.js b/ambari-web/app/views/main/admin/advanced/password.js
index e689e6e..29d804d 100644
--- a/ambari-web/app/views/main/admin/advanced/password.js
+++ b/ambari-web/app/views/main/admin/advanced/password.js
@@ -20,7 +20,7 @@ var App = require('app');
 
 App.MainAdminAdvancedPasswordView = App.Form.extend({
   fieldsOptions:[
-    { name:"password", displayName:Em.I18n.t('form.password'), displayType:"password", disableRequiredOnExistent:true },
+    { name:"password", displayName:Em.I18n.t('common.password'), displayType:"password", disableRequiredOnExistent:true },
     { name:"passwordRetype", displayName:Em.I18n.t('form.passwordRetype'), displayType:"passwordRetype", disableRequiredOnExistent:true }
   ],
   fields: []

http://git-wip-us.apache.org/repos/asf/ambari/blob/24e58d5c/ambari-web/app/views/main/mirroring/manage_clusters_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/mirroring/manage_clusters_view.js b/ambari-web/app/views/main/mirroring/manage_clusters_view.js
new file mode 100644
index 0000000..898ba8c
--- /dev/null
+++ b/ambari-web/app/views/main/mirroring/manage_clusters_view.js
@@ -0,0 +1,103 @@
+/**
+ * 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.MainMirroringManageClusterstView = Em.View.extend({
+  name: 'mainMirroringManageClustersView',
+  templateName: require('templates/main/mirroring/manage_clusters'),
+
+  didInsertElement: function () {
+    this.get('controller').clearStep();
+  },
+
+  clusterSelect: Ember.Select.extend({
+    classNames: ['cluster-select'],
+    multiple: true,
+    content: function () {
+      return App.TargetCluster.find().mapProperty('clusterName');
+    }.property(),
+    selectedCluster: null,
+    onSelect: function () {
+      if (this.get('selection.length')) {
+        if (this.get('selection').length === 1) {
+          this.set('selectedCluster', this.get('selection')[0]);
+        } else {
+          this.set('selection', [this.get('selectedCluster')]);
+        }
+      } else {
+        this.set('selectedCluster', null);
+      }
+    }.observes('selection')
+  }),
+
+  ambariClusterSelect: Ember.Select.extend({
+    attributeBindings: ['disabled'],
+    classNames: ['span5'],
+    content: function () {
+      return [App.get('clusterName')];
+    }.property()
+  }),
+
+  ambariRadioButton: Ember.Checkbox.extend({
+    tagName: 'input',
+    attributeBindings: ['type', 'checked'],
+    checked: function () {
+      return this.get('controller.ambariSelected');
+    }.property('controller.ambariSelected'),
+    type: 'radio',
+
+    click: function () {
+      this.set('controller.ambariSelected', true);
+      this.set('controller.ambariServerSelected', false);
+      this.set('controller.interfacesSelected', false);
+    }
+  }),
+
+  ambariServerRadioButton: Ember.Checkbox.extend({
+    tagName: 'input',
+    attributeBindings: ['type', 'checked'],
+    checked: function () {
+      return this.get('controller.ambariServerSelected');
+    }.property('controller.ambariServerSelected'),
+    type: 'radio',
+
+    click: function () {
+      this.set('controller.ambariSelected', false);
+      this.set('controller.ambariServerSelected', true);
+      this.set('controller.interfacesSelected', false);
+    }
+  }),
+
+  interfacesRadioButton: Ember.Checkbox.extend({
+    tagName: 'input',
+    attributeBindings: ['type', 'checked'],
+    checked: function () {
+      return this.get('controller.interfacesSelected');
+    }.property('controller.interfacesSelected'),
+    type: 'radio',
+
+    click: function () {
+      this.set('controller.ambariSelected', false);
+      this.set('controller.ambariServerSelected', false);
+      this.set('controller.interfacesSelected', true);
+    }
+  })
+});
+
+