[feat] Add message explaining strings cannot contain spaces

This commit is contained in:
William Wernert
2021-01-13 11:04:35 -05:00
parent 0734998315
commit d254fd960a
2 changed files with 11 additions and 4 deletions

View File

@@ -419,7 +419,7 @@ collect_es_cluster_name() {
whiptail_manager_adv_escluster_name
while ! valid_string "$ESCLUSTERNAME"; do
whiptail_invalid_input
whiptail_invalid_string "ES cluster name"
whiptail_manager_adv_escluster_name
done
fi
@@ -628,7 +628,7 @@ collect_patch_schedule_name_new() {
whiptail_patch_name_new_schedule
while ! valid_string "$PATCHSCHEDULENAME"; do
whiptail_invalid_input
whiptail_invalid_string "schedule name"
whiptail_patch_name_new_schedule
done
}
@@ -637,7 +637,7 @@ collect_patch_schedule_name_import() {
whiptail_patch_schedule_import
while ! valid_string "$PATCHSCHEDULENAME"; do
whiptail_invalid_input
whiptail_invalid_string "schedule name"
whiptail_patch_schedule_import
done
}

View File

@@ -584,7 +584,14 @@ whiptail_install_type_other() {
whiptail_invalid_input() { # TODO: This should accept a list of arguments to specify what general pattern the input should follow
[ -n "$TESTING" ] && return
whiptail --title "Security Onion Setup" --msgbox "Invalid input, please try again." 8 75
whiptail --title "Security Onion Setup" --msgbox " Invalid input, please try again." 7 40
}
whiptail_invalid_string() {
[ -n "$TESTING" ] && return
whiptail --title "Security Onion Setup" --msgbox "Invalid input, please try again.\n\nThe $1 cannot contain spaces." 9 45
}