Skip to content

Commit 11a7e46

Browse files
author
Jessica Wang
committed
CLOUDSTACK-1974: Dedicate Guest VLAN Range - UI - Infrastructure menu - physical network - Guest - Dedicated Guest VLAN Range tab - implement Release Dedicated VLAN Range action.
1 parent b247ba6 commit 11a7e46

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

ui/scripts/system.js

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,6 +2199,73 @@
21992199
}
22002200
}
22012201
}
2202+
},
2203+
2204+
//???
2205+
detailView: {
2206+
name: 'VLAN Range details',
2207+
actions: {
2208+
remove: {
2209+
label: 'Delete VLAN Range',
2210+
messages: {
2211+
confirm: function(args) {
2212+
return 'Please confirm you want to delete VLAN Range';
2213+
},
2214+
notification: function(args) {
2215+
return 'Delete VLAN Range';
2216+
}
2217+
},
2218+
action: function(args) {
2219+
var data = {
2220+
id: args.context.dedicatedGuestVlanRanges[0].id
2221+
};
2222+
$.ajax({
2223+
url: createURL('releaseDedicatedGuestVlanRange'),
2224+
data: data,
2225+
async: true,
2226+
success: function(json) {
2227+
var jid = json.releasededicatedguestvlanrangeresponse.jobid;
2228+
args.response.success(
2229+
{
2230+
_custom: { jobId: jid }
2231+
}
2232+
);
2233+
}
2234+
});
2235+
},
2236+
notification: {
2237+
poll: pollAsyncJobResult
2238+
}
2239+
}
2240+
},
2241+
2242+
tabs: {
2243+
details: {
2244+
title: 'label.details',
2245+
fields: [
2246+
{
2247+
guestvlanrange: { label: 'VLAN Range(s)' },
2248+
},
2249+
{
2250+
domain: { label: 'label.domain' },
2251+
account: { label: 'label.account' },
2252+
id: { label: 'label.id' }
2253+
}
2254+
],
2255+
dataProvider: function(args) {
2256+
$.ajax({
2257+
url: createURL('listDedicatedGuestVlanRanges'),
2258+
data: {
2259+
id: args.context.dedicatedGuestVlanRanges[0].id
2260+
},
2261+
success: function(json) {
2262+
var item = json.listdedicatedguestvlanrangesresponse.dedicatedguestvlanrange[0];
2263+
args.response.success({ data: item })
2264+
}
2265+
});
2266+
}
2267+
}
2268+
}
22022269
}
22032270
}
22042271
}

0 commit comments

Comments
 (0)