From 060dc05afab1156749412a4fb939341c8b74a32a Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 20 Apr 2023 17:19:17 +0100 Subject: [PATCH] Removing export all apps functionality from cloud - this was a very niche feature and often confusing, now there is a consistent flow for starting out in self host. --- .../admin/_components/ImportAppsModal.svelte | 46 ------- .../src/pages/builder/admin/index.svelte | 34 +---- .../pages/builder/portal/apps/index.svelte | 33 ----- packages/builder/src/stores/portal/admin.js | 9 -- .../builder/src/stores/portal/admin.test.js | 33 ----- packages/frontend-core/src/api/other.js | 9 -- packages/server/src/api/controllers/cloud.ts | 119 ------------------ packages/server/src/api/index.ts | 1 - packages/server/src/api/routes/cloud.ts | 18 --- packages/server/src/api/routes/index.ts | 2 - .../server/src/api/routes/tests/cloud.spec.ts | 54 -------- .../server/src/sdk/app/backups/exports.ts | 35 ------ yarn.lock | 96 ++------------ 13 files changed, 11 insertions(+), 478 deletions(-) delete mode 100644 packages/builder/src/pages/builder/admin/_components/ImportAppsModal.svelte delete mode 100644 packages/server/src/api/controllers/cloud.ts delete mode 100644 packages/server/src/api/routes/cloud.ts delete mode 100644 packages/server/src/api/routes/tests/cloud.spec.ts diff --git a/packages/builder/src/pages/builder/admin/_components/ImportAppsModal.svelte b/packages/builder/src/pages/builder/admin/_components/ImportAppsModal.svelte deleted file mode 100644 index 182df63967..0000000000 --- a/packages/builder/src/pages/builder/admin/_components/ImportAppsModal.svelte +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Please upload the file that was exported from your Cloud environment to get - started - - { - value.file = e.detail?.[0] - }} - /> - diff --git a/packages/builder/src/pages/builder/admin/index.svelte b/packages/builder/src/pages/builder/admin/index.svelte index dc87054b0c..1d2f223f21 100644 --- a/packages/builder/src/pages/builder/admin/index.svelte +++ b/packages/builder/src/pages/builder/admin/index.svelte @@ -10,10 +10,8 @@ import { goto } from "@roxi/routify" import { API } from "api" import { admin, auth } from "stores/portal" - import ImportAppsModal from "./_components/ImportAppsModal.svelte" import Logo from "assets/bb-emblem.svg" - import { onMount } from "svelte" - import { FancyForm, FancyInput, ActionButton } from "@budibase/bbui" + import { FancyForm, FancyInput } from "@budibase/bbui" import { TestimonialPage } from "@budibase/frontend-core/src/components" import { passwordsMatch, handleError } from "../auth/_components/utils" @@ -24,8 +22,6 @@ let submitted = false $: tenantId = $auth.tenantId - $: cloud = $admin.cloud - $: imported = $admin.importComplete async function save() { form.validate() @@ -46,22 +42,8 @@ notifications.error("Failed to create admin user") } } - - onMount(async () => { - if (!cloud) { - try { - await admin.checkImportComplete() - } catch (error) { - notifications.error("Error checking import status") - } - } - }) - - - - @@ -156,20 +138,6 @@ Create super admin user - - - diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index a4c3415953..783cac49d7 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -9,14 +9,11 @@ notifications, Notification, Body, - Icon, Search, - InlineAlert, } from "@budibase/bbui" import Spinner from "components/common/Spinner.svelte" import CreateAppModal from "components/start/CreateAppModal.svelte" import AppLimitModal from "components/portal/licensing/AppLimitModal.svelte" - import ConfirmDialog from "components/common/ConfirmDialog.svelte" import { store, automationStore } from "builderStore" import { API } from "api" @@ -33,11 +30,9 @@ let appLimitModal let creatingApp = false let searchTerm = "" - let cloud = $admin.cloud let creatingFromTemplate = false let automationErrors let accessFilterList = null - let confirmDownloadDialog $: welcomeHeader = `Welcome ${$auth?.user?.firstName || "back"}` $: enrichedApps = enrichApps($apps, $auth.user, sortBy) @@ -123,15 +118,6 @@ } } - const initiateAppsExport = () => { - try { - window.location = `/api/cloud/export` - notifications.success("Apps exported successfully") - } catch (err) { - notifications.error(`Error exporting apps: ${err}`) - } - } - const initiateAppImport = () => { template = { fromFile: true } creationModal.show() @@ -264,13 +250,6 @@ {#if enrichedApps.length > 1}
- {#if cloud} - - {/if}