Bug fixed, deleting UIObjects while not connected over websockets
This commit is contained in:
1 parent
5a7f84afe3
commit
6c65700893
5 files changed
+19
-6
No files matched your search
+1
-1
@@ -2754,7 +2754,7 @@
|
||||
"action": "Delete UI Object",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"label": "Delete Process Dependencies",
|
||||
"label": "Delete Dependencies",
|
||||
"iconPathOn": "delete",
|
||||
"iconPathOff": "delete",
|
||||
"actionFunction": "payload.onMenuItemClick"
|
||||
|
||||
@@ -279,7 +279,11 @@ function newCircularMenuItem () {
|
||||
/* A Click during confirmation executes the pre-defined action. */
|
||||
if (temporaryStatus === STATUS_WAITING_CONFIRMATION || temporaryStatus === STATUS_PRIMARY_WORK_DONE) {
|
||||
executeAction()
|
||||
setStatus(thisObject.workDoneLabel, UI_COLOR.PATINATED_TURQUOISE, 100, STATUS_SECONDARY_WORK_DONE)
|
||||
if (thisObject.workDoneLabel !== undefined) {
|
||||
setStatus(thisObject.workDoneLabel, UI_COLOR.PATINATED_TURQUOISE, 100, STATUS_SECONDARY_WORK_DONE)
|
||||
} else {
|
||||
setStatus('Done', UI_COLOR.PATINATED_TURQUOISE, 100, STATUS_SECONDARY_WORK_DONE)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,9 @@ function newCircularProgressBar () {
|
||||
|
||||
function finalize () {
|
||||
let key = thisObject.payload.node.name + '-' + thisObject.payload.node.type + '-' + thisObject.payload.node.id
|
||||
systemEventHandler.stopListening(key, eventSubscriptionIdHeartbeat)
|
||||
if (eventSubscriptionIdHeartbeat !== undefined) {
|
||||
systemEventHandler.stopListening(key, eventSubscriptionIdHeartbeat)
|
||||
}
|
||||
|
||||
thisObject.container = undefined
|
||||
thisObject.payload = undefined
|
||||
|
||||
@@ -120,8 +120,13 @@ function newUiObject () {
|
||||
|
||||
function finalize () {
|
||||
let key = thisObject.payload.node.name + '-' + thisObject.payload.node.type + '-' + thisObject.payload.node.id
|
||||
systemEventHandler.stopListening(key, eventSubscriptionIdOnRunning, 'UiObject')
|
||||
systemEventHandler.stopListening(key, eventSubscriptionIdOnStopped, 'UiObject')
|
||||
|
||||
if (eventSubscriptionIdOnRunning !== undefined) {
|
||||
systemEventHandler.stopListening(key, eventSubscriptionIdOnRunning, 'UiObject')
|
||||
}
|
||||
if (eventSubscriptionIdOnStopped !== undefined) {
|
||||
systemEventHandler.stopListening(key, eventSubscriptionIdOnStopped, 'UiObject')
|
||||
}
|
||||
|
||||
thisObject.container.eventHandler.stopListening(selfFocusEventSubscriptionId)
|
||||
thisObject.container.eventHandler.stopListening(selfNotFocusEventSubscriptionId)
|
||||
|
||||
@@ -44,7 +44,9 @@ function newSystemEventHandler () {
|
||||
responseWaiters.set(command.callerId, responseCallBack)
|
||||
}
|
||||
|
||||
WEB_SOCKETS_CONNECTION.send(JSON.stringify(command))
|
||||
if (WEB_SOCKETS_CONNECTION.readyState === 1) { // 1 means connected and ready.
|
||||
WEB_SOCKETS_CONNECTION.send(JSON.stringify(command))
|
||||
}
|
||||
}
|
||||
|
||||
function createEventHandler (eventHandlerName, callerId, responseCallBack) {
|
||||
|
||||
Reference in new issue
Block a user