ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [2/3] ambari git commit: AMBARI-9429 Versions: hosts got out of sync and could not install version (UI part). (ababiichuk)
Date Mon, 02 Feb 2015 18:11:54 GMT
AMBARI-9429 Versions: hosts got out of sync and could not install version (UI part). (ababiichuk)


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

Branch: refs/heads/trunk
Commit: b02773753bab196aa245af8a9cc36cb31877a17a
Parents: d4faf0b
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Mon Feb 2 19:36:28 2015 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Mon Feb 2 20:11:44 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/messages.js                            |  3 +++
 ambari-web/app/models/host_stack_version.js           |  6 ++++++
 ambari-web/app/templates/main/host/stack_versions.hbs |  3 +++
 ambari-web/app/views/main/host/stack_versions_view.js | 11 +++++++++++
 4 files changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b0277375/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 4877f60..6b9c16a 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1996,6 +1996,9 @@ Em.I18n.translations = {
   'hosts.host.stackVersions.status.out_of_sync': 'Out of Sync',
   'hosts.host.stackVersions.status.upgrading': 'Upgrading',
   'hosts.host.stackVersions.status.upgrade_failed': 'Upgrade Failed',
+  'hosts.host.stackVersions.outOfSync.tooltip': 'This version is Out of Sync on this host.
Out of Sync can occur ' +
+    'the components on a host change after installing a version not in use. ' +
+    'Click Install to have Ambari install the packages for this version to get this host
in sync.',
   'hosts.host.stackVersions.install.confirmation': 'You are about to install version <b>{0}</b>
on this host.',
 
   'hosts.host.metrics.dataUnavailable':'Data Unavailable',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b0277375/ambari-web/app/models/host_stack_version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_stack_version.js b/ambari-web/app/models/host_stack_version.js
index 4142a3d..55639ab 100644
--- a/ambari-web/app/models/host_stack_version.js
+++ b/ambari-web/app/models/host_stack_version.js
@@ -48,6 +48,12 @@ App.HostStackVersion = DS.Model.extend({
   }.property('status'),
 
   /**
+   * @type {boolean}
+   */
+  isOutOfSync: function () {
+    return this.get('status') === 'OUT_OF_SYNC';
+  }.property('status'),
+  /**
    * @type {string}
    */
   displayStatus: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b0277375/ambari-web/app/templates/main/host/stack_versions.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/stack_versions.hbs b/ambari-web/app/templates/main/host/stack_versions.hbs
index 0180781..7585a7b 100644
--- a/ambari-web/app/templates/main/host/stack_versions.hbs
+++ b/ambari-web/app/templates/main/host/stack_versions.hbs
@@ -44,6 +44,9 @@
               <a href="#" {{action showInstallProgress this target="view"}}><i class="icon-cog
in_progress"></i>&nbsp;{{this.displayStatus}}</a>
             {{else}}
               {{this.displayStatus}}
+              {{#if this.isOutOfSync}}
+                {{view view.outOfSyncInfo}}
+              {{/if}}
             {{/if}}
           {{/if}}
         </td>

http://git-wip-us.apache.org/repos/asf/ambari/blob/b0277375/ambari-web/app/views/main/host/stack_versions_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/stack_versions_view.js b/ambari-web/app/views/main/host/stack_versions_view.js
index 8186e72..380850a 100644
--- a/ambari-web/app/views/main/host/stack_versions_view.js
+++ b/ambari-web/app/views/main/host/stack_versions_view.js
@@ -165,6 +165,17 @@ App.MainHostStackVersionsView = App.TableView.extend({
     App.router.get('mainAdminStackAndUpgradeController').showProgressPopup(event.context);
   },
 
+  outOfSyncInfo: Em.View.extend({
+    tagName: 'i',
+    classNames: ['icon-question-sign'],
+    didInsertElement: function() {
+      App.tooltip($(this.get('element')), {
+        placement: "top",
+        title: Em.I18n.t('hosts.host.stackVersions.outOfSync.tooltip')
+      });
+    }
+  }),
+
   /**
    * @type {Array}
    */


Mime
View raw message