|
@@ -271,6 +271,7 @@ App.HostComponentActionMap = {
|
|
|
var RA = ctx.get('controller.content.hostComponents').findProperty('componentName', 'RANGER_ADMIN');
|
|
|
var HM = ctx.get('controller.content.hostComponents').findProperty('componentName', 'HAWQMASTER');
|
|
|
var HS = ctx.get('controller.content.hostComponents').findProperty('componentName', 'HAWQSTANDBY');
|
|
|
+ var HMComponent = App.MasterComponent.find('HAWQMASTER');
|
|
|
return {
|
|
|
RESTART_ALL: {
|
|
|
action: 'restartAllHostComponents',
|
|
@@ -374,20 +375,29 @@ App.HostComponentActionMap = {
|
|
|
hasSubmenu: ctx.get('controller.isSeveralClients'),
|
|
|
submenuOptions: ctx.get('controller.clientComponents')
|
|
|
},
|
|
|
- IMMEDIATE_STOP_CLUSTER: {
|
|
|
- action: 'immediateStopHawqCluster',
|
|
|
- customCommand: 'IMMEDIATE_STOP_CLUSTER',
|
|
|
- context: Em.I18n.t('services.service.actions.run.immediateStopHawqCluster.context'),
|
|
|
- label: Em.I18n.t('services.service.actions.run.immediateStopHawqCluster.context'),
|
|
|
+ IMMEDIATE_STOP_HAWQ_SERVICE: {
|
|
|
+ action: 'executeHawqCustomCommand',
|
|
|
+ customCommand: 'IMMEDIATE_STOP_HAWQ_SERVICE',
|
|
|
+ context: Em.I18n.t('services.service.actions.run.immediateStopHawqService.context'),
|
|
|
+ label: Em.I18n.t('services.service.actions.run.immediateStopHawqService.label'),
|
|
|
cssClass: 'icon-stop',
|
|
|
disabled: !HM || HM.get('workStatus') != App.HostComponentStatus.started
|
|
|
},
|
|
|
- IMMEDIATE_STOP: {
|
|
|
- customCommand: 'IMMEDIATE_STOP',
|
|
|
+ IMMEDIATE_STOP_HAWQ_SEGMENT: {
|
|
|
+ customCommand: 'IMMEDIATE_STOP_HAWQ_SEGMENT',
|
|
|
context: Em.I18n.t('services.service.actions.run.immediateStopHawqSegment.context'),
|
|
|
label: Em.I18n.t('services.service.actions.run.immediateStopHawqSegment.label'),
|
|
|
cssClass: 'icon-stop'
|
|
|
},
|
|
|
+ RESYNC_HAWQ_STANDBY: {
|
|
|
+ action: 'executeHawqCustomCommand',
|
|
|
+ customCommand: 'RESYNC_HAWQ_STANDBY',
|
|
|
+ context: Em.I18n.t('services.service.actions.run.resyncHawqStandby.context'),
|
|
|
+ label: Em.I18n.t('services.service.actions.run.resyncHawqStandby.label'),
|
|
|
+ cssClass: 'icon-refresh',
|
|
|
+ isHidden : App.get('isSingleNode') || !HS ,
|
|
|
+ disabled: !((!!HMComponent && HMComponent.get('startedCount') === 1) && (!!HS && HS.get('workStatus') === App.HostComponentStatus.started))
|
|
|
+ },
|
|
|
MASTER_CUSTOM_COMMAND: {
|
|
|
action: 'executeCustomCommand',
|
|
|
cssClass: 'icon-play-circle',
|
|
@@ -407,9 +417,10 @@ App.HostComponentActionMap = {
|
|
|
isHidden: App.get('isSingleNode') || HS,
|
|
|
disabled: false
|
|
|
},
|
|
|
- TOGGLE_ACTIVATE_HAWQ_STANDBY: {
|
|
|
+ ACTIVATE_HAWQ_STANDBY: {
|
|
|
action: 'activateHawqStandby',
|
|
|
label: Em.I18n.t('admin.activateHawqStandby.button.enable'),
|
|
|
+ context: Em.I18n.t('admin.activateHawqStandby.button.enable'),
|
|
|
cssClass: 'icon-arrow-up',
|
|
|
isHidden: App.get('isSingleNode') || !HS,
|
|
|
disabled: false
|