Skip to content

Commit bf72a36

Browse files
author
Jessica Wang
committed
CLOUDSTACK-1974: cloudstack UI - Infrastructure menu - zone detail - public traffic type - IP Ranges tab - add new action "Release from account", "Add Account" for existing IP Ranges.
1 parent d6ed8d7 commit bf72a36

1 file changed

Lines changed: 77 additions & 1 deletion

File tree

ui/scripts/system.js

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,83 @@
588588
}
589589
});
590590
}
591-
}
591+
},
592+
/*
593+
releaseFromAccount: {
594+
label: 'Release from Account',
595+
action: function(args) {
596+
$.ajax({
597+
url: createURL('releasePublicIpRange'),
598+
data: {
599+
id: args.context.multiRule[0].id
600+
},
601+
success: function(json) {
602+
args.response.success({
603+
notification: {
604+
label: 'release from account',
605+
poll: function(args) {
606+
args.complete();
607+
}
608+
}
609+
});
610+
},
611+
error: function(json) {
612+
args.response.error(parseXMLHttpResponse(json));
613+
}
614+
});
615+
}
616+
},
617+
addAccount: {
618+
label: 'Add Account',
619+
createForm: {
620+
title: 'Add Account',
621+
fields: {
622+
account: { label: 'Account' },
623+
domainid: {
624+
label: 'Domain',
625+
select: function(args) {
626+
$.ajax({
627+
url: createURL('listDomains'),
628+
data: { listAll: true },
629+
success: function(json) {
630+
args.response.success({
631+
data: $.map(json.listdomainsresponse.domain, function(domain) {
632+
return {
633+
id: domain.id,
634+
description: domain.path
635+
};
636+
})
637+
});
638+
}
639+
});
640+
}
641+
}
642+
}
643+
},
644+
action: function(args) {
645+
var data = {
646+
id: args.context.multiRule[0].id
647+
};
648+
$.ajax({
649+
url: createURL('dedicatePublicIpRange'),
650+
data: data,
651+
success: function(json) {
652+
args.response.success({
653+
notification: {
654+
label: 'Add Account',
655+
poll: function(args) {
656+
args.complete();
657+
}
658+
}
659+
});
660+
},
661+
error: function(json) {
662+
args.response.error(parseXMLHttpResponse(json));
663+
}
664+
});
665+
}
666+
}
667+
*/
592668
},
593669
dataProvider: function(args) {
594670
$.ajax({

0 commit comments

Comments
 (0)