summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/views/Settings/DateTime/DateTime.vue14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/views/Settings/DateTime/DateTime.vue b/src/views/Settings/DateTime/DateTime.vue
index e62e3444..f5e063d1 100644
--- a/src/views/Settings/DateTime/DateTime.vue
+++ b/src/views/Settings/DateTime/DateTime.vue
@@ -356,11 +356,23 @@ export default {
} else {
dateTimeForm.ntpProtocolEnabled = true;
- dateTimeForm.ntpServersArray = [
+ const ntpArray = [
this.form.ntp.firstAddress,
this.form.ntp.secondAddress,
this.form.ntp.thirdAddress,
];
+
+ // Filter the ntpArray to remove empty strings,
+ // per Redfish spec there should be no empty strings or null on the ntp array.
+ const ntpArrayFiltered = ntpArray.filter((x) => x);
+
+ dateTimeForm.ntpServersArray = [...ntpArrayFiltered];
+
+ [this.ntpServers[0], this.ntpServers[1], this.ntpServers[2]] = [
+ ...dateTimeForm.ntpServersArray,
+ ];
+
+ this.setNtpValues();
}
this.$store