Skip to content

Commit

Permalink
Partial-Bug: #1449727 Allow moving of popup windows.
Browse files Browse the repository at this point in the history
Change-Id: Ib968d1f8b179caeef626e54cc334fac17d36a2e4
  • Loading branch information
Abhi committed Jul 1, 2015
1 parent 8e54b3c commit 4fc159a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 17 deletions.
31 changes: 31 additions & 0 deletions webroot/setting/sm/ui/js/views/ClusterEditView.js
Expand Up @@ -86,6 +86,16 @@ define([
that = this;

cowu.createWizardModal({'modalId': modalId, 'className': 'modal-980', 'title': options['title'], 'body': editLayout, 'onSave': function () {
var wizardId = cowu.formatElementId([prefixId, smwl.TITLE_ADD_CLUSTER]),
wizardDataContrailWizard = $('#' + wizardId).data('contrailWizard'),
currentStepIndex = wizardDataContrailWizard.getCurrentIndex(),
stepsLength = wizardDataContrailWizard.getStepsLength();

if(currentStepIndex == (stepsLength - 1)) {
wizardDataContrailWizard.finish();
} else {
wizardDataContrailWizard.next();
}
}, 'onCancel': function () {
Knockback.release(that.model, document.getElementById(modalId));
kbValidation.unbind(that);
Expand Down Expand Up @@ -142,6 +152,16 @@ define([
that = this;

cowu.createWizardModal({'modalId': modalId, 'className': 'modal-840', 'title': options['title'], 'body': editLayout, 'onSave': function () {
var wizardId = cowu.formatElementId([prefixId, smwl.TITLE_ADD_SERVERS]),
wizardDataContrailWizard = $('#' + wizardId).data('contrailWizard'),
currentStepIndex = wizardDataContrailWizard.getCurrentIndex(),
stepsLength = wizardDataContrailWizard.getStepsLength();

if(currentStepIndex == (stepsLength - 1)) {
wizardDataContrailWizard.finish();
} else {
wizardDataContrailWizard.next();
}
}, 'onCancel': function () {
Knockback.release(that.model, document.getElementById(modalId));
kbValidation.unbind(that);
Expand Down Expand Up @@ -175,6 +195,17 @@ define([
};

cowu.createWizardModal({'modalId': modalId, 'className': 'modal-840', 'title': options['title'], 'body': editLayout, 'onSave': function () {
var wizardId = cowu.formatElementId([prefixId, smwl.TITLE_REMOVE_SERVERS]),
wizardDataContrailWizard = $('#' + wizardId).data('contrailWizard'),
currentStepIndex = wizardDataContrailWizard.getCurrentIndex(),
stepsLength = wizardDataContrailWizard.getStepsLength();

if(currentStepIndex == (stepsLength - 1)) {
wizardDataContrailWizard.finish();
} else {
wizardDataContrailWizard.next();
}

}, 'onCancel': function () {
Knockback.release(that.model, document.getElementById(modalId));
kbValidation.unbind(that);
Expand Down
27 changes: 10 additions & 17 deletions webroot/setting/sm/ui/js/views/ClusterListView.js
Expand Up @@ -48,6 +48,7 @@ define([
yLabel: 'Total Servers',
forceX: [0, 1],
forceY: [0, 20],
noDataMessage: 'No Data found.',
dataParser: function (response) {
var chartDataValues = [];
for(var i = 0; i < response.length; i++) {
Expand All @@ -67,10 +68,10 @@ define([
},
tooltipConfigCB: getClusterTooltipConfig,
controlPanelConfig: {
/*filter: {
filter: {
enable: true,
viewConfig: getControlPanelFilterConfig()
},*/
},
legend: {
enable: true,
viewConfig: getControlPanelLegendConfig()
Expand Down Expand Up @@ -145,26 +146,18 @@ define([
groups: [
{
id: 'by-node-color',
title: 'By Node Color',
type: 'radio',
title: false,
type: 'checkbox-circle',
items: [
{
text: 'Filter 1',
text: 'Provisioned Server = Total Servers',
labelCssClass: 'okay',
events: {
click: function (event) {
console.log('Filter 1');
}
}
filterFn: function(d) { return d['total_servers'] == d['provisioned_servers']; }
},
{
text: 'Filter 2',
labelCssClass: 'medium',
events: {
click: function (event) {
console.log('Filter 2');
}
}
text: 'Provisioned Server != Total Servers',
labelCssClass: 'default',
filterFn: function(d) { return d['total_servers'] != d['provisioned_servers'];}
}
]
}
Expand Down
1 change: 1 addition & 0 deletions webroot/setting/sm/ui/js/views/ServerListView.js
Expand Up @@ -66,6 +66,7 @@ define([
yLabel: 'Memory Usage (%)',
forceX: [0, 1],
forceY: [0, 1],
noDataMessage: 'No Data found.',
dataParser: function (response) {
for(var i = 0; i < response.length; i++) {
var server = response[i];
Expand Down

0 comments on commit 4fc159a

Please sign in to comment.