+
diff --git a/ui/scripts/ui-custom/podEdit.js b/ui/scripts/ui-custom/podEdit.js
new file mode 100644
index 00000000000..d33cd97d210
--- /dev/null
+++ b/ui/scripts/ui-custom/podEdit.js
@@ -0,0 +1,66 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+(function(cloudStack, $) {
+ cloudStack.uiCustom.podEdit = function(args) {
+ var $podEdit = $('
').addClass('pod-edit');
+ var multiEditData = [];
+ var totalIndex = 0;
+ var form = cloudStack.dialog.createForm({
+ noDialog: true,
+ desc: '',
+ form: {
+ desc: '',
+ fields: args.form.fields
+ }
+ });
+ var $multi = $('
').multiEdit($.extend(true, {}, args.multiEdit, {
+ context: args.context,
+ noSelect: true,
+ add: {
+ label: 'label.add',
+ action: function(args) {
+ multiEditData.push($.extend(args.data, {
+ index: totalIndex
+ }));
+
+ totalIndex++;
+ args.response.success();
+ }
+ },
+ actions: {
+ destroy: {
+ label: 'label.remove.rule',
+ action: function(args) {
+ multiEditData = $.grep(multiEditData, function(item) {
+ return item.index != args.context.multiRule[0].index;
+ });
+ args.response.success();
+ }
+ }
+ },
+ dataProvider: function(args) {
+ args.response.success({
+ data: multiEditData
+ });
+ }
+ }));
+
+ $podEdit.append(form.$formContainer, $multi);
+
+ return $podEdit;
+ };
+}(window.cloudStack, window.jQuery));
\ No newline at end of file
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 5108c5c0c3b..79f0643fde1 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -121,6 +121,31 @@
},
customUI: {
+ podIPRange: function(args) {
+ return cloudStack.uiCustom.podEdit({
+ form: {
+ fields: {
+ name: {
+ label: 'label.name',
+ validation: { required: true },
+ desc: 'message.tooltip.pod.name'
+ }
+ }
+ },
+ multiEdit: {
+ noSelect: true,
+ fields: {
+ 'gateway': { edit: true, label: 'label.gateway' },
+ 'netmask': { edit: true, label: 'label.netmask' },
+ 'vlanid': { edit: true, label: 'label.vlan', isOptional: true },
+ 'startip': { edit: true, label: 'label.start.IP' },
+ 'endip': { edit: true, label: 'label.end.IP' },
+ 'add-rule': { label: 'label.add', addButton: true }
+ }
+ }
+ });
+ },
+
publicTrafficIPRange: function(args) {
var multiEditData = [];
var totalIndex = 0;