|
@@ -315,42 +315,27 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
|
|
bodyClass: Em.View.extend({
|
|
bodyClass: Em.View.extend({
|
|
templateName: require('templates/main/host/details/deleteComponentPopup')
|
|
templateName: require('templates/main/host/details/deleteComponentPopup')
|
|
}),
|
|
}),
|
|
- isHiveMetastore: function () {
|
|
|
|
- return componentName == 'HIVE_METASTORE';
|
|
|
|
- }.property(),
|
|
|
|
- deleteHiveMetastoreMsg: Em.View.extend({
|
|
|
|
- template: Em.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.deleteHiveMetastore'))
|
|
|
|
- }),
|
|
|
|
- isNimbus: function () {
|
|
|
|
- return componentName == 'NIMBUS';
|
|
|
|
- }.property(),
|
|
|
|
- deleteNimbusMsg: Em.View.extend({
|
|
|
|
- template: Em.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.deleteNimbus'))
|
|
|
|
- }),
|
|
|
|
- isRangerKMSServer: function () {
|
|
|
|
- return componentName == 'RANGER_KMS_SERVER';
|
|
|
|
- }.property(),
|
|
|
|
- deleteRangerKMSServereMsg: Em.View.extend({
|
|
|
|
- template: Em.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.deleteRangerKMSServer'))
|
|
|
|
- }),
|
|
|
|
|
|
+ isHiveMetastore: componentName == 'HIVE_METASTORE',
|
|
|
|
+ isWebHCatServer: componentName == 'WEBHCAT_SERVER',
|
|
|
|
+ isNimbus: componentName == 'NIMBUS',
|
|
|
|
+ isRangerKMSServer: componentName == 'RANGER_KMS_SERVER',
|
|
|
|
+ isZkServer: componentName == 'ZOOKEEPER_SERVER',
|
|
|
|
+
|
|
|
|
+ deleteHiveMetastoreMsg: Em.I18n.t('hosts.host.deleteComponent.popup.deleteHiveMetastore'),
|
|
|
|
+ deleteWebHCatServerMsg: Em.I18n.t('hosts.host.deleteComponent.popup.deleteWebHCatServer'),
|
|
|
|
+ deleteNimbusMsg: Em.I18n.t('hosts.host.deleteComponent.popup.deleteNimbus'),
|
|
|
|
+ deleteRangerKMSServereMsg: Em.I18n.t('hosts.host.deleteComponent.popup.deleteRangerKMSServer'),
|
|
|
|
+ lastComponentError: Em.I18n.t('hosts.host.deleteComponent.popup.warning').format(displayName),
|
|
|
|
+ deleteComponentMsg: Em.I18n.t('hosts.host.deleteComponent.popup.msg1').format(displayName),
|
|
|
|
+ deleteZkServerMsg: Em.I18n.t('hosts.host.deleteComponent.popup.deleteZooKeeperServer'),
|
|
|
|
+
|
|
isChecked: false,
|
|
isChecked: false,
|
|
disablePrimary: Em.computed.not('isChecked'),
|
|
disablePrimary: Em.computed.not('isChecked'),
|
|
lastComponent: function () {
|
|
lastComponent: function () {
|
|
this.set('isChecked', !isLastComponent);
|
|
this.set('isChecked', !isLastComponent);
|
|
return isLastComponent;
|
|
return isLastComponent;
|
|
}.property(),
|
|
}.property(),
|
|
- isZkServer: function () {
|
|
|
|
- return componentName == 'ZOOKEEPER_SERVER';
|
|
|
|
- }.property(),
|
|
|
|
- lastComponentError: Em.View.extend({
|
|
|
|
- template: Em.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.warning').format(displayName))
|
|
|
|
- }),
|
|
|
|
- deleteComponentMsg: function () {
|
|
|
|
- return Em.I18n.t('hosts.host.deleteComponent.popup.msg1').format(displayName);
|
|
|
|
- }.property(),
|
|
|
|
- deleteZkServerMsg: Em.View.extend({
|
|
|
|
- template: Em.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.deleteZooKeeperServer'))
|
|
|
|
- }),
|
|
|
|
|
|
+
|
|
onPrimary: function () {
|
|
onPrimary: function () {
|
|
var popup = this;
|
|
var popup = this;
|
|
self._doDeleteHostComponent(component, function () {
|
|
self._doDeleteHostComponent(component, function () {
|
|
@@ -431,6 +416,9 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
|
|
} else if (data.componentName == 'HIVE_METASTORE') {
|
|
} else if (data.componentName == 'HIVE_METASTORE') {
|
|
this.set('deleteHiveMetaStore', true);
|
|
this.set('deleteHiveMetaStore', true);
|
|
this.loadConfigs('loadHiveConfigs');
|
|
this.loadConfigs('loadHiveConfigs');
|
|
|
|
+ } else if (data.componentName == 'WEBHCAT_SERVER') {
|
|
|
|
+ this.set('deleteWebHCatServer', true);
|
|
|
|
+ this.loadConfigs('loadHiveConfigs');
|
|
} else if (data.componentName == 'HIVE_SERVER') {
|
|
} else if (data.componentName == 'HIVE_SERVER') {
|
|
this.set('deleteHiveServer', true);
|
|
this.set('deleteHiveServer', true);
|
|
this.loadConfigs('loadHiveConfigs');
|
|
this.loadConfigs('loadHiveConfigs');
|
|
@@ -586,6 +574,12 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
|
|
self.loadConfigs("loadHiveConfigs");
|
|
self.loadConfigs("loadHiveConfigs");
|
|
}, Em.I18n.t('hosts.host.addComponent.' + componentName) + manualKerberosWarning);
|
|
}, Em.I18n.t('hosts.host.addComponent.' + componentName) + manualKerberosWarning);
|
|
break;
|
|
break;
|
|
|
|
+ case 'WEBHCAT_SERVER':
|
|
|
|
+ returnFunc = App.showConfirmationPopup(function () {
|
|
|
|
+ self.set('webhcatServerHost', hostName);
|
|
|
|
+ self.loadConfigs("loadHiveConfigs");
|
|
|
|
+ }, Em.I18n.t('hosts.host.addComponent.' + componentName) + manualKerberosWarning);
|
|
|
|
+ break;
|
|
case 'NIMBUS':
|
|
case 'NIMBUS':
|
|
returnFunc = App.showConfirmationPopup(function () {
|
|
returnFunc = App.showConfirmationPopup(function () {
|
|
self.set('nimbusHost', hostName);
|
|
self.set('nimbusHost', hostName);
|
|
@@ -835,6 +829,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
|
|
onLoadHiveConfigs: function (data) {
|
|
onLoadHiveConfigs: function (data) {
|
|
var
|
|
var
|
|
hiveMetastoreHost = this.get('hiveMetastoreHost'),
|
|
hiveMetastoreHost = this.get('hiveMetastoreHost'),
|
|
|
|
+ webhcatServerHost = this.get('webhcatServerHost'),
|
|
hiveMSHosts = this.getHiveHosts(),
|
|
hiveMSHosts = this.getHiveHosts(),
|
|
hiveMasterHosts = hiveMSHosts.concat(App.HostComponent.find().filterProperty('componentName', 'HIVE_SERVER').mapProperty('hostName')).uniq().sort().join(','),
|
|
hiveMasterHosts = hiveMSHosts.concat(App.HostComponent.find().filterProperty('componentName', 'HIVE_SERVER').mapProperty('hostName')).uniq().sort().join(','),
|
|
configs = {},
|
|
configs = {},
|
|
@@ -883,7 +878,11 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
|
|
}
|
|
}
|
|
}
|
|
}
|
|
];
|
|
];
|
|
- this.saveConfigsBatch(groups, this.get('addHiveServer') ? 'HIVE_SERVER' : 'HIVE_METASTORE', hiveMetastoreHost);
|
|
|
|
|
|
+ var params = [groups];
|
|
|
|
+ var componentName = this.get('addHiveServer') ? 'HIVE_SERVER' : (hiveMetastoreHost ? 'HIVE_METASTORE' : 'WEBHCAT_SERVER');
|
|
|
|
+ var host = webhcatServerHost || hiveMetastoreHost;
|
|
|
|
+ params.pushObjects([componentName, host]);
|
|
|
|
+ this.saveConfigsBatch.apply(this, params);
|
|
this.set('addHiveServer', false);
|
|
this.set('addHiveServer', false);
|
|
},
|
|
},
|
|
|
|
|
|
@@ -946,21 +945,35 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
|
|
*/
|
|
*/
|
|
deleteHiveMetaStore: false,
|
|
deleteHiveMetaStore: false,
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Delete WebHCat Server is performed
|
|
|
|
+ *
|
|
|
|
+ * @type {bool}
|
|
|
|
+ */
|
|
|
|
+ deleteWebHCatServer: false,
|
|
|
|
+
|
|
getHiveHosts: function () {
|
|
getHiveHosts: function () {
|
|
var
|
|
var
|
|
hiveHosts = App.HostComponent.find().filterProperty('componentName', 'HIVE_METASTORE').mapProperty('hostName'),
|
|
hiveHosts = App.HostComponent.find().filterProperty('componentName', 'HIVE_METASTORE').mapProperty('hostName'),
|
|
- hiveMetastoreHost = this.get('hiveMetastoreHost');
|
|
|
|
|
|
+ hiveMetastoreHost = this.get('hiveMetastoreHost'),
|
|
|
|
+ webhcatServerHost = this.get('webhcatServerHost');
|
|
|
|
|
|
if (!!hiveMetastoreHost) {
|
|
if (!!hiveMetastoreHost) {
|
|
hiveHosts.push(hiveMetastoreHost);
|
|
hiveHosts.push(hiveMetastoreHost);
|
|
this.set('hiveMetastoreHost', '');
|
|
this.set('hiveMetastoreHost', '');
|
|
}
|
|
}
|
|
|
|
|
|
- if (this.get('fromDeleteHost') || this.get('deleteHiveMetaStore') || this.get('deleteHiveServer')) {
|
|
|
|
|
|
+ if (!!webhcatServerHost) {
|
|
|
|
+ hiveHosts.push(webhcatServerHost);
|
|
|
|
+ this.set('webhcatServerHost' ,'');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.get('fromDeleteHost') || this.get('deleteHiveMetaStore') || this.get('deleteHiveServer') || this.get('deleteWebHCatServer')) {
|
|
this.set('deleteHiveMetaStore', false);
|
|
this.set('deleteHiveMetaStore', false);
|
|
this.set('deleteHiveServer', false);
|
|
this.set('deleteHiveServer', false);
|
|
|
|
+ this.set('deleteWebHCatServer', false);
|
|
this.set('fromDeleteHost', false);
|
|
this.set('fromDeleteHost', false);
|
|
- return hiveHosts.without(this.get('content.hostName'));
|
|
|
|
|
|
+ hiveHosts = hiveHosts.without(this.get('content.hostName'));
|
|
}
|
|
}
|
|
return hiveHosts.sort();
|
|
return hiveHosts.sort();
|
|
},
|
|
},
|