You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/08/07 00:50:59 UTC
git commit: cloudstack 3.0 UI - infrastructure - zone detail -
network service providers - VPC Virtual Router - Instances tab - add Type to
listView (System, VPC or Project).
Updated Branches:
refs/heads/vpc 4908adb3a -> 648dcf0cc
cloudstack 3.0 UI - infrastructure - zone detail - network service providers - VPC Virtual Router - Instances tab - add Type to listView (System, VPC or Project).
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/648dcf0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/648dcf0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/648dcf0c
Branch: refs/heads/vpc
Commit: 648dcf0ccfe471362b3e285ab724101f74189444
Parents: 4908adb
Author: Jessica Wang <je...@citrix.com>
Authored: Mon Aug 6 14:05:35 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Mon Aug 6 15:50:38 2012 -0700
----------------------------------------------------------------------
ui/scripts/system.js | 50 +++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/648dcf0c/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index b80fa90..142a41f 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -2393,6 +2393,9 @@
fields: {
name: { label: 'label.name' },
zonename: { label: 'label.zone' },
+ routerType: {
+ label: 'label.type'
+ },
state: {
converter: function(str) {
// For localization
@@ -2419,6 +2422,7 @@
}
}
+ var routers = [];
$.ajax({
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
dataType: 'json',
@@ -2427,28 +2431,30 @@
},
async: true,
success: function(json) {
- var items = json.listroutersresponse.router;
- args.response.success({
- actionFilter: routerActionfilter,
- data: items
- });
- }
- });
-
- // Get project routers
- $.ajax({
- url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"),
- dataType: 'json',
- data: {
- forvpc: true
- },
- async: true,
- success: function(json) {
- var items = json.listroutersresponse.router;
- args.response.success({
- actionFilter: routerActionfilter,
- data: items
- });
+ var items = json.listroutersresponse.router;
+ $(items).map(function(index, item) {
+ routers.push(item);
+ });
+
+ // Get project routers
+ $.ajax({
+ url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"),
+ dataType: 'json',
+ data: {
+ forvpc: true
+ },
+ async: true,
+ success: function(json) {
+ var items = json.listroutersresponse.router;
+ $(items).map(function(index, item) {
+ routers.push(item);
+ });
+ args.response.success({
+ actionFilter: routerActionfilter,
+ data: $(routers).map(mapRouterType)
+ });
+ }
+ });
}
});
},