Skip to content

Commit b996fe5

Browse files
committed
Disallow changing the device type after deployment
Closes issue #288
1 parent 0eb3db6 commit b996fe5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/nodes/victron-virtual.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@
8787
return (this.name||"Virtual "+this.device)
8888
},
8989
oneditprepare: function oneditprepare() {
90+
if (this.id) {
91+
$('#node-input-device')
92+
.prop('disabled', true)
93+
.attr('title', 'Device type cannot be changed after deployment.');
94+
}
95+
9096
$('#node-input-device').on('change', () => {
9197
checkSelectedVirtualDevice.call(this);
9298
});

0 commit comments

Comments
 (0)