@hpcc-js/comms 2.82.2 → 2.83.0
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 +607 -170
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +606 -169
- 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 +606 -169
- 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 +58 -1
- package/lib-es6/ecl/dfuWorkunit.js.map +1 -1
- package/lib-es6/ecl/query.js +30 -2
- package/lib-es6/ecl/query.js.map +1 -1
- package/lib-es6/ecl/workunit.js +9 -1
- package/lib-es6/ecl/workunit.js.map +1 -1
- package/lib-es6/services/fileSpray.js +5 -1
- package/lib-es6/services/fileSpray.js.map +1 -1
- package/lib-es6/services/wsLogaccess.js +147 -125
- package/lib-es6/services/wsLogaccess.js.map +1 -1
- package/lib-es6/services/wsdl/FileSpray/v1.25/FileSpray.js +116 -0
- package/lib-es6/services/wsdl/FileSpray/v1.25/FileSpray.js.map +1 -0
- package/package.json +2 -2
- package/src/__package__.ts +2 -2
- package/src/ecl/dfuWorkunit.ts +56 -3
- package/src/ecl/query.ts +17 -1
- package/src/ecl/workunit.ts +10 -1
- package/src/services/fileSpray.ts +11 -96
- package/src/services/wsLogaccess.ts +22 -8
- package/src/services/wsdl/FileSpray/v1.25/FileSpray.ts +1040 -0
- package/types/__package__.d.ts +2 -2
- package/types/ecl/dfuWorkunit.d.ts +11 -3
- package/types/ecl/dfuWorkunit.d.ts.map +1 -1
- package/types/ecl/query.d.ts +1 -0
- package/types/ecl/query.d.ts.map +1 -1
- package/types/ecl/workunit.d.ts.map +1 -1
- package/types/services/fileSpray.d.ts +9 -95
- package/types/services/fileSpray.d.ts.map +1 -1
- package/types/services/wsLogaccess.d.ts.map +1 -1
- package/types/services/wsdl/FileSpray/v1.25/FileSpray.d.ts +856 -0
- package/types/services/wsdl/FileSpray/v1.25/FileSpray.d.ts.map +1 -0
- package/types-3.4/__package__.d.ts +2 -2
- package/types-3.4/ecl/dfuWorkunit.d.ts +11 -3
- package/types-3.4/ecl/query.d.ts +1 -0
- package/types-3.4/services/fileSpray.d.ts +9 -95
- package/types-3.4/services/wsdl/FileSpray/v1.25/FileSpray.d.ts +856 -0
package/dist/index.js
CHANGED
|
@@ -611,8 +611,8 @@
|
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
var PKG_NAME = "@hpcc-js/comms";
|
|
614
|
-
var PKG_VERSION = "2.
|
|
615
|
-
var BUILD_VERSION = "2.104.
|
|
614
|
+
var PKG_VERSION = "2.83.0";
|
|
615
|
+
var BUILD_VERSION = "2.104.22";
|
|
616
616
|
|
|
617
617
|
/******************************************************************************
|
|
618
618
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1089,109 +1089,114 @@
|
|
|
1089
1089
|
return Service;
|
|
1090
1090
|
}());
|
|
1091
1091
|
|
|
1092
|
-
|
|
1093
|
-
(function (
|
|
1094
|
-
DFUWUActions
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1092
|
+
exports.FileSpray = void 0;
|
|
1093
|
+
(function (FileSpray) {
|
|
1094
|
+
(function (DFUWUActions) {
|
|
1095
|
+
DFUWUActions["Delete"] = "Delete";
|
|
1096
|
+
DFUWUActions["Protect"] = "Protect";
|
|
1097
|
+
DFUWUActions["Unprotect"] = "Unprotect";
|
|
1098
|
+
DFUWUActions["Restore"] = "Restore";
|
|
1099
|
+
DFUWUActions["SetToFailed"] = "SetToFailed";
|
|
1100
|
+
DFUWUActions["Archive"] = "Archive";
|
|
1101
|
+
})(FileSpray.DFUWUActions || (FileSpray.DFUWUActions = {}));
|
|
1102
|
+
})(exports.FileSpray || (exports.FileSpray = {}));
|
|
1101
1103
|
var FileSprayServiceBase = /** @class */ (function (_super) {
|
|
1102
1104
|
__extends(FileSprayServiceBase, _super);
|
|
1103
1105
|
function FileSprayServiceBase(optsConnection) {
|
|
1104
|
-
return _super.call(this, optsConnection, "FileSpray", "1.
|
|
1106
|
+
return _super.call(this, optsConnection, "FileSpray", "1.25") || this;
|
|
1105
1107
|
}
|
|
1106
1108
|
FileSprayServiceBase.prototype.AbortDFUWorkunit = function (request) {
|
|
1107
|
-
return this._connection.send("AbortDFUWorkunit", request);
|
|
1109
|
+
return this._connection.send("AbortDFUWorkunit", request, "json", false, undefined, "AbortDFUWorkunitResponse");
|
|
1108
1110
|
};
|
|
1109
1111
|
FileSprayServiceBase.prototype.Copy = function (request) {
|
|
1110
|
-
return this._connection.send("Copy", request);
|
|
1112
|
+
return this._connection.send("Copy", request, "json", false, undefined, "CopyResponse");
|
|
1113
|
+
};
|
|
1114
|
+
FileSprayServiceBase.prototype.CreateDFUPublisherWorkunit = function (request) {
|
|
1115
|
+
return this._connection.send("CreateDFUPublisherWorkunit", request, "json", false, undefined, "CreateDFUPublisherWorkunitResponse");
|
|
1111
1116
|
};
|
|
1112
1117
|
FileSprayServiceBase.prototype.CreateDFUWorkunit = function (request) {
|
|
1113
|
-
return this._connection.send("CreateDFUWorkunit", request);
|
|
1118
|
+
return this._connection.send("CreateDFUWorkunit", request, "json", false, undefined, "CreateDFUWorkunitResponse");
|
|
1114
1119
|
};
|
|
1115
1120
|
FileSprayServiceBase.prototype.DFUWUFile = function (request) {
|
|
1116
|
-
return this._connection.send("DFUWUFile", request);
|
|
1121
|
+
return this._connection.send("DFUWUFile", request, "json", false, undefined, "DFUWUFileResponse");
|
|
1117
1122
|
};
|
|
1118
1123
|
FileSprayServiceBase.prototype.DFUWUSearch = function (request) {
|
|
1119
|
-
return this._connection.send("DFUWUSearch", request);
|
|
1124
|
+
return this._connection.send("DFUWUSearch", request, "json", false, undefined, "DFUWUSearchResponse");
|
|
1120
1125
|
};
|
|
1121
1126
|
FileSprayServiceBase.prototype.DFUWorkunitsAction = function (request) {
|
|
1122
|
-
return this._connection.send("DFUWorkunitsAction", request);
|
|
1127
|
+
return this._connection.send("DFUWorkunitsAction", request, "json", false, undefined, "DFUWorkunitsActionResponse");
|
|
1123
1128
|
};
|
|
1124
1129
|
FileSprayServiceBase.prototype.DeleteDFUWorkunit = function (request) {
|
|
1125
|
-
return this._connection.send("DeleteDFUWorkunit", request);
|
|
1130
|
+
return this._connection.send("DeleteDFUWorkunit", request, "json", false, undefined, "DeleteDFUWorkunitResponse");
|
|
1126
1131
|
};
|
|
1127
1132
|
FileSprayServiceBase.prototype.DeleteDFUWorkunits = function (request) {
|
|
1128
|
-
return this._connection.send("DeleteDFUWorkunits", request);
|
|
1133
|
+
return this._connection.send("DeleteDFUWorkunits", request, "json", false, undefined, "DeleteDFUWorkunitsResponse");
|
|
1129
1134
|
};
|
|
1130
1135
|
FileSprayServiceBase.prototype.DeleteDropZoneFiles = function (request) {
|
|
1131
|
-
return this._connection.send("DeleteDropZoneFiles", request);
|
|
1136
|
+
return this._connection.send("DeleteDropZoneFiles", request, "json", false, undefined, "DFUWorkunitsActionResponse");
|
|
1132
1137
|
};
|
|
1133
1138
|
FileSprayServiceBase.prototype.Despray = function (request) {
|
|
1134
|
-
return this._connection.send("Despray", request);
|
|
1139
|
+
return this._connection.send("Despray", request, "json", false, undefined, "DesprayResponse");
|
|
1135
1140
|
};
|
|
1136
1141
|
FileSprayServiceBase.prototype.DfuMonitor = function (request) {
|
|
1137
|
-
return this._connection.send("DfuMonitor", request);
|
|
1142
|
+
return this._connection.send("DfuMonitor", request, "json", false, undefined, "DfuMonitorResponse");
|
|
1138
1143
|
};
|
|
1139
1144
|
FileSprayServiceBase.prototype.DropZoneFileSearch = function (request) {
|
|
1140
|
-
return this._connection.send("DropZoneFileSearch", request);
|
|
1145
|
+
return this._connection.send("DropZoneFileSearch", request, "json", false, undefined, "DropZoneFileSearchResponse");
|
|
1141
1146
|
};
|
|
1142
1147
|
FileSprayServiceBase.prototype.DropZoneFiles = function (request) {
|
|
1143
|
-
return this._connection.send("DropZoneFiles", request);
|
|
1148
|
+
return this._connection.send("DropZoneFiles", request, "json", false, undefined, "DropZoneFilesResponse");
|
|
1144
1149
|
};
|
|
1145
1150
|
FileSprayServiceBase.prototype.EchoDateTime = function (request) {
|
|
1146
|
-
return this._connection.send("EchoDateTime", request);
|
|
1151
|
+
return this._connection.send("EchoDateTime", request, "json", false, undefined, "EchoDateTimeResponse");
|
|
1147
1152
|
};
|
|
1148
1153
|
FileSprayServiceBase.prototype.FileList = function (request) {
|
|
1149
|
-
return this._connection.send("FileList", request);
|
|
1154
|
+
return this._connection.send("FileList", request, "json", false, undefined, "FileListResponse");
|
|
1150
1155
|
};
|
|
1151
1156
|
FileSprayServiceBase.prototype.GetDFUExceptions = function (request) {
|
|
1152
|
-
return this._connection.send("GetDFUExceptions", request);
|
|
1157
|
+
return this._connection.send("GetDFUExceptions", request, "json", false, undefined, "GetDFUExceptionsResponse");
|
|
1153
1158
|
};
|
|
1154
1159
|
FileSprayServiceBase.prototype.GetDFUProgress = function (request) {
|
|
1155
|
-
return this._connection.send("GetDFUProgress", request);
|
|
1160
|
+
return this._connection.send("GetDFUProgress", request, "json", false, undefined, "ProgressResponse");
|
|
1156
1161
|
};
|
|
1157
1162
|
FileSprayServiceBase.prototype.GetDFUServerQueues = function (request) {
|
|
1158
|
-
return this._connection.send("GetDFUServerQueues", request);
|
|
1163
|
+
return this._connection.send("GetDFUServerQueues", request, "json", false, undefined, "GetDFUServerQueuesResponse");
|
|
1159
1164
|
};
|
|
1160
1165
|
FileSprayServiceBase.prototype.GetDFUWorkunit = function (request) {
|
|
1161
|
-
return this._connection.send("GetDFUWorkunit", request);
|
|
1166
|
+
return this._connection.send("GetDFUWorkunit", request, "json", false, undefined, "GetDFUWorkunitResponse");
|
|
1162
1167
|
};
|
|
1163
1168
|
FileSprayServiceBase.prototype.GetDFUWorkunits = function (request) {
|
|
1164
|
-
return this._connection.send("GetDFUWorkunits", request);
|
|
1169
|
+
return this._connection.send("GetDFUWorkunits", request, "json", false, undefined, "GetDFUWorkunitsResponse");
|
|
1165
1170
|
};
|
|
1166
1171
|
FileSprayServiceBase.prototype.GetSprayTargets = function (request) {
|
|
1167
|
-
return this._connection.send("GetSprayTargets", request);
|
|
1172
|
+
return this._connection.send("GetSprayTargets", request, "json", false, undefined, "GetSprayTargetsResponse");
|
|
1168
1173
|
};
|
|
1169
1174
|
FileSprayServiceBase.prototype.OpenSave = function (request) {
|
|
1170
|
-
return this._connection.send("OpenSave", request);
|
|
1175
|
+
return this._connection.send("OpenSave", request, "json", false, undefined, "OpenSaveResponse");
|
|
1171
1176
|
};
|
|
1172
1177
|
FileSprayServiceBase.prototype.Ping = function (request) {
|
|
1173
|
-
return this._connection.send("Ping", request);
|
|
1178
|
+
return this._connection.send("Ping", request, "json", false, undefined, "FileSprayPingResponse");
|
|
1174
1179
|
};
|
|
1175
1180
|
FileSprayServiceBase.prototype.Rename = function (request) {
|
|
1176
|
-
return this._connection.send("Rename", request);
|
|
1181
|
+
return this._connection.send("Rename", request, "json", false, undefined, "RenameResponse");
|
|
1177
1182
|
};
|
|
1178
1183
|
FileSprayServiceBase.prototype.Replicate = function (request) {
|
|
1179
|
-
return this._connection.send("Replicate", request);
|
|
1184
|
+
return this._connection.send("Replicate", request, "json", false, undefined, "ReplicateResponse");
|
|
1180
1185
|
};
|
|
1181
1186
|
FileSprayServiceBase.prototype.ShowResult = function (request) {
|
|
1182
|
-
return this._connection.send("ShowResult", request);
|
|
1187
|
+
return this._connection.send("ShowResult", request, "json", false, undefined, "ShowResultResponse");
|
|
1183
1188
|
};
|
|
1184
1189
|
FileSprayServiceBase.prototype.SprayFixed = function (request) {
|
|
1185
|
-
return this._connection.send("SprayFixed", request);
|
|
1190
|
+
return this._connection.send("SprayFixed", request, "json", false, undefined, "SprayFixedResponse");
|
|
1186
1191
|
};
|
|
1187
1192
|
FileSprayServiceBase.prototype.SprayVariable = function (request) {
|
|
1188
|
-
return this._connection.send("SprayVariable", request);
|
|
1193
|
+
return this._connection.send("SprayVariable", request, "json", false, undefined, "SprayResponse");
|
|
1189
1194
|
};
|
|
1190
1195
|
FileSprayServiceBase.prototype.SubmitDFUWorkunit = function (request) {
|
|
1191
|
-
return this._connection.send("SubmitDFUWorkunit", request);
|
|
1196
|
+
return this._connection.send("SubmitDFUWorkunit", request, "json", false, undefined, "SubmitDFUWorkunitResponse");
|
|
1192
1197
|
};
|
|
1193
1198
|
FileSprayServiceBase.prototype.UpdateDFUWorkunit = function (request) {
|
|
1194
|
-
return this._connection.send("UpdateDFUWorkunit", request);
|
|
1199
|
+
return this._connection.send("UpdateDFUWorkunit", request, "json", false, undefined, "UpdateDFUWorkunitResponse");
|
|
1195
1200
|
};
|
|
1196
1201
|
return FileSprayServiceBase;
|
|
1197
1202
|
}(Service));
|
|
@@ -1210,6 +1215,9 @@
|
|
|
1210
1215
|
FileSprayService.prototype.DesprayEx = function (request) {
|
|
1211
1216
|
return this._connection.send("Despray", request);
|
|
1212
1217
|
};
|
|
1218
|
+
FileSprayService.prototype.UpdateDFUWorkunitEx = function (request) {
|
|
1219
|
+
return this._connection.send("UpdateDFUWorkunit", request, "json", false, undefined, "UpdateDFUWorkunitResponse");
|
|
1220
|
+
};
|
|
1213
1221
|
return FileSprayService;
|
|
1214
1222
|
}(FileSprayServiceBase));
|
|
1215
1223
|
|
|
@@ -2053,134 +2061,156 @@
|
|
|
2053
2061
|
};
|
|
2054
2062
|
LogaccessService.prototype.GetLogsEx = function (request) {
|
|
2055
2063
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2064
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2065
|
+
var logInfo, getLogsRequest, filters, _loop_1, key, binaryLogFilter_1;
|
|
2066
|
+
return __generator(this, function (_l) {
|
|
2067
|
+
switch (_l.label) {
|
|
2068
|
+
case 0: return [4 /*yield*/, this.GetLogAccessInfo()];
|
|
2069
|
+
case 1:
|
|
2070
|
+
logInfo = _l.sent();
|
|
2071
|
+
getLogsRequest = {
|
|
2072
|
+
Filter: {
|
|
2073
|
+
leftBinaryFilter: {
|
|
2074
|
+
BinaryLogFilter: [{
|
|
2075
|
+
leftFilter: {
|
|
2076
|
+
LogCategory: exports.WsLogaccess.LogAccessType.All,
|
|
2077
|
+
},
|
|
2078
|
+
}]
|
|
2079
|
+
}
|
|
2062
2080
|
},
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
LogLineLimit: (_b = request.LogLineLimit) !== null && _b !== void 0 ? _b : 100,
|
|
2071
|
-
SelectColumnMode: exports.WsLogaccess.LogSelectColumnMode.DEFAULT,
|
|
2072
|
-
Format: "JSON"
|
|
2073
|
-
};
|
|
2074
|
-
var filters = [];
|
|
2075
|
-
var _loop_1 = function (key) {
|
|
2076
|
-
if (key in ElasticKnownColumns) {
|
|
2077
|
-
if (Array.isArray(request[key])) {
|
|
2078
|
-
request[key].forEach(function (value) {
|
|
2079
|
-
filters.push({
|
|
2080
|
-
LogCategory: exports.WsLogaccess.LogAccessType.ByFieldName,
|
|
2081
|
-
SearchField: ElasticKnownColumns[key],
|
|
2082
|
-
SearchByValue: value
|
|
2083
|
-
});
|
|
2084
|
-
});
|
|
2085
|
-
}
|
|
2086
|
-
else {
|
|
2087
|
-
filters.push({
|
|
2088
|
-
LogCategory: exports.WsLogaccess.LogAccessType.ByFieldName,
|
|
2089
|
-
SearchField: ElasticKnownColumns[key],
|
|
2090
|
-
SearchByValue: request[key]
|
|
2091
|
-
});
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
};
|
|
2095
|
-
for (var key in request) {
|
|
2096
|
-
_loop_1(key);
|
|
2097
|
-
}
|
|
2098
|
-
if (filters.length > 2) {
|
|
2099
|
-
var binaryLogFilter_1 = getLogsRequest.Filter.leftBinaryFilter.BinaryLogFilter[0];
|
|
2100
|
-
filters.forEach(function (filter, i) {
|
|
2101
|
-
var operator = exports.WsLogaccess.LogAccessFilterOperator.AND;
|
|
2102
|
-
if (i > 0) {
|
|
2103
|
-
if (filters[i - 1].SearchField === filter.SearchField) {
|
|
2104
|
-
operator = exports.WsLogaccess.LogAccessFilterOperator.OR;
|
|
2105
|
-
}
|
|
2106
|
-
if (i === filters.length - 1) {
|
|
2107
|
-
binaryLogFilter_1.Operator = operator;
|
|
2108
|
-
binaryLogFilter_1.rightFilter = filter;
|
|
2109
|
-
}
|
|
2110
|
-
else {
|
|
2111
|
-
binaryLogFilter_1.Operator = operator;
|
|
2112
|
-
binaryLogFilter_1.rightBinaryFilter = {
|
|
2113
|
-
BinaryLogFilter: [{
|
|
2114
|
-
leftFilter: filter
|
|
2115
|
-
}]
|
|
2081
|
+
Range: {
|
|
2082
|
+
StartDate: new Date(0).toISOString(),
|
|
2083
|
+
},
|
|
2084
|
+
LogLineStartFrom: (_a = request.LogLineStartFrom) !== null && _a !== void 0 ? _a : 0,
|
|
2085
|
+
LogLineLimit: (_b = request.LogLineLimit) !== null && _b !== void 0 ? _b : 100,
|
|
2086
|
+
SelectColumnMode: exports.WsLogaccess.LogSelectColumnMode.DEFAULT,
|
|
2087
|
+
Format: "JSON"
|
|
2116
2088
|
};
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2089
|
+
filters = [];
|
|
2090
|
+
_loop_1 = function (key) {
|
|
2091
|
+
var searchField;
|
|
2092
|
+
switch (logInfo.RemoteLogManagerType) {
|
|
2093
|
+
case "azureloganalyticscurl":
|
|
2094
|
+
if (key in AzureKnownColumns) {
|
|
2095
|
+
searchField = AzureKnownColumns[key];
|
|
2096
|
+
}
|
|
2097
|
+
break;
|
|
2098
|
+
case "elasticstack":
|
|
2099
|
+
if (key in ElasticKnownColumns) {
|
|
2100
|
+
searchField = ElasticKnownColumns[key];
|
|
2101
|
+
}
|
|
2102
|
+
break;
|
|
2103
|
+
}
|
|
2104
|
+
if (searchField) {
|
|
2105
|
+
if (Array.isArray(request[key])) {
|
|
2106
|
+
request[key].forEach(function (value) {
|
|
2107
|
+
filters.push({
|
|
2108
|
+
LogCategory: exports.WsLogaccess.LogAccessType.ByFieldName,
|
|
2109
|
+
SearchField: searchField,
|
|
2110
|
+
SearchByValue: value
|
|
2111
|
+
});
|
|
2112
|
+
});
|
|
2113
|
+
}
|
|
2114
|
+
else {
|
|
2115
|
+
filters.push({
|
|
2116
|
+
LogCategory: exports.WsLogaccess.LogAccessType.ByFieldName,
|
|
2117
|
+
SearchField: searchField,
|
|
2118
|
+
SearchByValue: request[key]
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
};
|
|
2123
|
+
for (key in request) {
|
|
2124
|
+
_loop_1(key);
|
|
2125
|
+
}
|
|
2126
|
+
if (filters.length > 2) {
|
|
2127
|
+
binaryLogFilter_1 = getLogsRequest.Filter.leftBinaryFilter.BinaryLogFilter[0];
|
|
2128
|
+
filters.forEach(function (filter, i) {
|
|
2129
|
+
var operator = exports.WsLogaccess.LogAccessFilterOperator.AND;
|
|
2130
|
+
if (i > 0) {
|
|
2131
|
+
if (filters[i - 1].SearchField === filter.SearchField) {
|
|
2132
|
+
operator = exports.WsLogaccess.LogAccessFilterOperator.OR;
|
|
2133
|
+
}
|
|
2134
|
+
if (i === filters.length - 1) {
|
|
2135
|
+
binaryLogFilter_1.Operator = operator;
|
|
2136
|
+
binaryLogFilter_1.rightFilter = filter;
|
|
2137
|
+
}
|
|
2138
|
+
else {
|
|
2139
|
+
binaryLogFilter_1.Operator = operator;
|
|
2140
|
+
binaryLogFilter_1.rightBinaryFilter = {
|
|
2141
|
+
BinaryLogFilter: [{
|
|
2142
|
+
leftFilter: filter
|
|
2143
|
+
}]
|
|
2144
|
+
};
|
|
2145
|
+
binaryLogFilter_1 = binaryLogFilter_1.rightBinaryFilter.BinaryLogFilter[0];
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
else {
|
|
2149
|
+
binaryLogFilter_1.leftFilter = filter;
|
|
2150
|
+
}
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
else {
|
|
2154
|
+
delete getLogsRequest.Filter.leftBinaryFilter;
|
|
2155
|
+
getLogsRequest.Filter.leftFilter = {
|
|
2156
|
+
LogCategory: exports.WsLogaccess.LogAccessType.All
|
|
2157
|
+
};
|
|
2158
|
+
if ((_c = filters[0]) === null || _c === void 0 ? void 0 : _c.SearchField) {
|
|
2159
|
+
getLogsRequest.Filter.leftFilter = {
|
|
2160
|
+
LogCategory: (_d = filters[0]) === null || _d === void 0 ? void 0 : _d.LogCategory,
|
|
2161
|
+
SearchField: (_e = filters[0]) === null || _e === void 0 ? void 0 : _e.SearchField,
|
|
2162
|
+
SearchByValue: (_f = filters[0]) === null || _f === void 0 ? void 0 : _f.SearchByValue
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2165
|
+
if ((_g = filters[1]) === null || _g === void 0 ? void 0 : _g.SearchField) {
|
|
2166
|
+
getLogsRequest.Filter.Operator = exports.WsLogaccess.LogAccessFilterOperator.AND;
|
|
2167
|
+
if (filters[0].SearchField === filters[1].SearchField) {
|
|
2168
|
+
getLogsRequest.Filter.Operator = exports.WsLogaccess.LogAccessFilterOperator.OR;
|
|
2169
|
+
}
|
|
2170
|
+
getLogsRequest.Filter.rightFilter = {
|
|
2171
|
+
LogCategory: (_h = filters[0]) === null || _h === void 0 ? void 0 : _h.LogCategory,
|
|
2172
|
+
SearchField: (_j = filters[1]) === null || _j === void 0 ? void 0 : _j.SearchField,
|
|
2173
|
+
SearchByValue: (_k = filters[1]) === null || _k === void 0 ? void 0 : _k.SearchByValue
|
|
2174
|
+
};
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
if (request.StartDate) {
|
|
2178
|
+
getLogsRequest.Range.StartDate = request.StartDate.toISOString();
|
|
2179
|
+
}
|
|
2180
|
+
if (request.EndDate) {
|
|
2181
|
+
getLogsRequest.Range.EndDate = request.EndDate.toISOString();
|
|
2182
|
+
}
|
|
2183
|
+
return [2 /*return*/, this.GetLogs(getLogsRequest).then(function (response) {
|
|
2184
|
+
var _a, _b, _c, _d, _e;
|
|
2185
|
+
try {
|
|
2186
|
+
var logLines = JSON.parse(response.LogLines);
|
|
2187
|
+
var lines = [];
|
|
2188
|
+
switch (logInfo.RemoteLogManagerType) {
|
|
2189
|
+
case "azureloganalyticscurl":
|
|
2190
|
+
lines = (_b = (_a = logLines.lines) === null || _a === void 0 ? void 0 : _a.map(azureToLogLine)) !== null && _b !== void 0 ? _b : [];
|
|
2191
|
+
break;
|
|
2192
|
+
case "elasticstack":
|
|
2193
|
+
lines = (_d = (_c = logLines.lines) === null || _c === void 0 ? void 0 : _c.map(elasticToLogLine)) !== null && _d !== void 0 ? _d : [];
|
|
2194
|
+
break;
|
|
2195
|
+
default:
|
|
2196
|
+
logger$2.warning("Unknown RemoteLogManagerType: ".concat(logInfo.RemoteLogManagerType));
|
|
2197
|
+
lines = [];
|
|
2198
|
+
}
|
|
2199
|
+
return {
|
|
2200
|
+
lines: lines,
|
|
2201
|
+
total: (_e = response.TotalLogLinesAvailable) !== null && _e !== void 0 ? _e : 10000
|
|
2202
|
+
};
|
|
2203
|
+
}
|
|
2204
|
+
catch (e) {
|
|
2205
|
+
logger$2.error(e);
|
|
2206
|
+
}
|
|
2207
|
+
return {
|
|
2208
|
+
lines: [],
|
|
2209
|
+
total: 0
|
|
2210
|
+
};
|
|
2211
|
+
})];
|
|
2122
2212
|
}
|
|
2123
2213
|
});
|
|
2124
|
-
}
|
|
2125
|
-
else {
|
|
2126
|
-
delete getLogsRequest.Filter.leftBinaryFilter;
|
|
2127
|
-
getLogsRequest.Filter.leftFilter = {
|
|
2128
|
-
LogCategory: exports.WsLogaccess.LogAccessType.All
|
|
2129
|
-
};
|
|
2130
|
-
if ((_c = filters[0]) === null || _c === void 0 ? void 0 : _c.SearchField) {
|
|
2131
|
-
getLogsRequest.Filter.leftFilter = {
|
|
2132
|
-
LogCategory: (_d = filters[0]) === null || _d === void 0 ? void 0 : _d.LogCategory,
|
|
2133
|
-
SearchField: (_e = filters[0]) === null || _e === void 0 ? void 0 : _e.SearchField,
|
|
2134
|
-
SearchByValue: (_f = filters[0]) === null || _f === void 0 ? void 0 : _f.SearchByValue
|
|
2135
|
-
};
|
|
2136
|
-
}
|
|
2137
|
-
if ((_g = filters[1]) === null || _g === void 0 ? void 0 : _g.SearchField) {
|
|
2138
|
-
getLogsRequest.Filter.Operator = exports.WsLogaccess.LogAccessFilterOperator.AND;
|
|
2139
|
-
if (filters[0].SearchField === filters[1].SearchField) {
|
|
2140
|
-
getLogsRequest.Filter.Operator = exports.WsLogaccess.LogAccessFilterOperator.OR;
|
|
2141
|
-
}
|
|
2142
|
-
getLogsRequest.Filter.rightFilter = {
|
|
2143
|
-
LogCategory: (_h = filters[0]) === null || _h === void 0 ? void 0 : _h.LogCategory,
|
|
2144
|
-
SearchField: (_j = filters[1]) === null || _j === void 0 ? void 0 : _j.SearchField,
|
|
2145
|
-
SearchByValue: (_k = filters[1]) === null || _k === void 0 ? void 0 : _k.SearchByValue
|
|
2146
|
-
};
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
if (request.StartDate) {
|
|
2150
|
-
getLogsRequest.Range.StartDate = request.StartDate.toISOString();
|
|
2151
|
-
}
|
|
2152
|
-
if (request.EndDate) {
|
|
2153
|
-
getLogsRequest.Range.EndDate = request.EndDate.toISOString();
|
|
2154
|
-
}
|
|
2155
|
-
return Promise.all([this.GetLogAccessInfo(), this.GetLogs(getLogsRequest)]).then(function (_a) {
|
|
2156
|
-
var _b, _c, _d, _e, _f;
|
|
2157
|
-
var info = _a[0], response = _a[1];
|
|
2158
|
-
try {
|
|
2159
|
-
var logLines = JSON.parse(response.LogLines);
|
|
2160
|
-
var lines = [];
|
|
2161
|
-
switch (info.RemoteLogManagerType) {
|
|
2162
|
-
case "azureloganalyticscurl":
|
|
2163
|
-
lines = (_c = (_b = logLines.lines) === null || _b === void 0 ? void 0 : _b.map(azureToLogLine)) !== null && _c !== void 0 ? _c : [];
|
|
2164
|
-
break;
|
|
2165
|
-
case "elasticstack":
|
|
2166
|
-
lines = (_e = (_d = logLines.lines) === null || _d === void 0 ? void 0 : _d.map(elasticToLogLine)) !== null && _e !== void 0 ? _e : [];
|
|
2167
|
-
break;
|
|
2168
|
-
default:
|
|
2169
|
-
logger$2.warning("Unknown RemoteLogManagerType: ".concat(info.RemoteLogManagerType));
|
|
2170
|
-
lines = [];
|
|
2171
|
-
}
|
|
2172
|
-
return {
|
|
2173
|
-
lines: lines,
|
|
2174
|
-
total: (_f = response.TotalLogLinesAvailable) !== null && _f !== void 0 ? _f : 10000
|
|
2175
|
-
};
|
|
2176
|
-
}
|
|
2177
|
-
catch (e) {
|
|
2178
|
-
logger$2.error(e);
|
|
2179
|
-
}
|
|
2180
|
-
return {
|
|
2181
|
-
lines: [],
|
|
2182
|
-
total: 0
|
|
2183
|
-
};
|
|
2184
2214
|
});
|
|
2185
2215
|
};
|
|
2186
2216
|
return LogaccessService;
|
|
@@ -3142,6 +3172,321 @@
|
|
|
3142
3172
|
return WorkunitsServiceEx;
|
|
3143
3173
|
}(WorkunitsServiceBase));
|
|
3144
3174
|
|
|
3175
|
+
function formatDecimal(x) {
|
|
3176
|
+
return Math.abs(x = Math.round(x)) >= 1e21
|
|
3177
|
+
? x.toLocaleString("en").replace(/,/g, "")
|
|
3178
|
+
: x.toString(10);
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
// Computes the decimal coefficient and exponent of the specified number x with
|
|
3182
|
+
// significant digits p, where x is positive and p is in [1, 21] or undefined.
|
|
3183
|
+
// For example, formatDecimalParts(1.23) returns ["123", 0].
|
|
3184
|
+
function formatDecimalParts(x, p) {
|
|
3185
|
+
if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
|
|
3186
|
+
var i, coefficient = x.slice(0, i);
|
|
3187
|
+
|
|
3188
|
+
// The string returned by toExponential either has the form \d\.\d+e[-+]\d+
|
|
3189
|
+
// (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
|
|
3190
|
+
return [
|
|
3191
|
+
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
|
|
3192
|
+
+x.slice(i + 1)
|
|
3193
|
+
];
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
function exponent(x) {
|
|
3197
|
+
return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
function formatGroup(grouping, thousands) {
|
|
3201
|
+
return function(value, width) {
|
|
3202
|
+
var i = value.length,
|
|
3203
|
+
t = [],
|
|
3204
|
+
j = 0,
|
|
3205
|
+
g = grouping[0],
|
|
3206
|
+
length = 0;
|
|
3207
|
+
|
|
3208
|
+
while (i > 0 && g > 0) {
|
|
3209
|
+
if (length + g + 1 > width) g = Math.max(1, width - length);
|
|
3210
|
+
t.push(value.substring(i -= g, i + g));
|
|
3211
|
+
if ((length += g + 1) > width) break;
|
|
3212
|
+
g = grouping[j = (j + 1) % grouping.length];
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
return t.reverse().join(thousands);
|
|
3216
|
+
};
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
function formatNumerals(numerals) {
|
|
3220
|
+
return function(value) {
|
|
3221
|
+
return value.replace(/[0-9]/g, function(i) {
|
|
3222
|
+
return numerals[+i];
|
|
3223
|
+
});
|
|
3224
|
+
};
|
|
3225
|
+
}
|
|
3226
|
+
|
|
3227
|
+
// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
|
|
3228
|
+
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
3229
|
+
|
|
3230
|
+
function formatSpecifier(specifier) {
|
|
3231
|
+
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
|
|
3232
|
+
var match;
|
|
3233
|
+
return new FormatSpecifier({
|
|
3234
|
+
fill: match[1],
|
|
3235
|
+
align: match[2],
|
|
3236
|
+
sign: match[3],
|
|
3237
|
+
symbol: match[4],
|
|
3238
|
+
zero: match[5],
|
|
3239
|
+
width: match[6],
|
|
3240
|
+
comma: match[7],
|
|
3241
|
+
precision: match[8] && match[8].slice(1),
|
|
3242
|
+
trim: match[9],
|
|
3243
|
+
type: match[10]
|
|
3244
|
+
});
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
|
|
3248
|
+
|
|
3249
|
+
function FormatSpecifier(specifier) {
|
|
3250
|
+
this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
|
|
3251
|
+
this.align = specifier.align === undefined ? ">" : specifier.align + "";
|
|
3252
|
+
this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
|
|
3253
|
+
this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
|
|
3254
|
+
this.zero = !!specifier.zero;
|
|
3255
|
+
this.width = specifier.width === undefined ? undefined : +specifier.width;
|
|
3256
|
+
this.comma = !!specifier.comma;
|
|
3257
|
+
this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
|
|
3258
|
+
this.trim = !!specifier.trim;
|
|
3259
|
+
this.type = specifier.type === undefined ? "" : specifier.type + "";
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
FormatSpecifier.prototype.toString = function() {
|
|
3263
|
+
return this.fill
|
|
3264
|
+
+ this.align
|
|
3265
|
+
+ this.sign
|
|
3266
|
+
+ this.symbol
|
|
3267
|
+
+ (this.zero ? "0" : "")
|
|
3268
|
+
+ (this.width === undefined ? "" : Math.max(1, this.width | 0))
|
|
3269
|
+
+ (this.comma ? "," : "")
|
|
3270
|
+
+ (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
|
|
3271
|
+
+ (this.trim ? "~" : "")
|
|
3272
|
+
+ this.type;
|
|
3273
|
+
};
|
|
3274
|
+
|
|
3275
|
+
// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
|
|
3276
|
+
function formatTrim(s) {
|
|
3277
|
+
out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
|
|
3278
|
+
switch (s[i]) {
|
|
3279
|
+
case ".": i0 = i1 = i; break;
|
|
3280
|
+
case "0": if (i0 === 0) i0 = i; i1 = i; break;
|
|
3281
|
+
default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
var prefixExponent;
|
|
3288
|
+
|
|
3289
|
+
function formatPrefixAuto(x, p) {
|
|
3290
|
+
var d = formatDecimalParts(x, p);
|
|
3291
|
+
if (!d) return x + "";
|
|
3292
|
+
var coefficient = d[0],
|
|
3293
|
+
exponent = d[1],
|
|
3294
|
+
i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
|
|
3295
|
+
n = coefficient.length;
|
|
3296
|
+
return i === n ? coefficient
|
|
3297
|
+
: i > n ? coefficient + new Array(i - n + 1).join("0")
|
|
3298
|
+
: i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
|
|
3299
|
+
: "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!
|
|
3300
|
+
}
|
|
3301
|
+
|
|
3302
|
+
function formatRounded(x, p) {
|
|
3303
|
+
var d = formatDecimalParts(x, p);
|
|
3304
|
+
if (!d) return x + "";
|
|
3305
|
+
var coefficient = d[0],
|
|
3306
|
+
exponent = d[1];
|
|
3307
|
+
return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
|
|
3308
|
+
: coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
|
|
3309
|
+
: coefficient + new Array(exponent - coefficient.length + 2).join("0");
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
var formatTypes = {
|
|
3313
|
+
"%": function(x, p) { return (x * 100).toFixed(p); },
|
|
3314
|
+
"b": function(x) { return Math.round(x).toString(2); },
|
|
3315
|
+
"c": function(x) { return x + ""; },
|
|
3316
|
+
"d": formatDecimal,
|
|
3317
|
+
"e": function(x, p) { return x.toExponential(p); },
|
|
3318
|
+
"f": function(x, p) { return x.toFixed(p); },
|
|
3319
|
+
"g": function(x, p) { return x.toPrecision(p); },
|
|
3320
|
+
"o": function(x) { return Math.round(x).toString(8); },
|
|
3321
|
+
"p": function(x, p) { return formatRounded(x * 100, p); },
|
|
3322
|
+
"r": formatRounded,
|
|
3323
|
+
"s": formatPrefixAuto,
|
|
3324
|
+
"X": function(x) { return Math.round(x).toString(16).toUpperCase(); },
|
|
3325
|
+
"x": function(x) { return Math.round(x).toString(16); }
|
|
3326
|
+
};
|
|
3327
|
+
|
|
3328
|
+
function identity(x) {
|
|
3329
|
+
return x;
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
var map = Array.prototype.map,
|
|
3333
|
+
prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
|
|
3334
|
+
|
|
3335
|
+
function formatLocale$1(locale) {
|
|
3336
|
+
var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
|
|
3337
|
+
currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
|
|
3338
|
+
currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
|
|
3339
|
+
decimal = locale.decimal === undefined ? "." : locale.decimal + "",
|
|
3340
|
+
numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),
|
|
3341
|
+
percent = locale.percent === undefined ? "%" : locale.percent + "",
|
|
3342
|
+
minus = locale.minus === undefined ? "-" : locale.minus + "",
|
|
3343
|
+
nan = locale.nan === undefined ? "NaN" : locale.nan + "";
|
|
3344
|
+
|
|
3345
|
+
function newFormat(specifier) {
|
|
3346
|
+
specifier = formatSpecifier(specifier);
|
|
3347
|
+
|
|
3348
|
+
var fill = specifier.fill,
|
|
3349
|
+
align = specifier.align,
|
|
3350
|
+
sign = specifier.sign,
|
|
3351
|
+
symbol = specifier.symbol,
|
|
3352
|
+
zero = specifier.zero,
|
|
3353
|
+
width = specifier.width,
|
|
3354
|
+
comma = specifier.comma,
|
|
3355
|
+
precision = specifier.precision,
|
|
3356
|
+
trim = specifier.trim,
|
|
3357
|
+
type = specifier.type;
|
|
3358
|
+
|
|
3359
|
+
// The "n" type is an alias for ",g".
|
|
3360
|
+
if (type === "n") comma = true, type = "g";
|
|
3361
|
+
|
|
3362
|
+
// The "" type, and any invalid type, is an alias for ".12~g".
|
|
3363
|
+
else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g";
|
|
3364
|
+
|
|
3365
|
+
// If zero fill is specified, padding goes after sign and before digits.
|
|
3366
|
+
if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
|
|
3367
|
+
|
|
3368
|
+
// Compute the prefix and suffix.
|
|
3369
|
+
// For SI-prefix, the suffix is lazily computed.
|
|
3370
|
+
var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
|
|
3371
|
+
suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
|
|
3372
|
+
|
|
3373
|
+
// What format function should we use?
|
|
3374
|
+
// Is this an integer type?
|
|
3375
|
+
// Can this type generate exponential notation?
|
|
3376
|
+
var formatType = formatTypes[type],
|
|
3377
|
+
maybeSuffix = /[defgprs%]/.test(type);
|
|
3378
|
+
|
|
3379
|
+
// Set the default precision if not specified,
|
|
3380
|
+
// or clamp the specified precision to the supported range.
|
|
3381
|
+
// For significant precision, it must be in [1, 21].
|
|
3382
|
+
// For fixed precision, it must be in [0, 20].
|
|
3383
|
+
precision = precision === undefined ? 6
|
|
3384
|
+
: /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
|
|
3385
|
+
: Math.max(0, Math.min(20, precision));
|
|
3386
|
+
|
|
3387
|
+
function format(value) {
|
|
3388
|
+
var valuePrefix = prefix,
|
|
3389
|
+
valueSuffix = suffix,
|
|
3390
|
+
i, n, c;
|
|
3391
|
+
|
|
3392
|
+
if (type === "c") {
|
|
3393
|
+
valueSuffix = formatType(value) + valueSuffix;
|
|
3394
|
+
value = "";
|
|
3395
|
+
} else {
|
|
3396
|
+
value = +value;
|
|
3397
|
+
|
|
3398
|
+
// Determine the sign. -0 is not less than 0, but 1 / -0 is!
|
|
3399
|
+
var valueNegative = value < 0 || 1 / value < 0;
|
|
3400
|
+
|
|
3401
|
+
// Perform the initial formatting.
|
|
3402
|
+
value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
|
|
3403
|
+
|
|
3404
|
+
// Trim insignificant zeros.
|
|
3405
|
+
if (trim) value = formatTrim(value);
|
|
3406
|
+
|
|
3407
|
+
// If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.
|
|
3408
|
+
if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
|
|
3409
|
+
|
|
3410
|
+
// Compute the prefix and suffix.
|
|
3411
|
+
valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
|
|
3412
|
+
valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
|
|
3413
|
+
|
|
3414
|
+
// Break the formatted value into the integer “value” part that can be
|
|
3415
|
+
// grouped, and fractional or exponential “suffix” part that is not.
|
|
3416
|
+
if (maybeSuffix) {
|
|
3417
|
+
i = -1, n = value.length;
|
|
3418
|
+
while (++i < n) {
|
|
3419
|
+
if (c = value.charCodeAt(i), 48 > c || c > 57) {
|
|
3420
|
+
valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
|
|
3421
|
+
value = value.slice(0, i);
|
|
3422
|
+
break;
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
// If the fill character is not "0", grouping is applied before padding.
|
|
3429
|
+
if (comma && !zero) value = group(value, Infinity);
|
|
3430
|
+
|
|
3431
|
+
// Compute the padding.
|
|
3432
|
+
var length = valuePrefix.length + value.length + valueSuffix.length,
|
|
3433
|
+
padding = length < width ? new Array(width - length + 1).join(fill) : "";
|
|
3434
|
+
|
|
3435
|
+
// If the fill character is "0", grouping is applied after padding.
|
|
3436
|
+
if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
|
|
3437
|
+
|
|
3438
|
+
// Reconstruct the final output based on the desired alignment.
|
|
3439
|
+
switch (align) {
|
|
3440
|
+
case "<": value = valuePrefix + value + valueSuffix + padding; break;
|
|
3441
|
+
case "=": value = valuePrefix + padding + value + valueSuffix; break;
|
|
3442
|
+
case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
|
|
3443
|
+
default: value = padding + valuePrefix + value + valueSuffix; break;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
return numerals(value);
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
format.toString = function() {
|
|
3450
|
+
return specifier + "";
|
|
3451
|
+
};
|
|
3452
|
+
|
|
3453
|
+
return format;
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3456
|
+
function formatPrefix(specifier, value) {
|
|
3457
|
+
var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
|
|
3458
|
+
e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
|
|
3459
|
+
k = Math.pow(10, -e),
|
|
3460
|
+
prefix = prefixes[8 + e / 3];
|
|
3461
|
+
return function(value) {
|
|
3462
|
+
return f(k * value) + prefix;
|
|
3463
|
+
};
|
|
3464
|
+
}
|
|
3465
|
+
|
|
3466
|
+
return {
|
|
3467
|
+
format: newFormat,
|
|
3468
|
+
formatPrefix: formatPrefix
|
|
3469
|
+
};
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3472
|
+
var locale$1;
|
|
3473
|
+
var format;
|
|
3474
|
+
|
|
3475
|
+
defaultLocale$1({
|
|
3476
|
+
decimal: ".",
|
|
3477
|
+
thousands: ",",
|
|
3478
|
+
grouping: [3],
|
|
3479
|
+
currency: ["$", ""],
|
|
3480
|
+
minus: "-"
|
|
3481
|
+
});
|
|
3482
|
+
|
|
3483
|
+
function defaultLocale$1(definition) {
|
|
3484
|
+
locale$1 = formatLocale$1(definition);
|
|
3485
|
+
format = locale$1.format;
|
|
3486
|
+
locale$1.formatPrefix;
|
|
3487
|
+
return locale$1;
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3145
3490
|
var t0 = new Date,
|
|
3146
3491
|
t1 = new Date;
|
|
3147
3492
|
|
|
@@ -5238,6 +5583,13 @@
|
|
|
5238
5583
|
|
|
5239
5584
|
var formatter = utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");
|
|
5240
5585
|
var parser = utcParse("%Y-%m-%dT%H:%M:%S.%LZ");
|
|
5586
|
+
var d3FormatNum = format(",");
|
|
5587
|
+
function formatNum(num) {
|
|
5588
|
+
if (num && !isNaN(+num)) {
|
|
5589
|
+
return d3FormatNum(+num);
|
|
5590
|
+
}
|
|
5591
|
+
return num;
|
|
5592
|
+
}
|
|
5241
5593
|
var logger$1 = util.scopedLogger("workunit.ts");
|
|
5242
5594
|
var WUStateID = exports.WUStateID;
|
|
5243
5595
|
var WorkunitCache = /** @class */ (function (_super) {
|
|
@@ -6113,7 +6465,7 @@
|
|
|
6113
6465
|
default:
|
|
6114
6466
|
props[scopeProperty.Name] = scopeProperty.RawValue;
|
|
6115
6467
|
}
|
|
6116
|
-
formattedProps[scopeProperty.Name] = (_a = scopeProperty.Formatted) !== null && _a !== void 0 ? _a : props[scopeProperty.Name];
|
|
6468
|
+
formattedProps[scopeProperty.Name] = formatNum((_a = scopeProperty.Formatted) !== null && _a !== void 0 ? _a : props[scopeProperty.Name]);
|
|
6117
6469
|
}
|
|
6118
6470
|
}
|
|
6119
6471
|
data.push(__assign({ id: scope.Id, name: scope.ScopeName, type: scope.ScopeType, __formattedProps: formattedProps }, props));
|
|
@@ -7461,6 +7813,27 @@
|
|
|
7461
7813
|
});
|
|
7462
7814
|
return retVal;
|
|
7463
7815
|
};
|
|
7816
|
+
Query.prototype.fetchDetails = function () {
|
|
7817
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7818
|
+
var queryDetails;
|
|
7819
|
+
return __generator(this, function (_a) {
|
|
7820
|
+
switch (_a.label) {
|
|
7821
|
+
case 0: return [4 /*yield*/, this._wsWorkunits.WUQueryDetails({
|
|
7822
|
+
QuerySet: this.QuerySet,
|
|
7823
|
+
QueryId: this.QueryId,
|
|
7824
|
+
IncludeStateOnClusters: false,
|
|
7825
|
+
IncludeSuperFiles: false,
|
|
7826
|
+
IncludeWsEclAddresses: false,
|
|
7827
|
+
CheckAllNodes: false
|
|
7828
|
+
})];
|
|
7829
|
+
case 1:
|
|
7830
|
+
queryDetails = _a.sent();
|
|
7831
|
+
this.set(__assign({}, queryDetails));
|
|
7832
|
+
return [2 /*return*/];
|
|
7833
|
+
}
|
|
7834
|
+
});
|
|
7835
|
+
});
|
|
7836
|
+
};
|
|
7464
7837
|
Query.prototype.fetchRequestSchema = function () {
|
|
7465
7838
|
return __awaiter(this, void 0, void 0, function () {
|
|
7466
7839
|
var _a;
|
|
@@ -7516,9 +7889,16 @@
|
|
|
7516
7889
|
};
|
|
7517
7890
|
Query.prototype.refresh = function () {
|
|
7518
7891
|
return __awaiter(this, void 0, void 0, function () {
|
|
7519
|
-
var _this = this;
|
|
7520
7892
|
return __generator(this, function (_a) {
|
|
7521
|
-
|
|
7893
|
+
switch (_a.label) {
|
|
7894
|
+
case 0: return [4 /*yield*/, Promise.all([
|
|
7895
|
+
this.fetchDetails(),
|
|
7896
|
+
this.fetchSchema()
|
|
7897
|
+
])];
|
|
7898
|
+
case 1:
|
|
7899
|
+
_a.sent();
|
|
7900
|
+
return [2 /*return*/, this];
|
|
7901
|
+
}
|
|
7522
7902
|
});
|
|
7523
7903
|
});
|
|
7524
7904
|
};
|
|
@@ -8367,6 +8747,16 @@
|
|
|
8367
8747
|
enumerable: false,
|
|
8368
8748
|
configurable: true
|
|
8369
8749
|
});
|
|
8750
|
+
Object.defineProperty(DFUWorkunit.prototype, "KbPerSecAve", {
|
|
8751
|
+
get: function () { return this.get("KbPerSecAve"); },
|
|
8752
|
+
enumerable: false,
|
|
8753
|
+
configurable: true
|
|
8754
|
+
});
|
|
8755
|
+
Object.defineProperty(DFUWorkunit.prototype, "KbPerSec", {
|
|
8756
|
+
get: function () { return this.get("KbPerSec"); },
|
|
8757
|
+
enumerable: false,
|
|
8758
|
+
configurable: true
|
|
8759
|
+
});
|
|
8370
8760
|
// Factories ---
|
|
8371
8761
|
DFUWorkunit.create = function (optsConnection, dfuServerQueue) {
|
|
8372
8762
|
var retVal = new DFUWorkunit(optsConnection);
|
|
@@ -8412,6 +8802,21 @@
|
|
|
8412
8802
|
});
|
|
8413
8803
|
});
|
|
8414
8804
|
};
|
|
8805
|
+
DFUWorkunit.prototype.update = function (request) {
|
|
8806
|
+
var _a, _b, _c, _d;
|
|
8807
|
+
return this.connection.UpdateDFUWorkunitEx({
|
|
8808
|
+
wu: {
|
|
8809
|
+
JobName: (_b = (_a = request === null || request === void 0 ? void 0 : request.wu) === null || _a === void 0 ? void 0 : _a.JobName) !== null && _b !== void 0 ? _b : this.JobName,
|
|
8810
|
+
isProtected: (_d = (_c = request === null || request === void 0 ? void 0 : request.wu) === null || _c === void 0 ? void 0 : _c.isProtected) !== null && _d !== void 0 ? _d : this.isProtected,
|
|
8811
|
+
ID: this.ID,
|
|
8812
|
+
State: this.State
|
|
8813
|
+
},
|
|
8814
|
+
ClusterOrig: this.ClusterName,
|
|
8815
|
+
JobNameOrig: this.JobName,
|
|
8816
|
+
isProtectedOrig: this.isProtected,
|
|
8817
|
+
StateOrig: this.State
|
|
8818
|
+
});
|
|
8819
|
+
};
|
|
8415
8820
|
DFUWorkunit.prototype.isComplete = function () {
|
|
8416
8821
|
switch (this.State) {
|
|
8417
8822
|
case States.Finished:
|
|
@@ -8438,6 +8843,12 @@
|
|
|
8438
8843
|
DFUWorkunit.prototype.isRunning = function () {
|
|
8439
8844
|
return !this.isComplete();
|
|
8440
8845
|
};
|
|
8846
|
+
DFUWorkunit.prototype.abort = function () {
|
|
8847
|
+
return this.connection.AbortDFUWorkunit({ wuid: this.ID });
|
|
8848
|
+
};
|
|
8849
|
+
DFUWorkunit.prototype.delete = function () {
|
|
8850
|
+
return this.DFUWUAction(exports.FileSpray.DFUWUActions.Delete);
|
|
8851
|
+
};
|
|
8441
8852
|
DFUWorkunit.prototype.refresh = function (full) {
|
|
8442
8853
|
return __awaiter(this, void 0, void 0, function () {
|
|
8443
8854
|
return __generator(this, function (_a) {
|
|
@@ -8450,6 +8861,9 @@
|
|
|
8450
8861
|
});
|
|
8451
8862
|
});
|
|
8452
8863
|
};
|
|
8864
|
+
DFUWorkunit.prototype.fetchXML = function (callback) {
|
|
8865
|
+
return this.DFUWUFile();
|
|
8866
|
+
};
|
|
8453
8867
|
// Monitoring ---
|
|
8454
8868
|
DFUWorkunit.prototype._monitor = function () {
|
|
8455
8869
|
if (this.isComplete()) {
|
|
@@ -8471,6 +8885,29 @@
|
|
|
8471
8885
|
}
|
|
8472
8886
|
return retVal;
|
|
8473
8887
|
};
|
|
8888
|
+
DFUWorkunit.prototype.DFUWUFile = function (_request) {
|
|
8889
|
+
if (_request === void 0) { _request = {}; }
|
|
8890
|
+
return this.connection.DFUWUFile(__assign(__assign({}, _request), { Wuid: this.ID })).then(function (response) {
|
|
8891
|
+
//TODO: additional processing?
|
|
8892
|
+
return response;
|
|
8893
|
+
}).catch(function (e) {
|
|
8894
|
+
return {};
|
|
8895
|
+
});
|
|
8896
|
+
};
|
|
8897
|
+
DFUWorkunit.prototype.DFUWUAction = function (actionType) {
|
|
8898
|
+
var _this = this;
|
|
8899
|
+
return this.connection.DFUWorkunitsAction({
|
|
8900
|
+
wuids: { Item: [this.ID] },
|
|
8901
|
+
Type: actionType
|
|
8902
|
+
}).then(function (response) {
|
|
8903
|
+
if (actionType === exports.FileSpray.DFUWUActions.Delete)
|
|
8904
|
+
return response;
|
|
8905
|
+
return _this.refresh().then(function () {
|
|
8906
|
+
_this._monitor();
|
|
8907
|
+
return response;
|
|
8908
|
+
});
|
|
8909
|
+
});
|
|
8910
|
+
};
|
|
8474
8911
|
// Events ---
|
|
8475
8912
|
DFUWorkunit.prototype.on = function (eventID, propIDorCallback, callback) {
|
|
8476
8913
|
var _this = this;
|