This commit is contained in:
Rory Powell 2022-09-15 11:59:46 +01:00
parent 4787f9ccab
commit f7fa9969f4
5 changed files with 10 additions and 5 deletions

View File

@ -7,7 +7,7 @@ exports.Cookies = {
CurrentApp: "budibase:currentapp",
Auth: "budibase:auth",
Init: "budibase:init",
RETURN_URL: "budibase:returnurl",
ACCOUNT_RETURN_URL: "budibase:account:returnurl",
DatasourceAuth: "budibase:datasourceauth",
OIDC_CONFIG: "budibase:oidc:config",
}

View File

@ -63,8 +63,9 @@
await auth.getSelf()
await admin.init()
await licensing.getQuotaUsage()
await licensing.getUsageMetrics()
if ($auth.user) {
await licensing.init()
}
// Set init info if present
if ($params["?template"]) {

View File

@ -13,8 +13,7 @@
notifications,
} from "@budibase/bbui"
import ConfigChecklist from "components/common/ConfigChecklist.svelte"
import { organisation, auth } from "stores/portal"
import { admin as adminStore } from "stores/portal"
import { organisation, auth, admin as adminStore } from "stores/portal"
import { onMount } from "svelte"
import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte"
import ChangePasswordModal from "components/settings/ChangePasswordModal.svelte"

View File

@ -13,6 +13,10 @@ export const createLicensingStore = () => {
const store = writable(DEFAULT)
const actions = {
init: async () => {
await actions.getQuotaUsage()
await actions.getUsageMetrics()
},
getQuotaUsage: async () => {
const quotaUsage = await API.getQuotaUsage()
store.update(state => {

View File

@ -57,6 +57,7 @@ export const Cookies = {
Auth: "budibase:auth",
CurrentApp: "budibase:currentapp",
ReturnUrl: "budibase:returnurl",
AccountReturnUrl: "budibase:account:returnurl",
}
// Table names