remove beta stuff and remove self-host banners

This commit is contained in:
Martin McKeaveney 2022-07-11 11:08:56 +01:00
parent 912561199b
commit 367cf37795
7 changed files with 6 additions and 163 deletions

View File

@ -7,7 +7,6 @@ on:
branches: branches:
- master - master
- develop - develop
- new-design-ui
pull_request: pull_request:
branches: branches:
- master - master
@ -60,19 +59,3 @@ jobs:
with: with:
install: false install: false
command: yarn test:e2e:ci command: yarn test:e2e:ci
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Upload to S3
if: github.ref == 'refs/heads/new-design-ui'
run: |
tar -czvf new_ui.tar.gz packages/server/builder/assets packages/server/builder/index.html
aws s3 cp new_ui.tar.gz s3://prod-budi-app-assets/beta:design_ui/
aws s3 cp packages/client/dist/budibase-client.js s3://prod-budi-app-assets/beta:design_ui/budibase-client.js
aws cloudfront create-invalidation --distribution-id E3ELKP4RCEHVLW --paths "/beta:design_ui/*"

View File

@ -1,33 +0,0 @@
<script>
import { Modal, ModalContent, Button } from "@budibase/bbui"
import { admin } from "stores/portal"
let upgradeModal
const onConfirm = () => {
window.open(`${$admin.accountPortalUrl}/portal/install`, "_blank")
}
</script>
<div>
<Button
on:click={upgradeModal.show}
quiet
primary
size="M"
icon="DownloadFromCloud">Self-host Budibase</Button
>
</div>
<Modal bind:this={upgradeModal}>
<ModalContent
size="M"
{onConfirm}
title="Self-host Budibase"
confirmText="Self-host Budibase"
>
<span>
Self-host budibase for free to get unlimited apps and more - and it only
takes a few minutes!
</span>
</ModalContent>
</Modal>

View File

@ -1,23 +1,15 @@
<script> <script>
import { store, automationStore } from "builderStore" import { store, automationStore } from "builderStore"
import { roles, flags } from "stores/backend" import { roles, flags } from "stores/backend"
import { import { Icon, ActionGroup, Tabs, Tab, notifications } from "@budibase/bbui"
Icon,
ActionGroup,
Tabs,
Tab,
notifications,
Banner,
} from "@budibase/bbui"
import RevertModal from "components/deploy/RevertModal.svelte" import RevertModal from "components/deploy/RevertModal.svelte"
import VersionModal from "components/deploy/VersionModal.svelte" import VersionModal from "components/deploy/VersionModal.svelte"
import DeployNavigation from "components/deploy/DeployNavigation.svelte" import DeployNavigation from "components/deploy/DeployNavigation.svelte"
import { API } from "api" import { API } from "api"
import { auth, admin } from "stores/portal" import { auth } from "stores/portal"
import { isActive, goto, layout, redirect } from "@roxi/routify" import { isActive, goto, layout, redirect } from "@roxi/routify"
import Logo from "assets/bb-emblem.svg" import Logo from "assets/bb-emblem.svg"
import { capitalise } from "helpers" import { capitalise } from "helpers"
import UpgradeModal from "components/upgrade/UpgradeModal.svelte"
import { onMount, onDestroy } from "svelte" import { onMount, onDestroy } from "svelte"
export let application export let application
@ -66,11 +58,6 @@
}) })
} }
async function newDesignUi() {
await flags.toggleUiFeature("design_ui")
window.location.reload()
}
onMount(async () => { onMount(async () => {
if (!hasSynced && application) { if (!hasSynced && application) {
try { try {
@ -95,15 +82,6 @@
<div class="loading" /> <div class="loading" />
{:then _} {:then _}
<div class="root"> <div class="root">
{#if betaAccess}
<Banner
extraButtonText="Try New UI (Beta)"
extraButtonAction={newDesignUi}
>
Try the <b>all new</b> budibase design interface. (Not recommended for existing
budibase apps)
</Banner>
{/if}
<div class="top-nav"> <div class="top-nav">
<div class="topleftnav"> <div class="topleftnav">
<button class="home-logo"> <button class="home-logo">
@ -131,9 +109,6 @@
<ActionGroup /> <ActionGroup />
</div> </div>
<div class="toprightnav"> <div class="toprightnav">
{#if $admin.cloud && $auth.user.account}
<UpgradeModal />
{/if}
<VersionModal /> <VersionModal />
<RevertModal /> <RevertModal />
<Icon name="Play" hoverable on:click={previewApp} /> <Icon name="Play" hoverable on:click={previewApp} />

View File

@ -18,8 +18,6 @@
let versionModal let versionModal
let updatingModal let updatingModal
let selfHostPath =
"https://docs.budibase.com/docs/hosting-methods#self-host-budibase"
$: updateAvailable = clientPackage.version !== $store.version $: updateAvailable = clientPackage.version !== $store.version
$: appUrl = `${window.origin}/app${app?.url}` $: appUrl = `${window.origin}/app${app?.url}`
@ -86,24 +84,6 @@
</Body> </Body>
</Layout> </Layout>
</span> </span>
<span class="selfhost-section">
<Layout gap="XS" paddingY="XXL" paddingX="">
<Heading size="S">Self-host Budibase</Heading>
<Divider />
<Body>
Self-host Budibase for free to get unlimited apps and more - and it
only takes a few minutes!
<div class="page-action">
<Button
secondary
on:click={() => {
window.open(selfHostPath, "_blank")
}}>Self-host Budibase</Button
>
</div>
</Body>
</Layout>
</span>
</Layout> </Layout>
<VersionModal bind:this={versionModal} hideIcon={true} /> <VersionModal bind:this={versionModal} hideIcon={true} />
<Modal bind:this={updatingModal} padding={false} width="600px"> <Modal bind:this={updatingModal} padding={false} width="600px">

View File

@ -3,12 +3,8 @@ const env = require("../../environment")
const { checkSlashesInUrl } = require("../../utilities") const { checkSlashesInUrl } = require("../../utilities")
const { request } = require("../../utilities/workerRequests") const { request } = require("../../utilities/workerRequests")
const { clearLock } = require("../../utilities/redis") const { clearLock } = require("../../utilities/redis")
const { const { Replication, getProdAppID } = require("@budibase/backend-core/db")
Replication, const { DocumentTypes } = require("../../db/utils")
getProdAppID,
dangerousGetDB,
} = require("@budibase/backend-core/db")
const { DocumentTypes, getRowParams } = require("../../db/utils")
const { app: appCache } = require("@budibase/backend-core/cache") const { app: appCache } = require("@budibase/backend-core/cache")
const { getProdAppDB, getAppDB } = require("@budibase/backend-core/context") const { getProdAppDB, getAppDB } = require("@budibase/backend-core/context")
const { events } = require("@budibase/backend-core") const { events } = require("@budibase/backend-core")
@ -137,50 +133,3 @@ exports.getBudibaseVersion = async ctx => {
} }
await events.installation.versionChecked(version) await events.installation.versionChecked(version)
} }
// TODO: remove as part of beta program
exports.checkBetaAccess = async ctx => {
// go to the cloud platform if running self hosted
if (env.SELF_HOSTED || !env.MULTI_TENANCY) {
let baseUrl = ""
if (env.ACCOUNT_PORTAL_URL) {
baseUrl = env.ACCOUNT_PORTAL_URL.replace("account.", "")
} else {
baseUrl = "https://budibase.app"
}
const response = await fetch(
`${baseUrl}/api/beta/access?email=${ctx.query.email}`
)
const json = await response.json()
ctx.body = json
return
}
const userToCheck = ctx.query.email
const BETA_USERS_DB = "app_bb_f9b77d06b9db4e3ca185476ab87a2364"
const BETA_USERS_TABLE = "ta_8c2c6df1c03f49cfb6340e85e066dd15"
try {
const db = dangerousGetDB(BETA_USERS_DB)
const betaUsers = (
await db.allDocs(
getRowParams(BETA_USERS_TABLE, null, {
include_docs: true,
})
)
).rows.map(row => row.doc)
let access = false
for (let betaUser of betaUsers) {
if (betaUser["Email address"].trim() === userToCheck) {
access = true
break
}
}
ctx.body = { access }
} catch (err) {
console.error(err)
ctx.body = { access: false }
}
}

View File

@ -73,13 +73,7 @@ exports.toggleBetaUiFeature = async function (ctx) {
} }
exports.serveBuilder = async function (ctx) { exports.serveBuilder = async function (ctx) {
// Temporary: New Design UI await send(ctx, ctx.file, { root: TOP_LEVEL_PATH })
const designUiCookie = ctx.cookies.get("beta:design_ui")
// TODO: get this from the tmp Dir that we downloaded from MinIO
const uiPath = designUiCookie ? "new_design_ui" : "builder"
let builderPath = resolve(TOP_LEVEL_PATH, uiPath)
await send(ctx, ctx.file, { root: builderPath })
if (!ctx.file.includes("assets/")) { if (!ctx.file.includes("assets/")) {
await events.serve.servedBuilder() await events.serve.servedBuilder()
} }

View File

@ -54,13 +54,8 @@ exports.objectStoreUrl = () => {
* @return {string} The URL to be inserted into appPackage response or server rendered * @return {string} The URL to be inserted into appPackage response or server rendered
* app index file. * app index file.
*/ */
exports.clientLibraryPath = (appId, version, ctx) => { exports.clientLibraryPath = (appId, version) => {
if (env.isProd()) { if (env.isProd()) {
// TODO: remove - for beta testing UI
if (ctx && ctx.cookies.get("beta:design_ui")) {
return "https://cdn.budi.live/beta:design_ui/budibase-client.js"
}
let url = `${exports.objectStoreUrl()}/${sanitizeKey( let url = `${exports.objectStoreUrl()}/${sanitizeKey(
appId appId
)}/budibase-client.js` )}/budibase-client.js`