Skip to content

Commit 612ce62

Browse files
committed
Add tier VM, PF, static NAT links
1 parent 81bce38 commit 612ce62

3 files changed

Lines changed: 34 additions & 5 deletions

File tree

ui/modules/vpc/vpc.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
var elems = {
1919
tier: function(args) {
2020
var tier = args.tier;
21-
var context = args.context;
21+
var context = $.extend(true, {}, args.context, {
22+
networks: [tier]
23+
});
2224
var dashboardItems = args.dashboardItems;
2325
var $tier = $('<div>').addClass('tier-item');
2426
var $header = $('<div>').addClass('header');
@@ -41,9 +43,7 @@
4143
var $detailView = $('<div>').detailView(
4244
$.extend(true, {}, cloudStack.vpc.tiers.detailView, {
4345
$browser: $browser,
44-
context: $.extend(true, {}, context, {
45-
networks: [tier]
46-
}),
46+
context: context,
4747
onActionComplete: function() {
4848
$tier.closest('.vpc-network-chart').trigger('reload');
4949
}
@@ -153,6 +153,7 @@
153153
dashboard: function(args) {
154154
var $dashboard = $('<div>').addClass('dashboard');
155155
var context = args.context;
156+
var tier = context.networks[0];
156157

157158
$(args.dashboardItems).map(function(index, dashboardItem) {
158159
var $dashboardItem = $('<div>').addClass('dashboard-item');
@@ -167,7 +168,7 @@
167168

168169
$dashboardItem.click(function() {
169170
$('#browser .container').cloudBrowser('addPanel', {
170-
title: dashboardItem.name,
171+
title: tier.name + ' - ' + dashboardItem.name,
171172
maximizeIfSelected: true,
172173
complete: function($panel) {
173174
var section = cloudStack.vpc.sections[id];

ui/scripts/instances.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,14 @@
204204
affinitygroupid: args.context.affinityGroups[0].id
205205
});
206206
}
207+
208+
if("vpc" in args.context &&
209+
"networks" in args.context) {
210+
$.extend(data, {
211+
vpcid: args.context.vpc[0].id,
212+
networkid: args.context.networks[0].id
213+
});
214+
}
207215

208216
$.ajax({
209217
url: createURL('listVirtualMachines'),

ui/scripts/vpc.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,26 @@
294294
cloudStack.vpc = {
295295
// nTier sections
296296
sections: {
297+
tierVMs: function() {
298+
var list = $.extend(true, {}, cloudStack.sections.instances);
299+
300+
list.listView.actions.add.action.custom = cloudStack.uiCustom.instanceWizard(
301+
$.extend(true, {}, cloudStack.instanceWizard, {
302+
pluginForm: { name: 'vpcTierInstanceWizard' }
303+
})
304+
);
305+
306+
return list;
307+
},
308+
309+
tierPortForwarders: function() {
310+
return cloudStack.vpc.ipAddresses.listView();
311+
},
312+
313+
tierStaticNATs: function() {
314+
return cloudStack.vpc.ipAddresses.listView();
315+
},
316+
297317
// Internal load balancers
298318
tierLoadBalancers: {
299319
listView: {

0 commit comments

Comments
 (0)