@hpcc-js/comms 2.92.3 → 2.94.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 +52 -6
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +52 -6
- 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 +52 -6
- 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/__package__.js.map +1 -1
- package/lib-es6/ecl/workunit.js +17 -1
- package/lib-es6/ecl/workunit.js.map +1 -1
- package/lib-es6/services/wsLogaccess.js +33 -3
- package/lib-es6/services/wsLogaccess.js.map +1 -1
- package/package.json +5 -5
- package/src/__package__.ts +2 -2
- package/src/ecl/workunit.ts +22 -0
- package/src/services/wsLogaccess.ts +32 -3
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types/ecl/workunit.d.ts +3 -0
- package/types/ecl/workunit.d.ts.map +1 -1
- package/types/services/wsLogaccess.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
- package/types-3.4/ecl/workunit.d.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -648,8 +648,8 @@
|
|
|
648
648
|
}
|
|
649
649
|
|
|
650
650
|
var PKG_NAME = "@hpcc-js/comms";
|
|
651
|
-
var PKG_VERSION = "2.
|
|
652
|
-
var BUILD_VERSION = "2.
|
|
651
|
+
var PKG_VERSION = "2.94.0";
|
|
652
|
+
var BUILD_VERSION = "2.106.0";
|
|
653
653
|
|
|
654
654
|
/******************************************************************************
|
|
655
655
|
Copyright (c) Microsoft Corporation.
|
|
@@ -2118,17 +2118,41 @@
|
|
|
2118
2118
|
_loop_1 = function (key) {
|
|
2119
2119
|
var searchField;
|
|
2120
2120
|
if (key in columnMap) {
|
|
2121
|
-
|
|
2121
|
+
if (Object.values(exports.WsLogaccess.LogColumnType).includes(key)) {
|
|
2122
|
+
searchField = key;
|
|
2123
|
+
}
|
|
2124
|
+
else {
|
|
2125
|
+
searchField = columnMap[key];
|
|
2126
|
+
}
|
|
2122
2127
|
}
|
|
2123
|
-
var logCategory
|
|
2128
|
+
var logCategory;
|
|
2124
2129
|
if (searchField) {
|
|
2125
2130
|
switch (searchField) {
|
|
2131
|
+
case exports.WsLogaccess.LogColumnType.workunits:
|
|
2132
|
+
case "hpcc.log.jobid":
|
|
2133
|
+
logCategory = exports.WsLogaccess.LogAccessType.ByJobID;
|
|
2134
|
+
break;
|
|
2135
|
+
case exports.WsLogaccess.LogColumnType.audience:
|
|
2126
2136
|
case "hpcc.log.audience":
|
|
2127
2137
|
logCategory = exports.WsLogaccess.LogAccessType.ByTargetAudience;
|
|
2128
2138
|
break;
|
|
2139
|
+
case exports.WsLogaccess.LogColumnType.class:
|
|
2140
|
+
case "hpcc.log.class":
|
|
2141
|
+
logCategory = exports.WsLogaccess.LogAccessType.ByLogType;
|
|
2142
|
+
break;
|
|
2143
|
+
case exports.WsLogaccess.LogColumnType.components:
|
|
2144
|
+
case "kubernetes.container.name":
|
|
2145
|
+
logCategory = exports.WsLogaccess.LogAccessType.ByComponent;
|
|
2146
|
+
break;
|
|
2147
|
+
default:
|
|
2148
|
+
logCategory = exports.WsLogaccess.LogAccessType.ByFieldName;
|
|
2149
|
+
searchField = columnMap[key];
|
|
2129
2150
|
}
|
|
2130
2151
|
if (Array.isArray(request[key])) {
|
|
2131
2152
|
request[key].forEach(function (value) {
|
|
2153
|
+
if (logCategory === exports.WsLogaccess.LogAccessType.ByComponent) {
|
|
2154
|
+
value += "*";
|
|
2155
|
+
}
|
|
2132
2156
|
filters.push({
|
|
2133
2157
|
LogCategory: logCategory,
|
|
2134
2158
|
SearchField: searchField,
|
|
@@ -2137,10 +2161,16 @@
|
|
|
2137
2161
|
});
|
|
2138
2162
|
}
|
|
2139
2163
|
else {
|
|
2164
|
+
var value = request[key];
|
|
2165
|
+
if (logCategory === exports.WsLogaccess.LogAccessType.ByComponent) {
|
|
2166
|
+
// append wildcard to end of search value to include ephemeral
|
|
2167
|
+
// containers that aren't listed in ECL Watch's filters
|
|
2168
|
+
value += "*";
|
|
2169
|
+
}
|
|
2140
2170
|
filters.push({
|
|
2141
2171
|
LogCategory: logCategory,
|
|
2142
2172
|
SearchField: searchField,
|
|
2143
|
-
SearchByValue:
|
|
2173
|
+
SearchByValue: value
|
|
2144
2174
|
});
|
|
2145
2175
|
}
|
|
2146
2176
|
}
|
|
@@ -5768,10 +5798,21 @@
|
|
|
5768
5798
|
var _a, _b;
|
|
5769
5799
|
return (_b = (_a = item.__formattedProps) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : item[key];
|
|
5770
5800
|
}
|
|
5801
|
+
function safeParseFloat(val) {
|
|
5802
|
+
if (val === undefined)
|
|
5803
|
+
return undefined;
|
|
5804
|
+
var retVal = parseFloat(val);
|
|
5805
|
+
return isNaN(retVal) ? undefined : retVal;
|
|
5806
|
+
}
|
|
5771
5807
|
function formatValues(item, key, dedup) {
|
|
5772
5808
|
var keyParts = splitMetric(key);
|
|
5773
5809
|
if (!dedup[keyParts.measure]) {
|
|
5774
5810
|
dedup[keyParts.label] = true;
|
|
5811
|
+
var avg = safeParseFloat(item["".concat(keyParts.measure, "Avg").concat(keyParts.label)]);
|
|
5812
|
+
var min = safeParseFloat(item["".concat(keyParts.measure, "Min").concat(keyParts.label)]);
|
|
5813
|
+
var max = safeParseFloat(item["".concat(keyParts.measure, "Max").concat(keyParts.label)]);
|
|
5814
|
+
var stdDev = safeParseFloat(item["".concat(keyParts.measure, "StdDev").concat(keyParts.label)]);
|
|
5815
|
+
var StdDevs = Math.max((avg - min) / stdDev, (max - avg) / stdDev);
|
|
5775
5816
|
return {
|
|
5776
5817
|
Key: "".concat(keyParts.measure).concat(keyParts.label),
|
|
5777
5818
|
Value: formatValue(item, "".concat(keyParts.measure).concat(keyParts.label)),
|
|
@@ -5781,6 +5822,7 @@
|
|
|
5781
5822
|
Max: formatValue(item, "".concat(keyParts.measure, "Max").concat(keyParts.label)),
|
|
5782
5823
|
Delta: formatValue(item, "".concat(keyParts.measure, "Delta").concat(keyParts.label)),
|
|
5783
5824
|
StdDev: formatValue(item, "".concat(keyParts.measure, "StdDev").concat(keyParts.label)),
|
|
5825
|
+
StdDevs: isNaN(StdDevs) ? undefined : StdDevs,
|
|
5784
5826
|
// Related properties ---
|
|
5785
5827
|
SkewMin: formatValue(item, "SkewMin".concat(keyParts.label)),
|
|
5786
5828
|
SkewMax: formatValue(item, "SkewMax".concat(keyParts.label)),
|
|
@@ -6679,7 +6721,7 @@
|
|
|
6679
6721
|
}
|
|
6680
6722
|
// Other properties ---
|
|
6681
6723
|
}
|
|
6682
|
-
var normalizedScope = __assign({ id: scope.Id, name: scope.ScopeName, type: scope.ScopeType, Kind: scope["Kind"], Label: scope["Label"], __formattedProps: formattedProps, __groupedProps: {} }, props);
|
|
6724
|
+
var normalizedScope = __assign({ id: scope.Id, name: scope.ScopeName, type: scope.ScopeType, Kind: scope["Kind"], Label: scope["Label"], __formattedProps: formattedProps, __groupedProps: {}, __groupedRawProps: {}, __StdDevs: 0, __StdDevsSource: "" }, props);
|
|
6683
6725
|
if (normalizedScope[DEFINITION_LIST]) {
|
|
6684
6726
|
try {
|
|
6685
6727
|
var definitionList = JSON.parse(normalizedScope[DEFINITION_LIST].split("\\").join("\\\\"));
|
|
@@ -6705,6 +6747,10 @@
|
|
|
6705
6747
|
var row = formatValues(normalizedScope, key, dedup);
|
|
6706
6748
|
if (row) {
|
|
6707
6749
|
normalizedScope.__groupedProps[row.Key] = row;
|
|
6750
|
+
if (!isNaN(row.StdDevs) && normalizedScope.__StdDevs < row.StdDevs) {
|
|
6751
|
+
normalizedScope.__StdDevs = row.StdDevs;
|
|
6752
|
+
normalizedScope.__StdDevsSource = row.Key;
|
|
6753
|
+
}
|
|
6708
6754
|
}
|
|
6709
6755
|
}
|
|
6710
6756
|
}
|