Skip to content

Commit

Permalink
fix(ui): only allow healthchecks against controller and hide neighbors
Browse files Browse the repository at this point in the history
Fixes #3681
  • Loading branch information
robertsLando committed Apr 23, 2024
1 parent 1b0e49d commit 0209b55
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/dialogs/DialogHealthCheck.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@
class="mb-2"
justify="space-around"
>
<v-col v-if="averages.numNeighbors" class="text-center">
<v-col
v-if="averages.numNeighbors && !isLR()"

Check failure on line 200 in src/components/dialogs/DialogHealthCheck.vue

View workflow job for this annotation

GitHub Actions / test (18.x)

Use isLR instead of isLR()
class="text-center"
>
<p class="mb-1 subtitle-1 font-weight-bold">
No. Neighbors
</p>
Expand Down Expand Up @@ -414,6 +417,7 @@ import { mapActions, mapState } from 'pinia'
import useBaseStore from '../../stores/base.js'
import InstancesMixin from '../../mixins/InstancesMixin.js'
import { Protocols } from '@zwave-js/core/safe'
export default {
components: {},
Expand All @@ -430,7 +434,13 @@ export default {
},
computed: {
...mapState(useBaseStore, ['nodes']),
isLR() {
return this.activeNode?.protocol === Protocols.ZWaveLongRange
},
filteredNodes() {
if (this.isLR) {
return this.nodes.filter((n) => n.isControllerNode)
}
return this.activeNode
? this.nodes.filter((n) => n.id !== this.activeNode.id)
: this.nodes
Expand Down

0 comments on commit 0209b55

Please sign in to comment.