You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2012/09/24 22:59:59 UTC

git commit: CLOUDSTACK-154: Show network details for virtual router

Updated Branches:
  refs/heads/master 11acc208d -> 951c12416


CLOUDSTACK-154: Show network details for virtual router

-Adds new NICs tab, to display network information for each router
 NIC, including network name

-Show guest network ID field on router details tab


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/951c1241
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/951c1241
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/951c1241

Branch: refs/heads/master
Commit: 951c1241669f8707d0b6579df960f7f80cc05078
Parents: 11acc20
Author: Brian Federle <br...@citrix.com>
Authored: Mon Sep 24 13:59:44 2012 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Sep 24 13:59:44 2012 -0700

----------------------------------------------------------------------
 .../WEB-INF/classes/resources/messages.properties  |    4 +-
 ui/dictionary.jsp                                  |    2 +
 ui/scripts/system.js                               |   84 +++++++++++++++
 3 files changed, 88 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/951c1241/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index 1535c31..454974d 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -17,8 +17,8 @@
 
 
 #new labels (begin) **********************************************************************************************
-
-
+label.isolation.uri=Isolation URI
+label.broadcast.uri=Broadcast URI
 #new labels (end) ************************************************************************************************
 
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/951c1241/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index f64864c..9457e30 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,8 @@ under the License.
 <% long now = System.currentTimeMillis(); %>
 <script language="javascript">
 dictionary = {
+'label.broadcast.uri': '<fmt:message key="label.broadcast.uri"/>',
+'label.isolation.uri': '<fmt:message key="label.isolation.uri"/>',
 'message.zoneWizard.enable.local.storage': '<fmt:message key="message.zoneWizard.enable.local.storage"/>',
 'label.edit.tags': '<fmt:message key="label.edit.tags"/>',  
 'label.local.storage.enabled': '<fmt:message key="label.local.storage.enabled"/>',

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/951c1241/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index e71529f..e5d53e2 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -2255,6 +2255,7 @@
                             id: { label: 'label.id' },
                             projectid: { label: 'label.project.id' },
                             state: { label: 'label.state' },
+                            guestnetworkid: { label: 'label.network.id' },
                             publicip: { label: 'label.public.ip' },
                             guestipaddress: { label: 'label.guest.ip' },
                             linklocalip: { label: 'label.linklocal.ip' },
@@ -2286,6 +2287,47 @@
 														}
 													});		
                         }
+                      },
+                      nics: {
+                        title: 'label.nics',
+                        multiple: true,
+                        fields: [
+                          {
+                            name: { label: 'label.name', header: true },
+                            type: { label: 'label.type' },
+                            traffictype: { label: 'label.traffic.type' },
+                            networkname: { label: 'label.network.name' },
+                            netmask: { label: 'label.netmask' },
+                            ipaddress: { label: 'label.ip.address' },
+                            id: { label: 'label.id' },
+                            networkid: { label: 'label.network.id' },
+                            isolationuri: { label: 'label.isolation.uri' },
+                            broadcasturi: { label: 'label.broadcast.uri' }
+                          }
+                        ],
+                        dataProvider: function(args) {
+                          $.ajax({
+                            url: createURL("listRouters&id=" + args.context.routers[0].id),
+                            dataType: 'json',
+                            async: true,
+                            success: function(json) {
+                              var jsonObj = json.listroutersresponse.router[0].nic;
+
+                              args.response.success({
+                                actionFilter: routerActionfilter,
+                                data: $.map(jsonObj, function(nic, index) {
+                                  var name = 'NIC ' + (index + 1);                    
+                                  if (nic.isdefault) {
+                                    name += ' (' + _l('label.default') + ')';
+                                  }
+                                  return $.extend(nic, {
+                                    name: name
+                                  });
+                                })
+                              });
+                            }
+                          });
+                        }
                       }
                     }
                   }
@@ -5176,6 +5218,7 @@
                     id: { label: 'label.id' },
                     projectid: { label: 'label.project.id' },
                     state: { label: 'label.state' },
+                    guestnetworkid: { label: 'label.network.id' },
                     publicip: { label: 'label.public.ip' },
                     guestipaddress: { label: 'label.guest.ip' },
                     linklocalip: { label: 'label.linklocal.ip' },
@@ -5208,6 +5251,47 @@
                     }
                   });
                 }
+              },
+              nics: {
+                title: 'label.nics',
+                multiple: true,
+                fields: [
+                  {
+                    name: { label: 'label.name', header: true },
+                    type: { label: 'label.type' },
+                    traffictype: { label: 'label.traffic.type' },
+                    networkname: { label: 'label.network.name' },
+                    netmask: { label: 'label.netmask' },
+                    ipaddress: { label: 'label.ip.address' },
+                    id: { label: 'label.id' },
+                    networkid: { label: 'label.network.id' },
+                    isolationuri: { label: 'label.isolation.uri' },
+                    broadcasturi: { label: 'label.broadcast.uri' }
+                  }
+                ],
+                dataProvider: function(args) {
+                  $.ajax({
+                    url: createURL("listRouters&id=" + args.context.routers[0].id),
+                    dataType: 'json',
+                    async: true,
+                    success: function(json) {
+                      var jsonObj = json.listroutersresponse.router[0].nic;
+
+                      args.response.success({
+                        actionFilter: routerActionfilter,
+                        data: $.map(jsonObj, function(nic, index) {
+                          var name = 'NIC ' + (index + 1);                    
+                          if (nic.isdefault) {
+                            name += ' (' + _l('label.default') + ')';
+                          }
+                          return $.extend(nic, {
+                            name: name
+                          });
+                        })
+                      });
+                    }
+                  });
+                }
               }
             }
           }