فهرست منبع

AMBARI-8889 Version Management tweaks. (ababiichuk)

aBabiichuk 10 سال پیش
والد
کامیت
fa763504b3

+ 16 - 0
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);

+ 2 - 3
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',

+ 20 - 33
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 {

+ 2 - 2
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}}

+ 3 - 3
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});