Forráskód Böngészése

AMBARI-4417. "services actions" menu UI. (sposetti via yusaku)

Yusaku Sako 11 éve
szülő
commit
682ef9984e

+ 6 - 6
ambari-web/app/messages.js

@@ -1787,19 +1787,19 @@ Em.I18n.translations = {
   'mirroring.dateOrder.error': 'End Date must be after Start Date',
   'mirroring.required.invalidNumberError' : 'Enter valid number',
 
-  'rollingrestart.dialog.title': 'Rolling Restart {0}s',
+  'rollingrestart.dialog.title': 'Restart {0}s',
   'rollingrestart.dialog.primary': 'Trigger Restart',
   'rollingrestart.notsupported.hostComponent': 'Rolling restart not supported for {0} components',
-  'rollingrestart.dialog.msg.restart': 'This will restart {0} {1} in batches to keep your cluster operational and minimize downtime.',
-  'rollingrestart.dialog.msg.restart.plural': 'This will restart {0} {1}s in batches to keep your cluster operational and minimize downtime.',
+  'rollingrestart.dialog.msg.restart': 'This will restart {0} {1} at a time.',
+  'rollingrestart.dialog.msg.restart.plural': 'This will restart {0} {1}s at a time.',
   'rollingrestart.dialog.msg.noRestartHosts': 'There are no {0}s to do rolling restarts',
-  'rollingrestart.dialog.msg.maintainance': 'Note: {0} {1} in Maintainance Mode will not be restarted',
-  'rollingrestart.dialog.msg.maintainance.plural': 'Note: {0} {1}s in Maintainance Mode will not be restarted',
+  'rollingrestart.dialog.msg.maintainance': 'Note: {0} {1} in Out of Service Mode will not be restarted',
+  'rollingrestart.dialog.msg.maintainance.plural': 'Note: {0} {1}s in Out of Service Mode will not be restarted',
   'rollingrestart.dialog.msg.componentsAtATime': '{0}s at a time',
   'rollingrestart.dialog.msg.timegap.prefix': 'Wait ',
   'rollingrestart.dialog.msg.timegap.suffix': 'seconds between batches ',
   'rollingrestart.dialog.msg.toleration.prefix': 'Tolerate up to ',
-  'rollingrestart.dialog.msg.toleration.suffix': 'failures',
+  'rollingrestart.dialog.msg.toleration.suffix': 'restart failures',
   'rollingrestart.dialog.err.invalid.batchsize': 'Invalid restart batch size: {0}',
   'rollingrestart.dialog.err.invalid.waitTime': 'Invalid wait time between batches: {0}',
   'rollingrestart.dialog.err.invalid.toleratesize': 'Invalid failure toleration count: {0}',

+ 0 - 1
ambari-web/app/styles/application.less

@@ -5219,7 +5219,6 @@ i.icon-asterisks {
     }
     tr:last-of-type {
       td {
-        text-align: center;
         input {
           vertical-align: top;
         }

+ 2 - 1
ambari-web/app/templates/common/rolling_restart_view.hbs

@@ -44,7 +44,8 @@
       <td>{{t rollingrestart.dialog.msg.toleration.suffix}}</td>
     </tr>
     <tr>
-      <td colspan="3">
+      <td>&nbsp;</td>
+      <td colspan="2">
         {{view Ember.Checkbox checkedBinding="view.staleConfigsOnly"}}
         {{view.staleConfigsOnlyMessage}}
       </td>

+ 2 - 1
ambari-web/app/templates/main/host/details.hbs

@@ -38,7 +38,8 @@
 				        <!-- dropdown menu links -->
 				        {{#each option in view.maintenance}}
 				        <li {{bindAttr class="controller.isStopDisabled:disabled"}}>
-				          <a {{action "doAction" option target="controller" href=true}}>{{option.label}}</a>
+				          <a {{action "doAction" option target="controller" href=true}}><i {{bindAttr class="option.cssClass"}}></i>
+{{option.label}}</a>
 				        </li>
 				        {{/each}}
 				      </ul>

+ 2 - 1
ambari-web/app/templates/main/service/item.hbs

@@ -70,7 +70,8 @@
         <!-- Other service actions -->
         {{#each option in view.maintenance}}
         <li {{bindAttr class="option.disabled:disabled"}}>
-          <a {{action "doAction" option target="controller" href=true}}>{{option.label}}</a>
+          <a {{action "doAction" option target="controller" href=true}}><i {{bindAttr class="option.cssClass"}}></i>
+{{option.label}}</a>
         </li>
         {{/each}}
       </ul>

+ 4 - 4
ambari-web/app/views/main/host/details.js

@@ -28,10 +28,10 @@ App.MainHostDetailsView = Em.View.extend({
 
   maintenance: function(){
     return [
-         {action: 'startAllComponents', 'label': this.t('hosts.host.details.startAllComponents')},
-         {action: 'stopAllComponents', 'label': this.t('hosts.host.details.stopAllComponents')},
-         {action: 'restartAllComponents', 'label': this.t('hosts.host.details.restartAllComponents')},
-         {action: 'deleteHost', 'label': this.t('hosts.host.details.deleteHost')}];
+      {action: 'startAllComponents', cssClass: 'icon-play enabled', 'label': this.t('hosts.host.details.startAllComponents')},
+      {action: 'stopAllComponents', cssClass: 'icon-stop enabled', 'label': this.t('hosts.host.details.stopAllComponents')},
+      {action: 'restartAllComponents', cssClass: 'icon-forward enabled', 'label': this.t('hosts.host.details.restartAllComponents')},
+      {action: 'deleteHost', cssClass: 'icon-remove enabled', 'label': this.t('hosts.host.details.deleteHost')}];
   }.property('controller.content'),
   didInsertElement: function() {
     App.tooltip($("[rel='HealthTooltip']"));

+ 4 - 4
ambari-web/app/views/main/service/item.js

@@ -29,12 +29,12 @@ App.MainServiceItemView = Em.View.extend({
     var disabled = this.get('controller.isStopDisabled');
     var serviceName = service.get('serviceName');
     // Restart All action
-    options.push({action:'restartAllHostComponents', context: serviceName, 'label': Em.I18n.t('restart.service.all'), disabled: false});
+    options.push({action:'restartAllHostComponents', cssClass: 'icon-forward', context: serviceName, 'label': Em.I18n.t('restart.service.all'), disabled: false});
     // Rolling Restart action
     var rrComponentName = batchUtils.getRollingRestartComponentName(serviceName);
     if (rrComponentName) {
       var label = Em.I18n.t('rollingrestart.dialog.title').format(App.format.role(rrComponentName));
-      options.push({action:'rollingRestart', context: rrComponentName, 'label': label, disabled: false});
+      options.push({action:'rollingRestart', cssClass: 'icon-time', context: rrComponentName, 'label': label, disabled: false});
     }
     // Service Check and Reassign Master actions
     switch (serviceName) {
@@ -47,13 +47,13 @@ App.MainServiceItemView = Em.View.extend({
         if (App.supports.reassignMaster && hosts > 1) {
           allMasters.forEach(function (hostComponent) {
             if (App.reassignableComponents.contains(hostComponent)) {
-              options.push({action: 'reassignMaster', context: hostComponent,
+              options.push({action: 'reassignMaster', context: hostComponent, cssClass: 'icon-share-alt', 
                 'label': Em.I18n.t('services.service.actions.reassign.master').format(App.format.role(hostComponent)), disabled: false});
             }
           })
         }
       default:
-        options.push({action: 'runSmokeTest', 'label': Em.I18n.t('services.service.actions.run.smoke'), disabled:disabled});
+        options.push({action: 'runSmokeTest', cssClass: 'icon-thumbs-up-alt', 'label': Em.I18n.t('services.service.actions.run.smoke'), disabled:disabled});
     }
     return options;
   }.property('controller.content', 'controller.isStopDisabled'),