fix: Server usage only shown for root team
This commit is contained in:
parent
c3684a1650
commit
1f087cc29a
@ -25,6 +25,7 @@
|
|||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import Loading from './applications/[id]/logs/_Loading.svelte';
|
import Loading from './applications/[id]/logs/_Loading.svelte';
|
||||||
import Trend from './_Trend.svelte';
|
import Trend from './_Trend.svelte';
|
||||||
|
import { session } from '$app/stores';
|
||||||
|
|
||||||
export let applicationsCount: number;
|
export let applicationsCount: number;
|
||||||
export let sourcesCount: number;
|
export let sourcesCount: number;
|
||||||
@ -122,10 +123,12 @@
|
|||||||
clearInterval(usageInterval);
|
clearInterval(usageInterval);
|
||||||
});
|
});
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
if ($session.teamId === '0') {
|
||||||
await getStatus();
|
await getStatus();
|
||||||
usageInterval = setInterval(async () => {
|
usageInterval = setInterval(async () => {
|
||||||
await getStatus();
|
await getStatus();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -134,6 +137,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-10 pb-12 tracking-tight sm:pb-16">
|
<div class="mt-10 pb-12 tracking-tight sm:pb-16">
|
||||||
<div class="mx-auto max-w-4xl">
|
<div class="mx-auto max-w-4xl">
|
||||||
|
{#if $session.teamId === '0'}
|
||||||
<div class="title font-bold">Server Usage</div>
|
<div class="title font-bold">Server Usage</div>
|
||||||
<dl class="relative mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
<dl class="relative mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
||||||
<Loading />
|
<Loading />
|
||||||
@ -208,6 +212,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
<div class="title pt-20 font-bold">Resources</div>
|
<div class="title pt-20 font-bold">Resources</div>
|
||||||
|
{/if}
|
||||||
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
||||||
<a
|
<a
|
||||||
href="/applications"
|
href="/applications"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user