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:
- master
- develop
- new-design-ui
pull_request:
branches:
- master
@ -60,19 +59,3 @@ jobs:
with:
install: false
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>
import { store, automationStore } from "builderStore"
import { roles, flags } from "stores/backend"
import {
Icon,
ActionGroup,
Tabs,
Tab,
notifications,
Banner,
} from "@budibase/bbui"
import { Icon, ActionGroup, Tabs, Tab, notifications } from "@budibase/bbui"
import RevertModal from "components/deploy/RevertModal.svelte"
import VersionModal from "components/deploy/VersionModal.svelte"
import DeployNavigation from "components/deploy/DeployNavigation.svelte"
import { API } from "api"
import { auth, admin } from "stores/portal"
import { auth } from "stores/portal"
import { isActive, goto, layout, redirect } from "@roxi/routify"
import Logo from "assets/bb-emblem.svg"
import { capitalise } from "helpers"
import UpgradeModal from "components/upgrade/UpgradeModal.svelte"
import { onMount, onDestroy } from "svelte"
export let application
@ -66,11 +58,6 @@
})
}
async function newDesignUi() {
await flags.toggleUiFeature("design_ui")
window.location.reload()
}
onMount(async () => {
if (!hasSynced && application) {
try {
@ -95,15 +82,6 @@
<div class="loading" />
{:then _}
<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="topleftnav">
<button class="home-logo">
@ -131,9 +109,6 @@
<ActionGroup />
</div>
<div class="toprightnav">
{#if $admin.cloud && $auth.user.account}
<UpgradeModal />
{/if}
<VersionModal />
<RevertModal />
<Icon name="Play" hoverable on:click={previewApp} />

View File

@ -18,8 +18,6 @@
let versionModal
let updatingModal
let selfHostPath =
"https://docs.budibase.com/docs/hosting-methods#self-host-budibase"
$: updateAvailable = clientPackage.version !== $store.version
$: appUrl = `${window.origin}/app${app?.url}`
@ -86,24 +84,6 @@
</Body>
</Layout>
</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>
<VersionModal bind:this={versionModal} hideIcon={true} />
<Modal bind:this={updatingModal} padding={false} width="600px">

View File

@ -3,12 +3,8 @@ const env = require("../../environment")
const { checkSlashesInUrl } = require("../../utilities")
const { request } = require("../../utilities/workerRequests")
const { clearLock } = require("../../utilities/redis")
const {
Replication,
getProdAppID,
dangerousGetDB,
} = require("@budibase/backend-core/db")
const { DocumentTypes, getRowParams } = require("../../db/utils")
const { Replication, getProdAppID } = require("@budibase/backend-core/db")
const { DocumentTypes } = require("../../db/utils")
const { app: appCache } = require("@budibase/backend-core/cache")
const { getProdAppDB, getAppDB } = require("@budibase/backend-core/context")
const { events } = require("@budibase/backend-core")
@ -137,50 +133,3 @@ exports.getBudibaseVersion = async ctx => {
}
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) {
// Temporary: New Design UI
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 })
await send(ctx, ctx.file, { root: TOP_LEVEL_PATH })
if (!ctx.file.includes("assets/")) {
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
* app index file.
*/
exports.clientLibraryPath = (appId, version, ctx) => {
exports.clientLibraryPath = (appId, version) => {
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(
appId
)}/budibase-client.js`