From 928b5e691f9bdfac08ec86506f9b34b706da0054 Mon Sep 17 00:00:00 2001 From: Aleix Casanovas Date: Mon, 13 May 2024 15:19:54 +0200 Subject: [PATCH] fix: Set stop/start times to all resources --- catalog/ui/src/app/api.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/catalog/ui/src/app/api.ts b/catalog/ui/src/app/api.ts index 4f2dad51c..e593d4bb5 100644 --- a/catalog/ui/src/app/api.ts +++ b/catalog/ui/src/app/api.ts @@ -1241,9 +1241,7 @@ export async function scheduleStopForAllResourcesInResourceClaim(resourceClaim: } } for (let i = 0; i < patch.spec.resources.length; ++i) { - if (resourcesToStop.includes(patch.spec.resources[i].name)) { - patch.spec.resources[i].template.spec.vars.action_schedule.stop = stopTimestamp; - } + patch.spec.resources[i].template.spec.vars.action_schedule.stop = stopTimestamp; } } @@ -1293,10 +1291,8 @@ export async function scheduleStartForAllResourcesInResourceClaim( } } for (let i = 0; i < patch.spec.resources.length; ++i) { - if (resourcesToStart.includes(patch.spec.resources[i].name)) { - patch.spec.resources[i].template.spec.vars.action_schedule.start = startTimestamp; - patch.spec.resources[i].template.spec.vars.action_schedule.stop = stopTimestamp; - } + patch.spec.resources[i].template.spec.vars.action_schedule.start = startTimestamp; + patch.spec.resources[i].template.spec.vars.action_schedule.stop = stopTimestamp; } return (await patchNamespacedCustomObject(