@hpcc-js/comms 3.7.7 → 3.8.1
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/dist/browser/index.js +359 -384
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +1 -1
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +57 -57
- package/dist/node/index.cjs.map +4 -4
- package/dist/node/index.js +57 -57
- package/dist/node/index.js.map +4 -4
- package/package.json +7 -7
- package/src/__package__.ts +2 -2
- package/src/ecl/result.ts +12 -3
- package/types/__package__.d.ts +2 -2
- package/types/ecl/result.d.ts +4 -2
package/dist/browser/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
3
|
import { scopedLogger, join, promiseTimeout, exists, deepMixin, xml2json, StateObject, Cache, Graph, Subgraph as Subgraph$1, Vertex as Vertex$1, Edge as Edge$1, SAXStackParser, Stack, espTime2Seconds as espTime2Seconds$1, deepMixinT, XMLNode, debounce, Message, Dispatch } from "@hpcc-js/util";
|
|
6
4
|
const PKG_NAME = "@hpcc-js/comms";
|
|
7
|
-
const PKG_VERSION = "3.
|
|
8
|
-
const BUILD_VERSION = "3.
|
|
5
|
+
const PKG_VERSION = "3.8.0";
|
|
6
|
+
const BUILD_VERSION = "3.11.1";
|
|
9
7
|
const logger$6 = scopedLogger("comms/connection.ts");
|
|
10
8
|
function instanceOfIOptions(object) {
|
|
11
9
|
return "baseUrl" in object;
|
|
@@ -221,13 +219,13 @@ function hookSend(newSend) {
|
|
|
221
219
|
}
|
|
222
220
|
__name(hookSend, "hookSend");
|
|
223
221
|
const _Connection = class _Connection {
|
|
224
|
-
|
|
225
|
-
__publicField(this, "_opts");
|
|
226
|
-
this.opts(opts);
|
|
227
|
-
}
|
|
222
|
+
_opts;
|
|
228
223
|
get baseUrl() {
|
|
229
224
|
return this._opts.baseUrl;
|
|
230
225
|
}
|
|
226
|
+
constructor(opts) {
|
|
227
|
+
this.opts(opts);
|
|
228
|
+
}
|
|
231
229
|
opts(_) {
|
|
232
230
|
if (arguments.length === 0) return this._opts;
|
|
233
231
|
this._opts = { ...DefaultOptions, ..._ };
|
|
@@ -259,13 +257,13 @@ function isArray(arg) {
|
|
|
259
257
|
}
|
|
260
258
|
__name(isArray, "isArray");
|
|
261
259
|
const _ESPExceptions = class _ESPExceptions extends Error {
|
|
260
|
+
isESPExceptions = true;
|
|
261
|
+
action;
|
|
262
|
+
request;
|
|
263
|
+
Source;
|
|
264
|
+
Exception;
|
|
262
265
|
constructor(action, request, exceptions) {
|
|
263
266
|
super("ESPException: " + exceptions.Source);
|
|
264
|
-
__publicField(this, "isESPExceptions", true);
|
|
265
|
-
__publicField(this, "action");
|
|
266
|
-
__publicField(this, "request");
|
|
267
|
-
__publicField(this, "Source");
|
|
268
|
-
__publicField(this, "Exception");
|
|
269
267
|
this.action = action;
|
|
270
268
|
this.request = request;
|
|
271
269
|
this.Source = exceptions.Source;
|
|
@@ -288,17 +286,17 @@ function isConnection(optsConnection) {
|
|
|
288
286
|
}
|
|
289
287
|
__name(isConnection, "isConnection");
|
|
290
288
|
const _ESPConnection = class _ESPConnection {
|
|
289
|
+
_connection;
|
|
290
|
+
get baseUrl() {
|
|
291
|
+
return this._connection.opts().baseUrl;
|
|
292
|
+
}
|
|
293
|
+
_service;
|
|
294
|
+
_version;
|
|
291
295
|
constructor(optsConnection, service, version) {
|
|
292
|
-
__publicField(this, "_connection");
|
|
293
|
-
__publicField(this, "_service");
|
|
294
|
-
__publicField(this, "_version");
|
|
295
296
|
this._connection = isConnection(optsConnection) ? optsConnection : createConnection(optsConnection);
|
|
296
297
|
this._service = service;
|
|
297
298
|
this._version = version;
|
|
298
299
|
}
|
|
299
|
-
get baseUrl() {
|
|
300
|
-
return this._connection.opts().baseUrl;
|
|
301
|
-
}
|
|
302
300
|
service(_) {
|
|
303
301
|
if (_ === void 0) return this._service;
|
|
304
302
|
this._service = _;
|
|
@@ -377,13 +375,13 @@ const _ESPConnection = class _ESPConnection {
|
|
|
377
375
|
__name(_ESPConnection, "ESPConnection");
|
|
378
376
|
let ESPConnection = _ESPConnection;
|
|
379
377
|
const _Service = class _Service {
|
|
380
|
-
|
|
381
|
-
__publicField(this, "_connection");
|
|
382
|
-
this._connection = new ESPConnection(optsConnection, service, version);
|
|
383
|
-
}
|
|
378
|
+
_connection;
|
|
384
379
|
get baseUrl() {
|
|
385
380
|
return this._connection.opts().baseUrl;
|
|
386
381
|
}
|
|
382
|
+
constructor(optsConnection, service, version) {
|
|
383
|
+
this._connection = new ESPConnection(optsConnection, service, version);
|
|
384
|
+
}
|
|
387
385
|
opts() {
|
|
388
386
|
return this._connection.opts();
|
|
389
387
|
}
|
|
@@ -791,14 +789,12 @@ __name(_CloudServiceBase, "CloudServiceBase");
|
|
|
791
789
|
let CloudServiceBase = _CloudServiceBase;
|
|
792
790
|
const logger$5 = scopedLogger("@hpcc-js/comms/services/wsCloud.ts");
|
|
793
791
|
function isGetPODsResponse_v1_02(response) {
|
|
794
|
-
return
|
|
792
|
+
return response?.Pods !== void 0;
|
|
795
793
|
}
|
|
796
794
|
__name(isGetPODsResponse_v1_02, "isGetPODsResponse_v1_02");
|
|
797
795
|
function mapPorts(pod) {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
var _a2;
|
|
801
|
-
(_a2 = curr.ports) == null ? void 0 : _a2.forEach((p) => {
|
|
796
|
+
return pod.spec?.containers?.reduce((prev, curr) => {
|
|
797
|
+
curr.ports?.forEach((p) => {
|
|
802
798
|
prev.push({
|
|
803
799
|
ContainerPort: p.containerPort,
|
|
804
800
|
Name: p.name,
|
|
@@ -806,30 +802,28 @@ function mapPorts(pod) {
|
|
|
806
802
|
});
|
|
807
803
|
});
|
|
808
804
|
return prev;
|
|
809
|
-
}, [])
|
|
805
|
+
}, []) ?? [];
|
|
810
806
|
}
|
|
811
807
|
__name(mapPorts, "mapPorts");
|
|
812
808
|
function mapPods(pods) {
|
|
813
809
|
return pods.filter((pod) => {
|
|
814
|
-
|
|
815
|
-
const labels = ((_a = pod == null ? void 0 : pod.metadata) == null ? void 0 : _a.labels) ?? {};
|
|
810
|
+
const labels = pod?.metadata?.labels ?? {};
|
|
816
811
|
return labels.hasOwnProperty("app.kubernetes.io/part-of") && labels["app.kubernetes.io/part-of"] === "HPCC-Platform";
|
|
817
812
|
}).map((pod) => {
|
|
818
|
-
|
|
819
|
-
const started = new Date((_a = pod.metadata) == null ? void 0 : _a.creationTimestamp);
|
|
813
|
+
const started = new Date(pod.metadata?.creationTimestamp);
|
|
820
814
|
return {
|
|
821
815
|
Name: pod.metadata.name,
|
|
822
|
-
Status:
|
|
816
|
+
Status: pod.status?.phase,
|
|
823
817
|
CreationTimestamp: started.toISOString(),
|
|
824
|
-
ContainerName:
|
|
818
|
+
ContainerName: pod.status?.containerStatuses?.reduce((prev, curr) => {
|
|
825
819
|
if (curr.name) {
|
|
826
820
|
prev.push(curr.name);
|
|
827
821
|
}
|
|
828
822
|
return prev;
|
|
829
|
-
}, []).join(", ")
|
|
830
|
-
ContainerCount:
|
|
831
|
-
ContainerReadyCount:
|
|
832
|
-
ContainerRestartCount:
|
|
823
|
+
}, []).join(", ") ?? "",
|
|
824
|
+
ContainerCount: pod.spec?.containers?.length ?? 0,
|
|
825
|
+
ContainerReadyCount: pod.status?.containerStatuses?.reduce((prev, curr) => prev + (curr.ready ? 1 : 0), 0),
|
|
826
|
+
ContainerRestartCount: pod.status?.containerStatuses?.reduce((prev, curr) => prev + curr.restartCount, 0),
|
|
833
827
|
Ports: {
|
|
834
828
|
Port: mapPorts(pod)
|
|
835
829
|
}
|
|
@@ -840,13 +834,12 @@ __name(mapPods, "mapPods");
|
|
|
840
834
|
const _CloudService = class _CloudService extends CloudServiceBase {
|
|
841
835
|
getPODs() {
|
|
842
836
|
return super.GetPODs({}).then((response) => {
|
|
843
|
-
var _a;
|
|
844
837
|
if (isGetPODsResponse_v1_02(response)) {
|
|
845
|
-
return
|
|
838
|
+
return response.Pods?.Pod ?? [];
|
|
846
839
|
}
|
|
847
840
|
try {
|
|
848
841
|
const obj = typeof response.Result === "string" ? JSON.parse(response.Result) : response.Result;
|
|
849
|
-
return mapPods(
|
|
842
|
+
return mapPods(obj?.items ?? []);
|
|
850
843
|
} catch (error) {
|
|
851
844
|
logger$5.error(`Error parsing V1Pods json '${error instanceof Error ? error.message : String(error)}'`);
|
|
852
845
|
return [];
|
|
@@ -857,8 +850,8 @@ const _CloudService = class _CloudService extends CloudServiceBase {
|
|
|
857
850
|
__name(_CloudService, "CloudService");
|
|
858
851
|
let CloudService = _CloudService;
|
|
859
852
|
const _CodesignService = class _CodesignService {
|
|
853
|
+
_connection;
|
|
860
854
|
constructor(optsConnection) {
|
|
861
|
-
__publicField(this, "_connection");
|
|
862
855
|
this._connection = new ESPConnection(optsConnection, "ws_codesign", "1.1");
|
|
863
856
|
}
|
|
864
857
|
connectionOptions() {
|
|
@@ -1128,11 +1121,10 @@ const _DFUService = class _DFUService extends DfuServiceBase {
|
|
|
1128
1121
|
const logicalFiles = [];
|
|
1129
1122
|
await Promise.all(superFiles.map((superFile) => {
|
|
1130
1123
|
return this.DFUInfo({ Cluster: superFile.NodeGroup, Name: superFile.Name, IncludeJsonTypeInfo: false, IncludeBinTypeInfo: false, ForceIndexInfo: false }).then((response) => {
|
|
1131
|
-
|
|
1132
|
-
for (const child of ((_b = (_a = response == null ? void 0 : response.FileDetail) == null ? void 0 : _a.Superfiles) == null ? void 0 : _b.DFULogicalFile) ?? []) {
|
|
1124
|
+
for (const child of response?.FileDetail?.Superfiles?.DFULogicalFile ?? []) {
|
|
1133
1125
|
childSuperFiles.push(child);
|
|
1134
1126
|
}
|
|
1135
|
-
for (const child of
|
|
1127
|
+
for (const child of response?.FileDetail?.subfiles?.Item ?? []) {
|
|
1136
1128
|
logicalFiles.push(child);
|
|
1137
1129
|
}
|
|
1138
1130
|
});
|
|
@@ -1217,6 +1209,7 @@ function jsonToIField(id, item) {
|
|
|
1217
1209
|
fields: jsonToIFieldObj(item)
|
|
1218
1210
|
};
|
|
1219
1211
|
}
|
|
1212
|
+
// Fall through ---
|
|
1220
1213
|
default:
|
|
1221
1214
|
throw new Error("Unknown field type");
|
|
1222
1215
|
}
|
|
@@ -1414,10 +1407,7 @@ var TargetAudience = /* @__PURE__ */ ((TargetAudience2) => {
|
|
|
1414
1407
|
return TargetAudience2;
|
|
1415
1408
|
})(TargetAudience || {});
|
|
1416
1409
|
const _LogaccessService = class _LogaccessService extends LogaccessServiceBase {
|
|
1417
|
-
|
|
1418
|
-
super(...arguments);
|
|
1419
|
-
__publicField(this, "_logAccessInfo");
|
|
1420
|
-
}
|
|
1410
|
+
_logAccessInfo;
|
|
1421
1411
|
GetLogAccessInfo(request = {}) {
|
|
1422
1412
|
if (!this._logAccessInfo) {
|
|
1423
1413
|
this._logAccessInfo = super.GetLogAccessInfo(request);
|
|
@@ -1428,14 +1418,13 @@ const _LogaccessService = class _LogaccessService extends LogaccessServiceBase {
|
|
|
1428
1418
|
return super.GetLogs(request);
|
|
1429
1419
|
}
|
|
1430
1420
|
async GetLogsEx(request) {
|
|
1431
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1432
1421
|
const logInfo = await this.GetLogAccessInfo();
|
|
1433
1422
|
const columnMap = {};
|
|
1434
1423
|
logInfo.Columns.Column.forEach((column) => columnMap[column.LogType] = column.Name);
|
|
1435
1424
|
const convertLogLine = /* @__PURE__ */ __name((line) => {
|
|
1436
1425
|
const retVal = {};
|
|
1437
1426
|
for (const key in columnMap) {
|
|
1438
|
-
if (line
|
|
1427
|
+
if (line?.fields) {
|
|
1439
1428
|
retVal[key] = Object.assign({}, ...line.fields)[columnMap[key]] ?? "";
|
|
1440
1429
|
} else {
|
|
1441
1430
|
retVal[key] = "";
|
|
@@ -1554,22 +1543,22 @@ const _LogaccessService = class _LogaccessService extends LogaccessServiceBase {
|
|
|
1554
1543
|
getLogsRequest.Filter.leftFilter = {
|
|
1555
1544
|
LogCategory: WsLogaccess.LogAccessType.All
|
|
1556
1545
|
};
|
|
1557
|
-
if (
|
|
1546
|
+
if (filters[0]?.SearchField) {
|
|
1558
1547
|
getLogsRequest.Filter.leftFilter = {
|
|
1559
|
-
LogCategory:
|
|
1560
|
-
SearchField:
|
|
1561
|
-
SearchByValue:
|
|
1548
|
+
LogCategory: filters[0]?.LogCategory,
|
|
1549
|
+
SearchField: filters[0]?.SearchField,
|
|
1550
|
+
SearchByValue: filters[0]?.SearchByValue
|
|
1562
1551
|
};
|
|
1563
1552
|
}
|
|
1564
|
-
if (
|
|
1553
|
+
if (filters[1]?.SearchField) {
|
|
1565
1554
|
getLogsRequest.Filter.Operator = WsLogaccess.LogAccessFilterOperator.AND;
|
|
1566
1555
|
if (filters[0].SearchField === filters[1].SearchField) {
|
|
1567
1556
|
getLogsRequest.Filter.Operator = WsLogaccess.LogAccessFilterOperator.OR;
|
|
1568
1557
|
}
|
|
1569
1558
|
getLogsRequest.Filter.rightFilter = {
|
|
1570
|
-
LogCategory:
|
|
1571
|
-
SearchField:
|
|
1572
|
-
SearchByValue:
|
|
1559
|
+
LogCategory: filters[1]?.LogCategory,
|
|
1560
|
+
SearchField: filters[1]?.SearchField,
|
|
1561
|
+
SearchByValue: filters[1]?.SearchByValue
|
|
1573
1562
|
};
|
|
1574
1563
|
}
|
|
1575
1564
|
}
|
|
@@ -1580,7 +1569,6 @@ const _LogaccessService = class _LogaccessService extends LogaccessServiceBase {
|
|
|
1580
1569
|
getLogsRequest.Range.EndDate = request.EndDate.toISOString();
|
|
1581
1570
|
}
|
|
1582
1571
|
return this.GetLogs(getLogsRequest).then((response) => {
|
|
1583
|
-
var _a2;
|
|
1584
1572
|
try {
|
|
1585
1573
|
const logLines = JSON.parse(response.LogLines);
|
|
1586
1574
|
let lines = [];
|
|
@@ -1588,7 +1576,7 @@ const _LogaccessService = class _LogaccessService extends LogaccessServiceBase {
|
|
|
1588
1576
|
case "azureloganalyticscurl":
|
|
1589
1577
|
case "elasticstack":
|
|
1590
1578
|
case "grafanacurl":
|
|
1591
|
-
lines =
|
|
1579
|
+
lines = logLines.lines?.map(convertLogLine) ?? [];
|
|
1592
1580
|
break;
|
|
1593
1581
|
default:
|
|
1594
1582
|
logger$4.warning(`Unknown RemoteLogManagerType: ${logInfo.RemoteLogManagerType}`);
|
|
@@ -2581,7 +2569,6 @@ __name(isWUInfoWorkunit, "isWUInfoWorkunit");
|
|
|
2581
2569
|
const _WorkunitsService = class _WorkunitsService extends WorkunitsServiceBase {
|
|
2582
2570
|
constructor(optsConnection) {
|
|
2583
2571
|
super(optsConnection);
|
|
2584
|
-
__publicField(this, "_WUDetailsMetaPromise");
|
|
2585
2572
|
}
|
|
2586
2573
|
Ping() {
|
|
2587
2574
|
return this._connection.send("Ping", {}, "json", false, void 0, "WsWorkunitsPingResponse").then(() => {
|
|
@@ -2639,6 +2626,7 @@ const _WorkunitsService = class _WorkunitsService extends WorkunitsServiceBase {
|
|
|
2639
2626
|
WUFileEx(request) {
|
|
2640
2627
|
return this._connection.send("WUFile", request, "text");
|
|
2641
2628
|
}
|
|
2629
|
+
_WUDetailsMetaPromise;
|
|
2642
2630
|
WUDetailsMeta(request) {
|
|
2643
2631
|
if (!this._WUDetailsMetaPromise) {
|
|
2644
2632
|
this._WUDetailsMetaPromise = super.WUDetailsMeta(request);
|
|
@@ -3733,19 +3721,7 @@ function defaultLocale(definition) {
|
|
|
3733
3721
|
}
|
|
3734
3722
|
__name(defaultLocale, "defaultLocale");
|
|
3735
3723
|
const _ECLGraph = class _ECLGraph extends StateObject {
|
|
3736
|
-
|
|
3737
|
-
super();
|
|
3738
|
-
__publicField(this, "wu");
|
|
3739
|
-
this.wu = wu;
|
|
3740
|
-
let duration = 0;
|
|
3741
|
-
for (const eclTimer of eclTimers) {
|
|
3742
|
-
if (eclTimer.GraphName === eclGraph.Name && !eclTimer.HasSubGraphId) {
|
|
3743
|
-
duration = Math.round(eclTimer.Seconds * 1e3) / 1e3;
|
|
3744
|
-
break;
|
|
3745
|
-
}
|
|
3746
|
-
}
|
|
3747
|
-
this.set({ Time: duration, ...eclGraph });
|
|
3748
|
-
}
|
|
3724
|
+
wu;
|
|
3749
3725
|
get properties() {
|
|
3750
3726
|
return this.get();
|
|
3751
3727
|
}
|
|
@@ -3779,6 +3755,18 @@ const _ECLGraph = class _ECLGraph extends StateObject {
|
|
|
3779
3755
|
get Failed() {
|
|
3780
3756
|
return this.get("Failed");
|
|
3781
3757
|
}
|
|
3758
|
+
constructor(wu, eclGraph, eclTimers) {
|
|
3759
|
+
super();
|
|
3760
|
+
this.wu = wu;
|
|
3761
|
+
let duration = 0;
|
|
3762
|
+
for (const eclTimer of eclTimers) {
|
|
3763
|
+
if (eclTimer.GraphName === eclGraph.Name && !eclTimer.HasSubGraphId) {
|
|
3764
|
+
duration = Math.round(eclTimer.Seconds * 1e3) / 1e3;
|
|
3765
|
+
break;
|
|
3766
|
+
}
|
|
3767
|
+
}
|
|
3768
|
+
this.set({ Time: duration, ...eclGraph });
|
|
3769
|
+
}
|
|
3782
3770
|
fetchScopeGraph(subgraphID) {
|
|
3783
3771
|
if (subgraphID) {
|
|
3784
3772
|
return this.wu.fetchGraphDetails([subgraphID], ["subgraph"]).then((scopes) => {
|
|
@@ -3954,9 +3942,21 @@ function createGraph(scopes) {
|
|
|
3954
3942
|
}
|
|
3955
3943
|
__name(createGraph, "createGraph");
|
|
3956
3944
|
const _Resource = class _Resource extends StateObject {
|
|
3945
|
+
wu;
|
|
3946
|
+
get properties() {
|
|
3947
|
+
return this.get();
|
|
3948
|
+
}
|
|
3949
|
+
get URL() {
|
|
3950
|
+
return this.get("URL");
|
|
3951
|
+
}
|
|
3952
|
+
get DisplayName() {
|
|
3953
|
+
return this.get("DisplayName");
|
|
3954
|
+
}
|
|
3955
|
+
get DisplayPath() {
|
|
3956
|
+
return this.get("DisplayPath");
|
|
3957
|
+
}
|
|
3957
3958
|
constructor(wu, url) {
|
|
3958
3959
|
super();
|
|
3959
|
-
__publicField(this, "wu");
|
|
3960
3960
|
this.wu = wu;
|
|
3961
3961
|
const cleanedURL = url.split("\\").join("/");
|
|
3962
3962
|
const urlParts = cleanedURL.split("/");
|
|
@@ -3973,24 +3973,12 @@ const _Resource = class _Resource extends StateObject {
|
|
|
3973
3973
|
DisplayPath: displayPath
|
|
3974
3974
|
});
|
|
3975
3975
|
}
|
|
3976
|
-
get properties() {
|
|
3977
|
-
return this.get();
|
|
3978
|
-
}
|
|
3979
|
-
get URL() {
|
|
3980
|
-
return this.get("URL");
|
|
3981
|
-
}
|
|
3982
|
-
get DisplayName() {
|
|
3983
|
-
return this.get("DisplayName");
|
|
3984
|
-
}
|
|
3985
|
-
get DisplayPath() {
|
|
3986
|
-
return this.get("DisplayPath");
|
|
3987
|
-
}
|
|
3988
3976
|
};
|
|
3989
3977
|
__name(_Resource, "Resource");
|
|
3990
3978
|
let Resource = _Resource;
|
|
3991
3979
|
const _XSDNode = class _XSDNode {
|
|
3980
|
+
e;
|
|
3992
3981
|
constructor(e) {
|
|
3993
|
-
__publicField(this, "e");
|
|
3994
3982
|
this.e = e;
|
|
3995
3983
|
}
|
|
3996
3984
|
fix() {
|
|
@@ -4000,13 +3988,13 @@ const _XSDNode = class _XSDNode {
|
|
|
4000
3988
|
__name(_XSDNode, "XSDNode");
|
|
4001
3989
|
let XSDNode = _XSDNode;
|
|
4002
3990
|
const _XSDXMLNode = class _XSDXMLNode extends XSDNode {
|
|
3991
|
+
name;
|
|
3992
|
+
type;
|
|
3993
|
+
isSet = false;
|
|
3994
|
+
attrs = {};
|
|
3995
|
+
_children = [];
|
|
4003
3996
|
constructor(e) {
|
|
4004
3997
|
super(e);
|
|
4005
|
-
__publicField(this, "name");
|
|
4006
|
-
__publicField(this, "type");
|
|
4007
|
-
__publicField(this, "isSet", false);
|
|
4008
|
-
__publicField(this, "attrs", {});
|
|
4009
|
-
__publicField(this, "_children", []);
|
|
4010
3998
|
}
|
|
4011
3999
|
append(child) {
|
|
4012
4000
|
this._children.push(child);
|
|
@@ -4091,13 +4079,13 @@ const _XSDXMLNode = class _XSDXMLNode extends XSDNode {
|
|
|
4091
4079
|
__name(_XSDXMLNode, "XSDXMLNode");
|
|
4092
4080
|
let XSDXMLNode = _XSDXMLNode;
|
|
4093
4081
|
const _XSDSimpleType = class _XSDSimpleType extends XSDNode {
|
|
4082
|
+
name;
|
|
4083
|
+
type;
|
|
4084
|
+
maxLength;
|
|
4085
|
+
_restricition;
|
|
4086
|
+
_maxLength;
|
|
4094
4087
|
constructor(e) {
|
|
4095
4088
|
super(e);
|
|
4096
|
-
__publicField(this, "name");
|
|
4097
|
-
__publicField(this, "type");
|
|
4098
|
-
__publicField(this, "maxLength");
|
|
4099
|
-
__publicField(this, "_restricition");
|
|
4100
|
-
__publicField(this, "_maxLength");
|
|
4101
4089
|
}
|
|
4102
4090
|
append(e) {
|
|
4103
4091
|
switch (e.name) {
|
|
@@ -4121,10 +4109,8 @@ const _XSDSimpleType = class _XSDSimpleType extends XSDNode {
|
|
|
4121
4109
|
__name(_XSDSimpleType, "XSDSimpleType");
|
|
4122
4110
|
let XSDSimpleType = _XSDSimpleType;
|
|
4123
4111
|
const _XSDSchema = class _XSDSchema {
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
__publicField(this, "simpleTypes", {});
|
|
4127
|
-
}
|
|
4112
|
+
root;
|
|
4113
|
+
simpleTypes = {};
|
|
4128
4114
|
fields() {
|
|
4129
4115
|
return this.root.children();
|
|
4130
4116
|
}
|
|
@@ -4132,13 +4118,10 @@ const _XSDSchema = class _XSDSchema {
|
|
|
4132
4118
|
__name(_XSDSchema, "XSDSchema");
|
|
4133
4119
|
let XSDSchema = _XSDSchema;
|
|
4134
4120
|
const _XSDParser = class _XSDParser extends SAXStackParser {
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
__publicField(this, "simpleTypes", {});
|
|
4140
|
-
__publicField(this, "xsdStack", new Stack());
|
|
4141
|
-
}
|
|
4121
|
+
schema = new XSDSchema();
|
|
4122
|
+
simpleType;
|
|
4123
|
+
simpleTypes = {};
|
|
4124
|
+
xsdStack = new Stack();
|
|
4142
4125
|
startXMLNode(e) {
|
|
4143
4126
|
super.startXMLNode(e);
|
|
4144
4127
|
switch (e.name) {
|
|
@@ -4190,12 +4173,12 @@ function parseXSD(xml) {
|
|
|
4190
4173
|
}
|
|
4191
4174
|
__name(parseXSD, "parseXSD");
|
|
4192
4175
|
const _XSDParser2 = class _XSDParser2 extends XSDParser {
|
|
4176
|
+
_rootName;
|
|
4177
|
+
schema = new XSDSchema();
|
|
4178
|
+
simpleTypes = {};
|
|
4179
|
+
xsdStack = new Stack();
|
|
4193
4180
|
constructor(rootName) {
|
|
4194
4181
|
super();
|
|
4195
|
-
__publicField(this, "_rootName");
|
|
4196
|
-
__publicField(this, "schema", new XSDSchema());
|
|
4197
|
-
__publicField(this, "simpleTypes", {});
|
|
4198
|
-
__publicField(this, "xsdStack", new Stack());
|
|
4199
4182
|
this._rootName = rootName;
|
|
4200
4183
|
}
|
|
4201
4184
|
startXMLNode(e) {
|
|
@@ -4245,49 +4228,12 @@ __name(_GlobalResultCache, "GlobalResultCache");
|
|
|
4245
4228
|
let GlobalResultCache = _GlobalResultCache;
|
|
4246
4229
|
const _results = new GlobalResultCache();
|
|
4247
4230
|
const _Result = class _Result extends StateObject {
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
__publicField(this, "connection");
|
|
4251
|
-
__publicField(this, "xsdSchema");
|
|
4252
|
-
__publicField(this, "_fetchXMLSchemaPromise");
|
|
4253
|
-
if (optsConnection instanceof WorkunitsService) {
|
|
4254
|
-
this.connection = optsConnection;
|
|
4255
|
-
} else {
|
|
4256
|
-
this.connection = new WorkunitsService(optsConnection);
|
|
4257
|
-
}
|
|
4258
|
-
if (typeof resultViews_isLogicalFile === "boolean" && resultViews_isLogicalFile === true) {
|
|
4259
|
-
this.set({
|
|
4260
|
-
NodeGroup: wuid_NodeGroup,
|
|
4261
|
-
LogicalFileName: name_sequence_eclResult_logicalFile
|
|
4262
|
-
});
|
|
4263
|
-
} else if (isECLResult(name_sequence_eclResult_logicalFile) && Array.isArray(resultViews_isLogicalFile)) {
|
|
4264
|
-
this.set({
|
|
4265
|
-
...name_sequence_eclResult_logicalFile,
|
|
4266
|
-
Wuid: wuid_NodeGroup,
|
|
4267
|
-
ResultName: name_sequence_eclResult_logicalFile.Name,
|
|
4268
|
-
ResultViews: resultViews_isLogicalFile
|
|
4269
|
-
});
|
|
4270
|
-
} else if (typeof resultViews_isLogicalFile === "undefined") {
|
|
4271
|
-
if (typeof name_sequence_eclResult_logicalFile === "number") {
|
|
4272
|
-
this.set({
|
|
4273
|
-
Wuid: wuid_NodeGroup,
|
|
4274
|
-
ResultSequence: name_sequence_eclResult_logicalFile
|
|
4275
|
-
});
|
|
4276
|
-
} else if (typeof name_sequence_eclResult_logicalFile === "string") {
|
|
4277
|
-
this.set({
|
|
4278
|
-
Wuid: wuid_NodeGroup,
|
|
4279
|
-
ResultName: name_sequence_eclResult_logicalFile
|
|
4280
|
-
});
|
|
4281
|
-
} else {
|
|
4282
|
-
console.warn("Unknown Result.attach (1)");
|
|
4283
|
-
}
|
|
4284
|
-
} else {
|
|
4285
|
-
console.warn("Unknown Result.attach (2)");
|
|
4286
|
-
}
|
|
4287
|
-
}
|
|
4231
|
+
connection;
|
|
4232
|
+
_bypassCache = false;
|
|
4288
4233
|
get BaseUrl() {
|
|
4289
4234
|
return this.connection.baseUrl;
|
|
4290
4235
|
}
|
|
4236
|
+
xsdSchema;
|
|
4291
4237
|
get properties() {
|
|
4292
4238
|
return this.get();
|
|
4293
4239
|
}
|
|
@@ -4364,14 +4310,56 @@ const _Result = class _Result extends StateObject {
|
|
|
4364
4310
|
return new _Result(optsConnection, nodeGroup, logicalFile, true);
|
|
4365
4311
|
});
|
|
4366
4312
|
}
|
|
4313
|
+
constructor(optsConnection, wuid_NodeGroup, name_sequence_eclResult_logicalFile, resultViews_isLogicalFile) {
|
|
4314
|
+
super();
|
|
4315
|
+
if (optsConnection instanceof WorkunitsService) {
|
|
4316
|
+
this.connection = optsConnection;
|
|
4317
|
+
} else {
|
|
4318
|
+
this.connection = new WorkunitsService(optsConnection);
|
|
4319
|
+
}
|
|
4320
|
+
if (typeof resultViews_isLogicalFile === "boolean" && resultViews_isLogicalFile === true) {
|
|
4321
|
+
this.set({
|
|
4322
|
+
NodeGroup: wuid_NodeGroup,
|
|
4323
|
+
LogicalFileName: name_sequence_eclResult_logicalFile
|
|
4324
|
+
});
|
|
4325
|
+
} else if (isECLResult(name_sequence_eclResult_logicalFile) && Array.isArray(resultViews_isLogicalFile)) {
|
|
4326
|
+
this.set({
|
|
4327
|
+
...name_sequence_eclResult_logicalFile,
|
|
4328
|
+
Wuid: wuid_NodeGroup,
|
|
4329
|
+
ResultName: name_sequence_eclResult_logicalFile.Name,
|
|
4330
|
+
ResultViews: resultViews_isLogicalFile
|
|
4331
|
+
});
|
|
4332
|
+
} else if (typeof resultViews_isLogicalFile === "undefined") {
|
|
4333
|
+
if (typeof name_sequence_eclResult_logicalFile === "number") {
|
|
4334
|
+
this.set({
|
|
4335
|
+
Wuid: wuid_NodeGroup,
|
|
4336
|
+
ResultSequence: name_sequence_eclResult_logicalFile
|
|
4337
|
+
});
|
|
4338
|
+
} else if (typeof name_sequence_eclResult_logicalFile === "string") {
|
|
4339
|
+
this.set({
|
|
4340
|
+
Wuid: wuid_NodeGroup,
|
|
4341
|
+
ResultName: name_sequence_eclResult_logicalFile
|
|
4342
|
+
});
|
|
4343
|
+
} else {
|
|
4344
|
+
console.warn("Unknown Result.attach (1)");
|
|
4345
|
+
}
|
|
4346
|
+
} else {
|
|
4347
|
+
console.warn("Unknown Result.attach (2)");
|
|
4348
|
+
}
|
|
4349
|
+
}
|
|
4367
4350
|
isComplete() {
|
|
4368
4351
|
return this.Total !== -1;
|
|
4369
4352
|
}
|
|
4353
|
+
bypassCache(bypass) {
|
|
4354
|
+
if (bypass === void 0) return this._bypassCache;
|
|
4355
|
+
this._bypassCache = bypass;
|
|
4356
|
+
return this;
|
|
4357
|
+
}
|
|
4358
|
+
_fetchXMLSchemaPromise;
|
|
4370
4359
|
fetchXMLSchema(refresh = false) {
|
|
4371
4360
|
if (!this._fetchXMLSchemaPromise || refresh) {
|
|
4372
4361
|
this._fetchXMLSchemaPromise = this.WUResult().then((response) => {
|
|
4373
|
-
|
|
4374
|
-
if ((_b = (_a = response.Result) == null ? void 0 : _a.XmlSchema) == null ? void 0 : _b.xml) {
|
|
4362
|
+
if (response.Result?.XmlSchema?.xml) {
|
|
4375
4363
|
this.xsdSchema = parseXSD(response.Result.XmlSchema.xml);
|
|
4376
4364
|
return this.xsdSchema;
|
|
4377
4365
|
}
|
|
@@ -4384,8 +4372,9 @@ const _Result = class _Result extends StateObject {
|
|
|
4384
4372
|
await this.fetchRows(0, 1, true);
|
|
4385
4373
|
return this;
|
|
4386
4374
|
}
|
|
4387
|
-
fetchRows(from = 0, count = -1, includeSchema = false, filter = {}, abortSignal) {
|
|
4388
|
-
|
|
4375
|
+
fetchRows(from = 0, count = -1, includeSchema = false, filter = {}, abortSignal, bypassCache) {
|
|
4376
|
+
const shouldBypassCache = bypassCache ?? this._bypassCache;
|
|
4377
|
+
return this.WUResult(from, count, !includeSchema, filter, abortSignal, shouldBypassCache).then((response) => {
|
|
4389
4378
|
const result = response.Result;
|
|
4390
4379
|
delete response.Result;
|
|
4391
4380
|
this.set({
|
|
@@ -4410,7 +4399,7 @@ const _Result = class _Result extends StateObject {
|
|
|
4410
4399
|
if (!this.xsdSchema) return [];
|
|
4411
4400
|
return this.xsdSchema.root.children();
|
|
4412
4401
|
}
|
|
4413
|
-
WUResult(start = 0, count = 1, suppressXmlSchema = false, filter = {}, abortSignal) {
|
|
4402
|
+
WUResult(start = 0, count = 1, suppressXmlSchema = false, filter = {}, abortSignal, bypassCache = false) {
|
|
4414
4403
|
const FilterBy = {
|
|
4415
4404
|
NamedValue: {
|
|
4416
4405
|
itemcount: 0
|
|
@@ -4438,6 +4427,7 @@ const _Result = class _Result extends StateObject {
|
|
|
4438
4427
|
request.Start = start;
|
|
4439
4428
|
request.Count = count;
|
|
4440
4429
|
request.SuppressXmlSchema = suppressXmlSchema;
|
|
4430
|
+
request.BypassCachedResult = bypassCache;
|
|
4441
4431
|
return this.connection.WUResult(request, abortSignal).then((response) => {
|
|
4442
4432
|
return response;
|
|
4443
4433
|
});
|
|
@@ -4455,12 +4445,7 @@ const _ResultCache = class _ResultCache extends Cache {
|
|
|
4455
4445
|
__name(_ResultCache, "ResultCache");
|
|
4456
4446
|
let ResultCache = _ResultCache;
|
|
4457
4447
|
const _Attribute = class _Attribute extends StateObject {
|
|
4458
|
-
|
|
4459
|
-
super();
|
|
4460
|
-
__publicField(this, "scope");
|
|
4461
|
-
this.scope = scope;
|
|
4462
|
-
this.set(attribute);
|
|
4463
|
-
}
|
|
4448
|
+
scope;
|
|
4464
4449
|
get properties() {
|
|
4465
4450
|
return this.get();
|
|
4466
4451
|
}
|
|
@@ -4485,16 +4470,17 @@ const _Attribute = class _Attribute extends StateObject {
|
|
|
4485
4470
|
get CreatorType() {
|
|
4486
4471
|
return this.get("CreatorType");
|
|
4487
4472
|
}
|
|
4473
|
+
constructor(scope, attribute) {
|
|
4474
|
+
super();
|
|
4475
|
+
this.scope = scope;
|
|
4476
|
+
this.set(attribute);
|
|
4477
|
+
}
|
|
4488
4478
|
};
|
|
4489
4479
|
__name(_Attribute, "Attribute");
|
|
4490
4480
|
let Attribute = _Attribute;
|
|
4491
4481
|
const _BaseScope = class _BaseScope extends StateObject {
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
__publicField(this, "_attributeMap", {});
|
|
4495
|
-
__publicField(this, "_children", []);
|
|
4496
|
-
this.update(scope);
|
|
4497
|
-
}
|
|
4482
|
+
_attributeMap = {};
|
|
4483
|
+
_children = [];
|
|
4498
4484
|
get properties() {
|
|
4499
4485
|
return this.get();
|
|
4500
4486
|
}
|
|
@@ -4541,6 +4527,10 @@ const _BaseScope = class _BaseScope extends StateObject {
|
|
|
4541
4527
|
}
|
|
4542
4528
|
return retVal;
|
|
4543
4529
|
}
|
|
4530
|
+
constructor(scope) {
|
|
4531
|
+
super();
|
|
4532
|
+
this.update(scope);
|
|
4533
|
+
}
|
|
4544
4534
|
update(scope) {
|
|
4545
4535
|
this.set(scope);
|
|
4546
4536
|
this.CAttributes.forEach((attr) => {
|
|
@@ -4630,28 +4620,16 @@ const _BaseScope = class _BaseScope extends StateObject {
|
|
|
4630
4620
|
__name(_BaseScope, "BaseScope");
|
|
4631
4621
|
let BaseScope = _BaseScope;
|
|
4632
4622
|
const _Scope = class _Scope extends BaseScope {
|
|
4623
|
+
wu;
|
|
4633
4624
|
constructor(wu, scope) {
|
|
4634
4625
|
super(scope);
|
|
4635
|
-
__publicField(this, "wu");
|
|
4636
4626
|
this.wu = wu;
|
|
4637
4627
|
}
|
|
4638
4628
|
};
|
|
4639
4629
|
__name(_Scope, "Scope");
|
|
4640
4630
|
let Scope = _Scope;
|
|
4641
4631
|
const _SourceFile = class _SourceFile extends StateObject {
|
|
4642
|
-
|
|
4643
|
-
super();
|
|
4644
|
-
__publicField(this, "connection");
|
|
4645
|
-
if (optsConnection instanceof WorkunitsService) {
|
|
4646
|
-
this.connection = optsConnection;
|
|
4647
|
-
} else {
|
|
4648
|
-
this.connection = new WorkunitsService(optsConnection);
|
|
4649
|
-
}
|
|
4650
|
-
this.set({
|
|
4651
|
-
Wuid: wuid,
|
|
4652
|
-
...eclSourceFile
|
|
4653
|
-
});
|
|
4654
|
-
}
|
|
4632
|
+
connection;
|
|
4655
4633
|
get properties() {
|
|
4656
4634
|
return this.get();
|
|
4657
4635
|
}
|
|
@@ -4676,26 +4654,23 @@ const _SourceFile = class _SourceFile extends StateObject {
|
|
|
4676
4654
|
get ECLSourceFiles() {
|
|
4677
4655
|
return this.get("ECLSourceFiles");
|
|
4678
4656
|
}
|
|
4679
|
-
|
|
4680
|
-
__name(_SourceFile, "SourceFile");
|
|
4681
|
-
let SourceFile = _SourceFile;
|
|
4682
|
-
const _Timer = class _Timer extends StateObject {
|
|
4683
|
-
constructor(optsConnection, wuid, eclTimer) {
|
|
4657
|
+
constructor(optsConnection, wuid, eclSourceFile) {
|
|
4684
4658
|
super();
|
|
4685
|
-
__publicField(this, "connection");
|
|
4686
4659
|
if (optsConnection instanceof WorkunitsService) {
|
|
4687
4660
|
this.connection = optsConnection;
|
|
4688
4661
|
} else {
|
|
4689
4662
|
this.connection = new WorkunitsService(optsConnection);
|
|
4690
4663
|
}
|
|
4691
|
-
const secs = espTime2Seconds$1(eclTimer.Value);
|
|
4692
4664
|
this.set({
|
|
4693
4665
|
Wuid: wuid,
|
|
4694
|
-
|
|
4695
|
-
HasSubGraphId: eclTimer.SubGraphId !== void 0,
|
|
4696
|
-
...eclTimer
|
|
4666
|
+
...eclSourceFile
|
|
4697
4667
|
});
|
|
4698
4668
|
}
|
|
4669
|
+
};
|
|
4670
|
+
__name(_SourceFile, "SourceFile");
|
|
4671
|
+
let SourceFile = _SourceFile;
|
|
4672
|
+
const _Timer = class _Timer extends StateObject {
|
|
4673
|
+
connection;
|
|
4699
4674
|
get properties() {
|
|
4700
4675
|
return this.get();
|
|
4701
4676
|
}
|
|
@@ -4729,6 +4704,21 @@ const _Timer = class _Timer extends StateObject {
|
|
|
4729
4704
|
get When() {
|
|
4730
4705
|
return this.get("When");
|
|
4731
4706
|
}
|
|
4707
|
+
constructor(optsConnection, wuid, eclTimer) {
|
|
4708
|
+
super();
|
|
4709
|
+
if (optsConnection instanceof WorkunitsService) {
|
|
4710
|
+
this.connection = optsConnection;
|
|
4711
|
+
} else {
|
|
4712
|
+
this.connection = new WorkunitsService(optsConnection);
|
|
4713
|
+
}
|
|
4714
|
+
const secs = espTime2Seconds$1(eclTimer.Value);
|
|
4715
|
+
this.set({
|
|
4716
|
+
Wuid: wuid,
|
|
4717
|
+
Seconds: Math.round(secs * 1e3) / 1e3,
|
|
4718
|
+
HasSubGraphId: eclTimer.SubGraphId !== void 0,
|
|
4719
|
+
...eclTimer
|
|
4720
|
+
});
|
|
4721
|
+
}
|
|
4732
4722
|
};
|
|
4733
4723
|
__name(_Timer, "Timer");
|
|
4734
4724
|
let Timer = _Timer;
|
|
@@ -4757,7 +4747,7 @@ function _splitMetric(fullLabel) {
|
|
|
4757
4747
|
}
|
|
4758
4748
|
}
|
|
4759
4749
|
const labelParts = fullLabel.match(metricKeyRegex);
|
|
4760
|
-
if (labelParts
|
|
4750
|
+
if (labelParts?.length) {
|
|
4761
4751
|
const measure = labelParts.shift();
|
|
4762
4752
|
let label = labelParts.join("");
|
|
4763
4753
|
for (const ext of PropertyType) {
|
|
@@ -4783,8 +4773,7 @@ function splitMetric(key) {
|
|
|
4783
4773
|
}
|
|
4784
4774
|
__name(splitMetric, "splitMetric");
|
|
4785
4775
|
function formatValue(item, key) {
|
|
4786
|
-
|
|
4787
|
-
return ((_a = item.__formattedProps) == null ? void 0 : _a[key]) ?? item[key];
|
|
4776
|
+
return item.__formattedProps?.[key] ?? item[key];
|
|
4788
4777
|
}
|
|
4789
4778
|
__name(formatValue, "formatValue");
|
|
4790
4779
|
function safeParseFloat(val) {
|
|
@@ -4834,23 +4823,14 @@ __name(_WorkunitCache, "WorkunitCache");
|
|
|
4834
4823
|
let WorkunitCache = _WorkunitCache;
|
|
4835
4824
|
const _workunits$1 = new WorkunitCache();
|
|
4836
4825
|
const _Workunit = class _Workunit extends StateObject {
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
super();
|
|
4840
|
-
__publicField(this, "connection");
|
|
4841
|
-
__publicField(this, "topologyConnection");
|
|
4842
|
-
__publicField(this, "_debugMode", false);
|
|
4843
|
-
__publicField(this, "_debugAllGraph");
|
|
4844
|
-
__publicField(this, "_submitAction");
|
|
4845
|
-
__publicField(this, "_resultCache", new ResultCache());
|
|
4846
|
-
__publicField(this, "_graphCache", new GraphCache());
|
|
4847
|
-
this.connection = new WorkunitsService(optsConnection);
|
|
4848
|
-
this.topologyConnection = new TopologyService(optsConnection);
|
|
4849
|
-
this.clearState(wuid);
|
|
4850
|
-
}
|
|
4826
|
+
connection;
|
|
4827
|
+
topologyConnection;
|
|
4851
4828
|
get BaseUrl() {
|
|
4852
4829
|
return this.connection.baseUrl;
|
|
4853
4830
|
}
|
|
4831
|
+
_debugMode = false;
|
|
4832
|
+
_debugAllGraph;
|
|
4833
|
+
_submitAction;
|
|
4854
4834
|
// Accessors ---
|
|
4855
4835
|
get properties() {
|
|
4856
4836
|
return this.get();
|
|
@@ -4888,6 +4868,7 @@ const _Workunit = class _Workunit extends StateObject {
|
|
|
4888
4868
|
get ResultViews() {
|
|
4889
4869
|
return this.get("ResultViews", { View: [] });
|
|
4890
4870
|
}
|
|
4871
|
+
_resultCache = new ResultCache();
|
|
4891
4872
|
get ResultCount() {
|
|
4892
4873
|
return this.get("ResultCount", 0);
|
|
4893
4874
|
}
|
|
@@ -4916,6 +4897,7 @@ const _Workunit = class _Workunit extends StateObject {
|
|
|
4916
4897
|
return new Timer(this.connection, this.Wuid, eclTimer);
|
|
4917
4898
|
});
|
|
4918
4899
|
}
|
|
4900
|
+
_graphCache = new GraphCache();
|
|
4919
4901
|
get GraphCount() {
|
|
4920
4902
|
return this.get("GraphCount", 0);
|
|
4921
4903
|
}
|
|
@@ -5165,6 +5147,13 @@ const _Workunit = class _Workunit extends StateObject {
|
|
|
5165
5147
|
});
|
|
5166
5148
|
});
|
|
5167
5149
|
}
|
|
5150
|
+
// --- --- ---
|
|
5151
|
+
constructor(optsConnection, wuid) {
|
|
5152
|
+
super();
|
|
5153
|
+
this.connection = new WorkunitsService(optsConnection);
|
|
5154
|
+
this.topologyConnection = new TopologyService(optsConnection);
|
|
5155
|
+
this.clearState(wuid);
|
|
5156
|
+
}
|
|
5168
5157
|
clearState(wuid) {
|
|
5169
5158
|
this.clear({
|
|
5170
5159
|
Wuid: wuid,
|
|
@@ -5377,14 +5366,12 @@ const _Workunit = class _Workunit extends StateObject {
|
|
|
5377
5366
|
}
|
|
5378
5367
|
fetchHelpers() {
|
|
5379
5368
|
return this.WUInfo({ IncludeHelpers: true }).then(() => {
|
|
5380
|
-
|
|
5381
|
-
return ((_a = this.Helpers) == null ? void 0 : _a.ECLHelpFile) || [];
|
|
5369
|
+
return this.Helpers?.ECLHelpFile || [];
|
|
5382
5370
|
});
|
|
5383
5371
|
}
|
|
5384
5372
|
fetchAllowedClusters() {
|
|
5385
5373
|
return this.WUInfo({ IncludeAllowedClusters: true }).then(() => {
|
|
5386
|
-
|
|
5387
|
-
return ((_a = this.AllowedClusters) == null ? void 0 : _a.AllowedCluster) || [];
|
|
5374
|
+
return this.AllowedClusters?.AllowedCluster || [];
|
|
5388
5375
|
});
|
|
5389
5376
|
}
|
|
5390
5377
|
fetchTotalClusterTime() {
|
|
@@ -5394,8 +5381,7 @@ const _Workunit = class _Workunit extends StateObject {
|
|
|
5394
5381
|
}
|
|
5395
5382
|
fetchServiceNames() {
|
|
5396
5383
|
return this.WUInfo({ IncludeServiceNames: true }).then(() => {
|
|
5397
|
-
|
|
5398
|
-
return (_a = this.ServiceNames) == null ? void 0 : _a.Item;
|
|
5384
|
+
return this.ServiceNames?.Item;
|
|
5399
5385
|
});
|
|
5400
5386
|
}
|
|
5401
5387
|
fetchDetailsMeta(request = {}) {
|
|
@@ -5405,7 +5391,6 @@ const _Workunit = class _Workunit extends StateObject {
|
|
|
5405
5391
|
return this.WUDetails(request).then((response) => response.Scopes.Scope);
|
|
5406
5392
|
}
|
|
5407
5393
|
normalizeDetails(meta, scopes) {
|
|
5408
|
-
var _a, _b;
|
|
5409
5394
|
const columns = {
|
|
5410
5395
|
id: {
|
|
5411
5396
|
Measure: "label"
|
|
@@ -5418,7 +5403,7 @@ const _Workunit = class _Workunit extends StateObject {
|
|
|
5418
5403
|
}
|
|
5419
5404
|
};
|
|
5420
5405
|
const activityMap = /* @__PURE__ */ new Map();
|
|
5421
|
-
for (const activity of
|
|
5406
|
+
for (const activity of meta.Activities?.Activity ?? []) {
|
|
5422
5407
|
activityMap.set(activity.Kind, activity.Name);
|
|
5423
5408
|
}
|
|
5424
5409
|
const data = new Array(scopes.length);
|
|
@@ -5426,7 +5411,7 @@ const _Workunit = class _Workunit extends StateObject {
|
|
|
5426
5411
|
const scope = scopes[i];
|
|
5427
5412
|
const props = {};
|
|
5428
5413
|
const formattedProps = {};
|
|
5429
|
-
if (scope.Id &&
|
|
5414
|
+
if (scope.Id && scope.Properties?.Property) {
|
|
5430
5415
|
for (const scopeProperty of scope.Properties.Property) {
|
|
5431
5416
|
const measure = scopeProperty.Measure;
|
|
5432
5417
|
const name = scopeProperty.Name;
|
|
@@ -6028,21 +6013,7 @@ function breakpointLocations(graph, path) {
|
|
|
6028
6013
|
__name(breakpointLocations, "breakpointLocations");
|
|
6029
6014
|
let _activity;
|
|
6030
6015
|
const _Activity = class _Activity extends StateObject {
|
|
6031
|
-
|
|
6032
|
-
super();
|
|
6033
|
-
__publicField(this, "connection");
|
|
6034
|
-
__publicField(this, "lazyRefresh", debounce(async () => {
|
|
6035
|
-
const response = await this.connection.Activity({});
|
|
6036
|
-
this.set(response);
|
|
6037
|
-
return this;
|
|
6038
|
-
}));
|
|
6039
|
-
if (optsConnection instanceof SMCService) {
|
|
6040
|
-
this.connection = optsConnection;
|
|
6041
|
-
} else {
|
|
6042
|
-
this.connection = new SMCService(optsConnection);
|
|
6043
|
-
}
|
|
6044
|
-
this.clear({});
|
|
6045
|
-
}
|
|
6016
|
+
connection;
|
|
6046
6017
|
get properties() {
|
|
6047
6018
|
return this.get();
|
|
6048
6019
|
}
|
|
@@ -6118,6 +6089,15 @@ const _Activity = class _Activity extends StateObject {
|
|
|
6118
6089
|
}
|
|
6119
6090
|
return _activity;
|
|
6120
6091
|
}
|
|
6092
|
+
constructor(optsConnection) {
|
|
6093
|
+
super();
|
|
6094
|
+
if (optsConnection instanceof SMCService) {
|
|
6095
|
+
this.connection = optsConnection;
|
|
6096
|
+
} else {
|
|
6097
|
+
this.connection = new SMCService(optsConnection);
|
|
6098
|
+
}
|
|
6099
|
+
this.clear({});
|
|
6100
|
+
}
|
|
6121
6101
|
runningWorkunits(clusterName = "") {
|
|
6122
6102
|
return this.Running.ActiveWorkunit.filter((awu) => clusterName === "" || awu.ClusterName === clusterName).map((awu) => Workunit.attach(this.connection.connectionOptions(), awu.Wuid, awu));
|
|
6123
6103
|
}
|
|
@@ -6129,6 +6109,11 @@ const _Activity = class _Activity extends StateObject {
|
|
|
6129
6109
|
return this;
|
|
6130
6110
|
});
|
|
6131
6111
|
}
|
|
6112
|
+
lazyRefresh = debounce(async () => {
|
|
6113
|
+
const response = await this.connection.Activity({});
|
|
6114
|
+
this.set(response);
|
|
6115
|
+
return this;
|
|
6116
|
+
});
|
|
6132
6117
|
async refresh() {
|
|
6133
6118
|
return this.lazyRefresh();
|
|
6134
6119
|
}
|
|
@@ -6147,19 +6132,7 @@ __name(_LogicalFileCache, "LogicalFileCache");
|
|
|
6147
6132
|
let LogicalFileCache = _LogicalFileCache;
|
|
6148
6133
|
const _store$1 = new LogicalFileCache();
|
|
6149
6134
|
const _LogicalFile = class _LogicalFile extends StateObject {
|
|
6150
|
-
|
|
6151
|
-
super();
|
|
6152
|
-
__publicField(this, "connection");
|
|
6153
|
-
if (optsConnection instanceof DFUService) {
|
|
6154
|
-
this.connection = optsConnection;
|
|
6155
|
-
} else {
|
|
6156
|
-
this.connection = new DFUService(optsConnection);
|
|
6157
|
-
}
|
|
6158
|
-
this.clear({
|
|
6159
|
-
Cluster,
|
|
6160
|
-
Name
|
|
6161
|
-
});
|
|
6162
|
-
}
|
|
6135
|
+
connection;
|
|
6163
6136
|
get BaseUrl() {
|
|
6164
6137
|
return this.connection.baseUrl;
|
|
6165
6138
|
}
|
|
@@ -6340,15 +6313,25 @@ const _LogicalFile = class _LogicalFile extends StateObject {
|
|
|
6340
6313
|
}
|
|
6341
6314
|
return retVal;
|
|
6342
6315
|
}
|
|
6316
|
+
constructor(optsConnection, Cluster, Name) {
|
|
6317
|
+
super();
|
|
6318
|
+
if (optsConnection instanceof DFUService) {
|
|
6319
|
+
this.connection = optsConnection;
|
|
6320
|
+
} else {
|
|
6321
|
+
this.connection = new DFUService(optsConnection);
|
|
6322
|
+
}
|
|
6323
|
+
this.clear({
|
|
6324
|
+
Cluster,
|
|
6325
|
+
Name
|
|
6326
|
+
});
|
|
6327
|
+
}
|
|
6343
6328
|
filePartsOnCluster() {
|
|
6344
|
-
|
|
6345
|
-
return [...((_a = this.DFUFilePartsOnClusters) == null ? void 0 : _a.DFUFilePartsOnCluster) || []];
|
|
6329
|
+
return [...this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster || []];
|
|
6346
6330
|
}
|
|
6347
6331
|
fileParts() {
|
|
6348
|
-
var _a, _b;
|
|
6349
6332
|
const retVal = [];
|
|
6350
|
-
for (const poc of
|
|
6351
|
-
for (const part of
|
|
6333
|
+
for (const poc of this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster || []) {
|
|
6334
|
+
for (const part of poc?.DFUFileParts?.DFUPart || []) {
|
|
6352
6335
|
const row = { ...poc, ...part };
|
|
6353
6336
|
delete row.DFUFileParts;
|
|
6354
6337
|
retVal.push(row);
|
|
@@ -6373,11 +6356,10 @@ const _LogicalFile = class _LogicalFile extends StateObject {
|
|
|
6373
6356
|
}
|
|
6374
6357
|
fetchInfo() {
|
|
6375
6358
|
return this.connection.DFUInfo({ Cluster: this.Cluster, Name: this.Name }).then((response) => {
|
|
6376
|
-
var _a;
|
|
6377
6359
|
this.set({
|
|
6378
6360
|
Cluster: this.Cluster,
|
|
6379
6361
|
...response.FileDetail,
|
|
6380
|
-
ProtectList:
|
|
6362
|
+
ProtectList: response?.FileDetail?.ProtectList ?? { DFUFileProtect: [] }
|
|
6381
6363
|
});
|
|
6382
6364
|
return response.FileDetail;
|
|
6383
6365
|
}).catch((e) => {
|
|
@@ -6404,14 +6386,12 @@ const _LogicalFile = class _LogicalFile extends StateObject {
|
|
|
6404
6386
|
}
|
|
6405
6387
|
fetchListHistory() {
|
|
6406
6388
|
return this.connection.ListHistory({ Name: this.Name }).then((response) => {
|
|
6407
|
-
|
|
6408
|
-
return ((_a = response == null ? void 0 : response.History) == null ? void 0 : _a.Origin) || [];
|
|
6389
|
+
return response?.History?.Origin || [];
|
|
6409
6390
|
});
|
|
6410
6391
|
}
|
|
6411
6392
|
eraseHistory() {
|
|
6412
6393
|
return this.connection.EraseHistory({ Name: this.Name }).then((response) => {
|
|
6413
|
-
|
|
6414
|
-
return ((_a = response == null ? void 0 : response.History) == null ? void 0 : _a.Origin) || [];
|
|
6394
|
+
return response?.History?.Origin || [];
|
|
6415
6395
|
});
|
|
6416
6396
|
}
|
|
6417
6397
|
};
|
|
@@ -6428,15 +6408,7 @@ __name(_MachineCache, "MachineCache");
|
|
|
6428
6408
|
let MachineCache = _MachineCache;
|
|
6429
6409
|
const _machines = new MachineCache();
|
|
6430
6410
|
const _Machine = class _Machine extends StateObject {
|
|
6431
|
-
|
|
6432
|
-
super();
|
|
6433
|
-
__publicField(this, "connection");
|
|
6434
|
-
if (optsConnection instanceof MachineService) {
|
|
6435
|
-
this.connection = optsConnection;
|
|
6436
|
-
} else {
|
|
6437
|
-
this.connection = new MachineService(optsConnection);
|
|
6438
|
-
}
|
|
6439
|
-
}
|
|
6411
|
+
connection;
|
|
6440
6412
|
get Address() {
|
|
6441
6413
|
return this.get("Address");
|
|
6442
6414
|
}
|
|
@@ -6518,6 +6490,14 @@ const _Machine = class _Machine extends StateObject {
|
|
|
6518
6490
|
}
|
|
6519
6491
|
return retVal;
|
|
6520
6492
|
}
|
|
6493
|
+
constructor(optsConnection) {
|
|
6494
|
+
super();
|
|
6495
|
+
if (optsConnection instanceof MachineService) {
|
|
6496
|
+
this.connection = optsConnection;
|
|
6497
|
+
} else {
|
|
6498
|
+
this.connection = new MachineService(optsConnection);
|
|
6499
|
+
}
|
|
6500
|
+
}
|
|
6521
6501
|
};
|
|
6522
6502
|
__name(_Machine, "Machine");
|
|
6523
6503
|
let Machine = _Machine;
|
|
@@ -6532,21 +6512,8 @@ __name(_TargetClusterCache, "TargetClusterCache");
|
|
|
6532
6512
|
let TargetClusterCache = _TargetClusterCache;
|
|
6533
6513
|
const _targetCluster = new TargetClusterCache();
|
|
6534
6514
|
const _TargetCluster = class _TargetCluster extends StateObject {
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
__publicField(this, "connection");
|
|
6538
|
-
__publicField(this, "machineConnection");
|
|
6539
|
-
if (optsConnection instanceof TopologyService) {
|
|
6540
|
-
this.connection = optsConnection;
|
|
6541
|
-
this.machineConnection = new MachineService(optsConnection.connectionOptions());
|
|
6542
|
-
} else {
|
|
6543
|
-
this.connection = new TopologyService(optsConnection);
|
|
6544
|
-
this.machineConnection = new MachineService(optsConnection);
|
|
6545
|
-
}
|
|
6546
|
-
this.clear({
|
|
6547
|
-
Name: name
|
|
6548
|
-
});
|
|
6549
|
-
}
|
|
6515
|
+
connection;
|
|
6516
|
+
machineConnection;
|
|
6550
6517
|
get BaseUrl() {
|
|
6551
6518
|
return this.connection.baseUrl;
|
|
6552
6519
|
}
|
|
@@ -6592,6 +6559,19 @@ const _TargetCluster = class _TargetCluster extends StateObject {
|
|
|
6592
6559
|
}
|
|
6593
6560
|
return retVal;
|
|
6594
6561
|
}
|
|
6562
|
+
constructor(optsConnection, name) {
|
|
6563
|
+
super();
|
|
6564
|
+
if (optsConnection instanceof TopologyService) {
|
|
6565
|
+
this.connection = optsConnection;
|
|
6566
|
+
this.machineConnection = new MachineService(optsConnection.connectionOptions());
|
|
6567
|
+
} else {
|
|
6568
|
+
this.connection = new TopologyService(optsConnection);
|
|
6569
|
+
this.machineConnection = new MachineService(optsConnection);
|
|
6570
|
+
}
|
|
6571
|
+
this.clear({
|
|
6572
|
+
Name: name
|
|
6573
|
+
});
|
|
6574
|
+
}
|
|
6595
6575
|
fetchMachines(request = {}) {
|
|
6596
6576
|
return this.machineConnection.GetTargetClusterInfo({
|
|
6597
6577
|
TargetClusters: {
|
|
@@ -6688,16 +6668,7 @@ __name(_TopologyCache, "TopologyCache");
|
|
|
6688
6668
|
let TopologyCache = _TopologyCache;
|
|
6689
6669
|
const _topology = new TopologyCache();
|
|
6690
6670
|
const _Topology = class _Topology extends StateObject {
|
|
6691
|
-
|
|
6692
|
-
super();
|
|
6693
|
-
__publicField(this, "connection");
|
|
6694
|
-
__publicField(this, "_prevRefresh");
|
|
6695
|
-
if (optsConnection instanceof TopologyService) {
|
|
6696
|
-
this.connection = optsConnection;
|
|
6697
|
-
} else {
|
|
6698
|
-
this.connection = new TopologyService(optsConnection);
|
|
6699
|
-
}
|
|
6700
|
-
}
|
|
6671
|
+
connection;
|
|
6701
6672
|
get BaseUrl() {
|
|
6702
6673
|
return this.connection.baseUrl;
|
|
6703
6674
|
}
|
|
@@ -6726,6 +6697,14 @@ const _Topology = class _Topology extends StateObject {
|
|
|
6726
6697
|
}
|
|
6727
6698
|
return retVal;
|
|
6728
6699
|
}
|
|
6700
|
+
constructor(optsConnection) {
|
|
6701
|
+
super();
|
|
6702
|
+
if (optsConnection instanceof TopologyService) {
|
|
6703
|
+
this.connection = optsConnection;
|
|
6704
|
+
} else {
|
|
6705
|
+
this.connection = new TopologyService(optsConnection);
|
|
6706
|
+
}
|
|
6707
|
+
}
|
|
6729
6708
|
GetESPServiceBaseURL(type = "") {
|
|
6730
6709
|
return this.connection.TpServiceQuery({}).then((response) => {
|
|
6731
6710
|
const rootProtocol = this.connection.protocol();
|
|
@@ -6747,9 +6726,8 @@ const _Topology = class _Topology extends StateObject {
|
|
|
6747
6726
|
}
|
|
6748
6727
|
fetchTargetClusters() {
|
|
6749
6728
|
return this.connection.TpTargetClusterQuery({ Type: "ROOT" }).then((response) => {
|
|
6750
|
-
var _a;
|
|
6751
6729
|
this.set({
|
|
6752
|
-
TargetClusters:
|
|
6730
|
+
TargetClusters: response.TpTargetClusters?.TpTargetCluster ?? []
|
|
6753
6731
|
});
|
|
6754
6732
|
return this.CTargetClusters;
|
|
6755
6733
|
});
|
|
@@ -6770,6 +6748,7 @@ const _Topology = class _Topology extends StateObject {
|
|
|
6770
6748
|
return this.Services;
|
|
6771
6749
|
});
|
|
6772
6750
|
}
|
|
6751
|
+
_prevRefresh;
|
|
6773
6752
|
refresh(force = false) {
|
|
6774
6753
|
if (!this._prevRefresh || force) {
|
|
6775
6754
|
this._prevRefresh = Promise.all([this.fetchTargetClusters(), this.fetchLogicalClusters(), this.fetchServices()]).then(() => {
|
|
@@ -6886,14 +6865,14 @@ function espSkew2Number(skew) {
|
|
|
6886
6865
|
}
|
|
6887
6866
|
__name(espSkew2Number, "espSkew2Number");
|
|
6888
6867
|
const _LocalisedXGMMLWriter = class _LocalisedXGMMLWriter {
|
|
6868
|
+
graph;
|
|
6869
|
+
m_xgmml;
|
|
6870
|
+
m_visibleSubgraphs;
|
|
6871
|
+
m_visibleVertices;
|
|
6872
|
+
m_semiVisibleVertices;
|
|
6873
|
+
m_visibleEdges;
|
|
6874
|
+
noSpills;
|
|
6889
6875
|
constructor(graph) {
|
|
6890
|
-
__publicField(this, "graph");
|
|
6891
|
-
__publicField(this, "m_xgmml");
|
|
6892
|
-
__publicField(this, "m_visibleSubgraphs");
|
|
6893
|
-
__publicField(this, "m_visibleVertices");
|
|
6894
|
-
__publicField(this, "m_semiVisibleVertices");
|
|
6895
|
-
__publicField(this, "m_visibleEdges");
|
|
6896
|
-
__publicField(this, "noSpills");
|
|
6897
6876
|
this.graph = graph;
|
|
6898
6877
|
this.m_xgmml = "";
|
|
6899
6878
|
this.m_visibleSubgraphs = {};
|
|
@@ -7120,12 +7099,12 @@ const _LocalisedXGMMLWriter = class _LocalisedXGMMLWriter {
|
|
|
7120
7099
|
__name(_LocalisedXGMMLWriter, "LocalisedXGMMLWriter");
|
|
7121
7100
|
let LocalisedXGMMLWriter = _LocalisedXGMMLWriter;
|
|
7122
7101
|
const _GraphItem = class _GraphItem {
|
|
7102
|
+
__hpcc_graph;
|
|
7103
|
+
__hpcc_parent;
|
|
7104
|
+
__widget;
|
|
7105
|
+
__hpcc_id;
|
|
7106
|
+
_globalID;
|
|
7123
7107
|
constructor(graph, id) {
|
|
7124
|
-
__publicField(this, "__hpcc_graph");
|
|
7125
|
-
__publicField(this, "__hpcc_parent");
|
|
7126
|
-
__publicField(this, "__widget");
|
|
7127
|
-
__publicField(this, "__hpcc_id");
|
|
7128
|
-
__publicField(this, "_globalID");
|
|
7129
7108
|
this.__hpcc_graph = graph;
|
|
7130
7109
|
this.__hpcc_id = id;
|
|
7131
7110
|
this._globalID = id;
|
|
@@ -7143,13 +7122,13 @@ const _GraphItem = class _GraphItem {
|
|
|
7143
7122
|
__name(_GraphItem, "GraphItem");
|
|
7144
7123
|
let GraphItem = _GraphItem;
|
|
7145
7124
|
const _Subgraph = class _Subgraph extends GraphItem {
|
|
7125
|
+
_globalType;
|
|
7126
|
+
__hpcc_subgraphs;
|
|
7127
|
+
__hpcc_vertices;
|
|
7128
|
+
__hpcc_edges;
|
|
7129
|
+
id;
|
|
7146
7130
|
constructor(graph, id) {
|
|
7147
7131
|
super(graph, id);
|
|
7148
|
-
__publicField(this, "_globalType");
|
|
7149
|
-
__publicField(this, "__hpcc_subgraphs");
|
|
7150
|
-
__publicField(this, "__hpcc_vertices");
|
|
7151
|
-
__publicField(this, "__hpcc_edges");
|
|
7152
|
-
__publicField(this, "id");
|
|
7153
7132
|
this._globalType = id === "0" ? "Graph" : "Cluster";
|
|
7154
7133
|
this.__hpcc_subgraphs = [];
|
|
7155
7134
|
this.__hpcc_vertices = [];
|
|
@@ -7203,16 +7182,15 @@ const _Subgraph = class _Subgraph extends GraphItem {
|
|
|
7203
7182
|
__name(_Subgraph, "Subgraph");
|
|
7204
7183
|
let Subgraph = _Subgraph;
|
|
7205
7184
|
const _Vertex = class _Vertex extends GraphItem {
|
|
7185
|
+
_globalType = "Vertex";
|
|
7186
|
+
_isSpill;
|
|
7206
7187
|
constructor(graph, id) {
|
|
7207
7188
|
super(graph, id);
|
|
7208
|
-
__publicField(this, "_globalType", "Vertex");
|
|
7209
|
-
__publicField(this, "_isSpill");
|
|
7210
7189
|
}
|
|
7211
7190
|
isSpill() {
|
|
7212
7191
|
return this._isSpill;
|
|
7213
7192
|
}
|
|
7214
7193
|
remove() {
|
|
7215
|
-
var _a;
|
|
7216
7194
|
const inVertices = this.getInVertices();
|
|
7217
7195
|
if (inVertices.length <= 1) {
|
|
7218
7196
|
console.warn(this.__hpcc_id + ": remove only supports single or zero inputs activities...");
|
|
@@ -7223,7 +7201,7 @@ const _Vertex = class _Vertex extends GraphItem {
|
|
|
7223
7201
|
this.getOutEdges().forEach((edge) => {
|
|
7224
7202
|
edge.setSource(inVertices[0]);
|
|
7225
7203
|
});
|
|
7226
|
-
|
|
7204
|
+
this.__hpcc_parent?.removeVertex(this);
|
|
7227
7205
|
this.__hpcc_graph.removeItem(this);
|
|
7228
7206
|
}
|
|
7229
7207
|
getInVertices() {
|
|
@@ -7250,13 +7228,13 @@ const _Vertex = class _Vertex extends GraphItem {
|
|
|
7250
7228
|
__name(_Vertex, "Vertex");
|
|
7251
7229
|
let Vertex = _Vertex;
|
|
7252
7230
|
const _Edge = class _Edge extends GraphItem {
|
|
7231
|
+
_globalType = "Edge";
|
|
7232
|
+
_sourceActivity;
|
|
7233
|
+
source;
|
|
7234
|
+
_targetActivity;
|
|
7235
|
+
target;
|
|
7253
7236
|
constructor(graph, id) {
|
|
7254
7237
|
super(graph, id);
|
|
7255
|
-
__publicField(this, "_globalType", "Edge");
|
|
7256
|
-
__publicField(this, "_sourceActivity");
|
|
7257
|
-
__publicField(this, "source");
|
|
7258
|
-
__publicField(this, "_targetActivity");
|
|
7259
|
-
__publicField(this, "target");
|
|
7260
7238
|
this._globalType = "Edge";
|
|
7261
7239
|
}
|
|
7262
7240
|
remove() {
|
|
@@ -7285,12 +7263,12 @@ const _Edge = class _Edge extends GraphItem {
|
|
|
7285
7263
|
__name(_Edge, "Edge");
|
|
7286
7264
|
let Edge = _Edge;
|
|
7287
7265
|
const _QueryGraph = class _QueryGraph {
|
|
7266
|
+
idx = {};
|
|
7267
|
+
subgraphs = [];
|
|
7268
|
+
vertices = [];
|
|
7269
|
+
edges = [];
|
|
7270
|
+
xgmml = "";
|
|
7288
7271
|
constructor() {
|
|
7289
|
-
__publicField(this, "idx", {});
|
|
7290
|
-
__publicField(this, "subgraphs", []);
|
|
7291
|
-
__publicField(this, "vertices", []);
|
|
7292
|
-
__publicField(this, "edges", []);
|
|
7293
|
-
__publicField(this, "xgmml", "");
|
|
7294
7272
|
this.clear();
|
|
7295
7273
|
}
|
|
7296
7274
|
clear() {
|
|
@@ -7517,28 +7495,13 @@ __name(_QueryCache, "QueryCache");
|
|
|
7517
7495
|
let QueryCache = _QueryCache;
|
|
7518
7496
|
const _queries = new QueryCache();
|
|
7519
7497
|
const _Query = class _Query extends StateObject {
|
|
7520
|
-
|
|
7521
|
-
super();
|
|
7522
|
-
__publicField(this, "wsWorkunitsService");
|
|
7523
|
-
__publicField(this, "topology");
|
|
7524
|
-
__publicField(this, "_requestSchema");
|
|
7525
|
-
__publicField(this, "_responseSchema");
|
|
7526
|
-
__publicField(this, "_eclService");
|
|
7527
|
-
if (optsConnection instanceof WorkunitsService) {
|
|
7528
|
-
this.wsWorkunitsService = optsConnection;
|
|
7529
|
-
} else {
|
|
7530
|
-
this.wsWorkunitsService = new WorkunitsService(optsConnection);
|
|
7531
|
-
}
|
|
7532
|
-
this.topology = Topology.attach(this.wsWorkunitsService.opts());
|
|
7533
|
-
this.set({
|
|
7534
|
-
QuerySet: querySet,
|
|
7535
|
-
QueryId: queryID,
|
|
7536
|
-
...queryDetails
|
|
7537
|
-
});
|
|
7538
|
-
}
|
|
7498
|
+
wsWorkunitsService;
|
|
7539
7499
|
get BaseUrl() {
|
|
7540
7500
|
return this.wsWorkunitsService.baseUrl;
|
|
7541
7501
|
}
|
|
7502
|
+
topology;
|
|
7503
|
+
_requestSchema;
|
|
7504
|
+
_responseSchema;
|
|
7542
7505
|
get properties() {
|
|
7543
7506
|
return this.get();
|
|
7544
7507
|
}
|
|
@@ -7617,6 +7580,20 @@ const _Query = class _Query extends StateObject {
|
|
|
7617
7580
|
get PriorityID() {
|
|
7618
7581
|
return this.get("PriorityID");
|
|
7619
7582
|
}
|
|
7583
|
+
constructor(optsConnection, querySet, queryID, queryDetails) {
|
|
7584
|
+
super();
|
|
7585
|
+
if (optsConnection instanceof WorkunitsService) {
|
|
7586
|
+
this.wsWorkunitsService = optsConnection;
|
|
7587
|
+
} else {
|
|
7588
|
+
this.wsWorkunitsService = new WorkunitsService(optsConnection);
|
|
7589
|
+
}
|
|
7590
|
+
this.topology = Topology.attach(this.wsWorkunitsService.opts());
|
|
7591
|
+
this.set({
|
|
7592
|
+
QuerySet: querySet,
|
|
7593
|
+
QueryId: queryID,
|
|
7594
|
+
...queryDetails
|
|
7595
|
+
});
|
|
7596
|
+
}
|
|
7620
7597
|
static attach(optsConnection, querySet, queryId, state) {
|
|
7621
7598
|
const retVal = _queries.get({ BaseUrl: optsConnection.baseUrl, QuerySet: querySet, QueryId: queryId }, () => {
|
|
7622
7599
|
return new _Query(optsConnection, querySet, queryId);
|
|
@@ -7626,13 +7603,13 @@ const _Query = class _Query extends StateObject {
|
|
|
7626
7603
|
}
|
|
7627
7604
|
return retVal;
|
|
7628
7605
|
}
|
|
7606
|
+
_eclService;
|
|
7629
7607
|
async wsEclService() {
|
|
7630
7608
|
if (!this._eclService) {
|
|
7631
7609
|
this._eclService = this.topology.fetchServices({}).then((services) => {
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
if ((binding == null ? void 0 : binding.Service) === "ws_ecl") {
|
|
7610
|
+
for (const espServer of services?.TpEspServers?.TpEspServer ?? []) {
|
|
7611
|
+
for (const binding of espServer?.TpBindings?.TpBinding ?? []) {
|
|
7612
|
+
if (binding?.Service === "ws_ecl") {
|
|
7636
7613
|
const baseUrl = `${binding.Protocol}://${globalThis.location.hostname}:${binding.Port}`;
|
|
7637
7614
|
return new EclService({ baseUrl });
|
|
7638
7615
|
}
|
|
@@ -7657,7 +7634,7 @@ const _Query = class _Query extends StateObject {
|
|
|
7657
7634
|
async fetchRequestSchema() {
|
|
7658
7635
|
const wsEclService = await this.wsEclService();
|
|
7659
7636
|
try {
|
|
7660
|
-
this._requestSchema = await
|
|
7637
|
+
this._requestSchema = await wsEclService?.requestJson(this.QuerySet, this.QueryId) ?? [];
|
|
7661
7638
|
} catch (e) {
|
|
7662
7639
|
logger$1.debug(e.message ?? e);
|
|
7663
7640
|
this._requestSchema = [];
|
|
@@ -7666,7 +7643,7 @@ const _Query = class _Query extends StateObject {
|
|
|
7666
7643
|
async fetchResponseSchema() {
|
|
7667
7644
|
const wsEclService = await this.wsEclService();
|
|
7668
7645
|
try {
|
|
7669
|
-
this._responseSchema = await
|
|
7646
|
+
this._responseSchema = await wsEclService?.responseJson(this.QuerySet, this.QueryId) ?? {};
|
|
7670
7647
|
} catch (e) {
|
|
7671
7648
|
logger$1.debug(e.message ?? e);
|
|
7672
7649
|
this._responseSchema = {};
|
|
@@ -7680,10 +7657,9 @@ const _Query = class _Query extends StateObject {
|
|
|
7680
7657
|
}
|
|
7681
7658
|
fetchGraph(GraphName = "", SubGraphId = "") {
|
|
7682
7659
|
return this.wsWorkunitsService.WUQueryGetGraph({ Target: this.QuerySet, QueryId: this.QueryId, GraphName, SubGraphId }).then((response) => {
|
|
7683
|
-
var _a;
|
|
7684
7660
|
const graph = new QueryGraph();
|
|
7685
7661
|
let first = true;
|
|
7686
|
-
for (const graphItem of
|
|
7662
|
+
for (const graphItem of response?.Graphs?.ECLGraphEx || []) {
|
|
7687
7663
|
if (first) {
|
|
7688
7664
|
graph.load(graphItem.Graph);
|
|
7689
7665
|
first = false;
|
|
@@ -7746,12 +7722,12 @@ const _Query = class _Query extends StateObject {
|
|
|
7746
7722
|
async submit(request) {
|
|
7747
7723
|
const wsEclService = await this.wsEclService();
|
|
7748
7724
|
try {
|
|
7749
|
-
return
|
|
7725
|
+
return wsEclService?.submit(this.QuerySet, this.QueryId, request).then((results) => {
|
|
7750
7726
|
for (const key in results) {
|
|
7751
7727
|
results[key] = results[key].Row;
|
|
7752
7728
|
}
|
|
7753
7729
|
return results;
|
|
7754
|
-
})
|
|
7730
|
+
}) ?? [];
|
|
7755
7731
|
} catch (e) {
|
|
7756
7732
|
logger$1.debug(e.message ?? e);
|
|
7757
7733
|
return [];
|
|
@@ -7820,13 +7796,21 @@ const _ValueChangedMessage = class _ValueChangedMessage extends Message {
|
|
|
7820
7796
|
__name(_ValueChangedMessage, "ValueChangedMessage");
|
|
7821
7797
|
let ValueChangedMessage = _ValueChangedMessage;
|
|
7822
7798
|
const _Store = class _Store {
|
|
7799
|
+
connection;
|
|
7800
|
+
get BaseUrl() {
|
|
7801
|
+
return this.connection.baseUrl;
|
|
7802
|
+
}
|
|
7803
|
+
Name;
|
|
7804
|
+
UserSpecific;
|
|
7805
|
+
Namespace;
|
|
7806
|
+
_dispatch = new Dispatch();
|
|
7807
|
+
static attach(optsConnection, Name = "HPCCApps", Namespace, UserSpecific = true) {
|
|
7808
|
+
const retVal = _store.get({ BaseUrl: optsConnection.baseUrl, Name, UserSpecific, Namespace }, () => {
|
|
7809
|
+
return new _Store(optsConnection, Name, Namespace, UserSpecific);
|
|
7810
|
+
});
|
|
7811
|
+
return retVal;
|
|
7812
|
+
}
|
|
7823
7813
|
constructor(optsConnection, Name, Namespace, UserSpecific) {
|
|
7824
|
-
__publicField(this, "connection");
|
|
7825
|
-
__publicField(this, "Name");
|
|
7826
|
-
__publicField(this, "UserSpecific");
|
|
7827
|
-
__publicField(this, "Namespace");
|
|
7828
|
-
__publicField(this, "_dispatch", new Dispatch());
|
|
7829
|
-
__publicField(this, "_knownValues", {});
|
|
7830
7814
|
if (optsConnection instanceof StoreService) {
|
|
7831
7815
|
this.connection = optsConnection;
|
|
7832
7816
|
} else {
|
|
@@ -7836,15 +7820,7 @@ const _Store = class _Store {
|
|
|
7836
7820
|
this.UserSpecific = UserSpecific;
|
|
7837
7821
|
this.Namespace = Namespace;
|
|
7838
7822
|
}
|
|
7839
|
-
|
|
7840
|
-
return this.connection.baseUrl;
|
|
7841
|
-
}
|
|
7842
|
-
static attach(optsConnection, Name = "HPCCApps", Namespace, UserSpecific = true) {
|
|
7843
|
-
const retVal = _store.get({ BaseUrl: optsConnection.baseUrl, Name, UserSpecific, Namespace }, () => {
|
|
7844
|
-
return new _Store(optsConnection, Name, Namespace, UserSpecific);
|
|
7845
|
-
});
|
|
7846
|
-
return retVal;
|
|
7847
|
-
}
|
|
7823
|
+
_knownValues = {};
|
|
7848
7824
|
create() {
|
|
7849
7825
|
this.connection.CreateStore({ Name: this.Name, UserSpecific: this.UserSpecific, Type: "", Description: "" });
|
|
7850
7826
|
}
|
|
@@ -7946,15 +7922,8 @@ __name(_DFUWorkunitCache, "DFUWorkunitCache");
|
|
|
7946
7922
|
let DFUWorkunitCache = _DFUWorkunitCache;
|
|
7947
7923
|
const _workunits = new DFUWorkunitCache();
|
|
7948
7924
|
const _DFUWorkunit = class _DFUWorkunit extends StateObject {
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
super();
|
|
7952
|
-
__publicField(this, "connection");
|
|
7953
|
-
__publicField(this, "topologyConnection");
|
|
7954
|
-
this.connection = new FileSprayService(optsConnection);
|
|
7955
|
-
this.topologyConnection = new TopologyService(optsConnection);
|
|
7956
|
-
this.clearState(wuid);
|
|
7957
|
-
}
|
|
7925
|
+
connection;
|
|
7926
|
+
topologyConnection;
|
|
7958
7927
|
get BaseUrl() {
|
|
7959
7928
|
return this.connection.baseUrl;
|
|
7960
7929
|
}
|
|
@@ -8192,11 +8161,10 @@ const _DFUWorkunit = class _DFUWorkunit extends StateObject {
|
|
|
8192
8161
|
});
|
|
8193
8162
|
}
|
|
8194
8163
|
update(request) {
|
|
8195
|
-
var _a, _b;
|
|
8196
8164
|
return this.connection.UpdateDFUWorkunitEx({
|
|
8197
8165
|
wu: {
|
|
8198
|
-
JobName:
|
|
8199
|
-
isProtected:
|
|
8166
|
+
JobName: request?.wu?.JobName ?? this.JobName,
|
|
8167
|
+
isProtected: request?.wu?.isProtected ?? this.isProtected,
|
|
8200
8168
|
ID: this.ID,
|
|
8201
8169
|
State: this.State
|
|
8202
8170
|
},
|
|
@@ -8342,6 +8310,13 @@ const _DFUWorkunit = class _DFUWorkunit extends StateObject {
|
|
|
8342
8310
|
});
|
|
8343
8311
|
});
|
|
8344
8312
|
}
|
|
8313
|
+
// --- --- ---
|
|
8314
|
+
constructor(optsConnection, wuid) {
|
|
8315
|
+
super();
|
|
8316
|
+
this.connection = new FileSprayService(optsConnection);
|
|
8317
|
+
this.topologyConnection = new TopologyService(optsConnection);
|
|
8318
|
+
this.clearState(wuid);
|
|
8319
|
+
}
|
|
8345
8320
|
clearState(wuid) {
|
|
8346
8321
|
this.clear({
|
|
8347
8322
|
ID: wuid,
|