web app update to attempt to re-use deleted node ids

This commit is contained in:
Blake J. Harnden 2018-05-15 08:46:53 -07:00
parent f004d20b79
commit 014dea2dd0
3 changed files with 25 additions and 4 deletions

View file

@ -157,12 +157,13 @@ class NodeContext {
this.nodeEditModal = nodeEditModal;
this.servicesModal = servicesModal;
this.$nodeContext = $('#node-context');
this.$deleteButton = this.$nodeContext.find('button[data-option="delete"]');
this.$linkRfButton = $('#node-linkrf-button');
this.$deleteButton = $('#node-delete-button');
this.onClick();
}
show(nodeId, x, y) {
const node = this.coreNetwork.nodes.get(nodeId);
const node = this.coreNetwork.getCoreNode(nodeId);
console.log('context node: ', node);
this.coreRest.isRunning()
.then(isRunning => {
@ -172,6 +173,13 @@ class NodeContext {
this.$deleteButton.removeAttr('disabled');
}
console.log('node type: ', node.type);
if (node.type === CoreNodeHelper.wlanNode) {
this.$linkRfButton.removeClass('d-none');
} else {
this.$linkRfButton.addClass('d-none');
}
this.$nodeContext.data('node', nodeId);
this.$nodeContext.css({
position: 'absolute',