ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject [2/2] ambari git commit: AMBARI-10079. Service Actions -> Run Service Check should be disabled for stopped services (alexantonenko)
Date Mon, 16 Mar 2015 13:50:20 GMT
AMBARI-10079. Service Actions -> Run Service Check should be disabled for stopped services
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: e4bfb03c7ce01cc533b27c23bff3c278971bf41b
Parents: bfad3fa
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Mon Mar 16 15:14:05 2015 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Mon Mar 16 15:14:05 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/models/host_component.js         |  3 ++-
 ambari-web/test/views/main/service/item_test.js | 25 ++++++++++----------
 2 files changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e4bfb03c/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 82ee85a..f6d7cc0 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -238,7 +238,8 @@ App.HostComponentActionMap = {
       RUN_SMOKE_TEST: {
         action: 'runSmokeTest',
         label: Em.I18n.t('services.service.actions.run.smoke'),
-        cssClass: 'icon-thumbs-up-alt'
+        cssClass: 'icon-thumbs-up-alt',
+        disabled: ctx.get('controller.isStopDisabled')
       },
       REFRESH_CONFIGS: {
         action: 'refreshConfigs',

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4bfb03c/ambari-web/test/views/main/service/item_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/service/item_test.js b/ambari-web/test/views/main/service/item_test.js
index fb9227a..6126055 100644
--- a/ambari-web/test/views/main/service/item_test.js
+++ b/ambari-web/test/views/main/service/item_test.js
@@ -21,7 +21,7 @@ require('views/main/service/item');
 
 var view;
 
-describe('App.MainServiceItemView', function () {
+describe.only('App.MainServiceItemView', function () {
 
   describe('#mastersExcludedCommands', function () {
 
@@ -109,13 +109,13 @@ describe('App.MainServiceItemView', function () {
             {"action": "reassignMaster", "context": "NAMENODE", "label": "Move NameNode",
"cssClass": "icon-share-alt", "disabled": false},
             {"action": "reassignMaster", "context": "SECONDARY_NAMENODE", "label": "Move
SNameNode", "cssClass": "icon-share-alt", "disabled": false},
             {"action": "enableHighAvailability", "label": "Enable NameNode HA", "cssClass":
"icon-arrow-up", "isHidden": false, "disabled": true},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for HDFS",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"action": "rebalanceHdfsNodes", "customCommand": "REBALANCEHDFS", "context":
"Rebalance HDFS", "label": "Rebalance HDFS", "cssClass": "icon-refresh", "disabled": false},
             {"action": "downloadClientConfigs", "label": "Download Client Configs", "cssClass":
"icon-download-alt", "isHidden": false, "disabled": false, hasSubmenu: false, submenuOptions:
[]}
           ]
         },
-       {
+        {
           serviceName: "ZOOKEEPER",
           displayName: "ZooKeeper",
           serviceTypes: [],
@@ -139,7 +139,7 @@ describe('App.MainServiceItemView', function () {
           ],
           result: [
             {"action": "restartAllHostComponents", "context": "ZOOKEEPER", "label": "Restart
All", "cssClass": "icon-repeat", "disabled": false},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for ZooKeeper",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"cssClass": "icon-plus", "label": "Add ZooKeeper Server", "service": "ZOOKEEPER",
"component": "ZOOKEEPER_SERVER", "action": "addZOOKEEPER_SERVER", "disabled": "disabled",
tooltip: ''},
             {"action": "downloadClientConfigs", "label": "Download Client Configs", "cssClass":
"icon-download-alt", "isHidden": false, "disabled": false, "hasSubmenu": false, "submenuOptions":
[]}
@@ -180,7 +180,7 @@ describe('App.MainServiceItemView', function () {
             {"action": "reassignMaster", "context": "APP_TIMELINE_SERVER", "label": "Move
App Timeline Server", "cssClass": "icon-share-alt", "disabled": false},
             {"action": "reassignMaster", "context": "RESOURCEMANAGER", "label": "Move ResourceManager",
"cssClass": "icon-share-alt", "disabled": false},
             {"action": "enableRMHighAvailability", "label": "Enable ResourceManager HA",
"cssClass": "icon-arrow-up", "isHidden": false, disabled: false},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for YARN",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"action": "downloadClientConfigs", "label": "Download Client Configs", "cssClass":
"icon-download-alt", "isHidden": false, "disabled": false, "hasSubmenu": false, "submenuOptions":
[]}
           ]
@@ -205,7 +205,7 @@ describe('App.MainServiceItemView', function () {
           ],
           result: [
             {"action": "restartAllHostComponents", "context": "MAPREDUCE2", "label": "Restart
All", "cssClass": "icon-repeat", "disabled": false},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for MapReduce2",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"action": "downloadClientConfigs", "label": "Download Client Configs", "cssClass":
"icon-download-alt", "isHidden": false, "disabled": false, "hasSubmenu": false, "submenuOptions":
[]}
           ]
@@ -225,7 +225,7 @@ describe('App.MainServiceItemView', function () {
           ],
           result: [
             {"action": "restartAllHostComponents", "context": "KAFKA", "label": "Restart
All", "cssClass": "icon-repeat", "disabled": false},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for Kafka",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"action": "downloadClientConfigs", "label": "Download Client Configs", "cssClass":
"icon-download-alt", "isHidden": true, "disabled": false, "hasSubmenu": false, "submenuOptions":
[]}
           ]
@@ -251,7 +251,7 @@ describe('App.MainServiceItemView', function () {
             {"action": "refreshConfigs", "label": "Refresh configs", "cssClass": "icon-refresh",
"disabled": true},
             {"action": "restartAllHostComponents", "context": "FLUME", "label": "Restart
All", "cssClass": "icon-repeat", "disabled": false},
             {"action": "rollingRestart", "label": "Restart Flumes", "cssClass": "icon-time",
"disabled": false, "context": "FLUME_HANDLER"},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for Flume",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"cssClass": "icon-plus", "label": "Add Flume Component", "service": "FLUME",
"component": "FLUME_HANDLER", "action": "addFLUME_HANDLER", "disabled": '', tooltip: ''},
             {"action": "downloadClientConfigs", "label": "Download Client Configs", "cssClass":
"icon-download-alt", "isHidden": true, "disabled": false, "hasSubmenu": false, "submenuOptions":
[]}
@@ -287,7 +287,7 @@ describe('App.MainServiceItemView', function () {
           result: [
             {"action": "restartAllHostComponents", "context": "HBASE", "label": "Restart
All", "cssClass": "icon-repeat", "disabled": false},
             {"action": "rollingRestart", "label": "Restart RegionServers", "cssClass": "icon-time",
"disabled": false, "context": "HBASE_REGIONSERVER"},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for HBase",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"cssClass": "icon-plus", "label": "Add HBase Master", "service": "HBASE", "component":
"HBASE_MASTER", "action": "addHBASE_MASTER", "disabled": '', tooltip: ''},
             {"action": "downloadClientConfigs", "label": "Download Client Configs", "cssClass":
"icon-download-alt", "isHidden": false, "disabled": false, "hasSubmenu": false, "submenuOptions":
[]}
@@ -314,7 +314,7 @@ describe('App.MainServiceItemView', function () {
           result: [
             {"action": "restartAllHostComponents", "context": "OOZIE", "label": "Restart
All", "cssClass": "icon-repeat", "disabled": false},
             {"action": "reassignMaster", "context": "OOZIE_SERVER", "label": "Move Oozie
Server", "cssClass": "icon-share-alt", "disabled": false},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for Oozie",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"action": "downloadClientConfigs", "label": "Download Client Configs", "cssClass":
"icon-download-alt", "isHidden": false, "disabled": false, "hasSubmenu": false, "submenuOptions":
[]}
           ]
@@ -334,7 +334,7 @@ describe('App.MainServiceItemView', function () {
           ],
           result: [
             {"action": "restartAllHostComponents", "context": "KNOX", "label": "Restart All",
"cssClass": "icon-repeat", "disabled": false},
-            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt"},
+            {"action": "runSmokeTest", "label": "Run Service Check", "cssClass": "icon-thumbs-up-alt",
"disabled": false},
             {"action": "turnOnOffPassive", "context": "Turn On Maintenance Mode for Knox",
"label": "Turn On Maintenance Mode", "cssClass": "icon-medkit", "disabled": false},
             {"action": "startLdapKnox", "customCommand": "STARTDEMOLDAP", "context": "Start
Demo LDAP",  "label": "Start Demo LDAP", "cssClass": "icon-play-sign", "disabled": false},
             {"action": "stopLdapKnox", "customCommand": "STOPDEMOLDAP", "context": "Stop
Demo LDAP", "label": "Stop Demo LDAP", "cssClass": "icon-stop", "disabled": false},
@@ -444,7 +444,8 @@ describe('App.MainServiceItemView', function () {
               passiveState: 'OFF'
             }),
             isSeveralClients: false,
-            clientComponents: []
+            clientComponents: [],
+            isStopDisabled: false
           }),
           mastersExcludedCommands: mastersExcludedCommands,
           hasConfigTab: hasConfigTab


Mime
View raw message