Skip to content

Commit

Permalink
added required flags to all-default.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
markdhooper committed Dec 3, 2021
1 parent 0e21263 commit 3af9bee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ ceph_nfs_grace_namespace: "ganesha-grace"
osd_memory_target: 2147483648
#journal_size: 5120 # OSD journal size in MB
block_db_size: -1 # block db size in bytes for the ceph-volume lvm batch. -1 means use the default of 'as big as possible'.
dedicated_device_db: False
public_network: 192.168.0.0/16
#cluster_network: 10.0.0.0/24
#osd_mkfs_type: xfs
Expand Down
12 changes: 10 additions & 2 deletions src/fakeroot/usr/share/cockpit/ceph-deploy/ceph-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,6 @@ function update_options_info(
let parent_div = options_div.querySelectorAll(
`:scope div[opt-parent=${element.getAttribute("opt-parent")}]`
);
console.log(parent_div[0].classList.contains("hidden"));
if (!parent_div[0].classList.contains("hidden")) {
next_btn.disabled = true;
next_btn.title = "To proceed, fill in required fields.";
Expand Down Expand Up @@ -1795,6 +1794,7 @@ function make_global_options(

let opt_input = document.createElement("input");
if (opt.option_format === "default") {
opt_input.setAttribute("option_format",opt.option_format);
if (opt.input_type === "text") {
// make a text field
opt_input.type = opt.input_type;
Expand Down Expand Up @@ -3672,6 +3672,15 @@ function update_options_request() {
) {
if (element.type == "text") {
options_request_json[element.id] = element.value;
if (
element.value == "" &&
!element.getAttribute("optional") &&
!element.getAttribute("opt-parent")
) {
element.dispatchEvent(new Event("input"));
ABORT = true;
ABORT_MSG = "Fix invalid fields before proceeding";
}
} else if (element.type == "checkbox") {
options_request_json[element.id] = element.checked ? true : false;
}
Expand All @@ -3690,7 +3699,6 @@ function update_options_request() {
options_request_json[g_opt.id] = element.checked
? g_opt.value
: g_opt.getAttribute("default_value");
console.log(options_request_json);
if (
element.checked &&
g_opt.value == "" &&
Expand Down

0 comments on commit 3af9bee

Please sign in to comment.