From d25e5622128c584167caebccccfbe4339a26317a Mon Sep 17 00:00:00 2001 From: Julian Knight <1591850+TotallyInformation@users.noreply.github.com> Date: Sat, 11 Mar 2023 12:14:15 +0000 Subject: [PATCH] Track connected uib node by ID not just url to better handle uib renames. --- src/editor/uib-sender/editor.js | 59 +++++++++++++++++++++++++++----- src/editor/uib-sender/panel.html | 2 +- typedefs.js | 1 + 3 files changed, 53 insertions(+), 9 deletions(-) diff --git a/src/editor/uib-sender/editor.js b/src/editor/uib-sender/editor.js index d018ac92..757338fd 100644 --- a/src/editor/uib-sender/editor.js +++ b/src/editor/uib-sender/editor.js @@ -14,6 +14,9 @@ /** Node's background color @constant {string} paletteColor */ const paletteColor = '#E6E0F8' + /** Copy of all deployed uibuilder node instances */ + let uibInstances = null + /** Get all of the current uibuilder URL's */ function getUrls() { $.ajax({ @@ -25,12 +28,15 @@ 'cmd': 'listinstances', }, success: function(instances) { - // console.log('>>>>', instances) + console.log('>> Instances >>', instances, Object.entries(instances) ) + + uibInstances = instances - Object.keys(instances).forEach( (val, i, arr) => { + Object.keys(instances).forEach( (key, i, arr) => { $('#node-input-url').append($('