Skip to content

Commit

Permalink
Merge pull request #2489 from emqx/dev/1.7.1
Browse files Browse the repository at this point in the history
Sync code from refs/heads/dev/1.7.1 to enterprise
  • Loading branch information
Kinplemelon authored Mar 8, 2024
2 parents e3fd00e + ed2c6e8 commit a667445
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/views/Clients/ClientDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ const props = defineProps({
},
})
type ClientTypes = 'MQTT' | 'LWM2M' | 'others' | 'MQISDP'
const emit = defineEmits(['refreshGateway'])
const dialogVisible = ref(false)
Expand Down Expand Up @@ -381,12 +383,15 @@ const backRoute = computed(() => {
const clientId = computed<string>((): string => {
return (route.params.clientId as string) || (props.clientid as string)
})
const clientType = computed<'MQTT' | 'LWM2M' | 'others'>((): 'MQTT' | 'LWM2M' | 'others' => {
const clientType = computed<ClientTypes>((): ClientTypes => {
const proto_name = String(record.value.proto_name)
return proto_name.toUpperCase() as 'MQTT' | 'LWM2M' | 'others'
return proto_name.toUpperCase() as ClientTypes
})
const clientDetailParts = computed(() => {
let allParts = Object.keys(clientsOrganizied)
if (clientType.value === 'MQISDP') {
return clientsOrganizied.MQTT
}
if (Array.prototype.includes.call(allParts, clientType.value)) {
return clientsOrganizied[clientType.value]
}
Expand Down

0 comments on commit a667445

Please sign in to comment.