ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-8280 Create mock for Admin Web: Stack Versions: Version Detail page. (ababiichuk)
Date Tue, 11 Nov 2014 17:28:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6b98cfc08 -> fc0cda879


AMBARI-8280 Create mock for Admin Web: Stack Versions: Version Detail page. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: fc0cda8793c740838074500e6941e6ee9c9715bd
Parents: 6b98cfc
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Tue Nov 11 19:18:50 2014 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Tue Nov 11 19:21:49 2014 +0200

----------------------------------------------------------------------
 .../data/stack_versions/stack_version_all.json  | 268 ++-----------------
 ambari-web/app/assets/test/tests.js             |   1 +
 ambari-web/app/controllers.js                   |   1 +
 .../stack_version_details_controller.js         |  33 +++
 ambari-web/app/mappers/stack_version_mapper.js  |   4 +-
 ambari-web/app/messages.js                      |  11 +
 ambari-web/app/models/stack_version/version.js  |   4 +-
 ambari-web/app/routes/main.js                   |  22 +-
 ambari-web/app/styles/application.less          |  34 +++
 .../stack_versions/stack_version_details.hbs    | 102 +++++++
 .../admin/stack_versions/stack_versions.hbs     |   6 +-
 ambari-web/app/views.js                         |   1 +
 ambari-web/app/views/main/admin.js              |   2 +-
 .../stack_version_details_view.js               | 102 +++++++
 .../admin/stack_versions/stack_version_view.js  |   6 +-
 ambari-web/app/views/main/menu.js               |   4 +-
 .../stack_version/stack_version_details_test.js |  94 +++++++
 17 files changed, 432 insertions(+), 263 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/assets/data/stack_versions/stack_version_all.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/stack_versions/stack_version_all.json b/ambari-web/app/assets/data/stack_versions/stack_version_all.json
index c2651ea..15e1415 100644
--- a/ambari-web/app/assets/data/stack_versions/stack_version_all.json
+++ b/ambari-web/app/assets/data/stack_versions/stack_version_all.json
@@ -2,50 +2,10 @@
   "items": [
     {
       "StackVersion": {
-        "name": "HDP 2.2.0.0",
-        "version": "2.2.0.10",
-        "installed_hosts": 0,
-        "current_hosts": 0,
-        "repositories": [
-          {
-            "os": "redhat6",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          },
-          {
-            "os": "ubuntu12",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          }
-        ]
-      }
-    },
-    {
-      "StackVersion": {
         "name": "HDP 2.2.0.1",
-        "version": "2.2.0.12",
-        "installed_hosts": 2,
-        "current_hosts": 3,
+        "version": "HDP-2.2.2",
+        "installed_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com"],
+        "current_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com"],
         "repositories": [
           {
             "os": "redhat6",
@@ -53,12 +13,12 @@
               {
                 "id": "HDP-2.2.0.1-885",
                 "type": "HDP",
-                "baseurl": "http://host1/hdp"
+                "baseurl": "http://dev01.hortonworks.com/hdp"
               },
               {
                 "id": "HDP-UTILS-1.0.0.20",
                 "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
+                "baseurl": "http://dev01.hortonworks.com/hdp-utils"
               }
             ]
           }
@@ -68,9 +28,9 @@
     {
       "StackVersion": {
         "name": "HDP 2.2.0.2",
-        "version": "2.2.0.11",
-        "installed_hosts": 5,
-        "current_hosts": 5,
+        "version": "HDP-2.2.3",
+        "installed_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com"],
+        "current_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com"],
         "repositories": [
           {
             "os": "redhat6",
@@ -78,12 +38,12 @@
               {
                 "id": "HDP-2.2.0.1-885",
                 "type": "HDP",
-                "baseurl": "http://host1/hdp"
+                "baseurl": "http://dev01.hortonworks.com/hdp"
               },
               {
                 "id": "HDP-UTILS-1.0.0.20",
                 "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
+                "baseurl": "http://dev01.hortonworks.com/hdp-utils"
               }
             ]
           }
@@ -94,8 +54,8 @@
       "StackVersion": {
         "name": "HDP 2.2.0.0",
         "version": "2.2.0.1",
-        "installed_hosts": 0,
-        "current_hosts": 0,
+        "installed_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com"],
+        "current_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com"],
         "repositories": [
           {
             "os": "redhat6",
@@ -103,12 +63,12 @@
               {
                 "id": "HDP-2.2.0.1-885",
                 "type": "HDP",
-                "baseurl": "http://host1/hdp"
+                "baseurl": "http://dev01.hortonworks.com/hdp"
               },
               {
                 "id": "HDP-UTILS-1.0.0.20",
                 "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
+                "baseurl": "http://dev01.hortonworks.com/hdp-utils"
               }
             ]
           },
@@ -118,12 +78,12 @@
               {
                 "id": "HDP-2.2.0.1-885",
                 "type": "HDP",
-                "baseurl": "http://host1/hdp"
+                "baseurl": "http://dev01.hortonworks.com/hdp"
               },
               {
                 "id": "HDP-UTILS-1.0.0.20",
                 "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
+                "baseurl": "http://dev01.hortonworks.com/hdp-utils"
               }
             ]
           }
@@ -134,8 +94,8 @@
       "StackVersion": {
         "name": "HDP 2.2.0.1",
         "version": "2.2.0.2",
-        "installed_hosts": 2,
-        "current_hosts": 3,
+        "installed_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com", "dev03.hortonworks.com"],
+        "current_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com", "dev03.hortonworks.com"],
         "repositories": [
           {
             "os": "redhat6",
@@ -143,12 +103,12 @@
               {
                 "id": "HDP-2.2.0.1-885",
                 "type": "HDP",
-                "baseurl": "http://host1/hdp"
+                "baseurl": "http://dev01.hortonworks.com/hdp"
               },
               {
                 "id": "HDP-UTILS-1.0.0.20",
                 "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
+                "baseurl": "http://dev01.hortonworks.com/hdp-utils"
               }
             ]
           }
@@ -159,188 +119,8 @@
       "StackVersion": {
         "name": "HDP 2.2.0.2",
         "version": "2.2.0.3",
-        "installed_hosts": 5,
-        "current_hosts": 5,
-        "repositories": [
-          {
-            "os": "redhat6",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          }
-        ]
-      }
-    },
-    {
-      "StackVersion": {
-        "name": "HDP 2.2.0.0",
-        "version": "2.2.0.4",
-        "installed_hosts": 0,
-        "current_hosts": 0,
-        "repositories": [
-          {
-            "os": "redhat6",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          },
-          {
-            "os": "ubuntu12",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          }
-        ]
-      }
-    },
-    {
-      "StackVersion": {
-        "name": "HDP 2.2.0.1",
-        "version": "2.2.0.5",
-        "installed_hosts": 2,
-        "current_hosts": 3,
-        "repositories": [
-          {
-            "os": "redhat6",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          }
-        ]
-      }
-    },
-    {
-      "StackVersion": {
-        "name": "HDP 2.2.0.2",
-        "version": "2.2.0.6",
-        "installed_hosts": 5,
-        "current_hosts": 5,
-        "repositories": [
-          {
-            "os": "redhat6",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          }
-        ]
-      }
-    },
-    {
-      "StackVersion": {
-        "name": "HDP 2.2.0.0",
-        "version": "2.2.0.7",
-        "installed_hosts": 0,
-        "current_hosts": 0,
-        "repositories": [
-          {
-            "os": "redhat6",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          },
-          {
-            "os": "ubuntu12",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          }
-        ]
-      }
-    },
-    {
-      "StackVersion": {
-        "name": "HDP 2.2.0.1",
-        "version": "2.2.0.8",
-        "installed_hosts": 2,
-        "current_hosts": 3,
-        "repositories": [
-          {
-            "os": "redhat6",
-            "baseurls": [
-              {
-                "id": "HDP-2.2.0.1-885",
-                "type": "HDP",
-                "baseurl": "http://host1/hdp"
-              },
-              {
-                "id": "HDP-UTILS-1.0.0.20",
-                "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
-              }
-            ]
-          }
-        ]
-      }
-    },
-    {
-      "StackVersion": {
-        "name": "HDP 2.2.0.2",
-        "version": "2.2.0.9",
-        "installed_hosts": 5,
-        "current_hosts": 5,
+        "installed_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com", "dev03.hortonworks.com"],
+        "current_hosts": ["dev01.hortonworks.com", "dev02.hortonworks.com", "dev03.hortonworks.com"],
         "repositories": [
           {
             "os": "redhat6",
@@ -348,12 +128,12 @@
               {
                 "id": "HDP-2.2.0.1-885",
                 "type": "HDP",
-                "baseurl": "http://host1/hdp"
+                "baseurl": "http://dev01.hortonworks.com/hdp"
               },
               {
                 "id": "HDP-UTILS-1.0.0.20",
                 "type": "HDP-UTILS",
-                "baseurl": "http://host1/hdp-utils"
+                "baseurl": "http://dev01.hortonworks.com/hdp-utils"
               }
             ]
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/assets/test/tests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index 2752a0c..93c61dd 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -145,6 +145,7 @@ var files = ['test/init_model_test',
   'test/views/common/configs/config_history_flow_test',
   'test/views/main/dashboard_test',
   'test/views/main/menu_test',
+  '/test/views/main/admin/stack_version/stack_version_details_test',
   'test/views/main/dashboard/config_history_view_test',
   'test/views/main/dashboard/widget_test',
   'test/views/main/dashboard/widgets_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index 3e4e0da..89187e2 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -54,6 +54,7 @@ require('controllers/main/admin/highAvailability/resourceManager/step4_controlle
 require('controllers/main/admin/repositories');
 require('controllers/main/admin/stack_upgrade_controller');
 require('controllers/main/admin/stack_upgrade/stack_versions_controller');
+require('controllers/main/admin/stack_upgrade/stack_version_details_controller');
 require('controllers/main/admin/serviceAccounts_controller');
 require('controllers/main/admin/advanced');
 require('utils/polling');

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/controllers/main/admin/stack_upgrade/stack_version_details_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_upgrade/stack_version_details_controller.js
b/ambari-web/app/controllers/main/admin/stack_upgrade/stack_version_details_controller.js
new file mode 100644
index 0000000..365b171
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/stack_upgrade/stack_version_details_controller.js
@@ -0,0 +1,33 @@
+/**
+ * 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.MainStackVersionsDetailsController = Em.Controller.extend({
+  name: 'mainStackVersionsDetailsController',
+
+  content: null,
+
+  totalHostCount: function() {
+    return App.get('allHostNames.length');
+  }.property('App.allHostNames.length'),
+
+  //TODO method that will perform stack upgrade on host
+  installStackVersion: Em.K
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/mappers/stack_version_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/stack_version_mapper.js b/ambari-web/app/mappers/stack_version_mapper.js
index 856bccb..b07865e 100644
--- a/ambari-web/app/mappers/stack_version_mapper.js
+++ b/ambari-web/app/mappers/stack_version_mapper.js
@@ -31,8 +31,8 @@ App.stackVersionMapper = App.QuickDataMapper.create({
     operating_systems: {
       item: 'id'
     },
-    installed_hosts_count: 'installed_hosts',
-    current_hosts_count: 'current_hosts'
+    installed_hosts: 'installed_hosts',
+    current_hosts: 'current_hosts'
   },
 
   modelOS: {

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index f01f9c2..773fa6b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -154,6 +154,7 @@ Em.I18n.translations = {
   'common.cluster':'Cluster',
   'common.repositories':'Repositories',
   'common.stack.versions':'Stack Versions',
+  'common.versions':'Versions',
   'common.serviceAccounts': 'Service Accounts',
   'common.add': 'Add',
   'common.edit': 'Edit',
@@ -1177,6 +1178,16 @@ Em.I18n.translations = {
   'admin.stackVersions.table.header.installed': "Installed on",
   'admin.stackVersions.table.header.current': "Current on",
 
+  'admin.stackVersions.datails.versionName': "Version Name",
+  'admin.stackVersions.datails.installed.on': "Installed On",
+  'admin.stackVersions.datails.current.on': "Current On",
+  'admin.stackVersions.datails.base.url': "Base Url",
+
+  'admin.stackVersions.datails.hosts.btn.install': "Install to {0} hosts",
+  'admin.stackVersions.datails.hosts.btn.installing': "Installing...",
+  'admin.stackVersions.datails.hosts.btn.nothing': "Nothing to Install",
+  'admin.stackVersions.datails.hosts.btn.na': "Status not available",
+
   'services.service.start':'Start',
   'services.service.stop':'Stop',
   'services.service.metrics':'Service Metrics',

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/models/stack_version/version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_version/version.js b/ambari-web/app/models/stack_version/version.js
index b7ede22..fb0d4f7 100644
--- a/ambari-web/app/models/stack_version/version.js
+++ b/ambari-web/app/models/stack_version/version.js
@@ -22,8 +22,8 @@ App.StackVersion = DS.Model.extend({
   id: DS.attr('string'),
   name: DS.attr('string'),
   version: DS.attr('string'),
-  installedHostsCount: DS.attr('number'),
-  currentHostsCount: DS.attr('number'),
+  installedHosts: DS.attr('array'),
+  currentHosts: DS.attr('array'),
   operatingSystems: DS.hasMany('App.OS')
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 76c46a5..e66fde3 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -493,11 +493,25 @@ module.exports = Em.Route.extend({
     adminStackVersions: Em.Route.extend({
       route: '/versions',
       connectOutlets: function (router) {
-        if(App.get('supports.stackUpgrade')) {
-          router.set('mainAdminController.category', "stackVersions");
-          router.get('mainAdminController').connectOutlet('mainStackVersions');
+        if (App.get('supports.stackUpgrade')) {
+          router.get('mainStackVersionsController').load();
         }
-      }
+      },
+      index: Em.Route.extend({
+        route: '/',
+        connectOutlets: function (router) {
+          if(App.get('supports.stackUpgrade')) {
+            router.set('mainAdminController.category', "stackVersions");
+            router.get('mainAdminController').connectOutlet('mainStackVersions');
+          }
+        }
+      }),
+      version: Em.Route.extend({
+        route: '/:stack_version_id',
+        connectOutlets: function (router, stackVersion) {
+          router.get('mainAdminController').connectOutlet('mainStackVersionsDetails', stackVersion);
+        }
+      })
     }),
     adminAdvanced: Em.Route.extend({
       route: '/advanced',

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index df43c1a..d955e15 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5037,6 +5037,40 @@ ul.inline li {
     padding-left: 13px;
   }
 }
+
+#stack-version-details {
+  padding-top: 10px;
+  .box {
+    margin-top:20px;
+  }
+  .version-content {
+    padding: 10px 15px;
+  }
+  table.stack-version-repos {
+    width: 100%;
+    text-align: left;
+    .table {
+      td:first-child,
+      th:first-child,
+      td:first-child + td,
+      th:first-child + th {
+        width: 20%;
+      }
+      td:first-child + td + td,
+      th:first-child + th + th{
+        width: 60%;
+      }
+    }
+    input {
+      width: 100%;
+    }
+  }
+  .stack-status-button {
+    padding-top: 20px;
+    padding-bottom: 20px;
+    width: 250px;
+  }
+}
 .one-story-bar {
   margin-bottom: 60px;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/templates/main/admin/stack_versions/stack_version_details.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_versions/stack_version_details.hbs
b/ambari-web/app/templates/main/admin/stack_versions/stack_version_details.hbs
new file mode 100644
index 0000000..a76631e
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/stack_versions/stack_version_details.hbs
@@ -0,0 +1,102 @@
+{{!
+* 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="stack-version-details">
+  <a href="#/main/admin/versions">{{t common.versions}}</a><span>&nbsp;
> &nbsp;{{content.version}}</span>
+
+  <div class="box">
+    <div class="box-header">
+      <h4>{{t common.details}}</h4>
+    </div>
+    <div class="version-content">
+      <div class="row-fluid">
+        <div class="span3">{{t common.stack}}</div>
+        <div class="span6">{{content.name}}</div>
+      </div>
+      <div class="row-fluid">
+        <div class="span3">{{t admin.stackVersions.datails.versionName}}</div>
+        <div class="span6">{{content.version}}</div>
+      </div>
+    </div>
+  </div>
+
+  <div class="box">
+    <div class="box-header">
+      <h4>{{t common.status}}</h4>
+    </div>
+    <div class="version-content">
+      <div class="row-fluid">
+        <div class="span8">
+          <div class="row-fluid">
+            <div class="span3">{{t admin.stackVersions.datails.installed.on}}</div>
+            <div class="span6">{{content.installedHosts.length}}/{{totalHostCount}}</div>
+          </div>
+          <div class="row-fluid">
+            <div class="span3">{{t admin.stackVersions.datails.current.on}}</div>
+            <div class="span6">{{content.currentHosts.length}}/{{totalHostCount}}</div>
+          </div>
+        </div>
+        <div class="span4">
+          <a {{bindAttr class="view.statusClass :btn :stack-status-button"}} {{action
installStackVersion target="controller"}}>
+            <i {{bindAttr class="view.installInProgress:icon-cog"}}>&nbsp;</i>{{view.stackTextStatus}}
+          </a>
+        </div>
+      </div>
+    </div>
+  </div>
+
+  <div class="box">
+    <div class="box-header">
+      <h4>{{t common.repositories}}</h4>
+    </div>
+    <div class="version-content">
+      <table class="stack-version-repos">
+        <thead>
+        <tr>
+          <th>
+            {{t common.os}}
+          </th>
+          <th>
+            {{t common.name}}
+          </th>
+          <th>
+            {{t admin.stackVersions.datails.base.url}}
+          </th>
+        </tr>
+        </thead>
+        <tbody>
+        {{#each os in content.operatingSystems}}
+          {{#each repo in os.repositories}}
+            <tr>
+              <td>
+                {{os.name}}
+              </td>
+              <td>
+                {{repo.type}}
+              </td>
+              <td>
+                {{view Ember.TextField valueBinding="repo.baseurl" className="disabled"}}
+              </td>
+            </tr>
+          {{/each}}
+        {{/each}}
+        </tbody>
+      </table>
+    </div>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/templates/main/admin/stack_versions/stack_versions.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_versions/stack_versions.hbs b/ambari-web/app/templates/main/admin/stack_versions/stack_versions.hbs
index 15eba7b..2fb3e0b 100644
--- a/ambari-web/app/templates/main/admin/stack_versions/stack_versions.hbs
+++ b/ambari-web/app/templates/main/admin/stack_versions/stack_versions.hbs
@@ -40,7 +40,7 @@
         {{#each item in view.pageContent}}
           {{#view view.StackVersionView contentBinding="item"}}
             <td class="first">
-              <span class="stack-name">{{view.content.name}}</span>
+              <a href="#/main/admin/versions/{{unbound view.content.id}}" class="stack-name">{{view.content.name}}</a>
             </td>
             <td>
               <span class="stack-version">{{view.content.version}}</span>
@@ -56,10 +56,10 @@
               </div>
             </td>
             <td>
-              <span>{{view.content.installedHostsCount}}</span>
+              <span>{{view.content.installedHosts.length}}</span>
             </td>
             <td>
-              <span>{{view.content.currentHostsCount}}</span>
+              <span>{{view.content.currentHosts.length}}</span>
             </td>
           {{/view}}
         {{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 842596b..ff40a9f 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -96,6 +96,7 @@ require('views/main/admin/repositories');
 require('views/main/admin/serviceAccounts_view');
 require('views/main/admin/stack_upgrade');
 require('views/main/admin/stack_versions/stack_version_view');
+require('views/main/admin/stack_versions/stack_version_details_view');
 require('views/main/admin/advanced');
 require('views/main/admin/advanced/password');
 require('views/main/admin/audit');

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/ambari-web/app/views/main/admin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin.js b/ambari-web/app/views/main/admin.js
index 7c00ed8..7e14946 100644
--- a/ambari-web/app/views/main/admin.js
+++ b/ambari-web/app/views/main/admin.js
@@ -31,7 +31,7 @@ App.MainAdminView = Em.View.extend({
     if (App.get('supports.stackUpgrade')) {
       items.push({
         name: 'stackVersions',
-        url: 'adminStackVersions',
+        url: 'adminStackVersions.index',
         label: Em.I18n.t('common.stack.versions')
       });
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/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
new file mode 100644
index 0000000..9889fc8
--- /dev/null
+++ b/ambari-web/app/views/main/admin/stack_versions/stack_version_details_view.js
@@ -0,0 +1,102 @@
+/**
+ * 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'),
+  /**
+   * list of hostsStackVersions objects for current config version
+   * {Array}
+   */
+  hostStackVersions: function() {
+    return App.HostStackVersion.find().filterProperty('version', this.get('controller.content.version'));
+  }.property('controller.content.version'),
+
+  /**
+   * list of hosts on which this stack version is not installed
+   * {Array}
+   */
+  notInstalledHosts: function() {
+    return this.get('hostStackVersions').filterProperty('installEnabled');
+  }.property('hostStackVersions'),
+
+  /**
+   * true if install stack version is in progress at least on 1 host
+   * {Boolean}
+   */
+  installInProgress: function() {
+    return this.get('hostStackVersions').someProperty('status', 'INSTALLING');
+  }.property('hostStackVersions'),
+
+  /**
+   * installation status of stack version on hosts
+   * {String}
+   */
+  status: function() {
+    if (this.get('installInProgress'))  {
+      return 'INSTALLING'
+    } else if (this.get('notInstalledHosts.length') == 0) {
+      return 'ALL_INSTALLED';
+    } else if (this.get('notInstalledHosts.length') > 0) {
+      return 'INSTALL';
+    } else {
+      return 'UNDEFINED';
+    }
+  }.property('notInstalledHosts.length'),
+
+  /**
+   * text on install buttons
+   * {String}
+   */
+  stackTextStatus: function() {
+    switch(this.get('status')) {
+      case 'INSTALL':
+        return Em.I18n.t('admin.stackVersions.datails.hosts.btn.install').format(this.get('notInstalledHosts.length'));
+        break;
+      case 'INSTALLING':
+        return Em.I18n.t('admin.stackVersions.datails.hosts.btn.installing');
+        break;
+      case 'ALL_INSTALLED':
+        return Em.I18n.t('admin.stackVersions.datails.hosts.btn.nothing');
+        break;
+      default:
+        return Em.I18n.t('admin.stackVersions.datails.hosts.btn.na');
+        break;
+    }
+  }.property('status', 'notInstalledHosts'),
+
+  /**
+   * class on install buttons
+   * {String}
+   */
+  statusClass: function() {
+    switch (this.get('status')) {
+      case 'INSTALL':
+        return 'btn-success';
+        break;
+      case 'INSTALLING':
+        return 'btn-primary disabled';
+        break;
+      default:
+        return 'disabled';
+    }
+  }.property('status')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/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
index b0793b0..fd805fc 100644
--- 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
@@ -149,10 +149,6 @@ App.MainStackVersionsView = App.TableView.extend({
     labels: function() {
       return this.get('content.operatingSystems').getEach('name').join("<br />");
     }.property('content.operatingSystems.length')
-  }),
-
-  didInsertElement: function () {
-    this.get('controller').load();
-  }
+  })
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/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 5ab6375..1988d02 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -140,8 +140,8 @@ App.MainMenuView = Em.CollectionView.extend({
         });
         if(App.get('supports.stackUpgrade')) {
           categories.push({
-            name: 'stackVersions',
-            url: 'versions/',
+            name: 'adminStackVersions',
+            url: 'versions',
             label: Em.I18n.t('common.stack.versions')
           });
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0cda87/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
new file mode 100644
index 0000000..3710733
--- /dev/null
+++ b/ambari-web/test/views/main/admin/stack_version/stack_version_details_test.js
@@ -0,0 +1,94 @@
+/**
+ * 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 mainStackVersionsDetailsView;
+
+describe('App.MainStackVersionsDetailsView', function () {
+  var hostStackVersions = [
+    {
+      installEnabled: true,
+      status: "INIT"
+    },
+    {
+      installEnabled: true,
+      status: "INSTALL_FAILED"
+    },
+    {
+      installEnabled: false,
+      status: "INSTALLED"
+    }
+  ];
+  beforeEach(function () {
+    mainStackVersionsDetailsView = App.MainStackVersionsDetailsView.create({hostStackVersions:
hostStackVersions});
+  });
+
+  describe('#notInstalledHosts', function () {
+    it("list on host without current config version", function() {
+      var notInstalled = [
+        {
+          installEnabled: true,
+          status: "INIT"
+        },
+        {
+          installEnabled: true,
+          status: "INSTALL_FAILED"
+        }
+      ];
+      expect(mainStackVersionsDetailsView.get('notInstalledHosts')).to.eql(notInstalled);
+    });
+  });
+
+  describe('#installInProgress', function () {
+    it("stack version install is not in progress", function() {
+      expect(mainStackVersionsDetailsView.get('installInProgress')).to.be.false;
+    });
+    it("stack version install is in progress", function() {
+      mainStackVersionsDetailsView.get('hostStackVersions').pushObject({
+        installEnabled: false,
+        status: "INSTALLING"
+      });
+      expect(mainStackVersionsDetailsView.get('installInProgress')).to.be.true;
+    });
+  });
+
+
+  describe('#statusClass', function () {
+    var tests = [
+      {
+        status: "ALL_INSTALLED",
+        buttonClass: 'disabled'
+      },
+      {
+        status: "INSTALL",
+        buttonClass: 'btn-success'
+      },
+      {
+        status: "INSTALLING",
+        buttonClass: 'btn-primary disabled'
+      }
+    ].forEach(function(t) {
+      it("status is " + t.status + " class is " + t.buttonClass, function() {
+        mainStackVersionsDetailsView.reopen({'status': t.status});
+        expect(mainStackVersionsDetailsView.get('statusClass')).to.equal(t.buttonClass);
+      });
+    });
+  });
+});


Mime
View raw message