You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/04/05 23:03:32 UTC
[37/50] [abbrv] git commit: updated refs/heads/affinity_groups to
ca1a794
CLOUDSTACK-1669:UI for non-contiguous VLAN ranges
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bb841d60
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bb841d60
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bb841d60
Branch: refs/heads/affinity_groups
Commit: bb841d60111e389d04fa73748ee879db6618269a
Parents: 4f9bdba
Author: Pranav Saxena <pr...@citrix.com>
Authored: Thu Apr 4 02:56:34 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Thu Apr 4 02:56:34 2013 +0530
----------------------------------------------------------------------
ui/css/cloudstack3.css | 9 +++++++
ui/scripts/system.js | 56 +++++++++++++++++++++++++++++++++++++++++-
2 files changed, 63 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb841d60/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 9b77b9f..d6647cb 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -11761,6 +11761,15 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
.updateResourceLimits:hover .icon {
background-position: -100px -614px;
}
+
+.addVlanRange .icon {
+ background-position: -168px -31px;
+}
+
+
+.addVlanRange:hover .icon {
+ background-position: -168px -613px;
+}
.resize .icon,
.updateResourceCount .icon {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb841d60/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 62b4c76..8d08584 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -898,7 +898,59 @@
});
},
notification: { poll: pollAsyncJobResult }
- }
+ },
+
+ addVlanRange:{
+ label:'Add VLAN Range',
+ title:'Add VLAN Range',
+
+ messages: {
+ confirm: function(args) {
+ return 'Are you sure you want to add another VLAN Range to this guest network?';
+ },
+ notification: function(args) {
+ return 'VLAN Range added';
+ }
+ },
+
+ createForm:{
+ title:'Add VLAN Range',
+ fields:{
+ startvlan: {label:'Vlan Start', validation:{required:true}},
+ endvlan:{label:'Vlan End', validation:{required:true}}
+ }
+
+ },
+
+ action:function(args){
+
+ var array1=[];
+ if(args.data.startvlan != "" && args.data.endvlan != ""){
+ array1.push("&vlan=" + todb(args.data.startvlan) + "-" + todb(args.data.endvlan));
+
+ }
+ $.ajax({
+ url: createURL("updatePhysicalNetwork&id=" + selectedPhysicalNetworkObj.id + array1.join("")),
+ dataType: "json",
+ success: function(json) {
+ var jobId = json.updatephysicalnetworkresponse.jobid;
+
+ var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Guest');
+
+ updateTrafficLabels(trafficType, args.data, function() {
+ args.response.success({ _custom: { jobId: jobId }});
+ });
+ }
+ });
+
+
+ },
+ notification:{poll:pollAsyncJobResult}
+
+
+ }
+
+
},
tabFilter: function(args) {
@@ -980,7 +1032,7 @@
args.response.success({
actionFilter: function() {
- var allowedActions = ['edit'];
+ var allowedActions = ['edit' , 'addVlanRange'];
return allowedActions;
},
data: selectedPhysicalNetworkObj