You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vg...@apache.org on 2012/05/30 22:58:44 UTC
svn commit: r1344459 - in /incubator/ambari/branches/ambari-186: CHANGES.txt
hmc/css/manageServices.css hmc/js/manageServices.js
Author: vgogate
Date: Wed May 30 20:58:44 2012
New Revision: 1344459
URL: http://svn.apache.org/viewvc?rev=1344459&view=rev
Log:
Make ManageServices Show Only One Action Per Service
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/css/manageServices.css
incubator/ambari/branches/ambari-186/hmc/js/manageServices.js
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1344459&r1=1344458&r2=1344459&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Wed May 30 20:58:44 2012
@@ -6,7 +6,9 @@ characters wide.
Release 0.1.x - unreleased
- AMBARI-194. Avoid TxnProgressWidget Getting Stuck In An Infinite Loop (rezno via vgogate)
+ AMBARI-309. Make ManageServices Show Only One Action Per Service (reznor via vgogate)
+
+ AMBARI-194. Avoid TxnProgressWidget Getting Stuck In An Infinite Loop (reznor via vgogate)
AMBARI-308. Externalize message resources; Update styles/messaging on Uninstall Wizard and
Add Nodes Wizard (Yusaku via vgogate)
Modified: incubator/ambari/branches/ambari-186/hmc/css/manageServices.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/css/manageServices.css?rev=1344459&r1=1344458&r2=1344459&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/css/manageServices.css (original)
+++ incubator/ambari/branches/ambari-186/hmc/css/manageServices.css Wed May 30 20:58:44 2012
@@ -20,7 +20,7 @@
border-style: solid;
border-width: 2px;
/* Reznor's background-color: #c5c5c5; */
- background-color:#F0F0E8;
+ background-color: white;
border:color:#B2B299;
border-radius:4px;
-moz-border-radius:4px;
@@ -28,16 +28,14 @@
}
.serviceManagementEntry:hover {
- background-color: #B2B299;
- color: white;
+ background-color: rgb(240,240,232);
}
.serviceManagementEntry:hover a {
- color: white;
}
.serviceManagementEntryStarted {
- color: green;
+ color: rgb(50,205,50);
}
.serviceManagementEntryStopped {
@@ -45,7 +43,7 @@
}
.serviceManagementEntryInstalled {
- color: green;
+ color: rgb(50,205,50);
}
.serviceManagementEntryUninstalled {
@@ -112,4 +110,4 @@ ul#serviceManagementListId,
.serviceManagementGroup ul {
list-style:none outside none;
margin:0;
-}
\ No newline at end of file
+}
Modified: incubator/ambari/branches/ambari-186/hmc/js/manageServices.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/manageServices.js?rev=1344459&r1=1344458&r2=1344459&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/manageServices.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/manageServices.js Wed May 30 20:58:44 2012
@@ -409,12 +409,30 @@ function generateServiceManagementEntryM
'<div class="serviceManagementEntryActionsContainer">';
if( serviceAttributes.runnable ) {
-
+
+ var serviceManagementEntryAnchorName = '';
+ var serviceManagementEntryAnchorTitle = '';
+ var serviceManagementEntryAnchorCssClasses = 'serviceManagementEntryAction btn ';
+ var serviceManagementEntryIconCssClass = '';
+
+ /* Already-started/stopped services shouldn't allow a start/stop operation on them. */
+ if( serviceInfo.state == 'STOPPED' ) {
+ serviceManagementEntryAnchorName = 'start';
+ serviceManagementEntryAnchorTitle = 'Start';
+ serviceManagementEntryAnchorCssClasses += 'serviceManagementEntryActionStart';
+ serviceManagementEntryIconCssClass = 'iconic-play';
+ }
+ else if ( serviceInfo.state == 'STARTED' ) {
+ serviceManagementEntryAnchorName = 'stop';
+ serviceManagementEntryAnchorTitle = 'Stop';
+ serviceManagementEntryAnchorCssClasses += 'serviceManagementEntryActionStop';
+ serviceManagementEntryIconCssClass = 'iconic-stop';
+ }
+
generatedServiceManagementEntryMarkup +=
- '<a href="javascript:void(null)" name="start" title="Start" ' +
- 'class="btn serviceManagementEntryAction serviceManagementEntryActionStart"><i class="iconic-play"></i></a>' +
- '<a href="javascript:void(null)" name="stop" title="Stop" ' +
- 'class="btn serviceManagementEntryAction serviceManagementEntryActionStop"><i class="iconic-stop"></i></a>';
+ '<a href="javascript:void(null)" name="' + serviceManagementEntryAnchorName + '" ' +
+ 'title="' + serviceManagementEntryAnchorTitle + '" ' +
+ 'class="' + serviceManagementEntryAnchorCssClasses + '"><i class="' + serviceManagementEntryIconCssClass + '"></i></a> ';
}
generatedServiceManagementEntryMarkup +=