|
1 | 1 | <template> |
2 | | - <v-container class="pt-16"> |
3 | | - <h1 class="text-h4 font-weight-bold text-center mb-4"> |
4 | | - Mycelium Cloud |
5 | | - </h1> |
6 | | - <p class="text-body-1 text-center text-primary mx-auto" :style="{ maxWidth: '600px' }"> |
7 | | - Revolutionary Kubernetes platform that transforms how teams deploy and manage cloud-native |
8 | | - applications at scale |
9 | | - </p> |
| 2 | + <div> |
| 3 | + <div |
| 4 | + class="border-b d-flex justify-center align-center" |
| 5 | + :style="{ |
| 6 | + minHeight: '500px', |
| 7 | + background: ` |
| 8 | + url(${myceliumBg1}) no-repeat bottom right/40%, |
| 9 | + url(${myceliumBg2}) no-repeat -120px 80px/30%, |
| 10 | + linear-gradient(100.95deg, #0B1A30 71.46%, #225196 145.62%) |
| 11 | + `, |
| 12 | + }" |
| 13 | + > |
| 14 | + <v-container> |
| 15 | + <h1 class="text-h1 font-weight-bold text-center mb-4"> |
| 16 | + Mycelium Cloud |
| 17 | + </h1> |
| 18 | + <p class="text-body-1 text-center text-primary mx-auto" :style="{ maxWidth: '600px' }"> |
| 19 | + Revolutionary Kubernetes platform that transforms how teams deploy and manage cloud-native |
| 20 | + applications at scale |
| 21 | + </p> |
| 22 | + </v-container> |
| 23 | + </div> |
10 | 24 |
|
11 | | - {{ isLoading }} |
12 | | - {{ state }} |
13 | | - </v-container> |
| 25 | + <v-container class="my-16"> |
| 26 | + <div v-if="isLoading || stats.length === 0" class="d-flex justify-center align-center" :style="{ height: '198px' }"> |
| 27 | + <v-progress-linear indeterminate color="primary" :style="{ maxWidth: '600px' }" /> |
| 28 | + </div> |
| 29 | + |
| 30 | + <v-fade-transition> |
| 31 | + <v-row v-if="stats.length > 0 && !isLoading" class="justify-center"> |
| 32 | + <v-col |
| 33 | + v-for="resource in stats" |
| 34 | + :key="resource.id" |
| 35 | + cols="12" |
| 36 | + sm="6" |
| 37 | + md="4" |
| 38 | + lg="3" |
| 39 | + > |
| 40 | + <StatsCard v-bind="resource" /> |
| 41 | + </v-col> |
| 42 | + </v-row> |
| 43 | + </v-fade-transition> |
| 44 | + </v-container> |
| 45 | + </div> |
14 | 46 | </template> |
15 | 47 |
|
16 | 48 | <script setup lang="ts"> |
| 49 | +import myceliumBg1 from "~/assets/images/mycelium_bg_1.svg" |
| 50 | +import myceliumBg2 from "~/assets/images/mycelium_bg_2.svg" |
| 51 | +
|
17 | 52 | definePageMeta({ middleware: "public" }) |
18 | 53 |
|
19 | | -const api = useApi() |
20 | | -const { state, isLoading } = useAsyncState(async () => { |
21 | | - const { data } = await api.admin.getStats({ unauthenticated: true }) |
22 | | - return data.data |
23 | | -}, null) |
| 54 | +const { stats, isLoading } = useStats({ exclude: ["users", "clusters", "balance"] }) |
24 | 55 | </script> |
0 commit comments