incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [19/19] git commit: CLOUDSTACK-154: Show network details for virtual router
Date Tue, 25 Sep 2012 22:16:50 GMT
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/5c24041a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/5c24041a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/5c24041a

Branch: refs/heads/4.0
Commit: 5c24041a773b502e2eb8b4b793a3159c3538a5dc
Parents: dec6914
Author: Brian Federle <brian.federle@citrix.com>
Authored: Mon Sep 24 13:59:44 2012 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Tue Sep 25 15:01:31 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/5c24041a/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/5c24041a/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/5c24041a/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
+                          });
+                        })
+                      });
+                    }
+                  });
+                }
               }
             }
           }


Mime
View raw message