From 036e355c9bd37eedd1c83547baae671473bd9ba2 Mon Sep 17 00:00:00 2001 From: gitstart Date: Thu, 18 May 2023 14:05:05 +0000 Subject: [PATCH 001/343] disable duplicate for webhook triggers automation Co-authored-by: Moshood Abidemi --- .../AutomationPanel/EditAutomationPopover.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte b/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte index 0ce9c781ac..09b9cf07db 100644 --- a/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte @@ -32,7 +32,12 @@
- Duplicate + Duplicate Edit Delete From 410d8700e4555c414b50f19b0d626758e030ce2b Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Mon, 5 Jun 2023 18:42:44 +0100 Subject: [PATCH 002/343] Add more tests for user settings --- qa-core/src/internal-api/api/apis/SelfAPI.ts | 18 +++++++++++++++--- .../tests/users/userManagement.spec.ts | 16 ++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/qa-core/src/internal-api/api/apis/SelfAPI.ts b/qa-core/src/internal-api/api/apis/SelfAPI.ts index cd162053a1..022a438249 100644 --- a/qa-core/src/internal-api/api/apis/SelfAPI.ts +++ b/qa-core/src/internal-api/api/apis/SelfAPI.ts @@ -14,10 +14,11 @@ export default class SelfAPI extends BaseAPI { return [response, json] } - async changeSelfPassword(body: Partial): Promise<[Response, User]> { + async changeSelfPassword(): Promise<[Response, User]> { + const body = { + password: "newPassword", + } const [response, json] = await this.post(`/global/self`, body) - expect(json._id).toEqual(body._id) - expect(json._rev).not.toEqual(body._rev) return [response, json] } @@ -26,4 +27,15 @@ export default class SelfAPI extends BaseAPI { expect(json).toHaveProperty("apiKey") return json } + + async changeUserInfo(body: Partial): Promise<[Response, User]> { + const [response, json] = await this.post(`/global/self`, body) + return [response, json] + } + + async generateApiKey(): Promise<[Response, ApiKeyResponse]> { + const [response, json] = await this.post(`/global/self/api_key`) + expect(json).toHaveProperty("apiKey") + return [response, json] + } } diff --git a/qa-core/src/internal-api/tests/users/userManagement.spec.ts b/qa-core/src/internal-api/tests/users/userManagement.spec.ts index 28096c08c9..d1bada05c0 100644 --- a/qa-core/src/internal-api/tests/users/userManagement.spec.ts +++ b/qa-core/src/internal-api/tests/users/userManagement.spec.ts @@ -87,4 +87,20 @@ describe("Internal API - User Management & Permissions", () => { expect(changedUserInfoJson.builder?.global).toBeDefined() expect(changedUserInfoJson.builder?.global).toEqual(true) }) + + it("Set First and Last Name", async () => { + const body: Partial = { + firstName: "newFirstName", + lastName: "newLastName", + } + await config.api.self.changeUserInfo(body) + }) + + it("Generate API key", async () => { + await config.api.self.generateApiKey() + }) + + it("Change Password", async () => { + await config.api.self.changeSelfPassword() + }) }) From f37c49e8afdbbd3c7df05626d22168d7837560e3 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 6 Jun 2023 16:16:09 +0100 Subject: [PATCH 003/343] Initial commit --- .../src/components/start/AppRow.svelte | 2 +- .../builder/app/[application]/_layout.svelte | 78 ++++------- .../automate/[automationId]/_layout.svelte | 15 -- .../automate/[automationId]/index.svelte | 5 - .../app/[application]/automate/_layout.svelte | 131 ------------------ .../app/[application]/automate/index.svelte | 10 -- .../pages/builder/portal/apps/index.svelte | 5 +- 7 files changed, 31 insertions(+), 215 deletions(-) delete mode 100644 packages/builder/src/pages/builder/app/[application]/automate/[automationId]/_layout.svelte delete mode 100644 packages/builder/src/pages/builder/app/[application]/automate/[automationId]/index.svelte delete mode 100644 packages/builder/src/pages/builder/app/[application]/automate/_layout.svelte delete mode 100644 packages/builder/src/pages/builder/app/[application]/automate/index.svelte diff --git a/packages/builder/src/components/start/AppRow.svelte b/packages/builder/src/components/start/AppRow.svelte index 142c5c6e31..50e6b8466a 100644 --- a/packages/builder/src/components/start/AppRow.svelte +++ b/packages/builder/src/components/start/AppRow.svelte @@ -22,7 +22,7 @@ } const goToOverview = () => { - $goto(`../overview/${app.devId}`) + $goto(`../../app/${app.devId}/settings`) } diff --git a/packages/builder/src/pages/builder/app/[application]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/_layout.svelte index f13aa3dab6..d10657bdbe 100644 --- a/packages/builder/src/pages/builder/app/[application]/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_layout.svelte @@ -12,6 +12,7 @@ Heading, Modal, notifications, + Button, } from "@budibase/bbui" import AppActions from "components/deploy/AppActions.svelte" import { API } from "api" @@ -144,53 +145,14 @@
{#if $store.initialised}
- -
- -
- $goto("../../portal/apps")}> - Exit to portal - - $goto(`../../portal/overview/${application}`)} - > - Overview - - - $goto(`../../portal/overview/${application}/access`)} - > - Access - - - $goto(`../../portal/overview/${application}/automation-history`)} - > - Automation history - - - $goto(`../../portal/overview/${application}/backups`)} - > - Backups - - - - $goto(`../../portal/overview/${application}/name-and-url`)} - > - Name and URL - - - $goto(`../../portal/overview/${application}/version`)} - > - Version - -
- {$store.name} -
-
+ + $goto("../../portal/apps")} + /> + {#if $store.hasLock} {#each $layout.children as { path, title }} @@ -212,6 +174,9 @@
{/if}
+
+ {$store.name} +
@@ -236,6 +201,13 @@ diff --git a/packages/builder/src/pages/builder/app/[application]/automate/index.svelte b/packages/builder/src/pages/builder/app/[application]/automate/index.svelte deleted file mode 100644 index ea2c853139..0000000000 --- a/packages/builder/src/pages/builder/app/[application]/automate/index.svelte +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 8b8451f036..f2ea7b3896 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -100,7 +100,10 @@ const params = new URLSearchParams({ open: "error", }) - $goto(`../overview/${appId}/automation-history?${params.toString()}`) + $goto( + `/builder/app/${appId}/settings/automation-history?${params.toString()}` + ) + // $goto(`../overview/${appId}/automation-history?${params.toString()}`) } const errorCount = errors => { From 05851f6b19ad819a9c88b6a43ae8884ba0d18b61 Mon Sep 17 00:00:00 2001 From: gitstart Date: Tue, 6 Jun 2023 15:18:15 +0000 Subject: [PATCH 004/343] Fix CSV encoding issue Co-authored-by: Benjamin Mayanja --- .../components/backend/DataTable/modals/ExportModal.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte b/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte index 6cefe244bf..95586a384b 100644 --- a/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte @@ -130,7 +130,10 @@ notifications.error("Export Failed") } if (response) { - download(response, `export.${exportFormat}`) + download( + new Blob([response], { type: "text/plain" }), + `export.${exportFormat}` + ) notifications.success("Export Successful") } } else { From e1b63842e5e50be106371fd165b704d2a177f9e0 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 6 Jun 2023 16:24:30 +0100 Subject: [PATCH 005/343] Adding in relocated screen components --- .../automation/[automationId]/_layout.svelte | 15 + .../automation/[automationId]/index.svelte | 5 + .../[application]/automation/_layout.svelte | 131 +++++++ .../app/[application]/automation/index.svelte | 10 + .../app/[application]/settings/_layout.svelte | 74 ++++ .../_components/HistoryDetailsPanel.svelte | 82 +++++ .../_components/StatusRenderer.svelte | 27 ++ .../settings/automation-history/index.svelte | 262 ++++++++++++++ .../_components/ActionsRenderer.svelte | 87 +++++ .../_components/AppSizeRenderer.svelte | 41 +++ .../_components/CreateRestoreModal.svelte | 27 ++ .../_components/DatasourceRenderer.svelte | 21 ++ .../backups/_components/StatusRenderer.svelte | 15 + .../_components/TimeAgoRenderer.svelte | 10 + .../backups/_components/TypeRenderer.svelte | 36 ++ .../backups/_components/UserRenderer.svelte | 18 + .../settings/backups/index.svelte | 340 ++++++++++++++++++ .../app/[application]/settings/embed.svelte | 23 ++ .../app/[application]/settings/index.svelte | 4 + .../settings/name-and-url.svelte | 79 ++++ .../app/[application]/settings/version.svelte | 39 ++ 21 files changed, 1346 insertions(+) create mode 100644 packages/builder/src/pages/builder/app/[application]/automation/[automationId]/_layout.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/automation/[automationId]/index.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/automation/_layout.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/automation/index.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/_layout.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/automation-history/_components/HistoryDetailsPanel.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/automation-history/_components/StatusRenderer.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/automation-history/index.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/_components/ActionsRenderer.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/_components/AppSizeRenderer.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/_components/CreateRestoreModal.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/_components/DatasourceRenderer.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/_components/StatusRenderer.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/_components/TimeAgoRenderer.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/_components/TypeRenderer.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/_components/UserRenderer.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/backups/index.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/embed.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/index.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/name-and-url.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/settings/version.svelte diff --git a/packages/builder/src/pages/builder/app/[application]/automation/[automationId]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/automation/[automationId]/_layout.svelte new file mode 100644 index 0000000000..3be71a1bbe --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/automation/[automationId]/_layout.svelte @@ -0,0 +1,15 @@ + + + diff --git a/packages/builder/src/pages/builder/app/[application]/automation/[automationId]/index.svelte b/packages/builder/src/pages/builder/app/[application]/automation/[automationId]/index.svelte new file mode 100644 index 0000000000..1a15ed48c6 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/automation/[automationId]/index.svelte @@ -0,0 +1,5 @@ + + + diff --git a/packages/builder/src/pages/builder/app/[application]/automation/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/automation/_layout.svelte new file mode 100644 index 0000000000..79ca5df168 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/automation/_layout.svelte @@ -0,0 +1,131 @@ + + + +
+ +
+ {#if $automationStore.automations?.length} + + {:else} +
+
+ + + + + You have no automations + Let's fix that. Call the bots! + + +
+
+ {/if} +
+ + {#if $automationStore.showTestPanel} +
+ +
+ {/if} + + + + + + +
+ + diff --git a/packages/builder/src/pages/builder/app/[application]/automation/index.svelte b/packages/builder/src/pages/builder/app/[application]/automation/index.svelte new file mode 100644 index 0000000000..ea2c853139 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/automation/index.svelte @@ -0,0 +1,10 @@ + diff --git a/packages/builder/src/pages/builder/app/[application]/settings/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/settings/_layout.svelte new file mode 100644 index 0000000000..3c0299d50a --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/settings/_layout.svelte @@ -0,0 +1,74 @@ + + + +
+ + + + + + + + + + + + + + +
+ + diff --git a/packages/builder/src/pages/builder/app/[application]/settings/automation-history/_components/HistoryDetailsPanel.svelte b/packages/builder/src/pages/builder/app/[application]/settings/automation-history/_components/HistoryDetailsPanel.svelte new file mode 100644 index 0000000000..5b9c925130 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/settings/automation-history/_components/HistoryDetailsPanel.svelte @@ -0,0 +1,82 @@ + + +{#if history} + +
+ + +
+ + {history.automationName} + + + {#if history.status === STOPPED_ERROR} +
+ +
+ {/if} + {#if exists} +
+ +
+ {/if} + {#key history} +
+ +
+ {/key} +
+{:else} + No details found +{/if} + + diff --git a/packages/builder/src/pages/builder/app/[application]/settings/automation-history/_components/StatusRenderer.svelte b/packages/builder/src/pages/builder/app/[application]/settings/automation-history/_components/StatusRenderer.svelte new file mode 100644 index 0000000000..f041faa349 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/settings/automation-history/_components/StatusRenderer.svelte @@ -0,0 +1,27 @@ + + + + {info.message} + diff --git a/packages/builder/src/pages/builder/app/[application]/settings/automation-history/index.svelte b/packages/builder/src/pages/builder/app/[application]/settings/automation-history/index.svelte new file mode 100644 index 0000000000..c1c6be997b --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/settings/automation-history/index.svelte @@ -0,0 +1,262 @@ + + + + + Automation History + View the automations your app has executed + + + +
+