ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-4890 Disable component start when state is unknown. (atkach)
Date Fri, 28 Feb 2014 17:02:07 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 748b061a5 -> 1a66462b6


AMBARI-4890 Disable component start when state is unknown. (atkach)


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

Branch: refs/heads/trunk
Commit: 1a66462b6045ee2eee6625b8fee6d7e848b23204
Parents: 748b061
Author: atkach <atkach@hortonworks.com>
Authored: Fri Feb 28 18:59:52 2014 +0200
Committer: atkach <atkach@hortonworks.com>
Committed: Fri Feb 28 18:59:52 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host/details.js                  | 2 +-
 ambari-web/app/models/host_component.js                          | 4 ++++
 ambari-web/app/views/main/host/details/host_component_view.js    | 2 +-
 .../test/views/main/host/details/host_component_view_test.js     | 1 +
 4 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a66462b/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index cb73e53..b285d4a 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -1229,7 +1229,7 @@ App.MainHostDetailsController = Em.Controller.extend({
       reassignMasterController.saveComponentToReassign(component);
       reassignMasterController.getSecurityStatus();
       reassignMasterController.setCurrentStep('1');
-      App.router.transitionTo('services.reassign');
+      App.router.transitionTo('reassign');
     });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a66462b/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index 1bc2e3c..f2b6e69 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -187,6 +187,7 @@ App.HostComponentStatus = {
   installing: "INSTALLING",
   upgrade_failed: "UPGRADE_FAILED",
   unknown: "UNKNOWN",
+  disabled: "DISABLED",
 
   /**
    * Get host component status in "machine" format
@@ -209,6 +210,7 @@ App.HostComponentStatus = {
         return 'installing';
       case this.upgrade_failed:
         return 'upgrade_failed';
+      case this.disabled:
       case this.unknown:
         return 'unknown';
     }
@@ -238,6 +240,8 @@ App.HostComponentStatus = {
         return 'Heartbeat lost...';
       case this.upgrade_failed:
         return 'Upgrade Failed';
+      case this.disabled:
+        return 'Disabled';
     }
     return 'Unknown';
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a66462b/ambari-web/app/views/main/host/details/host_component_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js
index 30a8076..a68f0f2 100644
--- a/ambari-web/app/views/main/host/details/host_component_view.js
+++ b/ambari-web/app/views/main/host/details/host_component_view.js
@@ -172,7 +172,7 @@ App.HostComponentView = Em.View.extend({
    */
   noActionAvailable: function () {
     var workStatus = this.get('workStatus');
-    if ([App.HostComponentStatus.starting, App.HostComponentStatus.stopping, App.HostComponentStatus.unknown].contains(workStatus))
{
+    if ([App.HostComponentStatus.starting, App.HostComponentStatus.stopping, App.HostComponentStatus.unknown,
App.HostComponentStatus.disabled].contains(workStatus)) {
       return "hidden";
     }else{
       return "";

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a66462b/ambari-web/test/views/main/host/details/host_component_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/host/details/host_component_view_test.js b/ambari-web/test/views/main/host/details/host_component_view_test.js
index 3d7fcb9..21c72d4 100644
--- a/ambari-web/test/views/main/host/details/host_component_view_test.js
+++ b/ambari-web/test/views/main/host/details/host_component_view_test.js
@@ -211,6 +211,7 @@ describe('App.HostComponentView', function() {
       {workStatus: 'STARTING', e: 'hidden'},
       {workStatus: 'STOPPING', e: 'hidden'},
       {workStatus: 'UNKNOWN', e: 'hidden'},
+      {workStatus: 'DISABLED', e: 'hidden'},
       {workStatus: 'OTHER_STATUS', e: ''}
     ]);
 


Mime
View raw message