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", CurrentApp: "budibase:currentapp",
Auth: "budibase:auth", Auth: "budibase:auth",
Init: "budibase:init", Init: "budibase:init",
RETURN_URL: "budibase:returnurl", ACCOUNT_RETURN_URL: "budibase:account:returnurl",
DatasourceAuth: "budibase:datasourceauth", DatasourceAuth: "budibase:datasourceauth",
OIDC_CONFIG: "budibase:oidc:config", OIDC_CONFIG: "budibase:oidc:config",
} }

View File

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

View File

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

View File

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

View File

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