@hpcc-js/comms 2.84.2 → 2.84.4
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/index.es6.js +127 -164
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +207 -208
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.node.js +141 -178
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.min.js +1 -1
- package/dist/index.node.min.js.map +1 -1
- package/lib-es6/__package__.js +2 -2
- package/lib-es6/ecl/dfuWorkunit.js +2 -2
- package/lib-es6/ecl/dfuWorkunit.js.map +1 -1
- package/lib-es6/ecl/workunit.js +6 -1
- package/lib-es6/ecl/workunit.js.map +1 -1
- package/lib-es6/services/fileSpray.js +3 -0
- package/lib-es6/services/fileSpray.js.map +1 -1
- package/lib-es6/services/wsLogaccess.js +16 -69
- package/lib-es6/services/wsLogaccess.js.map +1 -1
- package/lib-es6/services/wsTopology.js +1 -1
- package/lib-es6/services/wsdl/WsTopology/v1.32/WsTopology.js +83 -0
- package/lib-es6/services/wsdl/WsTopology/v1.32/WsTopology.js.map +1 -0
- package/package.json +11 -11
- package/src/__package__.ts +2 -2
- package/src/ecl/dfuWorkunit.ts +4 -4
- package/src/ecl/workunit.ts +4 -0
- package/src/services/fileSpray.ts +4 -0
- package/src/services/wsLogaccess.ts +24 -79
- package/src/services/wsTopology.ts +1 -1
- package/src/services/wsdl/WsTopology/v1.32/WsTopology.ts +885 -0
- package/types/__package__.d.ts +2 -2
- package/types/ecl/dfuWorkunit.d.ts +2 -2
- package/types/ecl/dfuWorkunit.d.ts.map +1 -1
- package/types/ecl/workunit.d.ts.map +1 -1
- package/types/services/fileSpray.d.ts +1 -0
- package/types/services/fileSpray.d.ts.map +1 -1
- package/types/services/wsLogaccess.d.ts +10 -10
- package/types/services/wsLogaccess.d.ts.map +1 -1
- package/types/services/wsTopology.d.ts +1 -1
- package/types/services/wsdl/WsTopology/v1.32/WsTopology.d.ts +716 -0
- package/types/services/wsdl/WsTopology/v1.32/WsTopology.d.ts.map +1 -0
- package/types-3.4/__package__.d.ts +2 -2
- package/types-3.4/ecl/dfuWorkunit.d.ts +2 -2
- package/types-3.4/services/fileSpray.d.ts +1 -0
- package/types-3.4/services/wsLogaccess.d.ts +10 -10
- package/types-3.4/services/wsTopology.d.ts +1 -1
- package/types-3.4/services/wsdl/WsTopology/v1.32/WsTopology.d.ts +716 -0
package/src/ecl/dfuWorkunit.ts
CHANGED
|
@@ -214,7 +214,7 @@ export class DFUWorkunit extends StateObject<UDFUWorkunitState, IDFUWorkunitStat
|
|
|
214
214
|
return this;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
fetchXML(callback?: void): Promise<
|
|
217
|
+
fetchXML(callback?: void): Promise<string> {
|
|
218
218
|
return this.DFUWUFile();
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -239,14 +239,14 @@ export class DFUWorkunit extends StateObject<UDFUWorkunitState, IDFUWorkunitStat
|
|
|
239
239
|
return retVal;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
protected DFUWUFile(_request: Partial<FileSpray.DFUWUFileRequest> = {}): Promise<
|
|
243
|
-
return this.connection.
|
|
242
|
+
protected DFUWUFile(_request: Partial<FileSpray.DFUWUFileRequest> = {}): Promise<string> {
|
|
243
|
+
return this.connection.DFUWUFileEx({
|
|
244
244
|
..._request, Wuid: this.ID
|
|
245
245
|
}).then(response => {
|
|
246
246
|
//TODO: additional processing?
|
|
247
247
|
return response;
|
|
248
248
|
}).catch((e: ESPExceptions) => {
|
|
249
|
-
return
|
|
249
|
+
return "";
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
|
package/src/ecl/workunit.ts
CHANGED
|
@@ -424,6 +424,10 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
|
|
|
424
424
|
|
|
425
425
|
async refreshState(): Promise<this> {
|
|
426
426
|
await this.WUQuery();
|
|
427
|
+
// Ensure "isComplete" is correct for WUs that are only "Compiled".
|
|
428
|
+
if (this.StateID === WUStateID.Compiled && !this.ActionEx && !this._submitAction) {
|
|
429
|
+
await this.refreshInfo();
|
|
430
|
+
}
|
|
427
431
|
return this;
|
|
428
432
|
}
|
|
429
433
|
|
|
@@ -13,6 +13,10 @@ export interface UpdateDFUWorkunitEx extends UpdateDFUWorkunitMinusWU {
|
|
|
13
13
|
|
|
14
14
|
export class FileSprayService extends FileSprayServiceBase {
|
|
15
15
|
|
|
16
|
+
DFUWUFileEx(request: FileSpray.DFUWUFileRequest): Promise<string> {
|
|
17
|
+
return this._connection.send("DFUWUFile", request, "text");
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
SprayFixedEx(request: Partial<FileSpray.SprayFixed>): Promise<FileSpray.SprayFixedResponse> {
|
|
17
21
|
return this._connection.send("SprayFixed", request);
|
|
18
22
|
}
|
|
@@ -10,13 +10,13 @@ export {
|
|
|
10
10
|
export interface GetLogsExRequest {
|
|
11
11
|
audience?: string;
|
|
12
12
|
class?: string[];
|
|
13
|
-
|
|
13
|
+
workunits?: string;
|
|
14
14
|
message?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
processid?: string;
|
|
16
|
+
logid?: string;
|
|
17
|
+
threadid?: string;
|
|
18
18
|
timestamp?: string;
|
|
19
|
-
|
|
19
|
+
components?: string;
|
|
20
20
|
StartDate?: Date;
|
|
21
21
|
EndDate?: Date;
|
|
22
22
|
LogLineStartFrom: number,
|
|
@@ -39,73 +39,19 @@ export const enum TargetAudience {
|
|
|
39
39
|
Audit = "ADT"
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
//properties here are "LogType" values in Ws_logaccess.GetLogAccessInfo
|
|
42
43
|
export interface LogLine {
|
|
43
44
|
audience?: string;
|
|
44
45
|
class?: string;
|
|
45
|
-
|
|
46
|
+
workunits?: string;
|
|
46
47
|
message?: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
processid?: number;
|
|
49
|
+
logid?: string;
|
|
50
|
+
threadid?: number;
|
|
50
51
|
timestamp?: string;
|
|
51
|
-
|
|
52
|
+
components?: string;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
enum ElasticKnownColumns {
|
|
55
|
-
audience = "hpcc.log.audience",
|
|
56
|
-
class = "hpcc.log.class",
|
|
57
|
-
containerName = "kubernetes.container.name",
|
|
58
|
-
jobId = "hpcc.log.jobid",
|
|
59
|
-
message = "hpcc.log.message",
|
|
60
|
-
procId = "hpcc.log.procid",
|
|
61
|
-
sequence = "hpcc.log.sequence",
|
|
62
|
-
threadId = "hpcc.log.threadid",
|
|
63
|
-
timestamp = "hpcc.log.timestamp",
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const RElasticKnownColumns: { [key: string]: string } = {};
|
|
67
|
-
for (const key in ElasticKnownColumns) {
|
|
68
|
-
if (ElasticKnownColumns.hasOwnProperty(key)) {
|
|
69
|
-
RElasticKnownColumns[ElasticKnownColumns[key]] = key;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const elasticToLogLine = (line?: any): LogLine => {
|
|
74
|
-
const retVal: LogLine = {};
|
|
75
|
-
for (const key in RElasticKnownColumns) {
|
|
76
|
-
retVal[RElasticKnownColumns[key]] = line?.fields[0][key];
|
|
77
|
-
}
|
|
78
|
-
return retVal;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
enum AzureKnownColumns {
|
|
82
|
-
audience = "hpcc_log_audience", // #Target Audience
|
|
83
|
-
class = "hpcc_log_class", // #Log Entry type
|
|
84
|
-
containerID = "ContainerID",
|
|
85
|
-
containerName = "ContainerID",
|
|
86
|
-
jobId = "hpcc_log_jobid",
|
|
87
|
-
message = "hpcc_log_message", // #The log message
|
|
88
|
-
procId = "",
|
|
89
|
-
sequence = "hpcc_log_sequence",
|
|
90
|
-
threadId = "hpcc_log_threadid",
|
|
91
|
-
timestamp = "hpcc_log_timestamp"
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const RAzureKnownColumns: { [key: string]: string } = {};
|
|
95
|
-
for (const key in AzureKnownColumns) {
|
|
96
|
-
if (AzureKnownColumns.hasOwnProperty(key)) {
|
|
97
|
-
RAzureKnownColumns[AzureKnownColumns[key]] = key;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const azureToLogLine = (line?: any): LogLine => {
|
|
102
|
-
const retVal: LogLine = {};
|
|
103
|
-
for (const key in RAzureKnownColumns) {
|
|
104
|
-
retVal[RAzureKnownColumns[key]] = line?.fields[0][key] ?? "";
|
|
105
|
-
}
|
|
106
|
-
return retVal;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
55
|
export interface GetLogsExResponse {
|
|
110
56
|
lines: LogLine[],
|
|
111
57
|
total: number,
|
|
@@ -128,6 +74,16 @@ export class LogaccessService extends LogaccessServiceBase {
|
|
|
128
74
|
|
|
129
75
|
async GetLogsEx(request: GetLogsExRequest): Promise<GetLogsExResponse> {
|
|
130
76
|
const logInfo = await this.GetLogAccessInfo();
|
|
77
|
+
const columnMap = {};
|
|
78
|
+
logInfo.Columns.Column.forEach(column => columnMap[column.LogType] = column.Name);
|
|
79
|
+
|
|
80
|
+
const convertLogLine = (line: any) => {
|
|
81
|
+
const retVal: LogLine = {};
|
|
82
|
+
for (const key in columnMap) {
|
|
83
|
+
retVal[key] = line?.fields[0][columnMap[key]] ?? "";
|
|
84
|
+
}
|
|
85
|
+
return retVal;
|
|
86
|
+
};
|
|
131
87
|
|
|
132
88
|
const getLogsRequest: WsLogaccess.GetLogsRequest = {
|
|
133
89
|
Filter: {
|
|
@@ -151,17 +107,8 @@ export class LogaccessService extends LogaccessServiceBase {
|
|
|
151
107
|
const filters: WsLogaccess.leftFilter[] = [];
|
|
152
108
|
for (const key in request) {
|
|
153
109
|
let searchField;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if (key in AzureKnownColumns) {
|
|
157
|
-
searchField = AzureKnownColumns[key];
|
|
158
|
-
}
|
|
159
|
-
break;
|
|
160
|
-
case "elasticstack":
|
|
161
|
-
if (key in ElasticKnownColumns) {
|
|
162
|
-
searchField = ElasticKnownColumns[key];
|
|
163
|
-
}
|
|
164
|
-
break;
|
|
110
|
+
if (key in columnMap) {
|
|
111
|
+
searchField = columnMap[key];
|
|
165
112
|
}
|
|
166
113
|
if (searchField) {
|
|
167
114
|
if (Array.isArray(request[key])) {
|
|
@@ -244,10 +191,8 @@ export class LogaccessService extends LogaccessServiceBase {
|
|
|
244
191
|
let lines = [];
|
|
245
192
|
switch (logInfo.RemoteLogManagerType) {
|
|
246
193
|
case "azureloganalyticscurl":
|
|
247
|
-
lines = logLines.lines?.map(azureToLogLine) ?? [];
|
|
248
|
-
break;
|
|
249
194
|
case "elasticstack":
|
|
250
|
-
lines = logLines.lines?.map(
|
|
195
|
+
lines = logLines.lines?.map(convertLogLine) ?? [];
|
|
251
196
|
break;
|
|
252
197
|
default:
|
|
253
198
|
logger.warning(`Unknown RemoteLogManagerType: ${logInfo.RemoteLogManagerType}`);
|