Replace 'sandbox' with 'cloud' in builder, reuse 'SELF_HOSTED' flag
This commit is contained in:
parent
c419400043
commit
3ab39d1a1b
|
@ -92,7 +92,7 @@
|
||||||
<ActionGroup />
|
<ActionGroup />
|
||||||
</div>
|
</div>
|
||||||
<div class="toprightnav">
|
<div class="toprightnav">
|
||||||
{#if $admin.sandbox}
|
{#if $admin.cloud}
|
||||||
<UpgradeModal />
|
<UpgradeModal />
|
||||||
{/if}
|
{/if}
|
||||||
<VersionModal />
|
<VersionModal />
|
||||||
|
|
|
@ -6,7 +6,7 @@ export function createAdminStore() {
|
||||||
const DEFAULT_CONFIG = {
|
const DEFAULT_CONFIG = {
|
||||||
loaded: false,
|
loaded: false,
|
||||||
multiTenancy: false,
|
multiTenancy: false,
|
||||||
sandbox: false,
|
cloud: false,
|
||||||
onboardingProgress: 0,
|
onboardingProgress: 0,
|
||||||
checklist: {
|
checklist: {
|
||||||
apps: { checked: false },
|
apps: { checked: false },
|
||||||
|
@ -45,18 +45,18 @@ export function createAdminStore() {
|
||||||
|
|
||||||
async function getFlags() {
|
async function getFlags() {
|
||||||
let multiTenancyEnabled = false
|
let multiTenancyEnabled = false
|
||||||
let sandbox = false
|
let cloud = false
|
||||||
try {
|
try {
|
||||||
const response = await api.get(`/api/system/flags`)
|
const response = await api.get(`/api/system/flags`)
|
||||||
const json = await response.json()
|
const json = await response.json()
|
||||||
multiTenancyEnabled = json.multiTenancy
|
multiTenancyEnabled = json.multiTenancy
|
||||||
sandbox = json.sandbox
|
cloud = json.cloud
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// just let it stay disabled
|
// just let it stay disabled
|
||||||
}
|
}
|
||||||
admin.update(store => {
|
admin.update(store => {
|
||||||
store.multiTenancy = multiTenancyEnabled
|
store.multiTenancy = multiTenancyEnabled
|
||||||
store.sandbox = sandbox
|
store.cloud = cloud
|
||||||
return store
|
return store
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ export default ({ mode }) => {
|
||||||
"process.env.POSTHOG_TOKEN": JSON.stringify(process.env.POSTHOG_TOKEN),
|
"process.env.POSTHOG_TOKEN": JSON.stringify(process.env.POSTHOG_TOKEN),
|
||||||
"process.env.POSTHOG_URL": JSON.stringify(process.env.POSTHOG_URL),
|
"process.env.POSTHOG_URL": JSON.stringify(process.env.POSTHOG_URL),
|
||||||
"process.env.SENTRY_DSN": JSON.stringify(process.env.SENTRY_DSN),
|
"process.env.SENTRY_DSN": JSON.stringify(process.env.SENTRY_DSN),
|
||||||
|
"process.env.ACCOUNT_PORTAL_URL": JSON.stringify(process.env.ACCOUNT_PORTAL_URL),
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,6 @@ const env = require("../../../environment")
|
||||||
exports.fetch = async ctx => {
|
exports.fetch = async ctx => {
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
multiTenancy: !!env.MULTI_TENANCY,
|
multiTenancy: !!env.MULTI_TENANCY,
|
||||||
sandbox: !!env.SANDBOX,
|
cloud: !!env.SELF_HOSTED,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ module.exports = {
|
||||||
REDIS_PASSWORD: process.env.REDIS_PASSWORD,
|
REDIS_PASSWORD: process.env.REDIS_PASSWORD,
|
||||||
INTERNAL_API_KEY: process.env.INTERNAL_API_KEY,
|
INTERNAL_API_KEY: process.env.INTERNAL_API_KEY,
|
||||||
MULTI_TENANCY: process.env.MULTI_TENANCY,
|
MULTI_TENANCY: process.env.MULTI_TENANCY,
|
||||||
SANDBOX: process.env.SANDBOX,
|
|
||||||
_set(key, value) {
|
_set(key, value) {
|
||||||
process.env[key] = value
|
process.env[key] = value
|
||||||
module.exports[key] = value
|
module.exports[key] = value
|
||||||
|
|
Loading…
Reference in New Issue