diff --git a/dashboard/src/components/SystemUpdate.vue b/dashboard/src/components/SystemUpdate.vue
index ccab83986..aa8c5b7b9 100644
--- a/dashboard/src/components/SystemUpdate.vue
+++ b/dashboard/src/components/SystemUpdate.vue
@@ -83,9 +83,6 @@ async function refreshAutoupdatePattern() {
const [error, result] = await updaterModel.getAutoupdatePattern();
if (error) return console.error(error);
- // just keep the UI sane by supporting previous default pattern
- if (result.pattern === '00 30 1,3,5,23 * * *') result.pattern = '00 15 1,3,5,23 * * *';
-
currentPattern.value = result.pattern;
configurePattern.value = result.pattern;
}
@@ -110,10 +107,12 @@ async function refreshPendingUpdateInfo() {
function onShowConfigure() {
configureType.value = configurePattern.value === 'never' ? 'never' : 'pattern';
+
const tmp = currentPattern.value.split(' ');
const hours = tmp[2] ? tmp[2].split(',') : [];
const days = tmp[5] ? tmp[5].split(',') : [];
- if (days[0] === '*') configureDays.value = cronDays;
+
+ if (days[0] === '*') configureDays.value = cronDays.map(day => { return day.id; });
else configureDays.value = days.map(day => { return parseInt(day, 10); });
try {
@@ -329,8 +328,8 @@ onMounted(async () => {