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 2013/07/09 00:58:18 UTC
[1/3] git commit: updated refs/heads/4.2 to 40cac19
Updated Branches:
refs/heads/4.2 5f7b257fd -> 40cac192f
VPC JS: Code cleanup
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e535760d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e535760d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e535760d
Branch: refs/heads/4.2
Commit: e535760d9b16c6a44ab67f361b49449c28773daf
Parents: 5f7b257
Author: Brian Federle <br...@citrix.com>
Authored: Mon Jul 8 14:28:07 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Jul 8 15:56:26 2013 -0700
----------------------------------------------------------------------
ui/scripts/vpc.js | 197 +++++++++++++++++++++++++------------------------
1 file changed, 99 insertions(+), 98 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e535760d/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index edf0869..4d3ec7a 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -1964,35 +1964,37 @@
}
},
- replaceACL:{
- label:'Replace ACL',
- createForm:{
- title:'Replace ACL',
- label:'Replace ACL',
- fields:{
- aclid:{
- label:'ACL',
- select:function(args){
- $.ajax({
- url: createURL('listNetworkACLLists'),
- dataType: 'json',
- async: true,
- success: function(json) {
- var objs = json.listnetworkacllistsresponse.networkacllist;
- var items = [];
- $(objs).each(function() {
-
- items.push({id: this.id, description: this.name});
- });
- args.response.success({data: items});
- }
- });
+ replaceACL: {
+ label: 'Replace ACL',
+ createForm: {
+ title: 'Replace ACL',
+ label: 'Replace ACL',
+ fields: {
+ aclid: {
+ label: 'ACL',
+ select: function(args){
+ $.ajax({
+ url: createURL('listNetworkACLLists'),
+ dataType: 'json',
+ async: true,
+ success: function(json) {
+ var objs = json.listnetworkacllistsresponse.networkacllist;
+ var items = [];
+
+ $(objs).each(function() {
+ items.push({
+ id: this.id, description: this.name
+ });
+ });
+ args.response.success({data: items});
+ }
+ });
+ }
+ }
}
- }
- }
- },
-
- action: function(args) {
+ },
+
+ action: function(args) {
$.ajax({
url: createURL("replaceNetworkACLList&gatewayid=" + args.context.vpcGateways[0].id + "&aclid=" + args.data.aclid ),
dataType: "json",
@@ -2000,31 +2002,31 @@
var jid = json.replacenetworkacllistresponse.jobid;
args.response.success(
- {_custom:
+ {_custom:
{
jobId: jid,
getUpdatedItem: function(json) {
var item = json.queryasyncjobresultresponse.jobresult.aclid;
- return {data:item};
+ return {data: item};
}
}
}
- )
+ )
},
- error:function(json){
+ error: function(json){
- args.response.error(parseXMLHttpResponse(json));
- }
+ args.response.error(parseXMLHttpResponse(json));
+ }
});
},
- notification: {
- poll: pollAsyncJobResult
- },
+ notification: {
+ poll: pollAsyncJobResult
+ },
- messages: {
+ messages: {
confirm: function(args) {
return 'Do you want to replace the ACL with a new one ?';
},
@@ -2032,7 +2034,7 @@
return 'ACL replaced';
}
}
- }
+ }
},
tabs: {
details: {
@@ -2867,74 +2869,73 @@
}
},
- replaceacllist:{
-
- label:'Replace ACL List',
- createForm:{
- title:'Replace ACL List',
- label:'Replace ACL List',
- fields:{
- aclid:{
- label:'ACL',
- select:function(args){
- $.ajax({
- url: createURL('listNetworkACLLists&vpcid=' + args.context.vpc[0].id),
- dataType: 'json',
- async: true,
- success: function(json) {
- var objs = json.listnetworkacllistsresponse.networkacllist;
- var items = [];
- $(objs).each(function() {
+ replaceacllist: {
+ label: 'Replace ACL List',
+ createForm: {
+ title: 'Replace ACL List',
+ label: 'Replace ACL List',
+ fields: {
+ aclid: {
+ label: 'ACL',
+ select: function(args){
+ $.ajax({
+ url: createURL('listNetworkACLLists&vpcid=' + args.context.vpc[0].id),
+ dataType: 'json',
+ async: true,
+ success: function(json) {
+ var objs = json.listnetworkacllistsresponse.networkacllist;
+ var items = [];
+ $(objs).each(function() {
items.push({id: this.id, description: this.name});
- });
- args.response.success({data: items});
- }
- });
- }
+ });
+ args.response.success({data: items});
+ }
+ });
+ }
}
}
- },
- action: function(args) {
- $.ajax({
- url: createURL("replaceNetworkACLList&networkid=" + args.context.networks[0].id + "&aclid=" + args.data.aclid ),
- dataType: "json",
- success: function(json) {
- var jid = json.replacenetworkacllistresponse.jobid;
- args.response.success(
+ },
+ action: function(args) {
+ $.ajax({
+ url: createURL("replaceNetworkACLList&networkid=" + args.context.networks[0].id + "&aclid=" + args.data.aclid ),
+ dataType: "json",
+ success: function(json) {
+ var jid = json.replacenetworkacllistresponse.jobid;
+ args.response.success(
- {_custom:
- {
- jobId: jid,
- getUpdatedItem: function(json) {
- var item = json.queryasyncjobresultresponse.jobresult.aclid;
- return {data:item};
- }
- }
- }
+ {_custom:
+ {
+ jobId: jid,
+ getUpdatedItem: function(json) {
+ var item = json.queryasyncjobresultresponse.jobresult.aclid;
+ return {data: item};
+ }
+ }
+ }
- )
- },
+ )
+ },
- error:function(json){
+ error: function(json){
- args.response.error(parseXMLHttpResponse(json));
- }
- });
- },
- notification: {
- poll: pollAsyncJobResult
- },
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ },
- messages: {
- confirm: function(args) {
- return 'Do you want to replace the ACL with a new one ?';
- },
- notification: function(args) {
- return 'ACL replaced';
- }
- }
- }
+ messages: {
+ confirm: function(args) {
+ return 'Do you want to replace the ACL with a new one ?';
+ },
+ notification: function(args) {
+ return 'ACL replaced';
+ }
+ }
+ }
},
tabFilter: function(args) {
[2/3] git commit: updated refs/heads/4.2 to 40cac19
Posted by bf...@apache.org.
CLOUDSTACK-3337: Don't show current ACL list in dropdown
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/18b107b0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/18b107b0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/18b107b0
Branch: refs/heads/4.2
Commit: 18b107b062f9ae5ab6ef83c5abe13d9c0f774085
Parents: e535760
Author: Brian Federle <br...@citrix.com>
Authored: Mon Jul 8 15:23:15 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Jul 8 15:56:31 2013 -0700
----------------------------------------------------------------------
ui/modules/vpc/vpc.js | 1 +
ui/scripts/vpc.js | 32 +++++++++++++++++++-------------
2 files changed, 20 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/18b107b0/ui/modules/vpc/vpc.js
----------------------------------------------------------------------
diff --git a/ui/modules/vpc/vpc.js b/ui/modules/vpc/vpc.js
index 981d612..fb7320d 100644
--- a/ui/modules/vpc/vpc.js
+++ b/ui/modules/vpc/vpc.js
@@ -89,6 +89,7 @@
complete: function($panel) {
var $detailView = $('<div>').detailView(
$.extend(true, {}, cloudStack.vpc.tiers.detailView, {
+ section: 'networks',
$browser: $browser,
context: context,
onActionComplete: function() {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/18b107b0/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 4d3ec7a..9ea5a82 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -2885,9 +2885,15 @@
success: function(json) {
var objs = json.listnetworkacllistsresponse.networkacllist;
var items = [];
+
$(objs).each(function() {
-
+ if (this.id == args.context.networks[0].aclid) {
+ return true;
+ }
+
items.push({id: this.id, description: this.name});
+
+ return true;
});
args.response.success({data: items});
}
@@ -2898,23 +2904,23 @@
},
action: function(args) {
$.ajax({
- url: createURL("replaceNetworkACLList&networkid=" + args.context.networks[0].id + "&aclid=" + args.data.aclid ),
+ url: createURL("replaceNetworkACLList&networkid=" + args.context.networks[0].id + "&aclid=" + args.data.aclid),
dataType: "json",
success: function(json) {
var jid = json.replacenetworkacllistresponse.jobid;
- args.response.success(
+
+ args.response.success({
+ _custom: {
+ jobId: jid,
+ getUpdatedItem: function(json) {
+ var network = args.context.networks[0];
- {_custom:
- {
- jobId: jid,
- getUpdatedItem: function(json) {
- var item = json.queryasyncjobresultresponse.jobresult.aclid;
- return {data: item};
- }
- }
+ network.aclid = args.data.aclid;
+
+ return { aclid: args.data.aclid };
+ }
}
-
- )
+ });
},
error: function(json){
[3/3] git commit: updated refs/heads/4.2 to 40cac19
Posted by bf...@apache.org.
Detail view: Fix context not being refreshed on perform action
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/40cac192
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/40cac192
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/40cac192
Branch: refs/heads/4.2
Commit: 40cac192f614ab86f4ff3bb8d933255eb55a2fa0
Parents: 18b107b
Author: Brian Federle <br...@citrix.com>
Authored: Mon Jul 8 15:52:56 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Jul 8 15:56:36 2013 -0700
----------------------------------------------------------------------
ui/scripts/ui/widgets/detailView.js | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/40cac192/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index 356d9f2..0bccef5 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -88,9 +88,17 @@
var updateTabContent = function(newData) {
var $detailViewElems = $detailView.find('ul.ui-tabs-nav, .detail-group').remove();
+ var viewArgs = $detailView.data('view-args');
+ var context = viewArgs.context;
+ var activeContextItem = viewArgs.section ? context[viewArgs.section][0] : null;
+
$detailView.tabs('destroy');
$detailView.data('view-args').jsonObj = newData;
+ if (activeContextItem) {
+ $.extend(activeContextItem, newData);
+ }
+
makeTabs(
$detailView,
$detailView.data('view-args').tabs,