mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
CLOUDSTACK-3427: UI > UCS manager > implement associatesUcsProfileToBlade API.
This commit is contained in:
parent
0331b8fe5d
commit
e93ef73e9f
@ -13104,6 +13104,7 @@
|
|||||||
blades: {
|
blades: {
|
||||||
title: 'Blades',
|
title: 'Blades',
|
||||||
listView: {
|
listView: {
|
||||||
|
id: 'blades',
|
||||||
fields: {
|
fields: {
|
||||||
//dn: { label: 'Distinguished Name' },
|
//dn: { label: 'Distinguished Name' },
|
||||||
chassis: { label: 'Chassis' },
|
chassis: { label: 'Chassis' },
|
||||||
@ -13125,12 +13126,8 @@
|
|||||||
data[i].bladeid = array1[2];
|
data[i].bladeid = array1[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
args.response.success({
|
|
||||||
data: data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
//for testing only (begin)
|
||||||
/*
|
/*
|
||||||
var data = [
|
var data = [
|
||||||
{
|
{
|
||||||
@ -13144,18 +13141,20 @@
|
|||||||
"bladedn": "sys/chassis-1/blade-2"
|
"bladedn": "sys/chassis-1/blade-2"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
for(var i = 0; i < data.length; i++) {
|
for(var i = 0; i < data.length; i++) {
|
||||||
var array1 = data[i].bladedn.split('/');
|
var array1 = data[i].bladedn.split('/');
|
||||||
data[i].chassis = array1[1];
|
data[i].chassis = array1[1];
|
||||||
data[i].bladeid = array1[2];
|
data[i].bladeid = array1[2];
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
//for testing only (end)
|
||||||
|
|
||||||
|
|
||||||
args.response.success({
|
args.response.success({
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
*/
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
associateProfileToBlade: {
|
associateProfileToBlade: {
|
||||||
@ -13179,6 +13178,7 @@
|
|||||||
data: {
|
data: {
|
||||||
ucsmanagerid: args.context.ucsManagers[0].id
|
ucsmanagerid: args.context.ucsManagers[0].id
|
||||||
},
|
},
|
||||||
|
async: false,
|
||||||
success: function(json) { //e.g. json == { "listucsprofileresponse" : { "count":1 ,"ucsprofile" : [ {"ucsdn":"org-root/ls-testProfile"} ] } }
|
success: function(json) { //e.g. json == { "listucsprofileresponse" : { "count":1 ,"ucsprofile" : [ {"ucsdn":"org-root/ls-testProfile"} ] } }
|
||||||
var ucsprofiles = json.listucsprofileresponse.ucsprofile;
|
var ucsprofiles = json.listucsprofileresponse.ucsprofile;
|
||||||
if(ucsprofiles != null) {
|
if(ucsprofiles != null) {
|
||||||
@ -13186,42 +13186,43 @@
|
|||||||
items.push({ id: ucsprofiles[i].ucsdn, description: ucsprofiles[i].ucsdn });
|
items.push({ id: ucsprofiles[i].ucsdn, description: ucsprofiles[i].ucsdn });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//for testing only (begin)
|
//for testing only (begin)
|
||||||
/*
|
/*
|
||||||
items.push({id: 'Service_Profile_Demo1', description: 'Service_Profile_Demo1'});
|
items.push({id: 'org-root/ls-testProfile1', description: 'org-root/ls-testProfile1'});
|
||||||
items.push({id: 'Service_Profile_Demo2', description: 'Service_Profile_Demo2'});
|
items.push({id: 'org-root/ls-testProfile2', description: 'org-root/ls-testProfile2'});
|
||||||
items.push({id: 'Service_Profile_Demo3', description: 'Service_Profile_Demo3'});
|
items.push({id: 'org-root/ls-testProfile3', description: 'org-root/ls-testProfile3'});
|
||||||
items.push({id: 'Service_Profile_Demo4', description: 'Service_Profile_Demo4'});
|
items.push({id: 'org-root/ls-testProfile4', description: 'org-root/ls-testProfile4'});
|
||||||
items.push({id: 'Service_Profile_Demo5', description: 'Service_Profile_Demo5'});
|
items.push({id: 'org-root/ls-testProfile5', description: 'org-root/ls-testProfile5'});
|
||||||
items.push({id: 'Service_Profile_Demo6', description: 'Service_Profile_Demo6'});
|
items.push({id: 'org-root/ls-testProfile6', description: 'org-root/ls-testProfile6'});
|
||||||
items.push({id: 'Service_Profile_Demo7', description: 'Service_Profile_Demo7'});
|
items.push({id: 'org-root/ls-testProfile7', description: 'org-root/ls-testProfile7'});
|
||||||
*/
|
*/
|
||||||
//for testing only (end)
|
//for testing only (end)
|
||||||
|
|
||||||
args.response.success({ data: items });
|
args.response.success({ data: items });
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
validation: { required: true }
|
validation: { required: true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
action: function(args) {
|
action: function(args) {
|
||||||
/*
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('associatesUscProfileToBlade'),
|
url: createURL('associatesUcsProfileToBlade'),
|
||||||
data: {
|
data: {
|
||||||
ucsmanagerid: args.context.ucsManagers[0].id,
|
ucsmanagerid: args.context.ucsManagers[0].id,
|
||||||
profiledn: args.data.profiledn,
|
profiledn: args.data.profiledn,
|
||||||
bladeid: '1234567890' //to change later
|
bladeid: args.context.blades[0].id
|
||||||
},
|
},
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
|
//json.associateucsprofiletobladeresponse.ucsblade
|
||||||
|
args.response.success({data: { associatedProfileDn: args.data.profiledn }});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
args.response.success({data: { associatedProfileDn: args.data.profiledn }});
|
//args.response.success({data: { associatedProfileDn: args.data.profiledn }}); //for testing only
|
||||||
},
|
},
|
||||||
notification: {
|
notification: {
|
||||||
poll: function(args) {
|
poll: function(args) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user