Skip to content

Commit

Permalink
feat: change the device status color
Browse files Browse the repository at this point in the history
  • Loading branch information
Meng-20 committed Oct 7, 2024
1 parent 6936c45 commit 81d18ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
9 changes: 5 additions & 4 deletions webui/src/components/Appliance/Appliances.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@
<v-list lines="one">
<v-list-item>
<v-list-item-title>Status</v-list-item-title>
<v-list-item-subtitle>{{
selectedBladeStatus
}}</v-list-item-subtitle>
<v-list-item-subtitle
:style="{ fontWeight: 'bold', color: statusColor }"
>{{ selectedBladeStatus }}</v-list-item-subtitle
>
<template v-slot:prepend>
<v-avatar>
<v-icon :color="statusColor">{{
Expand Down Expand Up @@ -1531,7 +1532,7 @@ export default {
const selectedBladeStatus = computed(() => bladeStore.selectedBladeStatus);

const statusColor = computed(() => {
return selectedBladeStatus.value === "online" ? "#6ebe4a" : "warning";
return selectedBladeStatus.value === "online" ? "#6ebe4a" : "#ff9f40";
});

const statusIcon = computed(() => {
Expand Down
12 changes: 8 additions & 4 deletions webui/src/components/CXL-Hosts/CXL-Hosts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@
<v-list lines="one">
<v-list-item>
<v-list-item-title>Status</v-list-item-title>
<v-list-item-subtitle>{{
selectedHostStatus
}}</v-list-item-subtitle>
<v-list-item-subtitle
:style="{
fontWeight: 'bold',
color: statusColor + ' !important',
}"
>{{ selectedHostStatus }}</v-list-item-subtitle
>
<template v-slot:prepend>
<v-avatar>
<v-icon :color="statusColor">{{ statusIcon }}</v-icon>
Expand Down Expand Up @@ -915,7 +919,7 @@ export default {
const selectedHostStatus = computed(() => hostStore.selectedHostStatus);

const statusColor = computed(() => {
return selectedHostStatus.value === "online" ? "#6ebe4a" : "warning";
return selectedHostStatus.value === "online" ? "#6ebe4a" : "#ff9f40";
});

const statusIcon = computed(() => {
Expand Down

0 comments on commit 81d18ea

Please sign in to comment.