From a8c50dd824afc2f2208ac713cf5d694058b0989b Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 3 Jan 2012 15:58:30 -0800 Subject: [PATCH] bug 12147: cloudstack 3.0 new UI - host page - add "View Instances" which will display instances under the host when being clicked. --- ui/scripts/instances.js | 5 ++++- ui/scripts/system.js | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 9f35c6f3b1e..f0d12bc1d2b 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -735,7 +735,10 @@ } } } - + + if("hosts" in args.context) + array1.push("&hostid=" + args.context.hosts[0].id); + $.ajax({ url: createURL("listVirtualMachines&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), dataType: "json", diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 2e34c51375e..f60e4706662 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -6857,7 +6857,11 @@ }, detailView: { - name: "Host details", + name: "Host details", + viewAll: { + label: 'Instances', + path: 'instances' + }, actions: { edit: { label: 'Edit',