|
@@ -196,30 +196,10 @@ App.WizardStep7Controller = Em.Controller.extend({
|
|
|
|
|
|
submit: function () {
|
|
submit: function () {
|
|
if (!this.get('isSubmitDisabled')) {
|
|
if (!this.get('isSubmitDisabled')) {
|
|
- if(!this.isGangliaPartitionGood()){
|
|
|
|
- this.showRddWarningPopup();
|
|
|
|
- } else {
|
|
|
|
- App.router.send('next');
|
|
|
|
- }
|
|
|
|
|
|
+ App.router.send('next');
|
|
}
|
|
}
|
|
- },
|
|
|
|
-
|
|
|
|
- showRddWarningPopup: function() {
|
|
|
|
- var ganglia = this.get('content.masterComponentHosts').findProperty('component','GANGLIA_SERVER');
|
|
|
|
- if(!ganglia) return false;
|
|
|
|
- var gangliaServerHost = ganglia.hostName;
|
|
|
|
- App.ModalPopup.show({
|
|
|
|
- header: Em.I18n.t('installer.step7.popup.rddWarning.header').format(gangliaServerHost),
|
|
|
|
- body: Em.I18n.t('installer.step7.popup.rddWarning.body').format(this.get('gangliaMoutDir'),gangliaServerHost,numberUtils.bytesToSize(this.get('gangliaAvailableSpace'),1,'parseFloat',1024)),
|
|
|
|
- onPrimary: function () {
|
|
|
|
- this.hide();
|
|
|
|
- App.router.send('next');
|
|
|
|
- },
|
|
|
|
- onSecondary: function () {
|
|
|
|
- this.hide();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Provides service component name and display-name information for
|
|
* Provides service component name and display-name information for
|
|
* the current selected service.
|
|
* the current selected service.
|
|
@@ -259,32 +239,7 @@ App.WizardStep7Controller = Em.Controller.extend({
|
|
});
|
|
});
|
|
return validComponents;
|
|
return validComponents;
|
|
}.property('content'),
|
|
}.property('content'),
|
|
-
|
|
|
|
- gangliaHostDiskInfo: function(){
|
|
|
|
- var ganglia = this.get('content.masterComponentHosts').findProperty('component','GANGLIA_SERVER');
|
|
|
|
- if(!ganglia) return false;
|
|
|
|
- var gangliaServerHost = ganglia.hostName;
|
|
|
|
- var gangliaPartition = this.get('content.hosts')[gangliaServerHost].disk_info;
|
|
|
|
- return gangliaPartition;
|
|
|
|
- }.property('content'),
|
|
|
|
-
|
|
|
|
- isGangliaPartitionGood: function() {
|
|
|
|
- var gangliaDiskInfo = this.get('gangliaHostDiskInfo');
|
|
|
|
- if(!gangliaDiskInfo) return true;
|
|
|
|
- var miscConfigs = this.get('stepConfigs').findProperty('serviceName','MISC').get('configs');
|
|
|
|
- var rddDir = miscConfigs.findProperty('name', 'rrdcached_base_dir').value;
|
|
|
|
- var available = 0;
|
|
|
|
- gangliaDiskInfo.forEach(function(diskInfo) {
|
|
|
|
- var mount = rddDir.indexOf(diskInfo.mountpoint);
|
|
|
|
- if(mount==0 && diskInfo.mountpoint!="/") {
|
|
|
|
- available = diskInfo.available;
|
|
|
|
- this.set('gangliaMoutDir',diskInfo.mountpoint);
|
|
|
|
- }
|
|
|
|
- },this);
|
|
|
|
- available = (!available) ? gangliaDiskInfo.findProperty("mountpoint","/").available : available;
|
|
|
|
- this.set('gangliaAvailableSpace',available);
|
|
|
|
- return available > (16*1024*1024) ? true : false;
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
|
|
|
|
getAllHosts: function () {
|
|
getAllHosts: function () {
|
|
// Load hosts
|
|
// Load hosts
|