Repository: ambari
Updated Branches:
  refs/heads/trunk 9842b40d2 -> fa763504b


AMBARI-8889 Version Management tweaks. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: fa763504b3a240d9d864f5c3f2ac8c13f3c47328
Parents: 9842b40
Author: aBabiichuk <[email protected]>
Authored: Tue Dec 23 17:31:56 2014 +0200
Committer: aBabiichuk <[email protected]>
Committed: Tue Dec 23 17:31:56 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/mappers/stack_version_mapper.js  | 16 ++++++
 ambari-web/app/messages.js                      |  5 +-
 ambari-web/app/styles/application.less          | 53 ++++++++------------
 .../stack_versions/stack_version_details.hbs    |  4 +-
 .../test/controllers/wizard/step3_test.js       |  6 +--
 5 files changed, 43 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa763504/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 0de41ba..2d3f885 100644
--- a/ambari-web/app/mappers/stack_version_mapper.js
+++ b/ambari-web/app/mappers/stack_version_mapper.js
@@ -44,6 +44,22 @@ App.stackVersionMapper = App.QuickDataMapper.create({
       json.items.forEach(function (item) {
         var stack = item.ClusterStackVersions;
         stack.repository_version_id = 
item.ClusterStackVersions.repository_version;
+        /**
+         * this property contains array of hosts on which repoversion was 
installed
+         * but state of repoveriosn for this hosts can be any postinstalled 
state
+         * possible states:
+         * <code>INSTALLED<code>
+         * <code>UPGRADING<code>
+         * <code>UPGRADED<code>
+         * <code>UPGRADE_FAILED<code>
+         * <code>CURRENT<code>
+         */
+        stack.host_states.INSTALLED = 
item.ClusterStackVersions.host_states.INSTALLED
+          .concat(item.ClusterStackVersions.host_states.UPGRADING)
+          .concat(item.ClusterStackVersions.host_states.UPGRADED)
+          .concat(item.ClusterStackVersions.host_states.UPGRADE_FAILED)
+          .concat(item.ClusterStackVersions.host_states.CURRENT);
+
         if (item.repository_versions && item.repository_versions[0]) {
           item.repository_versions[0].RepositoryVersions.stackVersionId = 
item.ClusterStackVersions.id;
           App.repoVersionMapper.map({"items": item.repository_versions }, 
true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa763504/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e5d842e..aa7126e 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1297,7 +1297,7 @@ Em.I18n.translations = {
   'admin.stackVersions.details.hosts.btn.reinstall': "Reinstall on failed 
hosts",
   'admin.stackVersions.details.hosts.btn.install': "Install to {0} hosts",
   'admin.stackVersions.details.hosts.btn.installing': "Installing...",
-  'admin.stackVersions.details.hosts.btn.nothing': "Installed on all hosts",
+  'admin.stackVersions.details.hosts.btn.nothing': "Installed on all hosts.",
   'admin.stackVersions.details.hosts.btn.goto.upgrade': "Proceed to upgrade",
   'admin.stackVersions.details.hosts.btn.na': "Status not available",
   'admin.stackVersions.details.install.hosts.popup.title': "Install {0} 
version",
@@ -1338,8 +1338,7 @@ Em.I18n.translations = {
   'admin.stackUpgrade.dialog.closePause': "Upgrade is paused. \n If you 
dismiss this window, you can resume Upgrade later.",
   'admin.stackUpgrade.preupgradeCheck.header': "Upgrade to {0}",
   'admin.stackUpgrade.preupgradeCheck.title': "Upgrade Requirements Not Met",
-  'admin.stackUpgrade.preupgradeCheck.alert': "You have not met the following 
requirements for performing on upgrade.<br/>"+
-    "You must fix them before you continue",
+  'admin.stackUpgrade.preupgradeCheck.alert': "You must meet the following 
requirements before you can proceed with rolling upgrade.",
   'admin.stackUpgrade.preupgradeCheck.failedOn': "Failed on: ",
   'admin.stackUpgrade.preupgradeCheck.reason': "Reason: ",
   'services.service.start':'Start',

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa763504/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index ba17ec2..12d363c 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5017,36 +5017,21 @@ ul.inline li {
     thead {
       background: none repeat scroll 0 0 #F8F8F8;
     }
-    // stack name/version
+    // all columns
     th:first-child,
     td:first-child,
     th:first-child + th,
-    td:first-child + td {
-      width: 25%;
-      select.filter-input-width{
-        width: 75%;
-      }
-      input.filter-input-width{
-        width: 75%;
-      }
-    }
-    // os
+    td:first-child + td,
     th:first-child + th + th,
-    td:first-child + td + td {
+    td:first-child + td + td,
+    th:first-child + th + th + th,
+    td:first-child + td + td + td {
       width: 20%;
       word-wrap: break-word;
-      select.filter-input-width{
+      input.filter-input-width {
         width: 75%;
       }
-    }
-    // hosts column
-    th:first-child + th + th + th,
-    td:first-child + td + td + td,
-    th:first-child + th + th + th + th,
-    td:first-child + td + td + td + td {
-      width: 15%;
-      word-wrap: break-word;
-      input.filter-input-width {
+      select.filter-input-width{
         width: 75%;
       }
     }
@@ -5082,17 +5067,16 @@ ul.inline li {
   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%;
-      }
+
+    td:first-child,
+    th:first-child,
+    td:first-child + td,
+    th:first-child + th {
+      width: 15%;
+    }
+    td:first-child + td + td,
+    th:first-child + th + th {
+      width: 70%;
     }
     input {
       width: 100%;
@@ -5106,6 +5090,9 @@ ul.inline li {
     float: left;
     width: 140px;
     text-align: right;
+    .icon-cogs {
+      color: #0088cc;
+    }
   }
   #repo-installing-link {}
   .repo-installing-progress {

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa763504/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
index 70a875a..f922bf2 100644
--- 
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
@@ -63,7 +63,7 @@
           {{!show progress when install repo is in progress}}
           {{#if installInProgress}}
             <div class="repo-installing-info">
-            <i class="icon-cog">&nbsp;</i>
+            <i class="icon-cogs">&nbsp;</i>
             <a href="javascript:void(null);" id="repo-installing-link" 
{{action showProgressPopup target="controller"}}>
               {{t admin.stackVersions.details.hosts.btn.installing}}
             </a>
@@ -80,7 +80,7 @@
           {{!show success mesasge when install complete}}
           {{#if installComplete}}
             <i class="icon-ok">&nbsp;</i>
-            <span>{{t 
admin.stackVersions.details.hosts.btn.nothing}}</span>&nbsp;
+            <span>{{t 
admin.stackVersions.details.hosts.btn.nothing}}</span>&nbsp;&nbsp;
             {{#if controller.current}}
               <span class="label label-success">{{t common.current}}</span>
             {{else}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa763504/ambari-web/test/controllers/wizard/step3_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step3_test.js 
b/ambari-web/test/controllers/wizard/step3_test.js
index 249d1ad..f74bbf9 100644
--- a/ambari-web/test/controllers/wizard/step3_test.js
+++ b/ambari-web/test/controllers/wizard/step3_test.js
@@ -1425,7 +1425,7 @@ describe('App.WizardStep3Controller', function () {
 
       var items = [
         {Hosts:{host_name: 'c1', last_agent_env: {umask: 18}}},
-        {Hosts:{host_name: 'c2', last_agent_env: {umask: 1}}}
+        {Hosts:{host_name: 'c2', last_agent_env: {umask: 24}}}
       ];
 
       c.parseWarnings({items: items});
@@ -1439,8 +1439,8 @@ describe('App.WizardStep3Controller', function () {
     it('should parse umask warnings (2)', function() {
 
       var items = [
-        {Hosts:{host_name: 'c1', last_agent_env: {umask: 8}}},
-        {Hosts:{host_name: 'c2', last_agent_env: {umask: 1}}}
+        {Hosts:{host_name: 'c1', last_agent_env: {umask: 24}}},
+        {Hosts:{host_name: 'c2', last_agent_env: {umask: 25}}}
       ];
 
       c.parseWarnings({items: items});

Reply via email to