You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/01/29 15:35:41 UTC

[1/3] ambari git commit: AMBARI-9394 Versions: incorrect properties during navigation from versions to hosts. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/trunk ad73c195b -> 423f8fc37


AMBARI-9394 Versions: incorrect properties during navigation from versions to hosts. (atkach)


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

Branch: refs/heads/trunk
Commit: be9e4fb32f5c1230bae31b74d2ad2496714122d2
Parents: ad73c19
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Thu Jan 29 14:00:18 2015 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Thu Jan 29 16:35:17 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host.js |  4 ++--
 ambari-web/app/views/main/host.js       | 16 +++++++++++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/be9e4fb3/ambari-web/app/controllers/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js
index cd6b3d2..6074d66 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -482,11 +482,11 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, {
       iColumn: column,
       value: [
         {
-          property: 'version',
+          property: 'repository_versions/RepositoryVersions/repository_version',
           value: version
         },
         {
-          property: 'state',
+          property: 'HostStackVersions/state',
           value: state.toUpperCase()
         }
       ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/be9e4fb3/ambari-web/app/views/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js
index b68e745..88b41f5 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -1010,12 +1010,13 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
     filterView: filters.componentFieldView.extend({
       templateName: require('templates/main/host/version_filter'),
       selectedVersion: null,
-      selecteStatus: null,
+      selectedStatus: null,
       value: [],
 
       versionSelectView: filters.createSelectView({
         classNames: ['notActive'],
         fieldType: 'filter-input-width',
+        filterPropertyName: 'repository_versions/RepositoryVersions/repository_version',
         content: function () {
           return  [
             {
@@ -1036,6 +1037,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
       statusSelectView: filters.createSelectView({
         classNames: ['notActive'],
         fieldType: 'filter-input-width',
+        filterPropertyName: 'HostStackVersions/state',
         content: function () {
           return [
             {
@@ -1084,6 +1086,18 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
         });
       }
     }),
+    setValue: function (value) {
+      var versionSelectView = this.get('childViews')[0];
+
+      //restore selected options in Select views
+      versionSelectView.get('childViews').forEach(function (view) {
+        var filter = value.findProperty('property', view.get('filterPropertyName'));
+        if (filter && view.get('content').findProperty('value', filter.value)) {
+          view.set('selected', view.get('content').findProperty('value', filter.value));
+        }
+      }, this);
+      this._super(value);
+    },
     onChangeValue: function () {
       this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'sub-resource');
     },


[3/3] ambari git commit: AMBARI-9398 RU: minor tweaks. (atkach)

Posted by at...@apache.org.
AMBARI-9398 RU: minor tweaks. (atkach)


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

Branch: refs/heads/trunk
Commit: 423f8fc37e96208ebb15fcf83d8aed64851298fa
Parents: e3fccc2
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Thu Jan 29 15:35:47 2015 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Thu Jan 29 16:35:19 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/messages.js                                   | 8 ++++----
 .../main/admin/stack_upgrade/stack_upgrade_wizard.hbs        | 2 +-
 .../app/templates/main/admin/stack_upgrade/upgrade_group.hbs | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/423f8fc3/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 7296577..b870222 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1317,7 +1317,7 @@ Em.I18n.translations = {
 
   'admin.stackVersions.editRepositories.info': 'Provide Base URLs for the Operating Systems you are configuring. Uncheck all other Operating Systems.',
   'admin.stackVersions.editRepositories.validation.warning': 'Some of the repositories failed validation. Make changes to the base url or skip validation if you are sure that urls are correct',
-  'admin.stackVersions.version.install.confirm': 'You are about to install version <strong>{0}</strong> on all hosts.',
+  'admin.stackVersions.version.install.confirm': 'You are about to install packages for version <strong>{0}</strong> on all hosts.',
   'admin.stackVersions.version.linkTooltip': 'Click to Edit Repositories',
   'admin.stackVersions.version.hostsTooltip': 'Click to List Hosts',
   'admin.stackVersions.version.emptyHostsTooltip': 'No Hosts to List',
@@ -1326,7 +1326,7 @@ Em.I18n.translations = {
   'admin.stackVersions.manageVersions.popup.body': 'You are about to leave the <b>Cluster Management</b> interface' +
     ' and go to the <b>Ambari Administration</b> interface. You can return to cluster management by using the' +
     ' “Go to Dashboard” link in the Ambari Administration > Clusters section.',
-  'admin.stackVersions.version.installNow': "Install Now",
+  'admin.stackVersions.version.installNow': "Install Packages",
   'admin.stackVersions.version.performUpgrade': "Perform Upgrade",
   'admin.stackVersions.version.upgrade.pause': "Upgrade: Action Required",
   'admin.stackVersions.version.upgrade.running': "Upgrade: In Process",
@@ -1347,7 +1347,7 @@ Em.I18n.translations = {
   "Click on <b>Finalize</b> when you are ready to finalize the upgrade and commit to the new version." +
   " You are strongly encouraged to run tests on your cluster to ensure it is fully operational before finalizing." +
   " <b>You cannot go back to the original version once the upgrade is finalized.</b>",
-  'admin.stackUpgrade.doThisLater': "Do This Later",
+  'admin.stackUpgrade.pauseUpgrade': "Pause Upgrade",
   'admin.stackUpgrade.downgrade.proceed': "Proceed with Downgrade",
   'admin.stackUpgrade.downgrade.title': "Downgrade to {0}",
   'admin.stackUpgrade.downgrade.body': "Are you sure you wish to abort the upgrade process and downgrade to {0}",
@@ -1358,7 +1358,7 @@ Em.I18n.translations = {
   'admin.stackUpgrade.state.inProgress.downgrade': "Downgrade in Progress",
   'admin.stackUpgrade.state.paused.downgrade': "Downgrade Paused",
   'admin.stackUpgrade.state.completed.downgrade': "Downgrade Finished",
-  'admin.stackUpgrade.dialog.header': "Upgrade to {0}",
+  'admin.stackUpgrade.dialog.header': "Rolling Upgrade to {0}",
   'admin.stackUpgrade.dialog.downgrade.header': "Downgrade to {0}",
   'admin.stackUpgrade.dialog.operationFailed': "This operation failed.",
   'admin.stackUpgrade.dialog.stop': "Stop Upgrade",

http://git-wip-us.apache.org/repos/asf/ambari/blob/423f8fc3/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
index 4fb97b7..2e08c31 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
@@ -108,7 +108,7 @@
                 {{#if view.isDowngradeAvailable}}
                   <button class="btn btn-danger" {{action confirmDowngrade view.manualItem target="controller"}}>{{t common.downgrade}}</button>
                 {{/if}}
-                <button class="btn" {{action closeWizard target="view.parentView"}}>{{t admin.stackUpgrade.doThisLater}}</button>
+                <button class="btn" {{action closeWizard target="view.parentView"}}>{{t admin.stackUpgrade.pauseUpgrade}}</button>
                 <button class="btn btn-success" {{bindAttr disabled="view.isManualProceedDisabled"}} {{action complete view.manualItem target="view"}}>
                   {{t common.proceed}}
                 </button>

http://git-wip-us.apache.org/repos/asf/ambari/blob/423f8fc3/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_group.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_group.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_group.hbs
index 016251c..8372088 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_group.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_group.hbs
@@ -61,7 +61,7 @@
     {{#if item.isExpanded}}
 
       {{! List of Tasks}}
-      <div class="task-list">
+      <div class="task-list margin-bottom-5">
         {{#each task in item.tasks}}
           {{view App.upgradeTaskView contentBinding="task" tasksBinding="item.tasks"}}
         {{/each}}


[2/3] ambari git commit: AMBARI-9397 Rolling Upgrade popup: "current task" section at the top should not disappear. (atkach)

Posted by at...@apache.org.
AMBARI-9397 Rolling Upgrade popup: "current task" section at the top should not disappear. (atkach)


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

Branch: refs/heads/trunk
Commit: e3fccc2da9e3eaae3cef6e9e4c1789101c4bdf14
Parents: be9e4fb
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Thu Jan 29 14:58:20 2015 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Thu Jan 29 16:35:18 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/messages.js                      |  1 +
 .../stack_upgrade/stack_upgrade_wizard.hbs      |  7 ++++
 .../admin/stack_upgrade/upgrade_wizard_view.js  |  8 ++++
 .../stack_upgrade/upgrade_wizard_view_test.js   | 43 ++++++++++++++++++++
 4 files changed, 59 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e3fccc2d/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 75e51fc..7296577 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1373,6 +1373,7 @@ Em.I18n.translations = {
   'admin.stackUpgrade.dialog.closePause': "Upgrade is paused. \n If you dismiss this window, you can resume Upgrade later.",
   'admin.stackUpgrade.dialog.details.open': "show details",
   'admin.stackUpgrade.dialog.details.hide': "hide details",
+  'admin.stackUpgrade.dialog.notActive': "Waiting to execute the next task...",
   'services.service.start':'Start',
   'services.service.stop':'Stop',
   'services.service.metrics':'Metrics',

http://git-wip-us.apache.org/repos/asf/ambari/blob/e3fccc2d/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
index 8c96182..4fb97b7 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
@@ -116,6 +116,13 @@
             </div>
           {{/if}}
         {{/if}}
+        {{#if view.noActiveItem}}
+          <div class="box details-box">
+            <div>
+              {{t admin.stackUpgrade.dialog.notActive}}
+            </div>
+          </div>
+        {{/if}}
       </div>
       {{#each group in view.upgradeGroups}}
         {{#if group.isVisible}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/e3fccc2d/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
index fbbc4be..8e65bed 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
@@ -110,6 +110,14 @@ App.upgradeWizardView = Em.View.extend({
   }.property('activeGroup.upgradeItems.@each.status'),
 
   /**
+   * upgrade doesn't have any failed or manual or running item
+   * @type {boolean}
+   */
+  noActiveItem: function () {
+    return (Em.isNone(this.get('failedItem')) && Em.isNone(this.get('runningItem')) && Em.isNone(this.get('manualItem')));
+  }.property('failedItem', 'runningItem', 'manualItem'),
+
+  /**
    * details of currently active task
    * @type {object|undefined}
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e3fccc2d/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
index 8982763..cfa648a 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
@@ -212,6 +212,49 @@ describe('App.upgradeWizardView', function () {
     });
   });
 
+  describe("#noActiveItem", function () {
+    var testCases = [
+      {
+        data: {
+          failedItem: null,
+          runningItem: null,
+          manualItem: null
+        },
+        result: true
+      },
+      {
+        data: {
+          failedItem: {},
+          runningItem: null,
+          manualItem: null
+        },
+        result: false
+      },
+      {
+        data: {
+          failedItem: null,
+          runningItem: {},
+          manualItem: null
+        },
+        result: false
+      },
+      {
+        data: {
+          failedItem: null,
+          runningItem: null,
+          manualItem: {}
+        },
+        result: false
+      }
+    ].forEach(function (test) {
+        it("failedItem = " + test.data.failedItem + ";runningItem = " + test.data.runningItem + ";manualItem = " + test.data.manualItem, function () {
+          view.reopen(test.data);
+          view.propertyDidChange('noActiveItem');
+          expect(view.get('noActiveItem')).to.equal(test.result);
+        });
+      });
+  });
+
   describe("#isHoldingState", function () {
     var testCases = [
       {