diff --git a/charts/budibase/templates/automation-worker-service-hpa.yaml b/charts/budibase/templates/automation-worker-service-hpa.yaml index f29223b61b..18f9690c00 100644 --- a/charts/budibase/templates/automation-worker-service-hpa.yaml +++ b/charts/budibase/templates/automation-worker-service-hpa.yaml @@ -2,7 +2,7 @@ apiVersion: {{ ternary "autoscaling/v2" "autoscaling/v2beta2" (.Capabilities.APIVersions.Has "autoscaling/v2") }} kind: HorizontalPodAutoscaler metadata: - name: {{ include "budibase.fullname" . }}-apps + name: {{ include "budibase.fullname" . }}-automation-worker labels: {{- include "budibase.labels" . | nindent 4 }} spec: diff --git a/packages/builder/src/pages/builder/app/[application]/settings/backups/index.svelte b/packages/builder/src/pages/builder/app/[application]/settings/backups/index.svelte index 39d61ffc31..e8a67b2ae1 100644 --- a/packages/builder/src/pages/builder/app/[application]/settings/backups/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/settings/backups/index.svelte @@ -98,14 +98,22 @@ }) } - async function fetchBackups(filters, page, dateRange) { - const response = await backups.searchBackups({ + async function fetchBackups(filters, page, dateRange = []) { + const body = { appId: $appStore.appId, ...filters, page, - startDate: dateRange[0], - endDate: dateRange[1], - }) + } + + const [startDate, endDate] = dateRange + if (startDate) { + body.startDate = startDate + } + if (endDate) { + body.endDate = endDate + } + + const response = await backups.searchBackups(body) pageInfo.fetched(response.hasNextPage, response.nextPage) // flatten so we have an easier structure to use for the table schema @@ -120,7 +128,7 @@ }) await fetchBackups(filterOpt, page) notifications.success(response.message) - } catch { + } catch (err) { notifications.error("Unable to create backup") } }