Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: bump zwave-js@12 and fix breaking changes #3268

Merged
merged 18 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4551,14 +4551,14 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
}

/**
* Triggered on each progress of healing process
* Triggered on each progress of rebuild routes process
*/
private _onRebuildRoutesProgress(
progress: ReadonlyMap<number, RebuildRoutesStatus>
) {
const toHeal = [...progress.values()]
const healedNodes = toHeal.filter((v) => v !== 'pending')
robertsLando marked this conversation as resolved.
Show resolved Hide resolved
const message = `Healing process IN PROGRESS. Healed ${healedNodes.length} nodes`
const message = `Rebuild Routes process IN PROGRESS. Healed ${healedNodes.length} nodes`
robertsLando marked this conversation as resolved.
Show resolved Hide resolved
this._updateControllerStatus(message)
this.sendToSocket(socketEvents.rebuildRoutesProgress, [
...progress.entries(),
Expand Down Expand Up @@ -4602,7 +4602,7 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
}

private _onRebuildRoutesDone(result) {
const message = `Healing process COMPLETED. Healed ${result.size} nodes`
const message = `Rebuild Routes process COMPLETED. Healed ${result.size} nodes`
robertsLando marked this conversation as resolved.
Show resolved Hide resolved
this._updateControllerStatus(message)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/nodes-table/ExpandedNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export default {
},
],
icon: 'healing',
desc: 'Force nodes to establish better connections to the controller',
desc: 'Discover and assign new routes from node to the controller and other nodes.',
},
{
text: 'Refresh Values',
Expand Down
4 changes: 2 additions & 2 deletions src/mixins/InstancesMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ export default {

if (response.success && response.result) {
this.showSnackbar(
`Heal of node ${node.id} successful`,
`Routes of node ${node.id} has been rebuilt successfully`,
'success'
)
} else {
this.showSnackbar(
`Error healing node ${node.id}: ${
`Error while rebuilding node ${node.id} routes: ${
!response.success
? response.message
: 'failed to rebuild node routes'
Expand Down
2 changes: 1 addition & 1 deletion src/stores/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ const useBaseStore = defineStore('base', {
})
}
},
setHealProgress(nodesProgress) {
setRebuildRoutesProgress(nodesProgress) {
for (const [nodeId, progress] of nodesProgress) {
const node = this.getNode(nodeId)
if (node) {
Expand Down
19 changes: 13 additions & 6 deletions src/views/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,13 @@ export default {
action: 'rebuildNodeRoutes',
args: {
confirm:
'Healing a node causes a lot of traffic, can take minutes up to hours and you can expect degraded performance while it is going on',
'Rebuilding node routes causes a lot of traffic, can take minutes up to hours and you can expect degraded performance while it is going on',
robertsLando marked this conversation as resolved.
Show resolved Hide resolved
},
},
],
icon: 'healing',
desc: 'Force nodes to establish better connections to the controller',
color: 'warning',
desc: 'Discover and assign new routes from nodes to the controller and other nodes.',
},
{
text: 'Ping',
Expand All @@ -393,7 +394,10 @@ export default {
}
},
methods: {
...mapActions(useBaseStore, ['setHealProgress', 'showSnackbar']),
...mapActions(useBaseStore, [
'setRebuildRoutesProgress',
'showSnackbar',
]),
jsonToList,
showNodesManager() {
this.app.showNodesManager()
Expand Down Expand Up @@ -532,10 +536,10 @@ export default {
const { includeSleeping } =
await this.$listeners.showConfirm(
'Info',
'Healing network causes a lot of traffic, can take minutes up to hours and users have to expect degraded performance while it is going on',
'Rebuilding nodes routes causes a lot of traffic, can take minutes up to hours and users have to expect degraded performance while it is going on',
robertsLando marked this conversation as resolved.
Show resolved Hide resolved
'info',
{
confirmText: 'Heal',
confirmText: 'Rebuild',
inputs: [
{
type: 'checkbox',
Expand Down Expand Up @@ -1031,7 +1035,10 @@ export default {
},
},
mounted() {
this.bindEvent('rebuildRoutesProgress', this.setHealProgress.bind(this))
this.bindEvent(
'rebuildRoutesProgress',
this.setRebuildRoutesProgress.bind(this)
)
},
beforeDestroy() {
if (this.socket) {
Expand Down