http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 98861dd..915d23a 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -16,7 +16,7 @@
// under the License.
(function(cloudStack, $) {
var ostypeObjs;
-
+
cloudStack.sections.templates = {
title: 'label.menu.templates',
id: 'templates',
@@ -131,19 +131,19 @@
validation: {
required: true
}
- },
+ },
zone: {
label: 'label.zone',
docID: 'helpRegisterTemplateZone',
- select: function(args) {
+ select: function(args) {
if(g_regionsecondaryenabled == true) {
args.response.success({
data: [{
id: -1,
description: "All Zones"
}]
- });
- } else {
+ });
+ } else {
$.ajax({
url: createURL("listZones&available=true"),
dataType: "json",
@@ -184,7 +184,7 @@
var apiCmd;
if (args.zone == -1) { //All Zones
//apiCmd = "listHypervisors&zoneid=-1"; //"listHypervisors&zoneid=-1" has been changed to return only hypervisors available in all zones (bug 8809)
- apiCmd = "listHypervisors";
+ apiCmd = "listHypervisors";
}
else {
apiCmd = "listHypervisors&zoneid=" + args.zone;
@@ -215,20 +215,20 @@
$form.find('.form-item[rel=rootDiskControllerType]').css('display', 'inline-block');
$form.find('.form-item[rel=nicAdapterType]').css('display', 'inline-block');
$form.find('.form-item[rel=keyboardType]').css('display', 'inline-block');
-
+
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
} else if ($(this).val() == "XenServer") {
$form.find('.form-item[rel=rootDiskControllerType]').hide();
$form.find('.form-item[rel=nicAdapterType]').hide();
- $form.find('.form-item[rel=keyboardType]').hide();
-
+ $form.find('.form-item[rel=keyboardType]').hide();
+
if (isAdmin())
- $form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block');
+ $form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block');
} else {
$form.find('.form-item[rel=rootDiskControllerType]').hide();
$form.find('.form-item[rel=nicAdapterType]').hide();
$form.find('.form-item[rel=keyboardType]').hide();
-
+
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
}
});
@@ -260,7 +260,7 @@
},
isHidden: true
},
-
+
//fields for hypervisor == "VMware" (starts here)
rootDiskControllerType: {
label: 'label.root.disk.controller',
@@ -419,18 +419,18 @@
osTypeId: {
label: 'label.os.type',
docID: 'helpRegisterTemplateOSType',
- select: function(args) {
+ select: function(args) {
$.ajax({
url: createURL("listOsTypes"),
dataType: "json",
async: true,
- success: function(json) {
+ success: function(json) {
var ostypeObjs = json.listostypesresponse.ostype;
args.response.success({
data: ostypeObjs
});
}
- });
+ });
}
},
@@ -519,16 +519,16 @@
});
}
-
- //XenServer only (starts here)
+
+ //XenServer only (starts here)
if (args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css("display") != "none") {
$.extend(data, {
'details[0].hypervisortoolsversion': (args.data.xenserverToolsVersion61plus == "on") ? "xenserver61" : "xenserver56"
});
}
//XenServer only (ends here)
-
-
+
+
//VMware only (starts here)
if (args.$form.find('.form-item[rel=rootDiskControllerType]').css("display") != "none" && args.data.rootDiskControllerType != "") {
$.extend(data, {
@@ -579,7 +579,7 @@
}
}
},
-
+
uploadTemplateFromLocal: {
isHeader: true,
label: 'Upload from Local',
@@ -592,9 +592,9 @@
title: 'Upload Template from Local',
preFilter: cloudStack.preFilter.createTemplate,
fileUpload: {
- getURL: function(args) {
+ getURL: function(args) {
args.data = args.formData;
-
+
var data = {
name: args.data.name,
displayText: args.data.description,
@@ -606,7 +606,7 @@
osTypeId: args.data.osTypeId,
hypervisor: args.data.hypervisor
};
-
+
if (args.$form.find('.form-item[rel=isPublic]').css("display") != "none") {
$.extend(data, {
ispublic: (args.data.isPublic == "on")
@@ -630,15 +630,15 @@
isrouting: (args.data.isrouting === 'on')
});
}
-
+
$.ajax({
url: createURL('getUploadParamsForTemplate'),
data: data,
async: false,
- success: function(json) {
+ success: function(json) {
var uploadparams = json.postuploadtemplateresponse.getuploadparams;
var templateId = uploadparams.id;
-
+
args.response.success({
url: uploadparams.postURL,
ajaxPost: true,
@@ -647,9 +647,9 @@
'X-expires': uploadparams.expires,
'X-metadata': uploadparams.metadata
}
- });
+ });
}
- });
+ });
},
postUpload: function(args) {
if(args.error) {
@@ -685,7 +685,7 @@
validation: {
required: true
}
- },
+ },
zone: {
label: 'label.zone',
@@ -742,24 +742,24 @@
});
}
},
-
+
format: {
label: 'label.format',
docID: 'helpRegisterTemplateFormat',
dependsOn: 'hypervisor',
select: function(args) {
var items = [];
- if (args.hypervisor == "XenServer") {
+ if (args.hypervisor == "XenServer") {
items.push({
id: 'VHD',
description: 'VHD'
});
- } else if (args.hypervisor == "VMware") {
+ } else if (args.hypervisor == "VMware") {
items.push({
id: 'OVA',
description: 'OVA'
});
- } else if (args.hypervisor == "KVM") {
+ } else if (args.hypervisor == "KVM") {
items.push({
id: 'QCOW2',
description: 'QCOW2'
@@ -776,17 +776,17 @@
id: 'VMDK',
description: 'VMDK'
});
- } else if (args.hypervisor == "BareMetal") {
+ } else if (args.hypervisor == "BareMetal") {
items.push({
id: 'BareMetal',
description: 'BareMetal'
});
- } else if (args.hypervisor == "Ovm") {
+ } else if (args.hypervisor == "Ovm") {
items.push({
id: 'RAW',
description: 'RAW'
});
- } else if (args.hypervisor == "LXC") {
+ } else if (args.hypervisor == "LXC") {
items.push({
id: 'TAR',
description: 'TAR'
@@ -805,23 +805,23 @@
data: items
});
}
- },
+ },
osTypeId: {
label: 'label.os.type',
docID: 'helpRegisterTemplateOSType',
- select: function(args) {
+ select: function(args) {
$.ajax({
url: createURL("listOsTypes"),
dataType: "json",
async: true,
- success: function(json) {
+ success: function(json) {
var ostypeObjs = json.listostypesresponse.ostype;
args.response.success({
data: ostypeObjs
});
}
- });
+ });
}
},
@@ -830,40 +830,40 @@
docID: 'helpRegisterTemplateExtractable',
isBoolean: true
},
-
+
isPasswordEnabled: {
label: "label.password.enabled",
docID: 'helpRegisterTemplatePasswordEnabled',
isBoolean: true
},
-
+
isdynamicallyscalable: {
label: "label.dynamically.scalable",
docID: 'helpRegisterTemplateDynamicallyScalable',
isBoolean: true
- },
-
+ },
+
isPublic: {
label: "label.public",
docID: 'helpRegisterTemplatePublic',
isBoolean: true,
isHidden: true
- },
-
+ },
+
isFeatured: {
label: "label.featured",
docID: 'helpRegisterTemplateFeatured',
isBoolean: true,
isHidden: true
},
-
+
isrouting: {
label: 'label.routing',
docID: 'helpRegisterTemplateRouting',
isBoolean: true,
isHidden: true
},
-
+
requireshvm: {
label: 'label.hvm',
docID: 'helpRegisterTemplateHvm',
@@ -934,14 +934,14 @@
success: function(json) {
var items = json.listtemplatesresponse.template;
var itemsView = [];
-
+
$(items).each(function(index, item) {
var existing = $.grep(itemsView, function(it){
return it != null && it.id !=null && it.id == item.id;
});
-
+
if (existing.length == 0) {
- itemsView.push($.extend(item, {
+ itemsView.push($.extend(item, {
zones: item.zonename,
zoneids: [item.zoneid]
}));
@@ -950,7 +950,7 @@
existing[0].zones = 'label.multiplezones';
existing[0].zoneids.push(item.zoneid);
}
- });
+ });
args.response.success({
actionFilter: templateActionfilter,
@@ -1035,10 +1035,10 @@
}
});
-
+
//***** addResourceDetail *****
- //XenServer only (starts here)
- if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) {
+ //XenServer only (starts here)
+ if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) {
$.ajax({
url: createURL('addResourceDetail'),
data: {
@@ -1055,33 +1055,33 @@
dataType: "json",
success: function(json) {
var result = json.queryasyncjobresultresponse;
-
+
if (result.jobstatus == 0) {
return; //Job has not completed
} else {
clearInterval(addResourceDetailIntervalID);
- if (result.jobstatus == 1) {
- //do nothing
+ if (result.jobstatus == 1) {
+ //do nothing
} else if (result.jobstatus == 2) {
cloudStack.dialog.notice({
message: "message.XSTools61plus.update.failed" + " " + _s(result.jobresult.errortext)
- });
+ });
}
}
},
- error: function(XMLHttpResponse) {
+ error: function(XMLHttpResponse) {
cloudStack.dialog.notice({
message: "message.XSTools61plus.update.failed" + " " + parseXMLHttpResponse(XMLHttpResponse)
- });
+ });
}
});
- }, g_queryAsyncJobResultInterval);
+ }, g_queryAsyncJobResultInterval);
}
- });
- }
- //XenServer only (ends here)
-
+ });
+ }
+ //XenServer only (ends here)
+
//***** listTemplates *****
//So, we call listTemplates API to get a complete template object
@@ -1162,36 +1162,36 @@
} else {
hiddenFields = ["hypervisor", 'xenserverToolsVersion61plus'];
}
-
+
if ('templates' in args.context && args.context.templates[0].hypervisor != 'XenServer') {
hiddenFields.push('xenserverToolsVersion61plus');
}
-
+
if ('templates' in args.context && args.context.templates[0].ostypeid != undefined) {
var ostypeObjs;
$.ajax({
url: createURL("listOsTypes"),
dataType: "json",
async: false,
- success: function(json) {
- var ostypeObjs = json.listostypesresponse.ostype;
+ success: function(json) {
+ var ostypeObjs = json.listostypesresponse.ostype;
}
});
-
+
if (ostypeObjs != undefined) {
var ostypeName;
for (var i = 0; i < ostypeObjs.length; i++) {
- if (ostypeObjs[i].id == args.context.templates[0].ostypeid) {
+ if (ostypeObjs[i].id == args.context.templates[0].ostypeid) {
ostypeName = ostypeObjs[i].description;
break;
}
- }
- if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) {
+ }
+ if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) {
hiddenFields.push('xenserverToolsVersion61plus');
- }
+ }
}
}
-
+
return hiddenFields;
},
@@ -1203,7 +1203,7 @@
required: true
}
}
- }, {
+ }, {
hypervisor: {
label: 'label.hypervisor'
},
@@ -1217,8 +1217,8 @@
return false;
},
converter: cloudStack.converters.toBooleanText
- },
-
+ },
+
size: {
label: 'label.size',
converter: function(args) {
@@ -1276,8 +1276,8 @@
return false;
},
converter: cloudStack.converters.toBooleanText
- },
-
+ },
+
ostypeid: {
label: 'label.os.type',
isEditable: true,
@@ -1287,11 +1287,11 @@
url: createURL("listOsTypes"),
dataType: "json",
async: false,
- success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
+ success: function(json) {
+ ostypeObjs = json.listostypesresponse.ostype;
}
});
-
+
var items = [];
$(ostypeObjs).each(function() {
items.push({
@@ -1315,8 +1315,8 @@
validation: {
required: true
}
- },
-
+ },
+
domain: {
label: 'label.domain'
},
@@ -1327,11 +1327,11 @@
label: 'label.created',
converter: cloudStack.converters.toLocalDate
},
-
+
templatetype: {
label: 'label.type'
},
-
+
id: {
label: 'label.id'
}
@@ -1343,7 +1343,7 @@
}),
- dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab
+ dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab
$.ajax({
url: createURL("listTemplates"),
data: {
@@ -1352,14 +1352,14 @@
},
success: function(json) {
var jsonObj = json.listtemplatesresponse.template[0];
-
+
if ('details' in jsonObj && 'hypervisortoolsversion' in jsonObj.details) {
if (jsonObj.details.hypervisortoolsversion == 'xenserver61')
jsonObj.xenserverToolsVersion61plus = true;
else
jsonObj.xenserverToolsVersion61plus = false;
}
-
+
args.response.success({
actionFilter: templateActionfilter,
data: jsonObj
@@ -1388,7 +1388,7 @@
hideSearchBar: true,
- dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab > Zones tab (listing)
+ dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab > Zones tab (listing)
$.ajax({
url: createURL("listTemplates"),
data: {
@@ -1397,7 +1397,7 @@
},
success: function(json) {
var jsonObjs = json.listtemplatesresponse.template;
-
+
if (jsonObjs != undefined) {
for (var i = 0; i < jsonObjs.length; i++) {
var jsonObj = jsonObjs[i];
@@ -1408,16 +1408,16 @@
jsonObj.xenserverToolsVersion61plus = false;
}
}
- }
-
+ }
+
args.response.success({
actionFilter: templateActionfilter,
data: jsonObjs
});
}
- });
+ });
},
-
+
detailView: {
noCompact: true,
actions: {
@@ -1500,18 +1500,18 @@
}
}
},
- action: function(args) {
+ action: function(args) {
var data = {
id: args.context.templates[0].id,
destzoneid: args.data.destinationZoneId
- };
+ };
$.extend(data, {
sourcezoneid: args.context.zones[0].zoneid
- });
-
+ });
+
$.ajax({
url: createURL('copyTemplate'),
- data: data,
+ data: data,
success: function(json) {
var jid = json.copytemplateresponse.jobid;
args.response.success({
@@ -1532,7 +1532,7 @@
poll: pollAsyncJobResult
}
}
- },
+ },
tabs: {
details: {
@@ -1544,36 +1544,36 @@
} else {
hiddenFields = ["hypervisor", 'xenserverToolsVersion61plus'];
}
-
+
if ('templates' in args.context && args.context.templates[0].hypervisor != 'XenServer') {
hiddenFields.push('xenserverToolsVersion61plus');
}
-
+
if ('templates' in args.context && args.context.templates[0].ostypeid != undefined) {
var ostypeObjs;
$.ajax({
url: createURL("listOsTypes"),
dataType: "json",
async: false,
- success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
+ success: function(json) {
+ ostypeObjs = json.listostypesresponse.ostype;
}
});
-
+
if (ostypeObjs != undefined) {
var ostypeName;
for (var i = 0; i < ostypeObjs.length; i++) {
- if (ostypeObjs[i].id == args.context.templates[0].ostypeid) {
+ if (ostypeObjs[i].id == args.context.templates[0].ostypeid) {
ostypeName = ostypeObjs[i].description;
break;
}
- }
- if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) {
+ }
+ if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) {
hiddenFields.push('xenserverToolsVersion61plus');
- }
+ }
}
- }
-
+ }
+
return hiddenFields;
},
@@ -1585,13 +1585,13 @@
required: true
}
}
- }, {
+ }, {
id: {
label: 'label.id'
},
zonename: {
label: 'label.zone.name'
- },
+ },
zoneid: {
label: 'label.zone.id'
},
@@ -1616,8 +1616,8 @@
return false;
},
converter: cloudStack.converters.toBooleanText
- },
-
+ },
+
size: {
label: 'label.size',
converter: function(args) {
@@ -1675,22 +1675,22 @@
return false;
},
converter: cloudStack.converters.toBooleanText
- },
-
+ },
+
ostypeid: {
label: 'label.os.type',
isEditable: true,
- select: function(args) {
+ select: function(args) {
var ostypeObjs;
$.ajax({
url: createURL("listOsTypes"),
dataType: "json",
async: false,
success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
+ ostypeObjs = json.listostypesresponse.ostype;
}
});
-
+
var items = [];
$(ostypeObjs).each(function() {
items.push({
@@ -1711,8 +1711,8 @@
validation: {
required: true
}
- },
-
+ },
+
domain: {
label: 'label.domain'
},
@@ -1723,7 +1723,7 @@
label: 'label.created',
converter: cloudStack.converters.toLocalDate
},
-
+
templatetype: {
label: 'label.type'
}
@@ -1736,7 +1736,7 @@
}),
- dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab > Zones tab (listing) > select a zone from listing > Details tab
+ dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab > Zones tab (listing) > select a zone from listing > Details tab
var jsonObj = args.context.zones[0];
if ('details' in jsonObj && 'hypervisortoolsversion' in jsonObj.details) {
@@ -1749,11 +1749,11 @@
args.response.success({
actionFilter: templateActionfilter,
data: jsonObj
- });
+ });
}
}
}}
- }
+ }
}
}
}
@@ -1838,8 +1838,8 @@
id: -1,
description: "All Zones"
}]
- });
- } else {
+ });
+ } else {
$.ajax({
url: createURL("listZones&available=true"),
dataType: "json",
@@ -1891,7 +1891,7 @@
dataType: "json",
async: true,
success: function(json) {
- var ostypeObjs = json.listostypesresponse.ostype;
+ var ostypeObjs = json.listostypesresponse.ostype;
var items = [];
//items.push({id: "", description: "None"}); //shouldn't have None option when bootable is checked
$(ostypeObjs).each(function() {
@@ -1904,7 +1904,7 @@
data: items
});
}
- });
+ });
}
},
@@ -2316,13 +2316,13 @@
label: 'label.os.type',
isEditable: true,
select: function(args) {
- if (ostypeObjs == undefined) {
+ if (ostypeObjs == undefined) {
$.ajax({
url: createURL("listOsTypes"),
dataType: "json",
async: false,
success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
+ ostypeObjs = json.listostypesresponse.ostype;
}
});
}
@@ -2412,7 +2412,7 @@
}
});
},
-
+
detailView: {
actions: {
copyISO: {
@@ -2458,17 +2458,17 @@
}
}
},
- action: function(args) {
+ action: function(args) {
var data = {
id: args.context.isos[0].id,
destzoneid: args.data.destinationZoneId
- };
+ };
if (args.context.zones[0].zoneid != undefined) {
$.extend(data, {
sourcezoneid: args.context.zones[0].zoneid
- });
- }
-
+ });
+ }
+
$.ajax({
url: createURL('copyIso'),
data: data,
@@ -2616,10 +2616,10 @@
dataType: "json",
async: false,
success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
+ ostypeObjs = json.listostypesresponse.ostype;
}
});
-
+
var items = [];
$(ostypeObjs).each(function() {
items.push({
@@ -2629,7 +2629,7 @@
});
args.response.success({
data: items
- });
+ });
}
},
@@ -2689,14 +2689,14 @@
//do nothing
} else {
allowedActions.push("edit");
-
+
allowedActions.push("copyTemplate");
/*
if(g_regionsecondaryenabled != true) {
allowedActions.push("copyTemplate");
}
*/
-
+
//allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network.
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui-custom/accountsWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/accountsWizard.js b/ui/scripts/ui-custom/accountsWizard.js
index 0d416e1..3e2a646 100644
--- a/ui/scripts/ui-custom/accountsWizard.js
+++ b/ui/scripts/ui-custom/accountsWizard.js
@@ -209,10 +209,10 @@
}
]
}
- };
- */
+ };
+ */
//for testing only (end)
-
+
if (json.ldapuserresponse.count > 0) {
$(json.ldapuserresponse.LdapUser).each(function() {
var $result = $('<tr>');
@@ -334,4 +334,4 @@
accountsWizard(args);
};
};
-})(jQuery, cloudStack);
\ No newline at end of file
+})(jQuery, cloudStack);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui-custom/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js
index 0a5370e..86901c5 100644
--- a/ui/scripts/ui-custom/instanceWizard.js
+++ b/ui/scripts/ui-custom/instanceWizard.js
@@ -301,7 +301,7 @@
'select-iso': function($step, formData) {
$step.find('.section.custom-size').hide();
-
+
var originalValues = function(formData) {
var $inputs = $step.find('.wizard-step-conditional:visible')
.find('input[type=radio]');
@@ -323,7 +323,7 @@
return {
response: {
- success: function(args) {
+ success: function(args) {
if (formData['select-template']) {
$step.find('.wizard-step-conditional').filter(function() {
return $(this).hasClass(formData['select-template']);
@@ -462,7 +462,7 @@
}, {
'wizard-field': 'service-offering'
})
- );
+ );
$step.find('input[type=radio]').bind('change', function() {
var $target = $(this);
@@ -576,7 +576,7 @@
$selectContainer.hide();
// Fix issue with containers always showing after reload
- $multiDiskSelect.find('.select-container').attr('style', null);
+ $multiDiskSelect.find('.select-container').attr('style', null);
} else {
$selectContainer.show();
$step.find('.content .select-container').append(
@@ -618,7 +618,7 @@
// handle removal of custom IOPS controls
$step.removeClass('custom-iops-do');
}
-
+
return true;
}
@@ -1137,19 +1137,19 @@
// Next button
if ($target.closest('div.button.next').size()) {
//step 2 - select template/ISO
- if($activeStep.hasClass('select-iso')) {
+ if($activeStep.hasClass('select-iso')) {
if ($activeStep.find('.content:visible input:checked').size() == 0) {
cloudStack.dialog.notice({
message: 'message.step.1.continue'
});
return false;
- }
+ }
$(window).trigger("cloudStack.module.instanceWizard.clickNextButton", {
$form: $form,
currentStep: 2
- });
- }
-
+ });
+ }
+
//step 6 - select network
if ($activeStep.find('.wizard-step-conditional.select-network:visible').size() > 0) {
var data = $activeStep.data('my-networks');
@@ -1277,7 +1277,7 @@
$wizard.find('.tab-view').tabs();
$wizard.find('.slider').each(function() {
var $slider = $(this);
-
+
$slider.slider({
min: minCustomDiskSize,
max: maxCustomDiskSize,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui-custom/physicalResources.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/physicalResources.js b/ui/scripts/ui-custom/physicalResources.js
index 2a0ac85..e815fc5 100644
--- a/ui/scripts/ui-custom/physicalResources.js
+++ b/ui/scripts/ui-custom/physicalResources.js
@@ -61,7 +61,7 @@
);
$li.appendTo($socketInfo);
- });
+ });
}
}
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui-custom/pluginListing.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/pluginListing.js b/ui/scripts/ui-custom/pluginListing.js
index e679c62..fce7daa 100644
--- a/ui/scripts/ui-custom/pluginListing.js
+++ b/ui/scripts/ui-custom/pluginListing.js
@@ -53,13 +53,13 @@
$plugin.click(function() {
var $mainSection = $('#navigation ul li').filter('.' + plugin.id);
-
+
if ($mainSection.size()) {
$mainSection.click();
return;
}
-
+
$browser.cloudBrowser('addPanel', {
title: plugin.title,
$parent: $('.panel:first'),
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index 8344d95..7e1a2a2 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -296,21 +296,21 @@
var hypervisor = getData($trafficType.closest('.zone-wizard')).zone.hypervisor;
var zoneType = getData($trafficType.closest('.zone-wizard')).zone.networkType;
var fields;
-
+
if (hypervisor == 'VMware') {
fields = {
vSwitchName: {
label: 'label.vswitch.name' ,
defaultValue: trafficData.vSwitchName
},
- vlanId: {
+ vlanId: {
label: 'label.vlan.id',
defaultValue: trafficData.vlanId
- }
- };
-
+ }
+ };
+
if(zoneType == 'Advanced') {
- if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {
+ if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {
if(trafficData.vSwitchType == null) {
var useDvs = false;
$.ajax({
@@ -324,9 +324,9 @@
useDvs = true;
}
}
- });
- if (useDvs == true) {
- var useNexusDvs = false;
+ });
+ if (useDvs == true) {
+ var useNexusDvs = false;
$.ajax({
url: createURL('listConfigurations'),
data: {
@@ -345,17 +345,17 @@
} else {
trafficData.vSwitchType = 'vmwaredvs';
fields.vSwitchName.defaultValue = 'dvSwitch0';
- }
+ }
} else { //useDvs == false
trafficData.vSwitchType = 'vmwaresvs';
fields.vSwitchName.defaultValue = 'vSwitch0';
- }
+ }
}
-
+
$.extend(fields, {
vSwitchType: {
label: 'label.vSwitch.type',
- select: function (args) {
+ select: function (args) {
args.response.success({
data: [{
id: 'nexusdvs',
@@ -371,10 +371,10 @@
},
defaultValue: trafficData.vSwitchType
}
- });
- }
+ });
+ }
}
- } else {
+ } else {
fields = {
label: {
label: hypervisor + ' ' + _l('label.traffic.label'),
@@ -390,7 +390,7 @@
fields: fields
},
- after: function(args) {
+ after: function(args) {
$trafficType.data('traffic-type-data', args.data);
}
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui/core.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js
index 7756390..f05db2c 100644
--- a/ui/scripts/ui/core.js
+++ b/ui/scripts/ui/core.js
@@ -98,7 +98,7 @@
$navItem.addClass('active');
$browser.cloudBrowser('removeAllPanels');
}
-
+
$browser.cloudBrowser('addPanel', {
title: '<span class="section">' + _l(data.title) + '</span>' + '<span class="subsection"></span>',
data: '',
@@ -106,7 +106,7 @@
if(!isPlugin) {
$breadcrumb.attr('title', _l(data.title));
}
-
+
data.$breadcrumb = $breadcrumb;
// Hide breadcrumb if this is the home section
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index cb6fcb5..6f2b7a8 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -48,11 +48,11 @@
// Description text
var formDesc;
- if (typeof(args.form.desc) == 'function') {
+ if (typeof(args.form.desc) == 'function') {
formDesc = args.form.desc(args);
} else { //typeof(args.form.desc) == 'string' or 'undefined'
formDesc = args.form.desc;
- }
+ }
$('<span>').addClass('message').prependTo($formContainer).html(
_l(formDesc)
);
@@ -225,7 +225,7 @@
if ($dependsOn.is('[type=checkbox]')) {
var isReverse = false;
-
+
if (args.form.fields[dependsOn]) {
isReverse = args.form.fields[dependsOn].isReverse;
isChecked = args.form.fields[dependsOn].isChecked;
@@ -238,10 +238,10 @@
if (($target.is(':checked') && !isReverse) ||
($target.is(':unchecked') && isReverse)) {
-
+
$dependent.css('display', 'inline-block'); //show dependent dropdown field
$dependent.change(); //trigger event handler for default option in dependent dropdown field (CLOUDSTACK-7826)
-
+
$dependent.each(function() {
if ($(this).data('dialog-select-fn')) {
$(this).data('dialog-select-fn')();
@@ -283,7 +283,7 @@
success: function(args) {
if (args.data == undefined || args.data.length == 0) {
var $option = $('<option>')
- .appendTo($input)
+ .appendTo($input)
.html("");
} else {
$(args.data).each(function() {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui/utils.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/utils.js b/ui/scripts/ui/utils.js
index 542365a..524aed6 100644
--- a/ui/scripts/ui/utils.js
+++ b/ui/scripts/ui/utils.js
@@ -90,7 +90,7 @@
return '';
}
- var sanitized = value
+ var sanitized = value
.replace(/</g, "<")
.replace(/>/g, ">");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index c692af4..d1d9aeb 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -239,7 +239,7 @@
cloudStack.dialog.notice({
message: messages.complete(args2.data)
});
- }
+ }
}
if (additional && additional.complete) additional.complete($.extend(true, args, {
$detailView: $detailView
@@ -387,31 +387,31 @@
}
});
},
-
+
destroy: function($detailView, args) {
var tab = args.tabs[args.activeTab];
var isMultiple = tab.multiple;
uiActions.standard($detailView, args, {
noRefresh: true,
- complete: function(args, args2) {
- if ((!('id' in args2.data)) && ('toRemove' in args2.data) && (args2.data.toRemove == true)) {
+ complete: function(args, args2) {
+ if ((!('id' in args2.data)) && ('toRemove' in args2.data) && (args2.data.toRemove == true)) {
if (isMultiple && $detailView.is(':visible')) {
$detailView.find('.refresh').click(); // Reload tab
} else {
var $browser = $('#browser .container');
var $panel = $detailView.closest('.panel');
-
+
if ($detailView.is(':visible')) {
$browser.cloudBrowser('selectPanel', {
panel: $panel.prev()
});
}
-
+
if ($detailView.data("list-view-row") != null) {
var $row = $detailView.data('list-view-row');
var $tbody = $row.closest('tbody');
-
+
$row.remove();
if (!$tbody.find('tr').size()) {
$("<tr>").addClass('empty').append(
@@ -427,8 +427,8 @@
}
});
},
-
-
+
+
/**
* Convert editable fields to text boxes; clicking again saves data
*
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index 93eaa71..81b5185 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -21,7 +21,7 @@
var uiActions = {
standard: function($instanceRow, args, additional) {
var isAddAction = args.action.isAdd;
-
+
var listViewArgs = $instanceRow.closest('div.list-view').data('view-args');
var notification = args.action.notification ? args.action.notification : {};
var messages = args.action ? args.action.messages : {};
@@ -366,7 +366,7 @@
error: function(message) {
$instanceRow.removeClass('loading');
$instanceRow.find('td.quick-view').removeClass('loading-overlay');
-
+
if (!isHeader) {
if (($.isPlainObject(args.action.createForm) && args.action.addRow != 'false') ||
(!args.action.createForm && args.action.addRow == 'true')) {
@@ -629,10 +629,10 @@
showEditField();
} else if ($editInput.val() != $label.html()) { //click Save button with changed value
if ($editInput.val().match(/<|>/)) {
- cloudStack.dialog.notice({ message: 'message.validate.invalid.characters' });
+ cloudStack.dialog.notice({ message: 'message.validate.invalid.characters' });
return false;
}
-
+
$edit.animate({
opacity: 0.5
});
@@ -1148,7 +1148,7 @@
$td.attr('title', _s(content));
});
-
+
var $first = $tr.find('td:first');
if (multiSelect)
$first = $first.next();
@@ -1208,15 +1208,15 @@
rowActions[actionName]($tr);
var map1 = {};
$tr.closest('tbody').find('tr').each(function() {
- /*
- * fire only one sorting API call(updateXXXXXXX&sortKey=n&id=UUID) for items who have the same UUID.
+ /*
+ * fire only one sorting API call(updateXXXXXXX&sortKey=n&id=UUID) for items who have the same UUID.
* e.g. An Template/ISO of multiple zones have the same UUID.
*/
var objId = $(this).data('json-obj').id;
- if(!(objId in map1)) {
+ if(!(objId in map1)) {
sort($(this), action);
map1[objId] = 1;
- }
+ }
});
$tr.closest('.data-table').dataTable('selectRow', $tr.index());
@@ -1238,12 +1238,12 @@
rowActions._std($tr, function() {});
var map1 = {};
$tr.closest('tbody').find('tr').each(function() {
- /*
- * fire only one sorting API call(updateXXXXXXX&sortKey=n&id=UUID) for items who have the same UUID.
+ /*
+ * fire only one sorting API call(updateXXXXXXX&sortKey=n&id=UUID) for items who have the same UUID.
* e.g. An Template/ISO of multiple zones have the same UUID.
*/
var objId = $(this).data('json-obj').id;
- if(!(objId in map1)) {
+ if(!(objId in map1)) {
sort($(this), reorder.moveDrag);
map1[objId] = 1;
}
@@ -1355,7 +1355,7 @@
$select.hide();
}
- $select.find('option:first').attr('selected', 'selected');
+ $select.find('option:first').attr('selected', 'selected');
$listView.find('.data-table').dataTable('refresh');
}
}
@@ -1801,7 +1801,7 @@
noActionCol: listViewData.noActionCol
});
createFilters($toolbar, listViewData.filters);
-
+
if (listViewData.hideSearchBar != true) {
createSearchBar($toolbar, listViewData);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bdbaf45/ui/scripts/ui/widgets/multiEdit.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/multiEdit.js b/ui/scripts/ui/widgets/multiEdit.js
index 48b2ac3..4bd26f7 100755
--- a/ui/scripts/ui/widgets/multiEdit.js
+++ b/ui/scripts/ui/widgets/multiEdit.js
@@ -90,7 +90,7 @@
if (isHidden) {
return true;
}
-
+
var $td = $('<td>').addClass(fieldName).appendTo($tr);
var $input, val;
var $addButton = $multi.find('form .button.add-vm:not(.custom-action)').clone();
@@ -280,7 +280,7 @@
// Align width to main header
_medit.refreshItemWidths($multi);
-
+
if (data._hideFields &&
$.inArray(fieldName, data._hideFields) > -1) {
$td.addClass('disabled');
@@ -712,7 +712,7 @@
itemRow: function(item, itemActions, multiRule, $tbody) {
var $tr = $('<tr>');
-
+
var itemName = multiRule._itemName ? item[multiRule._itemName] : item.name;
var $itemName = $('<span>').html(_s(itemName));
@@ -727,14 +727,14 @@
});
});
-
+
var itemIp = multiRule._itemIp ? item[multiRule._itemIp] : null;
if (itemIp != null) {
var $itemIp = $('<span>').html(_s(itemIp));
$tr.append($('<td>').addClass('state').appendTo($tr).append($itemIp));
- }
-
-
+ }
+
+
var itemState = item._itemState ? item._itemState : item.state;
$tr.append($('<td>').addClass('state').appendTo($tr).append(
@@ -993,7 +993,7 @@
.appendTo($td);
if (field.validation) {
- $td.find('input').first().data("validation-settings", field.validation );
+ $td.find('input').first().data("validation-settings", field.validation );
}
if (field.isDisabled) $input.hide();