Skip to content

Commit

Permalink
feat(xo-web): add alarms to xo6 dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
P4l0m4 committed Jul 24, 2024
1 parent 0702454 commit 2400476
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<template>
<UiCard>
<CardTitle>
{{ $t('alarms')
}}<template #info>
<UiCounter color="error" :value="alarms.length" size="medium" />
</template>
</CardTitle>
<table>
<!-- <AlarmLine></AlarmLine> -->
</table>
</UiCard>
</template>

<script setup lang="ts">
import CardTitle from '@core/components/card/CardTitle.vue'
import UiCard from '@core/components/UiCard.vue'
import UiCounter from '@core/components/UiCounter.vue'
const alarms = [
{
level: 1,
triggerLevel: 2,
type: 'cpu_usage',
},
{
level: 4,
triggerLevel: 3,
type: 'network_usage',
},
{
level: 0,
triggerLevel: 6,
type: 'disk_usage',
},
{
level: 1,
triggerLevel: 3,
type: 'fs_usage',
},
{
level: 2,
triggerLevel: 4,
type: 'log_fs_usage',
},
{
level: 1,
triggerLevel: 1,
type: 'mem_usage',
},
{
level: 6,
triggerLevel: 2,
type: 'physical_utilisation',
},
]
</script>
8 changes: 5 additions & 3 deletions @xen-orchestra/web/src/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<!-- eslint-disable @intlify/vue-i18n/no-raw-text -->
Welcome to XO 6
<!-- eslint-enable @intlify/vue-i18n/no-raw-text -->
<DashboardAlarms />
</template>

<script setup lang="ts">
import DashboardAlarms from '@/components/pool/dashboard/DashboardAlarms.vue'
</script>

0 comments on commit 2400476

Please sign in to comment.