@xuda.io/runtime-bundle 1.0.961 → 1.0.963
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js/xuda-runtime-bundle.js +148 -39
- package/js/xuda-runtime-bundle.min.js +2 -2
- package/js/xuda-runtime-slim.js +148 -39
- package/js/xuda-runtime-slim.min.es.js +148 -39
- package/js/xuda-runtime-slim.min.js +2 -2
- package/js/xuda-server-bundle.min.mjs +2 -2
- package/js/xuda-server-bundle.mjs +3 -3
- package/js/xuda-worker-bundle.js +3 -3
- package/js/xuda-worker-bundle.min.js +2 -2
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -4655,7 +4655,7 @@ func.datasource.del = function (SESSION_ID, dsP) {
|
|
|
4655
4655
|
perform_delete();
|
|
4656
4656
|
};
|
|
4657
4657
|
|
|
4658
|
-
func.datasource.update = async function (SESSION_ID, datasource_changes, update_local_scope_only, avoid_xu_for_refresh) {
|
|
4658
|
+
func.datasource.update = async function (SESSION_ID, datasource_changes, update_local_scope_only, avoid_xu_for_refresh, trigger) {
|
|
4659
4659
|
return new Promise(async (resolve, reject) => {
|
|
4660
4660
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
4661
4661
|
|
|
@@ -4864,7 +4864,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4864
4864
|
return Math.min(...arr.map(Number));
|
|
4865
4865
|
}
|
|
4866
4866
|
|
|
4867
|
-
await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, findMin(datasource_changed), avoid_xu_for_refresh);
|
|
4867
|
+
await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, findMin(datasource_changed), avoid_xu_for_refresh, trigger);
|
|
4868
4868
|
// await removed from the below function cause to dead lock Mar 3 25
|
|
4869
4869
|
await func.UI.screen.refresh_screen(
|
|
4870
4870
|
SESSION_ID,
|
|
@@ -8357,34 +8357,141 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8357
8357
|
|
|
8358
8358
|
let last_job_in_queue = 0;
|
|
8359
8359
|
// let run_stat;
|
|
8360
|
+
// const job_iterator = async function () {
|
|
8361
|
+
// let from_job_num_to_run = last_job_in_queue;
|
|
8362
|
+
// last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
|
|
8363
|
+
|
|
8364
|
+
// if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8365
|
+
// // idle
|
|
8366
|
+
// this.attempt = 0;
|
|
8367
|
+
// if (UI_WORKER_OBJ.jobs.length) {
|
|
8368
|
+
// // clearInterval(this._interval);
|
|
8369
|
+
// for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8370
|
+
// // if (val.job_num < from_job_num_to_run) continue;
|
|
8371
|
+
// try {
|
|
8372
|
+
// if (val.stat) {
|
|
8373
|
+
// break;
|
|
8374
|
+
// }
|
|
8375
|
+
|
|
8376
|
+
// await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8377
|
+
// // break;
|
|
8378
|
+
// } catch (err) {
|
|
8379
|
+
// console.error(err);
|
|
8380
|
+
// }
|
|
8381
|
+
// }
|
|
8382
|
+
// }
|
|
8383
|
+
// } else {
|
|
8384
|
+
// //busy
|
|
8385
|
+
|
|
8386
|
+
// this.attempt++;
|
|
8387
|
+
// }
|
|
8388
|
+
// };
|
|
8389
|
+
|
|
8360
8390
|
const job_iterator = async function () {
|
|
8361
8391
|
let from_job_num_to_run = last_job_in_queue;
|
|
8362
8392
|
last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
|
|
8363
8393
|
|
|
8364
|
-
if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8394
|
+
// if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8395
|
+
// idle
|
|
8396
|
+
this.attempt = 0;
|
|
8397
|
+
if (UI_WORKER_OBJ.jobs.length) {
|
|
8398
|
+
let running_job_children_elements = [];
|
|
8399
|
+
let active_job_children_elements = [];
|
|
8400
|
+
for (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8401
|
+
try {
|
|
8402
|
+
if (val.stat === 'busy') continue;
|
|
8403
|
+
|
|
8404
|
+
if (!val.elementP) {
|
|
8405
|
+
func.UI.worker.execute(val.SESSION_ID, val);
|
|
8406
|
+
continue;
|
|
8407
|
+
}
|
|
8408
|
+
|
|
8409
|
+
const active_xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8410
|
+
if (!active_xu_ui_id) continue;
|
|
8375
8411
|
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8412
|
+
const running_job_obj = UI_WORKER_OBJ.jobs[0];
|
|
8413
|
+
|
|
8414
|
+
const running_xu_ui_id = running_job_obj?.elementP?.attr('xu-ui-id');
|
|
8415
|
+
if (!running_xu_ui_id) continue;
|
|
8416
|
+
|
|
8417
|
+
$.each(running_job_obj.elementP.find('*'), function (key, val) {
|
|
8418
|
+
const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8419
|
+
if (!xu_ui_id) return true;
|
|
8420
|
+
running_job_children_elements.push(xu_ui_id);
|
|
8421
|
+
});
|
|
8422
|
+
|
|
8423
|
+
$.each(val.elementP.find('*'), function (key, val) {
|
|
8424
|
+
const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8425
|
+
if (!xu_ui_id) return true;
|
|
8426
|
+
active_job_children_elements.push(xu_ui_id);
|
|
8427
|
+
});
|
|
8428
|
+
|
|
8429
|
+
// skip - if job element exist in the active job ui as child element
|
|
8430
|
+
if (running_job_children_elements.includes(active_xu_ui_id)) {
|
|
8431
|
+
continue;
|
|
8380
8432
|
}
|
|
8433
|
+
|
|
8434
|
+
// abort - if active job element exist in the current job ui (parent element changed)
|
|
8435
|
+
if (active_job_children_elements.includes(running_xu_ui_id)) {
|
|
8436
|
+
$.each(active_job_children_elements, function (key, val) {
|
|
8437
|
+
const $elm = $(`[xu-ui-id=${val}]`);
|
|
8438
|
+
if (!$elm.length) return true;
|
|
8439
|
+
if (!$elm.data().xuData) return true;
|
|
8440
|
+
$elm.data().xuData.pending_to_delete = true;
|
|
8441
|
+
});
|
|
8442
|
+
|
|
8443
|
+
func.UI.worker.delete_job(SESSION_ID, running_job_obj.job_num);
|
|
8444
|
+
break;
|
|
8445
|
+
}
|
|
8446
|
+
|
|
8447
|
+
// execute - if active job element not exist the current job ui and not detected as parent element
|
|
8448
|
+
func.UI.worker.execute(val.SESSION_ID, val);
|
|
8449
|
+
continue;
|
|
8450
|
+
|
|
8451
|
+
// active_job_children_elements = [];
|
|
8452
|
+
// if (val.elementP) {
|
|
8453
|
+
// // get active_job children elements only if job handle ui job (not update)
|
|
8454
|
+
// $.each(val.elementP.find('*'), function (key, val) {
|
|
8455
|
+
// const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8456
|
+
// if (!xu_ui_id) return true;
|
|
8457
|
+
// active_job_children_elements.push(xu_ui_id);
|
|
8458
|
+
// });
|
|
8459
|
+
// func.UI.worker.execute(val.SESSION_ID, val);
|
|
8460
|
+
// continue;
|
|
8461
|
+
// } else {
|
|
8462
|
+
// // non ui job
|
|
8463
|
+
// await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8464
|
+
// break;
|
|
8465
|
+
// }
|
|
8466
|
+
|
|
8467
|
+
// if (UI_WORKER_OBJ.jobs.length > 1 && val.elementP) {
|
|
8468
|
+
// const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8469
|
+
// if (!xu_ui_id) continue;
|
|
8470
|
+
// // skip - if job element exist in the active job ui as child element
|
|
8471
|
+
// if (active_job_children_elements.includes(xu_ui_id)) {
|
|
8472
|
+
// continue;
|
|
8473
|
+
// }
|
|
8474
|
+
// // abort - if active job element exist in the current job ui (parent element changed)
|
|
8475
|
+
// $.each(val.elementP.find('*'), function (key, val) {
|
|
8476
|
+
// const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8477
|
+
// if (!xu_ui_id) return true;
|
|
8478
|
+
// active_job_children_elements.push(xu_ui_id);
|
|
8479
|
+
// });
|
|
8480
|
+
// // execute - if active job element not exist the current job ui and not detected as parent element
|
|
8481
|
+
// const active_job = UI_WORKER_OBJ.jobs[0];
|
|
8482
|
+
// }
|
|
8483
|
+
|
|
8484
|
+
// break;
|
|
8485
|
+
} catch (err) {
|
|
8486
|
+
console.error(err);
|
|
8381
8487
|
}
|
|
8382
8488
|
}
|
|
8383
|
-
} else {
|
|
8384
|
-
//busy
|
|
8385
|
-
|
|
8386
|
-
this.attempt++;
|
|
8387
8489
|
}
|
|
8490
|
+
// } else {
|
|
8491
|
+
// //busy
|
|
8492
|
+
|
|
8493
|
+
// this.attempt++;
|
|
8494
|
+
// }
|
|
8388
8495
|
};
|
|
8389
8496
|
|
|
8390
8497
|
this._interval = setInterval(job_iterator, 1);
|
|
@@ -8471,7 +8578,7 @@ func.UI.worker.delete_job = async function (SESSION_ID, jobNoP) {
|
|
|
8471
8578
|
var job_index = func.UI.worker.find_job_index(SESSION_ID, jobNoP);
|
|
8472
8579
|
|
|
8473
8580
|
if (!UI_WORKER_OBJ.jobs[job_index]) {
|
|
8474
|
-
UI_WORKER_OBJ.stat = null;
|
|
8581
|
+
// UI_WORKER_OBJ.stat = null;
|
|
8475
8582
|
return;
|
|
8476
8583
|
}
|
|
8477
8584
|
|
|
@@ -8483,20 +8590,20 @@ func.UI.worker.delete_job = async function (SESSION_ID, jobNoP) {
|
|
|
8483
8590
|
if (dsSession && ds_obj?.loops_limit && ds_obj?.loops_count < ds_obj?.loops_limit - 1) {
|
|
8484
8591
|
return;
|
|
8485
8592
|
}
|
|
8486
|
-
UI_WORKER_OBJ.stat = null;
|
|
8593
|
+
// UI_WORKER_OBJ.stat = null;
|
|
8487
8594
|
|
|
8488
8595
|
UI_WORKER_OBJ.jobs.splice(job_index, 1);
|
|
8489
8596
|
};
|
|
8490
8597
|
func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
8491
8598
|
var job_index = func.UI.worker.find_job_index(SESSION_ID, queue_obj.job_num);
|
|
8492
|
-
if (UI_WORKER_OBJ.jobs?.[job_index]?.stat === 'busy') {
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
}
|
|
8496
|
-
if (queue_obj.jobNoP && !UI_WORKER_OBJ.jobs[job_index]) {
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
}
|
|
8599
|
+
// if (UI_WORKER_OBJ.jobs?.[job_index]?.stat === 'busy') {
|
|
8600
|
+
// if (queue_obj.jobNoP) UI_WORKER_OBJ.stat = job_index;
|
|
8601
|
+
// return;
|
|
8602
|
+
// }
|
|
8603
|
+
// if (queue_obj.jobNoP && !UI_WORKER_OBJ.jobs[job_index]) {
|
|
8604
|
+
// UI_WORKER_OBJ.stat = null;
|
|
8605
|
+
// return;
|
|
8606
|
+
// }
|
|
8500
8607
|
|
|
8501
8608
|
if (queue_obj.jobNoP) UI_WORKER_OBJ.stat = job_index;
|
|
8502
8609
|
if (UI_WORKER_OBJ.jobs[job_index]) {
|
|
@@ -9759,7 +9866,7 @@ func.events.execute = async function (
|
|
|
9759
9866
|
}
|
|
9760
9867
|
}
|
|
9761
9868
|
|
|
9762
|
-
await func.datasource.update(SESSION_ID, datasource_changes);
|
|
9869
|
+
await func.datasource.update(SESSION_ID, datasource_changes, null, null, triggerP);
|
|
9763
9870
|
|
|
9764
9871
|
if (_ds.PARAM_OUT_INFO) {
|
|
9765
9872
|
for await (const [key, val] of Object.entries(_ds.PARAM_OUT_INFO)) {
|
|
@@ -11326,13 +11433,15 @@ func.UI.screen.call_embed = function (SESSION_ID, prog) {
|
|
|
11326
11433
|
});
|
|
11327
11434
|
func.UI.main.embed_prog_execute(SESSION_ID, prog);
|
|
11328
11435
|
};
|
|
11329
|
-
func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed, avoid_xu_for_refresh) {
|
|
11330
|
-
if (
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11436
|
+
func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed, avoid_xu_for_refresh, trigger) {
|
|
11437
|
+
if (trigger !== 'click') {
|
|
11438
|
+
if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
|
|
11439
|
+
// let dom to finish
|
|
11440
|
+
setTimeout(() => {
|
|
11441
|
+
func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed);
|
|
11442
|
+
}, 100);
|
|
11443
|
+
return;
|
|
11444
|
+
}
|
|
11336
11445
|
}
|
|
11337
11446
|
|
|
11338
11447
|
UI_WORKER_OBJ.cache = {};
|
|
@@ -4656,7 +4656,7 @@ func.datasource.del = function (SESSION_ID, dsP) {
|
|
|
4656
4656
|
perform_delete();
|
|
4657
4657
|
};
|
|
4658
4658
|
|
|
4659
|
-
func.datasource.update = async function (SESSION_ID, datasource_changes, update_local_scope_only, avoid_xu_for_refresh) {
|
|
4659
|
+
func.datasource.update = async function (SESSION_ID, datasource_changes, update_local_scope_only, avoid_xu_for_refresh, trigger) {
|
|
4660
4660
|
return new Promise(async (resolve, reject) => {
|
|
4661
4661
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
4662
4662
|
|
|
@@ -4865,7 +4865,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4865
4865
|
return Math.min(...arr.map(Number));
|
|
4866
4866
|
}
|
|
4867
4867
|
|
|
4868
|
-
await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, findMin(datasource_changed), avoid_xu_for_refresh);
|
|
4868
|
+
await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, findMin(datasource_changed), avoid_xu_for_refresh, trigger);
|
|
4869
4869
|
// await removed from the below function cause to dead lock Mar 3 25
|
|
4870
4870
|
await func.UI.screen.refresh_screen(
|
|
4871
4871
|
SESSION_ID,
|
|
@@ -8358,34 +8358,141 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8358
8358
|
|
|
8359
8359
|
let last_job_in_queue = 0;
|
|
8360
8360
|
// let run_stat;
|
|
8361
|
+
// const job_iterator = async function () {
|
|
8362
|
+
// let from_job_num_to_run = last_job_in_queue;
|
|
8363
|
+
// last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
|
|
8364
|
+
|
|
8365
|
+
// if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8366
|
+
// // idle
|
|
8367
|
+
// this.attempt = 0;
|
|
8368
|
+
// if (UI_WORKER_OBJ.jobs.length) {
|
|
8369
|
+
// // clearInterval(this._interval);
|
|
8370
|
+
// for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8371
|
+
// // if (val.job_num < from_job_num_to_run) continue;
|
|
8372
|
+
// try {
|
|
8373
|
+
// if (val.stat) {
|
|
8374
|
+
// break;
|
|
8375
|
+
// }
|
|
8376
|
+
|
|
8377
|
+
// await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8378
|
+
// // break;
|
|
8379
|
+
// } catch (err) {
|
|
8380
|
+
// console.error(err);
|
|
8381
|
+
// }
|
|
8382
|
+
// }
|
|
8383
|
+
// }
|
|
8384
|
+
// } else {
|
|
8385
|
+
// //busy
|
|
8386
|
+
|
|
8387
|
+
// this.attempt++;
|
|
8388
|
+
// }
|
|
8389
|
+
// };
|
|
8390
|
+
|
|
8361
8391
|
const job_iterator = async function () {
|
|
8362
8392
|
let from_job_num_to_run = last_job_in_queue;
|
|
8363
8393
|
last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
|
|
8364
8394
|
|
|
8365
|
-
if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8395
|
+
// if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8396
|
+
// idle
|
|
8397
|
+
this.attempt = 0;
|
|
8398
|
+
if (UI_WORKER_OBJ.jobs.length) {
|
|
8399
|
+
let running_job_children_elements = [];
|
|
8400
|
+
let active_job_children_elements = [];
|
|
8401
|
+
for (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8402
|
+
try {
|
|
8403
|
+
if (val.stat === 'busy') continue;
|
|
8404
|
+
|
|
8405
|
+
if (!val.elementP) {
|
|
8406
|
+
func.UI.worker.execute(val.SESSION_ID, val);
|
|
8407
|
+
continue;
|
|
8408
|
+
}
|
|
8409
|
+
|
|
8410
|
+
const active_xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8411
|
+
if (!active_xu_ui_id) continue;
|
|
8376
8412
|
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8413
|
+
const running_job_obj = UI_WORKER_OBJ.jobs[0];
|
|
8414
|
+
|
|
8415
|
+
const running_xu_ui_id = running_job_obj?.elementP?.attr('xu-ui-id');
|
|
8416
|
+
if (!running_xu_ui_id) continue;
|
|
8417
|
+
|
|
8418
|
+
$.each(running_job_obj.elementP.find('*'), function (key, val) {
|
|
8419
|
+
const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8420
|
+
if (!xu_ui_id) return true;
|
|
8421
|
+
running_job_children_elements.push(xu_ui_id);
|
|
8422
|
+
});
|
|
8423
|
+
|
|
8424
|
+
$.each(val.elementP.find('*'), function (key, val) {
|
|
8425
|
+
const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8426
|
+
if (!xu_ui_id) return true;
|
|
8427
|
+
active_job_children_elements.push(xu_ui_id);
|
|
8428
|
+
});
|
|
8429
|
+
|
|
8430
|
+
// skip - if job element exist in the active job ui as child element
|
|
8431
|
+
if (running_job_children_elements.includes(active_xu_ui_id)) {
|
|
8432
|
+
continue;
|
|
8381
8433
|
}
|
|
8434
|
+
|
|
8435
|
+
// abort - if active job element exist in the current job ui (parent element changed)
|
|
8436
|
+
if (active_job_children_elements.includes(running_xu_ui_id)) {
|
|
8437
|
+
$.each(active_job_children_elements, function (key, val) {
|
|
8438
|
+
const $elm = $(`[xu-ui-id=${val}]`);
|
|
8439
|
+
if (!$elm.length) return true;
|
|
8440
|
+
if (!$elm.data().xuData) return true;
|
|
8441
|
+
$elm.data().xuData.pending_to_delete = true;
|
|
8442
|
+
});
|
|
8443
|
+
|
|
8444
|
+
func.UI.worker.delete_job(SESSION_ID, running_job_obj.job_num);
|
|
8445
|
+
break;
|
|
8446
|
+
}
|
|
8447
|
+
|
|
8448
|
+
// execute - if active job element not exist the current job ui and not detected as parent element
|
|
8449
|
+
func.UI.worker.execute(val.SESSION_ID, val);
|
|
8450
|
+
continue;
|
|
8451
|
+
|
|
8452
|
+
// active_job_children_elements = [];
|
|
8453
|
+
// if (val.elementP) {
|
|
8454
|
+
// // get active_job children elements only if job handle ui job (not update)
|
|
8455
|
+
// $.each(val.elementP.find('*'), function (key, val) {
|
|
8456
|
+
// const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8457
|
+
// if (!xu_ui_id) return true;
|
|
8458
|
+
// active_job_children_elements.push(xu_ui_id);
|
|
8459
|
+
// });
|
|
8460
|
+
// func.UI.worker.execute(val.SESSION_ID, val);
|
|
8461
|
+
// continue;
|
|
8462
|
+
// } else {
|
|
8463
|
+
// // non ui job
|
|
8464
|
+
// await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8465
|
+
// break;
|
|
8466
|
+
// }
|
|
8467
|
+
|
|
8468
|
+
// if (UI_WORKER_OBJ.jobs.length > 1 && val.elementP) {
|
|
8469
|
+
// const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8470
|
+
// if (!xu_ui_id) continue;
|
|
8471
|
+
// // skip - if job element exist in the active job ui as child element
|
|
8472
|
+
// if (active_job_children_elements.includes(xu_ui_id)) {
|
|
8473
|
+
// continue;
|
|
8474
|
+
// }
|
|
8475
|
+
// // abort - if active job element exist in the current job ui (parent element changed)
|
|
8476
|
+
// $.each(val.elementP.find('*'), function (key, val) {
|
|
8477
|
+
// const xu_ui_id = val.elementP.attr('xu-ui-id');
|
|
8478
|
+
// if (!xu_ui_id) return true;
|
|
8479
|
+
// active_job_children_elements.push(xu_ui_id);
|
|
8480
|
+
// });
|
|
8481
|
+
// // execute - if active job element not exist the current job ui and not detected as parent element
|
|
8482
|
+
// const active_job = UI_WORKER_OBJ.jobs[0];
|
|
8483
|
+
// }
|
|
8484
|
+
|
|
8485
|
+
// break;
|
|
8486
|
+
} catch (err) {
|
|
8487
|
+
console.error(err);
|
|
8382
8488
|
}
|
|
8383
8489
|
}
|
|
8384
|
-
} else {
|
|
8385
|
-
//busy
|
|
8386
|
-
|
|
8387
|
-
this.attempt++;
|
|
8388
8490
|
}
|
|
8491
|
+
// } else {
|
|
8492
|
+
// //busy
|
|
8493
|
+
|
|
8494
|
+
// this.attempt++;
|
|
8495
|
+
// }
|
|
8389
8496
|
};
|
|
8390
8497
|
|
|
8391
8498
|
this._interval = setInterval(job_iterator, 1);
|
|
@@ -8472,7 +8579,7 @@ func.UI.worker.delete_job = async function (SESSION_ID, jobNoP) {
|
|
|
8472
8579
|
var job_index = func.UI.worker.find_job_index(SESSION_ID, jobNoP);
|
|
8473
8580
|
|
|
8474
8581
|
if (!UI_WORKER_OBJ.jobs[job_index]) {
|
|
8475
|
-
UI_WORKER_OBJ.stat = null;
|
|
8582
|
+
// UI_WORKER_OBJ.stat = null;
|
|
8476
8583
|
return;
|
|
8477
8584
|
}
|
|
8478
8585
|
|
|
@@ -8484,20 +8591,20 @@ func.UI.worker.delete_job = async function (SESSION_ID, jobNoP) {
|
|
|
8484
8591
|
if (dsSession && ds_obj?.loops_limit && ds_obj?.loops_count < ds_obj?.loops_limit - 1) {
|
|
8485
8592
|
return;
|
|
8486
8593
|
}
|
|
8487
|
-
UI_WORKER_OBJ.stat = null;
|
|
8594
|
+
// UI_WORKER_OBJ.stat = null;
|
|
8488
8595
|
|
|
8489
8596
|
UI_WORKER_OBJ.jobs.splice(job_index, 1);
|
|
8490
8597
|
};
|
|
8491
8598
|
func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
8492
8599
|
var job_index = func.UI.worker.find_job_index(SESSION_ID, queue_obj.job_num);
|
|
8493
|
-
if (UI_WORKER_OBJ.jobs?.[job_index]?.stat === 'busy') {
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
}
|
|
8497
|
-
if (queue_obj.jobNoP && !UI_WORKER_OBJ.jobs[job_index]) {
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
}
|
|
8600
|
+
// if (UI_WORKER_OBJ.jobs?.[job_index]?.stat === 'busy') {
|
|
8601
|
+
// if (queue_obj.jobNoP) UI_WORKER_OBJ.stat = job_index;
|
|
8602
|
+
// return;
|
|
8603
|
+
// }
|
|
8604
|
+
// if (queue_obj.jobNoP && !UI_WORKER_OBJ.jobs[job_index]) {
|
|
8605
|
+
// UI_WORKER_OBJ.stat = null;
|
|
8606
|
+
// return;
|
|
8607
|
+
// }
|
|
8501
8608
|
|
|
8502
8609
|
if (queue_obj.jobNoP) UI_WORKER_OBJ.stat = job_index;
|
|
8503
8610
|
if (UI_WORKER_OBJ.jobs[job_index]) {
|
|
@@ -9053,13 +9160,15 @@ func.UI.screen.call_embed = function (SESSION_ID, prog) {
|
|
|
9053
9160
|
});
|
|
9054
9161
|
func.UI.main.embed_prog_execute(SESSION_ID, prog);
|
|
9055
9162
|
};
|
|
9056
|
-
func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed, avoid_xu_for_refresh) {
|
|
9057
|
-
if (
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9163
|
+
func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed, avoid_xu_for_refresh, trigger) {
|
|
9164
|
+
if (trigger !== 'click') {
|
|
9165
|
+
if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
|
|
9166
|
+
// let dom to finish
|
|
9167
|
+
setTimeout(() => {
|
|
9168
|
+
func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed);
|
|
9169
|
+
}, 100);
|
|
9170
|
+
return;
|
|
9171
|
+
}
|
|
9063
9172
|
}
|
|
9064
9173
|
|
|
9065
9174
|
UI_WORKER_OBJ.cache = {};
|
|
@@ -13857,7 +13966,7 @@ func.events.execute = async function (
|
|
|
13857
13966
|
}
|
|
13858
13967
|
}
|
|
13859
13968
|
|
|
13860
|
-
await func.datasource.update(SESSION_ID, datasource_changes);
|
|
13969
|
+
await func.datasource.update(SESSION_ID, datasource_changes, null, null, triggerP);
|
|
13861
13970
|
|
|
13862
13971
|
if (_ds.PARAM_OUT_INFO) {
|
|
13863
13972
|
for await (const [key, val] of Object.entries(_ds.PARAM_OUT_INFO)) {
|