Skip to content

Commit 96f092a

Browse files
author
Jessica Wang
committed
CLOUDSTACK-6729: UI - create compute offering/create disk offering - determine whether to pass certain data to API comamnd upon isCustomized checkbox/isPublic checkbox's value.
1 parent 326f6d0 commit 96f092a

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

ui/scripts/configuration.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -530,17 +530,13 @@
530530
};
531531

532532
//custom fields (begin)
533-
if (args.$form.find('.form-item[rel=cpuNumber]').css("display") != "none") {
533+
if (args.data.isCustomized != "on") {
534534
$.extend(data, {
535535
cpuNumber: args.data.cpuNumber
536536
});
537-
}
538-
if (args.$form.find('.form-item[rel=cpuSpeed]').css("display") != "none") {
539537
$.extend(data, {
540538
cpuSpeed: args.data.cpuSpeed
541539
});
542-
}
543-
if (args.$form.find('.form-item[rel=memory]').css("display") != "none") {
544540
$.extend(data, {
545541
memory: args.data.memory
546542
});
@@ -651,7 +647,7 @@
651647
isvolatile: (args.data.isVolatile == "on")
652648
});
653649

654-
if (args.$form.find('.form-item[rel=domainId]').css("display") != "none") {
650+
if (args.data.isPublic != "on") {
655651
$.extend(data, {
656652
domainid: args.data.domainId
657653
});
@@ -1222,7 +1218,7 @@
12221218
limitcpuuse: (args.data.cpuCap == "on")
12231219
});
12241220

1225-
if (args.$form.find('.form-item[rel=domainId]').css("display") != "none") {
1221+
if (args.data.isPublic != "on") {
12261222
$.extend(data, {
12271223
domainid: args.data.domainId
12281224
});
@@ -1807,7 +1803,7 @@
18071803
customized: (args.data.isCustomized == "on")
18081804
};
18091805

1810-
if (args.$form.find('.form-item[rel=disksize]').css("display") != "none") {
1806+
if (args.data.isCustomized != "on") {
18111807
$.extend(data, {
18121808
disksize: args.data.disksize
18131809
});
@@ -1871,7 +1867,7 @@
18711867
});
18721868
}
18731869

1874-
if (args.$form.find('.form-item[rel=domainId]').css("display") != "none") {
1870+
if (args.data.isPublic != "on") {
18751871
$.extend(data, {
18761872
domainid: args.data.domainId
18771873
});

0 commit comments

Comments
 (0)