Skip to content

Commit

Permalink
fix: data type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Meng-20 committed Oct 4, 2024
1 parent 9ed9924 commit 6936c45
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
22 changes: 8 additions & 14 deletions webui/src/components/Appliance/Appliances.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@
}}</v-list-item-subtitle>
<template v-slot:prepend>
<v-avatar>
<v-icon :color="statusColor"
>{{statusIcon}}</v-icon
>
<v-icon :color="statusColor">{{
statusIcon
}}</v-icon>
</v-avatar>
</template>
</v-list-item>
Expand All @@ -191,9 +191,7 @@
</v-list-item-subtitle>
<template v-slot:prepend>
<v-avatar>
<v-icon color="#6ebe4a"
>mdi-account-circle</v-icon
>
<v-icon color="#6ebe4a">mdi-account-circle</v-icon>
</v-avatar>
</template>
</v-list-item>
Expand All @@ -204,9 +202,7 @@
</v-list-item-subtitle>
<template v-slot:prepend>
<v-avatar>
<v-icon color="#6ebe4a"
>mdi-shield-account</v-icon
>
<v-icon color="#6ebe4a">mdi-shield-account</v-icon>
</v-avatar>
</template>
</v-list-item>
Expand Down Expand Up @@ -1533,11 +1529,9 @@ export default {
const selectedBladeIp = computed(() => bladeStore.selectedBladeIp);
const selectedBladePort = computed(() => bladeStore.selectedBladePortNum);
const selectedBladeStatus = computed(() => bladeStore.selectedBladeStatus);
const statusColor = computed(() => {
return selectedBladeStatus.value === "online"
? "#6ebe4a"
: "warning";
return selectedBladeStatus.value === "online" ? "#6ebe4a" : "warning";
});
const statusIcon = computed(() => {
Expand All @@ -1556,7 +1550,7 @@ export default {
bladePort: number,
bladeMemoryAvailable: number,
bladeMemoryAllocated: number,
bladeStatus: string
bladeStatus: string | undefined
) => {
bladeStore.selectBlade(
bladeId,
Expand Down
4 changes: 2 additions & 2 deletions webui/src/components/CXL-Hosts/CXL-Hosts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ export default {
selectedHost.ipAddress,
selectedHost.port,
selectedHost.localMemoryMiB,
selectedHost.selectedBladeStatus
selectedHost.status
);
}
Expand Down Expand Up @@ -930,7 +930,7 @@ export default {
hostIp: string,
hostPort: number,
hostLocalMemory: number | undefined,
hostStatus: string
hostStatus: string | undefined
) => {
hostStore.selectHost(
hostId,
Expand Down
4 changes: 2 additions & 2 deletions webui/src/components/Stores/BladeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useBladeStore = defineStore('blade', {
selectedBladePortNum: null as unknown as number,
selectedBladeTotalMemoryAvailableMiB: null as unknown as number | undefined,
selectedBladeTotalMemoryAllocatedMiB: null as unknown as number | undefined,
selectedBladeStatus: null as unknown as string,
selectedBladeStatus: null as unknown as string | undefined,
addBladeError: null as unknown,
deleteBladeError: null as unknown,
resyncBladeError: null as unknown,
Expand Down Expand Up @@ -146,7 +146,7 @@ export const useBladeStore = defineStore('blade', {
},


selectBlade(bladeId: string, selectedBladeIp: string, selectBladePortNum: number, selectedBladeTotalMemoryAvailableMiB: number, selectedBladeTotalMemoryAllocatedMiB: number, status: string) {
selectBlade(bladeId: string, selectedBladeIp: string, selectBladePortNum: number, selectedBladeTotalMemoryAvailableMiB: number, selectedBladeTotalMemoryAllocatedMiB: number, status: string | undefined) {
this.selectedBladeId = bladeId;
this.selectedBladeIp = selectedBladeIp;
this.selectedBladePortNum = selectBladePortNum;
Expand Down
4 changes: 2 additions & 2 deletions webui/src/components/Stores/HostStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useHostStore = defineStore('host', {
selectedHostIp: null as unknown as string,
selectedHostPortNum: null as unknown as number,
selectedHostLocalMemory: null as unknown as number | undefined,
selectedHostStatus: null as unknown as string,
selectedHostStatus: null as unknown as string | undefined,
addHostError: null as unknown,
deleteHostError: null as unknown,
resyncHostError: null as unknown,
Expand Down Expand Up @@ -124,7 +124,7 @@ export const useHostStore = defineStore('host', {
}
},

selectHost(selectedHostId: string, selectedHostIp: string, selectedHostPortNum: number, selectedHostLocalMemory: number | undefined, status: string) {
selectHost(selectedHostId: string, selectedHostIp: string, selectedHostPortNum: number, selectedHostLocalMemory: number | undefined, status: string | undefined) {
this.selectedHostId = selectedHostId;
this.selectedHostIp = selectedHostIp;
this.selectedHostPortNum = selectedHostPortNum;
Expand Down

0 comments on commit 6936c45

Please sign in to comment.