Skip to content

Commit

Permalink
feat: Button in UI to refresh node configuration params #235 #161
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Feb 7, 2020
1 parent 56e451e commit fb38f30
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 13 deletions.
41 changes: 30 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions src/components/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
<v-expansion-panel-content>
<div slot="header">Configuration</div>
<v-card>
<v-btn round color="primary" @click="sendNodeAction('requestAllConfigParams')" dark>Refresh values</v-btn>
<v-card-text>
<v-flex
v-for="(v, index) in selectedNode.values.filter(v => v.genre == 'config')"
Expand Down Expand Up @@ -601,6 +602,10 @@ export default {
text: 'Send NIF',
value: 'sendNodeInformation'
},
{
text: 'Refresh configuration params',
value: 'requestAllConfigParams'
},
{
text: 'Request network update',
value: 'requestNetworkUpdate'
Expand Down Expand Up @@ -942,9 +947,9 @@ export default {
this.apiRequest(this.cnt_action, args)
}
},
sendNodeAction () {
sendNodeAction (action) {
if (this.selectedNode) {
this.apiRequest(this.node_action, [this.selectedNode.node_id])
this.apiRequest(action || this.node_action, [this.selectedNode.node_id])
}
},
saveConfiguration () {
Expand Down Expand Up @@ -1055,6 +1060,9 @@ export default {
})
this.socket.on(this.socketEvents.nodeRemoved, node => {
if (self.selectedNode.node_id === node.node_id) {
self.selectedNode = null
}
self.$set(self.nodes, node.node_id, node)
})
Expand Down

0 comments on commit fb38f30

Please sign in to comment.