-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(xo-lite): adding pif status component, some improvement and css
- Loading branch information
Showing
9 changed files
with
272 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
@xen-orchestra/lite/src/components/pool/network/PoolNetworksPifStatus.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<UiInfo class="text-ellipsis" :accent="statusProps.accent"> | ||
<span class="text-ellipsis">{{ statusProps.text }}</span> | ||
</UiInfo> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import UiInfo from '@core/components/ui/info/UiInfo.vue' | ||
import { computed } from 'vue' | ||
const { pif } = defineProps<{ | ||
pif: { status: 'connected' | 'disconnected' | 'partially_connected' } | ||
}>() | ||
type NetworkAccent = 'success' | 'warning' | 'danger' | ||
const statusMap: Record<string, { text: string; accent: NetworkAccent }> = { | ||
connected: { text: 'Connected', accent: 'success' }, | ||
disconnected: { text: 'Disconnected', accent: 'danger' }, | ||
partially_connected: { text: 'Partially Connected', accent: 'warning' }, | ||
} | ||
const statusProps = computed(() => statusMap[pif.status]) | ||
</script> |
Oops, something went wrong.