@splunk/visualizations 26.3.0 → 26.4.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/Area.config.js +1 -1
- package/Area.config.js.map +1 -1
- package/Area.js +300 -290
- package/Area.js.map +1 -1
- package/Bar.config.js +1 -1
- package/Bar.config.js.map +1 -1
- package/Bar.js +303 -293
- package/Bar.js.map +1 -1
- package/Bubble.config.js +1 -1
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +292 -282
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +1 -1
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +262 -260
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +1 -1
- package/Column.config.js.map +1 -1
- package/Column.js +303 -293
- package/Column.js.map +1 -1
- package/Ellipse.js +220 -218
- package/Ellipse.js.map +1 -1
- package/Events.config.js +1 -1
- package/Events.config.js.map +1 -1
- package/Events.js +285 -283
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +1 -1
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +250 -248
- package/FillerGauge.js.map +1 -1
- package/Image.js +212 -210
- package/Image.js.map +1 -1
- package/Line.config.js +1 -1
- package/Line.config.js.map +1 -1
- package/Line.js +301 -291
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +1 -1
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +1725 -17201
- package/LinkGraph.js.map +1 -1
- package/MIGRATION.md +12 -0
- package/Map.config.js +1 -1
- package/Map.config.js.map +1 -1
- package/Map.js +465 -406
- package/Map.js.map +1 -1
- package/Markdown.config.js +1 -1
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +281 -277
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +1 -1
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +926 -922
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +1 -1
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +336 -320
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +5 -1
- package/Pie.config.js.map +1 -1
- package/Pie.js +374 -332
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +1 -1
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +342 -338
- package/Punchcard.js.map +1 -1
- package/Rectangle.js +260 -256
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +1 -1
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +339 -335
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +1 -1
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +351 -339
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +10 -2
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +455 -427
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +65 -53
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +10 -2
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +449 -421
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +11 -3
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1580 -1552
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +33 -33
- package/SparkLine.js.map +1 -1
- package/Table.js +354 -350
- package/Table.js.map +1 -1
- package/common/Charting.js +25 -24
- package/common/Charting.js.map +1 -1
- package/common/utils/dataUtils.js +12 -18
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +23 -11
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/withDashboardViz.js +31 -27
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +17 -16
package/MarkerGauge.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 437);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -95,28 +95,28 @@ module.exports =
|
|
|
95
95
|
/***/ 0:
|
|
96
96
|
/***/ (function(module, exports) {
|
|
97
97
|
|
|
98
|
-
module.exports = require("
|
|
98
|
+
module.exports = require("prop-types");
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
102
|
/***/ 1:
|
|
103
103
|
/***/ (function(module, exports) {
|
|
104
104
|
|
|
105
|
-
module.exports = require("
|
|
105
|
+
module.exports = require("react");
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
108
|
|
|
109
109
|
/***/ 10:
|
|
110
110
|
/***/ (function(module, exports) {
|
|
111
111
|
|
|
112
|
-
module.exports = require("@splunk/
|
|
112
|
+
module.exports = require("@splunk/visualizations-shared/numberUtils");
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
116
|
/***/ 11:
|
|
117
117
|
/***/ (function(module, exports) {
|
|
118
118
|
|
|
119
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
119
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
@@ -126,18 +126,18 @@ module.exports = require("@splunk/visualizations-shared/numberUtils");
|
|
|
126
126
|
"use strict";
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
var _toConsumableArray = __webpack_require__(
|
|
129
|
+
var _toConsumableArray = __webpack_require__(6);
|
|
130
130
|
|
|
131
131
|
Object.defineProperty(exports, "__esModule", {
|
|
132
132
|
value: true
|
|
133
133
|
});
|
|
134
134
|
exports.convertToGaugeProperties = exports.mapValueLabelDisplay = exports.mapToOldKey = exports.getGradientDimensions = exports.getGradientStops = exports.getGradientStopColors = exports.getGradientStopOffsets = exports.getGaugeRange = exports.validateRanges = exports.getSortedRanges = exports.getMarkerGaugeValueMarkerPositions = exports.getMarkerBarDimensions = exports.getFillerGaugeValueMarkerPositions = exports.getFillBarDimensions = exports.getGaugeBarHeight = exports.getGaugeBarWidth = exports.getGaugeBarStartPositions = exports.getGaugeBarLength = exports.assignGaugeColor = exports.getGaugeDimensions = exports.getGaugeStartPosition = exports.getGaugeLength = exports.getGaugeHeight = exports.getGaugeWidth = exports.FILL_THICKNESS = exports.GAUGE_THICKNESS = void 0;
|
|
135
135
|
|
|
136
|
-
var lodash_1 = __webpack_require__(
|
|
136
|
+
var lodash_1 = __webpack_require__(2);
|
|
137
137
|
|
|
138
|
-
var colorConstants_1 = __webpack_require__(
|
|
138
|
+
var colorConstants_1 = __webpack_require__(69);
|
|
139
139
|
|
|
140
|
-
var i18n_1 = __webpack_require__(
|
|
140
|
+
var i18n_1 = __webpack_require__(3);
|
|
141
141
|
|
|
142
142
|
exports.GAUGE_THICKNESS = 50;
|
|
143
143
|
exports.FILL_THICKNESS = 38;
|
|
@@ -892,25 +892,18 @@ exports.convertToGaugeProperties = convertToGaugeProperties;
|
|
|
892
892
|
/***/ 12:
|
|
893
893
|
/***/ (function(module, exports) {
|
|
894
894
|
|
|
895
|
-
module.exports = require("@splunk/visualizations-shared/Message");
|
|
896
|
-
|
|
897
|
-
/***/ }),
|
|
898
|
-
|
|
899
|
-
/***/ 13:
|
|
900
|
-
/***/ (function(module, exports) {
|
|
901
|
-
|
|
902
895
|
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
903
896
|
|
|
904
897
|
/***/ }),
|
|
905
898
|
|
|
906
|
-
/***/
|
|
899
|
+
/***/ 13:
|
|
907
900
|
/***/ (function(module, exports) {
|
|
908
901
|
|
|
909
902
|
module.exports = require("@splunk/themes/variables");
|
|
910
903
|
|
|
911
904
|
/***/ }),
|
|
912
905
|
|
|
913
|
-
/***/
|
|
906
|
+
/***/ 14:
|
|
914
907
|
/***/ (function(module, exports, __webpack_require__) {
|
|
915
908
|
|
|
916
909
|
"use strict";
|
|
@@ -919,692 +912,160 @@ module.exports = require("@splunk/themes/variables");
|
|
|
919
912
|
Object.defineProperty(exports, "__esModule", {
|
|
920
913
|
value: true
|
|
921
914
|
});
|
|
915
|
+
exports.downsampleDataSources = exports.calculateDownsamplingThreshold = exports.calculateThresholdOnRangeSelect = exports.isDownsamplingEnabledForViz = exports.convertToArrOfObjects = void 0;
|
|
922
916
|
|
|
923
|
-
var
|
|
924
|
-
|
|
925
|
-
var gauge = {
|
|
926
|
-
label: (0, i18n_1._)('Data display'),
|
|
927
|
-
layout: [[{
|
|
928
|
-
label: (0, i18n_1._)('Value display'),
|
|
929
|
-
option: 'valueDisplay',
|
|
930
|
-
editor: 'editor.radioBar',
|
|
931
|
-
editorProps: {
|
|
932
|
-
values: [{
|
|
933
|
-
label: (0, i18n_1._)('Number'),
|
|
934
|
-
value: 'number'
|
|
935
|
-
}, {
|
|
936
|
-
label: (0, i18n_1._)('Percentage'),
|
|
937
|
-
value: 'percentage'
|
|
938
|
-
}, {
|
|
939
|
-
label: (0, i18n_1._)('Off'),
|
|
940
|
-
value: 'off'
|
|
941
|
-
}]
|
|
942
|
-
}
|
|
943
|
-
}], [{
|
|
944
|
-
label: (0, i18n_1._)('Label display'),
|
|
945
|
-
option: 'labelDisplay',
|
|
946
|
-
editor: 'editor.radioBar',
|
|
947
|
-
editorProps: {
|
|
948
|
-
values: [{
|
|
949
|
-
label: (0, i18n_1._)('Numbers'),
|
|
950
|
-
value: 'number'
|
|
951
|
-
}, {
|
|
952
|
-
label: (0, i18n_1._)('Percentages'),
|
|
953
|
-
value: 'percentage'
|
|
954
|
-
}, {
|
|
955
|
-
label: (0, i18n_1._)('Off'),
|
|
956
|
-
value: 'off'
|
|
957
|
-
}]
|
|
958
|
-
}
|
|
959
|
-
}], [{
|
|
960
|
-
label: (0, i18n_1._)('Orientation'),
|
|
961
|
-
option: 'orientation',
|
|
962
|
-
editor: 'editor.radioBar',
|
|
963
|
-
editorProps: {
|
|
964
|
-
values: [{
|
|
965
|
-
label: (0, i18n_1._)('Vertical'),
|
|
966
|
-
value: 'vertical'
|
|
967
|
-
}, {
|
|
968
|
-
label: (0, i18n_1._)('Horizontal'),
|
|
969
|
-
value: 'horizontal'
|
|
970
|
-
}]
|
|
971
|
-
}
|
|
972
|
-
}]]
|
|
973
|
-
};
|
|
974
|
-
exports.default = gauge;
|
|
975
|
-
|
|
976
|
-
/***/ }),
|
|
917
|
+
var numberUtils_1 = __webpack_require__(10);
|
|
977
918
|
|
|
978
|
-
|
|
979
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
919
|
+
var interfaces_1 = __webpack_require__(39); // TODO: utilize this fn in ParallelCoordinates
|
|
980
920
|
|
|
981
|
-
"use strict";
|
|
982
|
-
__webpack_require__.r(__webpack_exports__);
|
|
983
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MajorTick", function() { return MajorTick; });
|
|
984
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionMajorTick", function() { return positionMajorTick; });
|
|
985
|
-
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69);
|
|
986
|
-
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
|
987
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
|
|
988
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
989
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
990
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
|
991
|
-
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
|
|
992
|
-
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
|
|
993
|
-
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(11);
|
|
994
|
-
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__);
|
|
995
921
|
|
|
922
|
+
var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
|
|
923
|
+
if (!columns || !columns[0] || !columns[0].length) return [];
|
|
924
|
+
var data = [];
|
|
996
925
|
|
|
926
|
+
var _loop = function _loop(i) {
|
|
927
|
+
var newObj = {};
|
|
928
|
+
fields.forEach(function (field, index) {
|
|
929
|
+
var fieldName = typeof field === 'string' ? field : field.name;
|
|
997
930
|
|
|
931
|
+
if (columns[index][i] === '') {
|
|
932
|
+
newObj[fieldName] = null;
|
|
933
|
+
} else {
|
|
934
|
+
newObj[fieldName] = columns[index][i];
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
data.push(newObj);
|
|
938
|
+
};
|
|
998
939
|
|
|
940
|
+
for (var i = 0; i < columns[0].length; i += 1) {
|
|
941
|
+
_loop(i);
|
|
942
|
+
}
|
|
999
943
|
|
|
1000
|
-
|
|
1001
|
-
var TICK_LENGTH_DELTA = 5;
|
|
1002
|
-
var TICK_LABEL_PADDING_FACTOR = 3.2;
|
|
1003
|
-
var MajorTickLine = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.line.withConfig({
|
|
1004
|
-
displayName: "GaugeMajorTicks__MajorTickLine",
|
|
1005
|
-
componentId: "sc-mchiad-0"
|
|
1006
|
-
})(["stroke:", ";stroke-width:2px;stroke-dasharray:", ";"], function (props) {
|
|
1007
|
-
return props.majorTickStrokeColor;
|
|
1008
|
-
}, function (props) {
|
|
1009
|
-
return props.index === 0 ? 0 : 3;
|
|
1010
|
-
});
|
|
1011
|
-
var MajorTickLabel = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.text.withConfig({
|
|
1012
|
-
displayName: "GaugeMajorTicks__MajorTickLabel",
|
|
1013
|
-
componentId: "sc-mchiad-1"
|
|
1014
|
-
})(["font-size:12px;font-family:Splunk Platform Sans,sans-serif;line-height:19px;fill:", ";text-anchor:middle;text-align:center;"], function (props) {
|
|
1015
|
-
return props.majorTickFillColor;
|
|
1016
|
-
});
|
|
1017
|
-
var MajorTick = function MajorTick(_ref) {
|
|
1018
|
-
var index = _ref.index,
|
|
1019
|
-
x1 = _ref.x1,
|
|
1020
|
-
y1 = _ref.y1,
|
|
1021
|
-
x2 = _ref.x2,
|
|
1022
|
-
y2 = _ref.y2,
|
|
1023
|
-
showLabels = _ref.showLabels,
|
|
1024
|
-
label = _ref.label,
|
|
1025
|
-
labelX = _ref.labelX,
|
|
1026
|
-
labelY = _ref.labelY,
|
|
1027
|
-
majorTickStrokeColor = _ref.majorTickStrokeColor,
|
|
1028
|
-
majorTickFillColor = _ref.majorTickFillColor;
|
|
1029
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("g", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MajorTickLine, {
|
|
1030
|
-
"data-test": "major-tick-line",
|
|
1031
|
-
index: index,
|
|
1032
|
-
x1: x1,
|
|
1033
|
-
y1: y1,
|
|
1034
|
-
x2: x2,
|
|
1035
|
-
y2: y2,
|
|
1036
|
-
majorTickStrokeColor: majorTickStrokeColor
|
|
1037
|
-
}), showLabels && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MajorTickLabel, {
|
|
1038
|
-
x: labelX,
|
|
1039
|
-
y: labelY,
|
|
1040
|
-
majorTickFillColor: majorTickFillColor,
|
|
1041
|
-
"data-test": "major-tick-label"
|
|
1042
|
-
}, Object(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__["isNumerial"])(label) ? Object(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__["formatNumber"])(label, 0, {
|
|
1043
|
-
useThousandSeparators: true,
|
|
1044
|
-
useTrendUnits: true
|
|
1045
|
-
}) : label));
|
|
1046
|
-
};
|
|
1047
|
-
MajorTick.propTypes = {
|
|
1048
|
-
index: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1049
|
-
x1: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1050
|
-
y1: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1051
|
-
x2: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1052
|
-
y2: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1053
|
-
showLabels: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1054
|
-
label: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number]),
|
|
1055
|
-
labelX: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1056
|
-
labelY: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1057
|
-
majorTickStrokeColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1058
|
-
majorTickFillColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string
|
|
944
|
+
return data;
|
|
1059
945
|
};
|
|
1060
|
-
/**
|
|
1061
|
-
* calculate position for each major tick
|
|
1062
|
-
* @method positionMajorTick
|
|
1063
|
-
* @param {Object} input
|
|
1064
|
-
* @param {Number} input.width
|
|
1065
|
-
* @param {Number} input.height
|
|
1066
|
-
* @param {Number} input.startX start x for rendering the first major tick
|
|
1067
|
-
* @param {Number} input.startY start y for rendering the first major tick
|
|
1068
|
-
* @param {String} input.orientation
|
|
1069
|
-
* @param {Number} input.numOfTicks how many ticks need to render
|
|
1070
|
-
* @param {Number} input.i index of major tick
|
|
1071
|
-
* @return {Object} MajorTick positions
|
|
1072
|
-
*/
|
|
1073
946
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
var y1 = startY;
|
|
1084
|
-
var x2 = startX;
|
|
1085
|
-
var y2 = startY;
|
|
1086
|
-
var labelX = startX;
|
|
1087
|
-
var labelY;
|
|
947
|
+
exports.convertToArrOfObjects = convertToArrOfObjects; // LTTB algorithm which can be used to downsample time series data while striving to maintain
|
|
948
|
+
// the spikes and overall shape of the chart
|
|
949
|
+
// Copied from https://github.com/sveinn-steinarsson/flot-downsample/blob/0815010016fc94b1bbc6a010afb8aad13ada6d0d/jquery.flot.downsample.js
|
|
950
|
+
// Modifications include:
|
|
951
|
+
// 1) Convert to modern JavaScript(use const, let, and use array.push to push to last element of array)
|
|
952
|
+
// 2) Convert to camel case
|
|
953
|
+
// 3) Convert to TS and also return the indices of the points that are in the downsampled result.
|
|
954
|
+
// 4) Add a new parameter preferredDownsampleIndices that correspond to the indices of points
|
|
955
|
+
// that should be used in case of a tie of the max area in a bucket
|
|
1088
956
|
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
x2 = x;
|
|
1102
|
-
y2 += height + TICK_LENGTH_DELTA;
|
|
1103
|
-
labelX = x;
|
|
1104
|
-
labelY = y2 + 16;
|
|
957
|
+
var largestTriangleThreeBuckets = function largestTriangleThreeBuckets(data, threshold, preferredDownsampleIndices) {
|
|
958
|
+
var dataLength = data.length;
|
|
959
|
+
var downsampledIndices = [];
|
|
960
|
+
|
|
961
|
+
if (threshold >= dataLength || threshold === 0) {
|
|
962
|
+
var allIndices = data.map(function (values, index) {
|
|
963
|
+
return index;
|
|
964
|
+
});
|
|
965
|
+
return {
|
|
966
|
+
downsampledData: data,
|
|
967
|
+
downsampledIndices: allIndices
|
|
968
|
+
}; // Nothing to do
|
|
1105
969
|
}
|
|
1106
970
|
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
y1: y1,
|
|
1110
|
-
x2: x2,
|
|
1111
|
-
y2: y2,
|
|
1112
|
-
labelX: labelX,
|
|
1113
|
-
labelY: labelY
|
|
1114
|
-
};
|
|
1115
|
-
};
|
|
971
|
+
var sampled = [];
|
|
972
|
+
var sampledIndex = 0; // Bucket size. Leave room for start and end data points
|
|
1116
973
|
|
|
1117
|
-
var
|
|
1118
|
-
var
|
|
974
|
+
var every = (dataLength - 2) / (threshold - 2);
|
|
975
|
+
var a = 0; // Initially a is the first point in the triangle
|
|
1119
976
|
|
|
1120
|
-
var
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
max = props.max,
|
|
1126
|
-
majorUnit = props.majorUnit,
|
|
1127
|
-
orientation = props.orientation,
|
|
1128
|
-
showLabels = props.showLabels,
|
|
1129
|
-
usePercentageRange = props.usePercentageRange,
|
|
1130
|
-
majorTickFillColor = props.majorTickFillColor,
|
|
1131
|
-
majorTickStrokeColor = props.majorTickStrokeColor;
|
|
1132
|
-
var range = max - min;
|
|
1133
|
-
var numOfTicks = majorUnit === 'auto' || Number.isNaN(Number(majorUnit)) || majorUnit <= 0 ? DEFAULT_NUM_OF_TICKS : range / majorUnit;
|
|
1134
|
-
var majorTicks = [];
|
|
1135
|
-
|
|
1136
|
-
for (var i = 0; i <= numOfTicks; i += 1) {
|
|
1137
|
-
var _positionMajorTick = positionMajorTick({
|
|
1138
|
-
width: width,
|
|
1139
|
-
height: height,
|
|
1140
|
-
startX: startX,
|
|
1141
|
-
startY: startY,
|
|
1142
|
-
orientation: orientation,
|
|
1143
|
-
numOfTicks: numOfTicks,
|
|
1144
|
-
i: i
|
|
1145
|
-
}),
|
|
1146
|
-
x1 = _positionMajorTick.x1,
|
|
1147
|
-
y1 = _positionMajorTick.y1,
|
|
1148
|
-
x2 = _positionMajorTick.x2,
|
|
1149
|
-
y2 = _positionMajorTick.y2,
|
|
1150
|
-
labelX = _positionMajorTick.labelX,
|
|
1151
|
-
labelY = _positionMajorTick.labelY;
|
|
977
|
+
var maxAreaPoint;
|
|
978
|
+
var maxArea;
|
|
979
|
+
var area;
|
|
980
|
+
var nextA;
|
|
981
|
+
sampled.push(data[a]); // Always add the first point
|
|
1152
982
|
|
|
1153
|
-
|
|
1154
|
-
majorTicks.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MajorTick, {
|
|
1155
|
-
key: i,
|
|
1156
|
-
index: i,
|
|
1157
|
-
x1: x1,
|
|
1158
|
-
y1: y1,
|
|
1159
|
-
x2: x2,
|
|
1160
|
-
y2: y2,
|
|
1161
|
-
showLabels: showLabels,
|
|
1162
|
-
label: label,
|
|
1163
|
-
labelX: labelX,
|
|
1164
|
-
labelY: labelY,
|
|
1165
|
-
majorTickFillColor: majorTickFillColor,
|
|
1166
|
-
majorTickStrokeColor: majorTickStrokeColor
|
|
1167
|
-
}));
|
|
1168
|
-
} // if the gauge is not divided evenly, put the last tick at the end of the gauge
|
|
983
|
+
downsampledIndices.push(0); // eslint-disable-next-line no-plusplus
|
|
1169
984
|
|
|
985
|
+
for (var i = 0; i < threshold - 2; i++) {
|
|
986
|
+
// Calculate point average for next bucket (containing c)
|
|
987
|
+
var avgX = 0;
|
|
988
|
+
var avgY = 0;
|
|
989
|
+
var avgRangeStart = Math.floor((i + 1) * every) + 1;
|
|
990
|
+
var avgRangeEnd = Math.floor((i + 2) * every) + 1;
|
|
991
|
+
avgRangeEnd = avgRangeEnd < dataLength ? avgRangeEnd : dataLength;
|
|
992
|
+
var avgRangeLength = avgRangeEnd - avgRangeStart; // eslint-disable-next-line no-plusplus
|
|
1170
993
|
|
|
1171
|
-
|
|
1172
|
-
|
|
994
|
+
for (; avgRangeStart < avgRangeEnd; avgRangeStart++) {
|
|
995
|
+
avgX += Number(data[avgRangeStart][0]); // * 1 enforces Number (value may be Date)
|
|
1173
996
|
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
height: height,
|
|
1177
|
-
startX: startX,
|
|
1178
|
-
startY: startY,
|
|
1179
|
-
orientation: orientation,
|
|
1180
|
-
numOfTicks: extraNumOfTicks,
|
|
1181
|
-
i: extraNumOfTicks
|
|
1182
|
-
}),
|
|
1183
|
-
_x = _positionMajorTick2.x1,
|
|
1184
|
-
_y = _positionMajorTick2.y1,
|
|
1185
|
-
_x2 = _positionMajorTick2.x2,
|
|
1186
|
-
_y2 = _positionMajorTick2.y2,
|
|
1187
|
-
_labelX = _positionMajorTick2.labelX,
|
|
1188
|
-
_labelY = _positionMajorTick2.labelY;
|
|
997
|
+
avgY += data[avgRangeStart][1] * 1;
|
|
998
|
+
}
|
|
1189
999
|
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
id: extraNumOfTicks,
|
|
1193
|
-
x1: _x,
|
|
1194
|
-
y1: _y,
|
|
1195
|
-
x2: _x2,
|
|
1196
|
-
y2: _y2,
|
|
1197
|
-
showLabels: showLabels,
|
|
1198
|
-
label: usePercentageRange ? '100%' : max,
|
|
1199
|
-
labelX: _labelX,
|
|
1200
|
-
labelY: _labelY,
|
|
1201
|
-
majorTickFillColor: majorTickFillColor,
|
|
1202
|
-
majorTickStrokeColor: majorTickStrokeColor
|
|
1203
|
-
}));
|
|
1204
|
-
}
|
|
1000
|
+
avgX /= avgRangeLength;
|
|
1001
|
+
avgY /= avgRangeLength; // Get the range for this bucket
|
|
1205
1002
|
|
|
1206
|
-
|
|
1207
|
-
|
|
1003
|
+
var rangeOffs = Math.floor((i + 0) * every) + 1;
|
|
1004
|
+
var rangeTo = Math.floor((i + 1) * every) + 1; // Point a
|
|
1208
1005
|
|
|
1209
|
-
|
|
1210
|
-
width: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1211
|
-
height: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1212
|
-
startX: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1213
|
-
startY: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1214
|
-
min: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1215
|
-
max: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1216
|
-
majorUnit: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number]),
|
|
1217
|
-
orientation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1218
|
-
showLabels: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1219
|
-
usePercentageRange: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1220
|
-
majorTickFillColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1221
|
-
majorTickStrokeColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string
|
|
1222
|
-
};
|
|
1223
|
-
MajorTicks.defaultProps = {
|
|
1224
|
-
min: 0,
|
|
1225
|
-
max: 100,
|
|
1226
|
-
majorUnit: 'auto',
|
|
1227
|
-
orientation: 'horizontal',
|
|
1228
|
-
showLabels: true,
|
|
1229
|
-
usePercentageRange: false
|
|
1230
|
-
};
|
|
1231
|
-
/* harmony default export */ __webpack_exports__["default"] = (MajorTicks);
|
|
1006
|
+
var pointAX = Number(data[a][0]); // Enforce Number (value may be Date)
|
|
1232
1007
|
|
|
1233
|
-
|
|
1008
|
+
var pointAY = data[a][1] * 1; // eslint-disable-next-line no-multi-assign
|
|
1234
1009
|
|
|
1235
|
-
|
|
1236
|
-
|
|
1010
|
+
maxArea = area = -1;
|
|
1011
|
+
var maxAreaIndex = rangeOffs; // eslint-disable-next-line no-plusplus
|
|
1237
1012
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
|
|
1245
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
1246
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
1247
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
|
1248
|
-
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
|
|
1249
|
-
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
|
|
1250
|
-
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(11);
|
|
1251
|
-
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__);
|
|
1013
|
+
for (; rangeOffs < rangeTo; rangeOffs++) {
|
|
1014
|
+
// Calculate triangle area over three buckets
|
|
1015
|
+
area = Math.abs((pointAX - avgX) * (data[rangeOffs][1] - pointAY) - (pointAX - Number(data[rangeOffs][0])) * (avgY - pointAY)) * 0.5; // Modification: try to downsample the least amount of points possible when there are multiple series
|
|
1016
|
+
// If all points in a bucket have the same area, prioritize the one with an x index
|
|
1017
|
+
// that also existed from another series so we don't add another point unnecessarily.
|
|
1018
|
+
// By default LTTB picks the leftmost point in the bucket
|
|
1252
1019
|
|
|
1020
|
+
if (area > maxArea || area === maxArea && preferredDownsampleIndices.has(rangeOffs)) {
|
|
1021
|
+
maxArea = area;
|
|
1022
|
+
maxAreaPoint = data[rangeOffs];
|
|
1023
|
+
nextA = rangeOffs; // Next a is this b
|
|
1024
|
+
// Modification: save the index of the point with the most area
|
|
1253
1025
|
|
|
1026
|
+
maxAreaIndex = rangeOffs;
|
|
1027
|
+
}
|
|
1028
|
+
} // eslint-disable-next-line no-plusplus
|
|
1254
1029
|
|
|
1255
1030
|
|
|
1031
|
+
sampled[sampledIndex++] = maxAreaPoint; // Pick this point from the bucket
|
|
1256
1032
|
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
var MARKER_LABEL_HEIGHT = 25;
|
|
1261
|
-
var RADIUS = 2;
|
|
1262
|
-
var DELTA_LENGTH = 12;
|
|
1263
|
-
var ValueMarkerRect = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.path.withConfig({
|
|
1264
|
-
displayName: "GaugeValueMarker__ValueMarkerRect",
|
|
1265
|
-
componentId: "sc-1bxkeao-0"
|
|
1266
|
-
})(["stroke-width:2px;fill:", ";"], function (props) {
|
|
1267
|
-
return props.valueMarkerFillColor;
|
|
1268
|
-
});
|
|
1269
|
-
var ValueMarkerLabelRect = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.rect.withConfig({
|
|
1270
|
-
displayName: "GaugeValueMarker__ValueMarkerLabelRect",
|
|
1271
|
-
componentId: "sc-1bxkeao-1"
|
|
1272
|
-
})(["fill:", ";"], function (props) {
|
|
1273
|
-
return props.valueMarkerFillColor;
|
|
1274
|
-
});
|
|
1275
|
-
var ValueMarkerLabel = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.text.withConfig({
|
|
1276
|
-
displayName: "GaugeValueMarker__ValueMarkerLabel",
|
|
1277
|
-
componentId: "sc-1bxkeao-2"
|
|
1278
|
-
})(["fill:", ";font-size:14px;font-family:Splunk Platform Sans,sans-serif;line-height:16px;text-anchor:middle;text-align:center;dominant-baseline:middle;"], function (props) {
|
|
1279
|
-
return props.valueMarkerLabelFillColor;
|
|
1280
|
-
});
|
|
1281
|
-
/**
|
|
1282
|
-
* calculate the path of Value Marker shape
|
|
1283
|
-
* @method positionValueMarkerRect
|
|
1284
|
-
* @param {Object} input
|
|
1285
|
-
* @param {Number} input.x
|
|
1286
|
-
* @param {Number} input.y
|
|
1287
|
-
* @param {String} input.orientation
|
|
1288
|
-
* @param {Number} input.valueMarkerRectLength
|
|
1289
|
-
* @return {String} d containing a series of path commands that define the path to be
|
|
1290
|
-
*/
|
|
1033
|
+
downsampledIndices.push(maxAreaIndex);
|
|
1034
|
+
a = nextA; // This a is the next a (chosen b)
|
|
1035
|
+
} // eslint-disable-next-line no-plusplus
|
|
1291
1036
|
|
|
1292
|
-
var positionValueMarkerRect = function positionValueMarkerRect(_ref) {
|
|
1293
|
-
var x = _ref.x,
|
|
1294
|
-
y = _ref.y,
|
|
1295
|
-
orientation = _ref.orientation,
|
|
1296
|
-
valueMarkerRectLength = _ref.valueMarkerRectLength,
|
|
1297
|
-
_ref$alignCenter = _ref.alignCenter,
|
|
1298
|
-
alignCenter = _ref$alignCenter === void 0 ? false : _ref$alignCenter;
|
|
1299
|
-
var hLength = MARKER_THICKNESS;
|
|
1300
|
-
var vLength = valueMarkerRectLength;
|
|
1301
|
-
var markerStartX = alignCenter ? x - MARKER_THICKNESS / 2 : x - MARKER_THICKNESS;
|
|
1302
|
-
var markerStartY = y;
|
|
1303
|
-
var innerHLength = hLength / 3;
|
|
1304
|
-
var innerVLength = MARKER_INNER_LENGTH;
|
|
1305
|
-
var innerStartX = markerStartX + innerHLength;
|
|
1306
|
-
var innerStartY = markerStartY + 7;
|
|
1307
1037
|
|
|
1308
|
-
|
|
1309
|
-
hLength = valueMarkerRectLength;
|
|
1310
|
-
vLength = MARKER_THICKNESS;
|
|
1311
|
-
markerStartX = x;
|
|
1312
|
-
markerStartY = alignCenter ? y - MARKER_THICKNESS / 2 : y;
|
|
1313
|
-
innerHLength = MARKER_INNER_LENGTH;
|
|
1314
|
-
innerVLength = vLength / 3;
|
|
1315
|
-
innerStartX = markerStartX + 7;
|
|
1316
|
-
innerStartY = markerStartY + innerVLength;
|
|
1317
|
-
}
|
|
1038
|
+
sampled[sampledIndex++] = data[dataLength - 1]; // Always add last
|
|
1318
1039
|
|
|
1319
|
-
|
|
1040
|
+
downsampledIndices.push(dataLength - 1);
|
|
1041
|
+
return {
|
|
1042
|
+
downsampledData: sampled,
|
|
1043
|
+
downsampledIndices: downsampledIndices
|
|
1044
|
+
};
|
|
1320
1045
|
};
|
|
1321
1046
|
/**
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
* @param {Number} input.y
|
|
1327
|
-
* @param {Number} input.length gauge thickness
|
|
1328
|
-
* @param {String} input.orientation
|
|
1329
|
-
* @return {Object} positions
|
|
1330
|
-
* @return {Number} positions.labelRectX x of value marker label rect
|
|
1331
|
-
* @return {Number} positions.labelRectY y of value marker label rect
|
|
1332
|
-
* @return {Number} positions.labelX x of value marker label text
|
|
1333
|
-
* @return {Number} positions.labelY y of value marker label text
|
|
1047
|
+
* Strictly coerces the entire column to numbers if it only consists of numeric strings or numbers. Also determines
|
|
1048
|
+
* if at least one of the values in the column can be loosely coerced to a number.
|
|
1049
|
+
* If the column cannot be strictly downsampled (if it contains nulls or non-numeric strings), returns an empty array and
|
|
1050
|
+
* returns that it cannot downsample the column.
|
|
1334
1051
|
*/
|
|
1335
1052
|
|
|
1336
|
-
var positionLabel = function positionLabel(_ref2) {
|
|
1337
|
-
var x = _ref2.x,
|
|
1338
|
-
y = _ref2.y,
|
|
1339
|
-
length = _ref2.length,
|
|
1340
|
-
orientation = _ref2.orientation,
|
|
1341
|
-
_ref2$alignCenter = _ref2.alignCenter,
|
|
1342
|
-
alignCenter = _ref2$alignCenter === void 0 ? false : _ref2$alignCenter; // for horizontal view
|
|
1343
|
-
|
|
1344
|
-
var labelRectX = alignCenter ? x - MARKER_LABEL_WIDTH / 2 : x - MARKER_THICKNESS / 2 - MARKER_LABEL_WIDTH / 2;
|
|
1345
|
-
var labelRectY = y + length;
|
|
1346
1053
|
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1054
|
+
var strictlyCoerceYColumn = function strictlyCoerceYColumn(column, options) {
|
|
1055
|
+
var isNullCoercionEnabled = options.nullValueDisplay === 'zero'; // Splunk charting allows for numbers in formats such as negative hex that
|
|
1056
|
+
// Number() does not support and also allows loose coercion of hex numbers (but not other formats)
|
|
1057
|
+
// We want to identify columns which contain at least one value that can be loosely coerced
|
|
1351
1058
|
|
|
1352
|
-
var
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
labelRectX: labelRectX,
|
|
1356
|
-
labelRectY: labelRectY,
|
|
1357
|
-
labelX: labelX,
|
|
1358
|
-
labelY: labelY
|
|
1359
|
-
};
|
|
1360
|
-
};
|
|
1361
|
-
|
|
1362
|
-
var ValueMarker = function ValueMarker(_ref3) {
|
|
1363
|
-
var props = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, _ref3);
|
|
1364
|
-
|
|
1365
|
-
var x = props.x,
|
|
1366
|
-
y = props.y,
|
|
1367
|
-
length = props.length,
|
|
1368
|
-
min = props.min,
|
|
1369
|
-
max = props.max,
|
|
1370
|
-
value = props.value,
|
|
1371
|
-
orientation = props.orientation,
|
|
1372
|
-
showValue = props.showValue,
|
|
1373
|
-
usePercentageValue = props.usePercentageValue,
|
|
1374
|
-
valueMarkerFillColor = props.valueMarkerFillColor,
|
|
1375
|
-
valueMarkerLabelFillColor = props.valueMarkerLabelFillColor,
|
|
1376
|
-
alignCenter = props.alignCenter;
|
|
1377
|
-
var valueMarkerRectLength = length + DELTA_LENGTH;
|
|
1378
|
-
|
|
1379
|
-
var _positionLabel = positionLabel({
|
|
1380
|
-
x: x,
|
|
1381
|
-
y: y,
|
|
1382
|
-
length: length,
|
|
1383
|
-
orientation: orientation,
|
|
1384
|
-
alignCenter: alignCenter
|
|
1385
|
-
}),
|
|
1386
|
-
labelRectX = _positionLabel.labelRectX,
|
|
1387
|
-
labelRectY = _positionLabel.labelRectY,
|
|
1388
|
-
labelX = _positionLabel.labelX,
|
|
1389
|
-
labelY = _positionLabel.labelY;
|
|
1390
|
-
|
|
1391
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("g", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ValueMarkerRect, {
|
|
1392
|
-
"data-test": "value-marker-rect",
|
|
1393
|
-
d: positionValueMarkerRect({
|
|
1394
|
-
x: x,
|
|
1395
|
-
y: y,
|
|
1396
|
-
orientation: orientation,
|
|
1397
|
-
valueMarkerRectLength: valueMarkerRectLength,
|
|
1398
|
-
alignCenter: alignCenter
|
|
1399
|
-
}),
|
|
1400
|
-
valueMarkerFillColor: valueMarkerFillColor
|
|
1401
|
-
}), showValue && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("g", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ValueMarkerLabelRect, {
|
|
1402
|
-
"data-test": "value-marker-label-rect",
|
|
1403
|
-
x: labelRectX,
|
|
1404
|
-
y: labelRectY,
|
|
1405
|
-
width: MARKER_LABEL_WIDTH,
|
|
1406
|
-
height: MARKER_LABEL_HEIGHT,
|
|
1407
|
-
rx: RADIUS,
|
|
1408
|
-
ry: RADIUS,
|
|
1409
|
-
valueMarkerFillColor: valueMarkerFillColor
|
|
1410
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ValueMarkerLabel, {
|
|
1411
|
-
"data-test": "value-marker-label",
|
|
1412
|
-
x: labelX,
|
|
1413
|
-
y: labelY,
|
|
1414
|
-
valueMarkerLabelFillColor: valueMarkerLabelFillColor
|
|
1415
|
-
}, usePercentageValue ? "".concat((value / (max - min) * 100).toFixed(2), "%") : Object(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__["formatNumber"])(value, 0, {
|
|
1416
|
-
useThousandSeparators: true,
|
|
1417
|
-
useTrendUnits: true
|
|
1418
|
-
}))));
|
|
1419
|
-
};
|
|
1420
|
-
|
|
1421
|
-
ValueMarker.propTypes = {
|
|
1422
|
-
x: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1423
|
-
y: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1424
|
-
length: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1425
|
-
min: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1426
|
-
max: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1427
|
-
value: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1428
|
-
orientation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1429
|
-
showValue: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1430
|
-
usePercentageValue: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1431
|
-
valueMarkerFillColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1432
|
-
valueMarkerLabelFillColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1433
|
-
alignCenter: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool
|
|
1434
|
-
};
|
|
1435
|
-
ValueMarker.defaultProps = {
|
|
1436
|
-
min: 0,
|
|
1437
|
-
max: 100,
|
|
1438
|
-
orientation: 'horizontal',
|
|
1439
|
-
showValue: true,
|
|
1440
|
-
usePercentageValue: false,
|
|
1441
|
-
alignCenter: false
|
|
1442
|
-
};
|
|
1443
|
-
/* harmony default export */ __webpack_exports__["default"] = (ValueMarker);
|
|
1444
|
-
|
|
1445
|
-
/***/ }),
|
|
1446
|
-
|
|
1447
|
-
/***/ 15:
|
|
1448
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1449
|
-
|
|
1450
|
-
"use strict";
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1454
|
-
value: true
|
|
1455
|
-
});
|
|
1456
|
-
exports.downsampleDataSources = exports.calculateDownsamplingThreshold = exports.calculateThresholdOnRangeSelect = exports.isDownsamplingEnabledForViz = exports.convertToArrOfObjects = void 0;
|
|
1457
|
-
|
|
1458
|
-
var numberUtils_1 = __webpack_require__(11);
|
|
1459
|
-
|
|
1460
|
-
var interfaces_1 = __webpack_require__(40); // TODO: utilize this fn in ParallelCoordinates
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
|
|
1464
|
-
if (!columns || !columns[0] || !columns[0].length) return [];
|
|
1465
|
-
var data = [];
|
|
1466
|
-
|
|
1467
|
-
var _loop = function _loop(i) {
|
|
1468
|
-
var newObj = {};
|
|
1469
|
-
fields.forEach(function (field, index) {
|
|
1470
|
-
var fieldName = typeof field === 'string' ? field : field.name;
|
|
1471
|
-
|
|
1472
|
-
if (columns[index][i] === '') {
|
|
1473
|
-
newObj[fieldName] = null;
|
|
1474
|
-
} else {
|
|
1475
|
-
newObj[fieldName] = columns[index][i];
|
|
1476
|
-
}
|
|
1477
|
-
});
|
|
1478
|
-
data.push(newObj);
|
|
1479
|
-
};
|
|
1480
|
-
|
|
1481
|
-
for (var i = 0; i < columns[0].length; i += 1) {
|
|
1482
|
-
_loop(i);
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
return data;
|
|
1486
|
-
};
|
|
1487
|
-
|
|
1488
|
-
exports.convertToArrOfObjects = convertToArrOfObjects; // LTTB algorithm which can be used to downsample time series data while striving to maintain
|
|
1489
|
-
// the spikes and overall shape of the chart
|
|
1490
|
-
// Copied from https://github.com/sveinn-steinarsson/flot-downsample/blob/0815010016fc94b1bbc6a010afb8aad13ada6d0d/jquery.flot.downsample.js
|
|
1491
|
-
// Modifications include:
|
|
1492
|
-
// 1) Convert to modern JavaScript(use const, let, and use array.push to push to last element of array)
|
|
1493
|
-
// 2) Convert to camel case
|
|
1494
|
-
// 3) Convert to TS and also return the indices of the points that are in the downsampled result.
|
|
1495
|
-
// 4) Add a new parameter preferredDownsampleIndices that correspond to the indices of points
|
|
1496
|
-
// that should be used in case of a tie of the max area in a bucket
|
|
1497
|
-
|
|
1498
|
-
var largestTriangleThreeBuckets = function largestTriangleThreeBuckets(data, threshold, preferredDownsampleIndices) {
|
|
1499
|
-
var dataLength = data.length;
|
|
1500
|
-
var downsampledIndices = [];
|
|
1501
|
-
|
|
1502
|
-
if (threshold >= dataLength || threshold === 0) {
|
|
1503
|
-
var allIndices = data.map(function (values, index) {
|
|
1504
|
-
return index;
|
|
1505
|
-
});
|
|
1506
|
-
return {
|
|
1507
|
-
downsampledData: data,
|
|
1508
|
-
downsampledIndices: allIndices
|
|
1509
|
-
}; // Nothing to do
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
var sampled = [];
|
|
1513
|
-
var sampledIndex = 0; // Bucket size. Leave room for start and end data points
|
|
1514
|
-
|
|
1515
|
-
var every = (dataLength - 2) / (threshold - 2);
|
|
1516
|
-
var a = 0; // Initially a is the first point in the triangle
|
|
1517
|
-
|
|
1518
|
-
var maxAreaPoint;
|
|
1519
|
-
var maxArea;
|
|
1520
|
-
var area;
|
|
1521
|
-
var nextA;
|
|
1522
|
-
sampled.push(data[a]); // Always add the first point
|
|
1523
|
-
|
|
1524
|
-
downsampledIndices.push(0); // eslint-disable-next-line no-plusplus
|
|
1525
|
-
|
|
1526
|
-
for (var i = 0; i < threshold - 2; i++) {
|
|
1527
|
-
// Calculate point average for next bucket (containing c)
|
|
1528
|
-
var avgX = 0;
|
|
1529
|
-
var avgY = 0;
|
|
1530
|
-
var avgRangeStart = Math.floor((i + 1) * every) + 1;
|
|
1531
|
-
var avgRangeEnd = Math.floor((i + 2) * every) + 1;
|
|
1532
|
-
avgRangeEnd = avgRangeEnd < dataLength ? avgRangeEnd : dataLength;
|
|
1533
|
-
var avgRangeLength = avgRangeEnd - avgRangeStart; // eslint-disable-next-line no-plusplus
|
|
1534
|
-
|
|
1535
|
-
for (; avgRangeStart < avgRangeEnd; avgRangeStart++) {
|
|
1536
|
-
avgX += Number(data[avgRangeStart][0]); // * 1 enforces Number (value may be Date)
|
|
1537
|
-
|
|
1538
|
-
avgY += data[avgRangeStart][1] * 1;
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
avgX /= avgRangeLength;
|
|
1542
|
-
avgY /= avgRangeLength; // Get the range for this bucket
|
|
1543
|
-
|
|
1544
|
-
var rangeOffs = Math.floor((i + 0) * every) + 1;
|
|
1545
|
-
var rangeTo = Math.floor((i + 1) * every) + 1; // Point a
|
|
1546
|
-
|
|
1547
|
-
var pointAX = Number(data[a][0]); // Enforce Number (value may be Date)
|
|
1548
|
-
|
|
1549
|
-
var pointAY = data[a][1] * 1; // eslint-disable-next-line no-multi-assign
|
|
1550
|
-
|
|
1551
|
-
maxArea = area = -1;
|
|
1552
|
-
var maxAreaIndex = rangeOffs; // eslint-disable-next-line no-plusplus
|
|
1553
|
-
|
|
1554
|
-
for (; rangeOffs < rangeTo; rangeOffs++) {
|
|
1555
|
-
// Calculate triangle area over three buckets
|
|
1556
|
-
area = Math.abs((pointAX - avgX) * (data[rangeOffs][1] - pointAY) - (pointAX - Number(data[rangeOffs][0])) * (avgY - pointAY)) * 0.5; // Modification: try to downsample the least amount of points possible when there are multiple series
|
|
1557
|
-
// If all points in a bucket have the same area, prioritize the one with an x index
|
|
1558
|
-
// that also existed from another series so we don't add another point unnecessarily.
|
|
1559
|
-
// By default LTTB picks the leftmost point in the bucket
|
|
1560
|
-
|
|
1561
|
-
if (area > maxArea || area === maxArea && preferredDownsampleIndices.has(rangeOffs)) {
|
|
1562
|
-
maxArea = area;
|
|
1563
|
-
maxAreaPoint = data[rangeOffs];
|
|
1564
|
-
nextA = rangeOffs; // Next a is this b
|
|
1565
|
-
// Modification: save the index of the point with the most area
|
|
1566
|
-
|
|
1567
|
-
maxAreaIndex = rangeOffs;
|
|
1568
|
-
}
|
|
1569
|
-
} // eslint-disable-next-line no-plusplus
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
sampled[sampledIndex++] = maxAreaPoint; // Pick this point from the bucket
|
|
1573
|
-
|
|
1574
|
-
downsampledIndices.push(maxAreaIndex);
|
|
1575
|
-
a = nextA; // This a is the next a (chosen b)
|
|
1576
|
-
} // eslint-disable-next-line no-plusplus
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
sampled[sampledIndex++] = data[dataLength - 1]; // Always add last
|
|
1580
|
-
|
|
1581
|
-
downsampledIndices.push(dataLength - 1);
|
|
1582
|
-
return {
|
|
1583
|
-
downsampledData: sampled,
|
|
1584
|
-
downsampledIndices: downsampledIndices
|
|
1585
|
-
};
|
|
1586
|
-
};
|
|
1587
|
-
/**
|
|
1588
|
-
* Strictly coerces the entire column to numbers if it only consists of numeric strings or numbers. Also determines
|
|
1589
|
-
* if at least one of the values in the column can be loosely coerced to a number.
|
|
1590
|
-
* If the column cannot be strictly downsampled (if it contains nulls or non-numeric strings), returns an empty array and
|
|
1591
|
-
* returns that it cannot downsample the column.
|
|
1592
|
-
*/
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
var strictlyCoerceYColumn = function strictlyCoerceYColumn(column) {
|
|
1596
|
-
// Splunk charting allows for numbers in formats such as negative hex that
|
|
1597
|
-
// Number() does not support and also allows loose coercion of hex numbers (but not other formats)
|
|
1598
|
-
// We want to identify columns which contain at least one value that can be loosely coerced
|
|
1599
|
-
var canLooselyCoerceSomeValues = column.findIndex(function (value) {
|
|
1600
|
-
return (0, numberUtils_1.startsWithNumber)("".concat(value));
|
|
1601
|
-
}) >= 0; // If not all values in column can be strictly coerced to a number, we do not downsample
|
|
1059
|
+
var canLooselyCoerceSomeValues = column.findIndex(function (value) {
|
|
1060
|
+
return (0, numberUtils_1.startsWithNumber)("".concat(value)) || isNullCoercionEnabled && value === null;
|
|
1061
|
+
}) >= 0; // If not all values in column can be strictly coerced to a number, we do not downsample
|
|
1602
1062
|
|
|
1603
1063
|
var coercedColumn = [];
|
|
1604
1064
|
var canDownsampleColumn = !column.some(function (value) {
|
|
1605
|
-
var coercedValue = Number(value);
|
|
1065
|
+
var coercedValue = Number(value);
|
|
1066
|
+
var coerceValueToZero = isNullCoercionEnabled && value === null; // if it can't be parsed or isn't safe, fail
|
|
1606
1067
|
|
|
1607
|
-
if (Number.isNaN(coercedValue) || coercedValue <= Number.MIN_SAFE_INTEGER || coercedValue >= Number.MAX_SAFE_INTEGER || typeof value !== 'string' && typeof value !== 'number') {
|
|
1068
|
+
if (Number.isNaN(coercedValue) || coercedValue <= Number.MIN_SAFE_INTEGER || coercedValue >= Number.MAX_SAFE_INTEGER || typeof value !== 'string' && typeof value !== 'number' && !coerceValueToZero) {
|
|
1608
1069
|
return true;
|
|
1609
1070
|
} // save value and continue to next
|
|
1610
1071
|
|
|
@@ -1685,8 +1146,7 @@ var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_re
|
|
|
1685
1146
|
dataSources = _ref3.dataSources,
|
|
1686
1147
|
selectChartEvent = _ref3.selectChartEvent,
|
|
1687
1148
|
width = _ref3.width,
|
|
1688
|
-
xField = _ref3.xField
|
|
1689
|
-
y2Fields = _ref3.y2Fields;
|
|
1149
|
+
xField = _ref3.xField;
|
|
1690
1150
|
|
|
1691
1151
|
var _a, _b, _c;
|
|
1692
1152
|
|
|
@@ -1723,14 +1183,7 @@ var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_re
|
|
|
1723
1183
|
});
|
|
1724
1184
|
var lastIndex = fullSeries.findIndex(function (x) {
|
|
1725
1185
|
return downsampledSeries[endXIndex] === x;
|
|
1726
|
-
});
|
|
1727
|
-
// re-calculating downsampling threshold if the chart is zoomed in until SPL-259458 is fixed
|
|
1728
|
-
// Also do not support re-calculating downsampling threshold for zoomed-in charts with y2
|
|
1729
|
-
// until SPL-259611 is fixed
|
|
1730
|
-
|
|
1731
|
-
if (xField !== '_time' || (y2Fields === null || y2Fields === void 0 ? void 0 : y2Fields.length)) {
|
|
1732
|
-
return firstIndex === 0 && lastIndex === fullSeries.length - 1 ? width : null;
|
|
1733
|
-
}
|
|
1186
|
+
});
|
|
1734
1187
|
|
|
1735
1188
|
if (firstIndex >= 0 && lastIndex >= 0 && firstIndex <= lastIndex) {
|
|
1736
1189
|
return (0, exports.calculateThresholdOnRangeSelect)({
|
|
@@ -1780,7 +1233,7 @@ var isColumnStrictlyIncreasing = function isColumnStrictlyIncreasing(column, fie
|
|
|
1780
1233
|
*/
|
|
1781
1234
|
|
|
1782
1235
|
|
|
1783
|
-
var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, xField, yFields, fieldTypes) {
|
|
1236
|
+
var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, xField, yFields, fieldTypes, options) {
|
|
1784
1237
|
var xColumn = [];
|
|
1785
1238
|
var yColumns = [];
|
|
1786
1239
|
var canDownsample = !ds.data.fields.some(function (field, index) {
|
|
@@ -1794,7 +1247,7 @@ var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, x
|
|
|
1794
1247
|
if (fieldName === xField) {
|
|
1795
1248
|
xColumn = strictlyCoerceXColumn(column, fieldType);
|
|
1796
1249
|
} else if (yFields.has(fieldName)) {
|
|
1797
|
-
var _strictlyCoerceYColum = strictlyCoerceYColumn(ds.data.columns[index]),
|
|
1250
|
+
var _strictlyCoerceYColum = strictlyCoerceYColumn(ds.data.columns[index], options),
|
|
1798
1251
|
coercedColumn = _strictlyCoerceYColum.coercedColumn,
|
|
1799
1252
|
canLooselyCoerceSomeValues = _strictlyCoerceYColum.canLooselyCoerceSomeValues,
|
|
1800
1253
|
canDownsampleColumn = _strictlyCoerceYColum.canDownsampleColumn; // do not perform downsampling if a column can possibly be displayed but cannot
|
|
@@ -1884,7 +1337,7 @@ var downsampleDataSources = function downsampleDataSources(_ref4) {
|
|
|
1884
1337
|
return dataSources;
|
|
1885
1338
|
}
|
|
1886
1339
|
|
|
1887
|
-
var _tryToCoerceAllDispla = tryToCoerceAllDisplayedFields(primaryDS, xField, nonInternalYFields, fieldTypes),
|
|
1340
|
+
var _tryToCoerceAllDispla = tryToCoerceAllDisplayedFields(primaryDS, xField, nonInternalYFields, fieldTypes, options),
|
|
1888
1341
|
xColumn = _tryToCoerceAllDispla.xColumn,
|
|
1889
1342
|
yColumns = _tryToCoerceAllDispla.yColumns;
|
|
1890
1343
|
|
|
@@ -1916,46 +1369,580 @@ var downsampleDataSources = function downsampleDataSources(_ref4) {
|
|
|
1916
1369
|
downsampledDataSources.primary = pickIndicesFromDataSource(primaryDS, downsampledIndices);
|
|
1917
1370
|
return downsampledDataSources;
|
|
1918
1371
|
};
|
|
1919
|
-
|
|
1920
|
-
exports.downsampleDataSources = downsampleDataSources;
|
|
1372
|
+
|
|
1373
|
+
exports.downsampleDataSources = downsampleDataSources;
|
|
1374
|
+
|
|
1375
|
+
/***/ }),
|
|
1376
|
+
|
|
1377
|
+
/***/ 145:
|
|
1378
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1379
|
+
|
|
1380
|
+
"use strict";
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1384
|
+
value: true
|
|
1385
|
+
});
|
|
1386
|
+
|
|
1387
|
+
var i18n_1 = __webpack_require__(3);
|
|
1388
|
+
|
|
1389
|
+
var gauge = {
|
|
1390
|
+
label: (0, i18n_1._)('Data display'),
|
|
1391
|
+
layout: [[{
|
|
1392
|
+
label: (0, i18n_1._)('Value display'),
|
|
1393
|
+
option: 'valueDisplay',
|
|
1394
|
+
editor: 'editor.radioBar',
|
|
1395
|
+
editorProps: {
|
|
1396
|
+
values: [{
|
|
1397
|
+
label: (0, i18n_1._)('Number'),
|
|
1398
|
+
value: 'number'
|
|
1399
|
+
}, {
|
|
1400
|
+
label: (0, i18n_1._)('Percentage'),
|
|
1401
|
+
value: 'percentage'
|
|
1402
|
+
}, {
|
|
1403
|
+
label: (0, i18n_1._)('Off'),
|
|
1404
|
+
value: 'off'
|
|
1405
|
+
}]
|
|
1406
|
+
}
|
|
1407
|
+
}], [{
|
|
1408
|
+
label: (0, i18n_1._)('Label display'),
|
|
1409
|
+
option: 'labelDisplay',
|
|
1410
|
+
editor: 'editor.radioBar',
|
|
1411
|
+
editorProps: {
|
|
1412
|
+
values: [{
|
|
1413
|
+
label: (0, i18n_1._)('Numbers'),
|
|
1414
|
+
value: 'number'
|
|
1415
|
+
}, {
|
|
1416
|
+
label: (0, i18n_1._)('Percentages'),
|
|
1417
|
+
value: 'percentage'
|
|
1418
|
+
}, {
|
|
1419
|
+
label: (0, i18n_1._)('Off'),
|
|
1420
|
+
value: 'off'
|
|
1421
|
+
}]
|
|
1422
|
+
}
|
|
1423
|
+
}], [{
|
|
1424
|
+
label: (0, i18n_1._)('Orientation'),
|
|
1425
|
+
option: 'orientation',
|
|
1426
|
+
editor: 'editor.radioBar',
|
|
1427
|
+
editorProps: {
|
|
1428
|
+
values: [{
|
|
1429
|
+
label: (0, i18n_1._)('Vertical'),
|
|
1430
|
+
value: 'vertical'
|
|
1431
|
+
}, {
|
|
1432
|
+
label: (0, i18n_1._)('Horizontal'),
|
|
1433
|
+
value: 'horizontal'
|
|
1434
|
+
}]
|
|
1435
|
+
}
|
|
1436
|
+
}]]
|
|
1437
|
+
};
|
|
1438
|
+
exports.default = gauge;
|
|
1439
|
+
|
|
1440
|
+
/***/ }),
|
|
1441
|
+
|
|
1442
|
+
/***/ 146:
|
|
1443
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1444
|
+
|
|
1445
|
+
"use strict";
|
|
1446
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1447
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MajorTick", function() { return MajorTick; });
|
|
1448
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionMajorTick", function() { return positionMajorTick; });
|
|
1449
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68);
|
|
1450
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
|
1451
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
1452
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
1453
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
|
|
1454
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
|
1455
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
|
|
1456
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
|
|
1457
|
+
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
|
|
1458
|
+
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__);
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
var DEFAULT_NUM_OF_TICKS = 5;
|
|
1465
|
+
var TICK_LENGTH_DELTA = 5;
|
|
1466
|
+
var TICK_LABEL_PADDING_FACTOR = 3.2;
|
|
1467
|
+
var MajorTickLine = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.line.withConfig({
|
|
1468
|
+
displayName: "GaugeMajorTicks__MajorTickLine",
|
|
1469
|
+
componentId: "sc-mchiad-0"
|
|
1470
|
+
})(["stroke:", ";stroke-width:2px;stroke-dasharray:", ";"], function (props) {
|
|
1471
|
+
return props.majorTickStrokeColor;
|
|
1472
|
+
}, function (props) {
|
|
1473
|
+
return props.index === 0 ? 0 : 3;
|
|
1474
|
+
});
|
|
1475
|
+
var MajorTickLabel = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.text.withConfig({
|
|
1476
|
+
displayName: "GaugeMajorTicks__MajorTickLabel",
|
|
1477
|
+
componentId: "sc-mchiad-1"
|
|
1478
|
+
})(["font-size:12px;font-family:Splunk Platform Sans,sans-serif;line-height:19px;fill:", ";text-anchor:middle;text-align:center;"], function (props) {
|
|
1479
|
+
return props.majorTickFillColor;
|
|
1480
|
+
});
|
|
1481
|
+
var MajorTick = function MajorTick(_ref) {
|
|
1482
|
+
var index = _ref.index,
|
|
1483
|
+
x1 = _ref.x1,
|
|
1484
|
+
y1 = _ref.y1,
|
|
1485
|
+
x2 = _ref.x2,
|
|
1486
|
+
y2 = _ref.y2,
|
|
1487
|
+
showLabels = _ref.showLabels,
|
|
1488
|
+
label = _ref.label,
|
|
1489
|
+
labelX = _ref.labelX,
|
|
1490
|
+
labelY = _ref.labelY,
|
|
1491
|
+
majorTickStrokeColor = _ref.majorTickStrokeColor,
|
|
1492
|
+
majorTickFillColor = _ref.majorTickFillColor;
|
|
1493
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("g", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MajorTickLine, {
|
|
1494
|
+
"data-test": "major-tick-line",
|
|
1495
|
+
index: index,
|
|
1496
|
+
x1: x1,
|
|
1497
|
+
y1: y1,
|
|
1498
|
+
x2: x2,
|
|
1499
|
+
y2: y2,
|
|
1500
|
+
majorTickStrokeColor: majorTickStrokeColor
|
|
1501
|
+
}), showLabels && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MajorTickLabel, {
|
|
1502
|
+
x: labelX,
|
|
1503
|
+
y: labelY,
|
|
1504
|
+
majorTickFillColor: majorTickFillColor,
|
|
1505
|
+
"data-test": "major-tick-label"
|
|
1506
|
+
}, Object(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__["isNumerial"])(label) ? Object(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__["formatNumber"])(label, 0, {
|
|
1507
|
+
useThousandSeparators: true,
|
|
1508
|
+
useTrendUnits: true
|
|
1509
|
+
}) : label));
|
|
1510
|
+
};
|
|
1511
|
+
MajorTick.propTypes = {
|
|
1512
|
+
index: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1513
|
+
x1: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1514
|
+
y1: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1515
|
+
x2: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1516
|
+
y2: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1517
|
+
showLabels: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1518
|
+
label: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number]),
|
|
1519
|
+
labelX: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1520
|
+
labelY: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1521
|
+
majorTickStrokeColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1522
|
+
majorTickFillColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string
|
|
1523
|
+
};
|
|
1524
|
+
/**
|
|
1525
|
+
* calculate position for each major tick
|
|
1526
|
+
* @method positionMajorTick
|
|
1527
|
+
* @param {Object} input
|
|
1528
|
+
* @param {Number} input.width
|
|
1529
|
+
* @param {Number} input.height
|
|
1530
|
+
* @param {Number} input.startX start x for rendering the first major tick
|
|
1531
|
+
* @param {Number} input.startY start y for rendering the first major tick
|
|
1532
|
+
* @param {String} input.orientation
|
|
1533
|
+
* @param {Number} input.numOfTicks how many ticks need to render
|
|
1534
|
+
* @param {Number} input.i index of major tick
|
|
1535
|
+
* @return {Object} MajorTick positions
|
|
1536
|
+
*/
|
|
1537
|
+
|
|
1538
|
+
var positionMajorTick = function positionMajorTick(_ref2) {
|
|
1539
|
+
var width = _ref2.width,
|
|
1540
|
+
height = _ref2.height,
|
|
1541
|
+
startX = _ref2.startX,
|
|
1542
|
+
startY = _ref2.startY,
|
|
1543
|
+
orientation = _ref2.orientation,
|
|
1544
|
+
numOfTicks = _ref2.numOfTicks,
|
|
1545
|
+
i = _ref2.i;
|
|
1546
|
+
var x1 = startX;
|
|
1547
|
+
var y1 = startY;
|
|
1548
|
+
var x2 = startX;
|
|
1549
|
+
var y2 = startY;
|
|
1550
|
+
var labelX = startX;
|
|
1551
|
+
var labelY;
|
|
1552
|
+
|
|
1553
|
+
if (orientation === 'vertical') {
|
|
1554
|
+
var y = height / numOfTicks * (numOfTicks - i) + startY;
|
|
1555
|
+
x1 -= TICK_LENGTH_DELTA;
|
|
1556
|
+
y1 = y;
|
|
1557
|
+
x2 += width + TICK_LENGTH_DELTA;
|
|
1558
|
+
y2 = y;
|
|
1559
|
+
labelX += width + TICK_LENGTH_DELTA * TICK_LABEL_PADDING_FACTOR;
|
|
1560
|
+
labelY = y;
|
|
1561
|
+
} else {
|
|
1562
|
+
var x = width / numOfTicks * i + startX;
|
|
1563
|
+
x1 = x;
|
|
1564
|
+
y1 -= TICK_LENGTH_DELTA;
|
|
1565
|
+
x2 = x;
|
|
1566
|
+
y2 += height + TICK_LENGTH_DELTA;
|
|
1567
|
+
labelX = x;
|
|
1568
|
+
labelY = y2 + 16;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
return {
|
|
1572
|
+
x1: x1,
|
|
1573
|
+
y1: y1,
|
|
1574
|
+
x2: x2,
|
|
1575
|
+
y2: y2,
|
|
1576
|
+
labelX: labelX,
|
|
1577
|
+
labelY: labelY
|
|
1578
|
+
};
|
|
1579
|
+
};
|
|
1580
|
+
|
|
1581
|
+
var MajorTicks = function MajorTicks(_ref3) {
|
|
1582
|
+
var props = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, _ref3);
|
|
1583
|
+
|
|
1584
|
+
var width = props.width,
|
|
1585
|
+
height = props.height,
|
|
1586
|
+
startX = props.startX,
|
|
1587
|
+
startY = props.startY,
|
|
1588
|
+
min = props.min,
|
|
1589
|
+
max = props.max,
|
|
1590
|
+
majorUnit = props.majorUnit,
|
|
1591
|
+
orientation = props.orientation,
|
|
1592
|
+
showLabels = props.showLabels,
|
|
1593
|
+
usePercentageRange = props.usePercentageRange,
|
|
1594
|
+
majorTickFillColor = props.majorTickFillColor,
|
|
1595
|
+
majorTickStrokeColor = props.majorTickStrokeColor;
|
|
1596
|
+
var range = max - min;
|
|
1597
|
+
var numOfTicks = majorUnit === 'auto' || Number.isNaN(Number(majorUnit)) || majorUnit <= 0 ? DEFAULT_NUM_OF_TICKS : range / majorUnit;
|
|
1598
|
+
var majorTicks = [];
|
|
1599
|
+
|
|
1600
|
+
for (var i = 0; i <= numOfTicks; i += 1) {
|
|
1601
|
+
var _positionMajorTick = positionMajorTick({
|
|
1602
|
+
width: width,
|
|
1603
|
+
height: height,
|
|
1604
|
+
startX: startX,
|
|
1605
|
+
startY: startY,
|
|
1606
|
+
orientation: orientation,
|
|
1607
|
+
numOfTicks: numOfTicks,
|
|
1608
|
+
i: i
|
|
1609
|
+
}),
|
|
1610
|
+
x1 = _positionMajorTick.x1,
|
|
1611
|
+
y1 = _positionMajorTick.y1,
|
|
1612
|
+
x2 = _positionMajorTick.x2,
|
|
1613
|
+
y2 = _positionMajorTick.y2,
|
|
1614
|
+
labelX = _positionMajorTick.labelX,
|
|
1615
|
+
labelY = _positionMajorTick.labelY;
|
|
1616
|
+
|
|
1617
|
+
var label = usePercentageRange ? "".concat(parseInt((i / numOfTicks - min / range) * 100, 10), "%") : parseInt(min + range / numOfTicks * i, 10);
|
|
1618
|
+
majorTicks.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MajorTick, {
|
|
1619
|
+
key: i,
|
|
1620
|
+
index: i,
|
|
1621
|
+
x1: x1,
|
|
1622
|
+
y1: y1,
|
|
1623
|
+
x2: x2,
|
|
1624
|
+
y2: y2,
|
|
1625
|
+
showLabels: showLabels,
|
|
1626
|
+
label: label,
|
|
1627
|
+
labelX: labelX,
|
|
1628
|
+
labelY: labelY,
|
|
1629
|
+
majorTickFillColor: majorTickFillColor,
|
|
1630
|
+
majorTickStrokeColor: majorTickStrokeColor
|
|
1631
|
+
}));
|
|
1632
|
+
} // if the gauge is not divided evenly, put the last tick at the end of the gauge
|
|
1633
|
+
|
|
1634
|
+
|
|
1635
|
+
if (!Number.isInteger(numOfTicks)) {
|
|
1636
|
+
var extraNumOfTicks = Math.ceil(numOfTicks);
|
|
1637
|
+
|
|
1638
|
+
var _positionMajorTick2 = positionMajorTick({
|
|
1639
|
+
width: width,
|
|
1640
|
+
height: height,
|
|
1641
|
+
startX: startX,
|
|
1642
|
+
startY: startY,
|
|
1643
|
+
orientation: orientation,
|
|
1644
|
+
numOfTicks: extraNumOfTicks,
|
|
1645
|
+
i: extraNumOfTicks
|
|
1646
|
+
}),
|
|
1647
|
+
_x = _positionMajorTick2.x1,
|
|
1648
|
+
_y = _positionMajorTick2.y1,
|
|
1649
|
+
_x2 = _positionMajorTick2.x2,
|
|
1650
|
+
_y2 = _positionMajorTick2.y2,
|
|
1651
|
+
_labelX = _positionMajorTick2.labelX,
|
|
1652
|
+
_labelY = _positionMajorTick2.labelY;
|
|
1653
|
+
|
|
1654
|
+
majorTicks.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MajorTick, {
|
|
1655
|
+
key: extraNumOfTicks,
|
|
1656
|
+
id: extraNumOfTicks,
|
|
1657
|
+
x1: _x,
|
|
1658
|
+
y1: _y,
|
|
1659
|
+
x2: _x2,
|
|
1660
|
+
y2: _y2,
|
|
1661
|
+
showLabels: showLabels,
|
|
1662
|
+
label: usePercentageRange ? '100%' : max,
|
|
1663
|
+
labelX: _labelX,
|
|
1664
|
+
labelY: _labelY,
|
|
1665
|
+
majorTickFillColor: majorTickFillColor,
|
|
1666
|
+
majorTickStrokeColor: majorTickStrokeColor
|
|
1667
|
+
}));
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("g", null, majorTicks);
|
|
1671
|
+
};
|
|
1672
|
+
|
|
1673
|
+
MajorTicks.propTypes = {
|
|
1674
|
+
width: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1675
|
+
height: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1676
|
+
startX: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1677
|
+
startY: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1678
|
+
min: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1679
|
+
max: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1680
|
+
majorUnit: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number]),
|
|
1681
|
+
orientation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1682
|
+
showLabels: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1683
|
+
usePercentageRange: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1684
|
+
majorTickFillColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1685
|
+
majorTickStrokeColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string
|
|
1686
|
+
};
|
|
1687
|
+
MajorTicks.defaultProps = {
|
|
1688
|
+
min: 0,
|
|
1689
|
+
max: 100,
|
|
1690
|
+
majorUnit: 'auto',
|
|
1691
|
+
orientation: 'horizontal',
|
|
1692
|
+
showLabels: true,
|
|
1693
|
+
usePercentageRange: false
|
|
1694
|
+
};
|
|
1695
|
+
/* harmony default export */ __webpack_exports__["default"] = (MajorTicks);
|
|
1696
|
+
|
|
1697
|
+
/***/ }),
|
|
1698
|
+
|
|
1699
|
+
/***/ 147:
|
|
1700
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1701
|
+
|
|
1702
|
+
"use strict";
|
|
1703
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1704
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionValueMarkerRect", function() { return positionValueMarkerRect; });
|
|
1705
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionLabel", function() { return positionLabel; });
|
|
1706
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68);
|
|
1707
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
|
1708
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
1709
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
1710
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
|
|
1711
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
|
1712
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
|
|
1713
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
|
|
1714
|
+
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
|
|
1715
|
+
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__);
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
var MARKER_THICKNESS = 15;
|
|
1722
|
+
var MARKER_INNER_LENGTH = 30;
|
|
1723
|
+
var MARKER_LABEL_WIDTH = 60;
|
|
1724
|
+
var MARKER_LABEL_HEIGHT = 25;
|
|
1725
|
+
var RADIUS = 2;
|
|
1726
|
+
var DELTA_LENGTH = 12;
|
|
1727
|
+
var ValueMarkerRect = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.path.withConfig({
|
|
1728
|
+
displayName: "GaugeValueMarker__ValueMarkerRect",
|
|
1729
|
+
componentId: "sc-1bxkeao-0"
|
|
1730
|
+
})(["stroke-width:2px;fill:", ";"], function (props) {
|
|
1731
|
+
return props.valueMarkerFillColor;
|
|
1732
|
+
});
|
|
1733
|
+
var ValueMarkerLabelRect = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.rect.withConfig({
|
|
1734
|
+
displayName: "GaugeValueMarker__ValueMarkerLabelRect",
|
|
1735
|
+
componentId: "sc-1bxkeao-1"
|
|
1736
|
+
})(["fill:", ";"], function (props) {
|
|
1737
|
+
return props.valueMarkerFillColor;
|
|
1738
|
+
});
|
|
1739
|
+
var ValueMarkerLabel = styled_components__WEBPACK_IMPORTED_MODULE_3___default.a.text.withConfig({
|
|
1740
|
+
displayName: "GaugeValueMarker__ValueMarkerLabel",
|
|
1741
|
+
componentId: "sc-1bxkeao-2"
|
|
1742
|
+
})(["fill:", ";font-size:14px;font-family:Splunk Platform Sans,sans-serif;line-height:16px;text-anchor:middle;text-align:center;dominant-baseline:middle;"], function (props) {
|
|
1743
|
+
return props.valueMarkerLabelFillColor;
|
|
1744
|
+
});
|
|
1745
|
+
/**
|
|
1746
|
+
* calculate the path of Value Marker shape
|
|
1747
|
+
* @method positionValueMarkerRect
|
|
1748
|
+
* @param {Object} input
|
|
1749
|
+
* @param {Number} input.x
|
|
1750
|
+
* @param {Number} input.y
|
|
1751
|
+
* @param {String} input.orientation
|
|
1752
|
+
* @param {Number} input.valueMarkerRectLength
|
|
1753
|
+
* @return {String} d containing a series of path commands that define the path to be
|
|
1754
|
+
*/
|
|
1755
|
+
|
|
1756
|
+
var positionValueMarkerRect = function positionValueMarkerRect(_ref) {
|
|
1757
|
+
var x = _ref.x,
|
|
1758
|
+
y = _ref.y,
|
|
1759
|
+
orientation = _ref.orientation,
|
|
1760
|
+
valueMarkerRectLength = _ref.valueMarkerRectLength,
|
|
1761
|
+
_ref$alignCenter = _ref.alignCenter,
|
|
1762
|
+
alignCenter = _ref$alignCenter === void 0 ? false : _ref$alignCenter;
|
|
1763
|
+
var hLength = MARKER_THICKNESS;
|
|
1764
|
+
var vLength = valueMarkerRectLength;
|
|
1765
|
+
var markerStartX = alignCenter ? x - MARKER_THICKNESS / 2 : x - MARKER_THICKNESS;
|
|
1766
|
+
var markerStartY = y;
|
|
1767
|
+
var innerHLength = hLength / 3;
|
|
1768
|
+
var innerVLength = MARKER_INNER_LENGTH;
|
|
1769
|
+
var innerStartX = markerStartX + innerHLength;
|
|
1770
|
+
var innerStartY = markerStartY + 7;
|
|
1771
|
+
|
|
1772
|
+
if (orientation === 'vertical') {
|
|
1773
|
+
hLength = valueMarkerRectLength;
|
|
1774
|
+
vLength = MARKER_THICKNESS;
|
|
1775
|
+
markerStartX = x;
|
|
1776
|
+
markerStartY = alignCenter ? y - MARKER_THICKNESS / 2 : y;
|
|
1777
|
+
innerHLength = MARKER_INNER_LENGTH;
|
|
1778
|
+
innerVLength = vLength / 3;
|
|
1779
|
+
innerStartX = markerStartX + 7;
|
|
1780
|
+
innerStartY = markerStartY + innerVLength;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
return "M".concat(markerStartX, ",").concat(markerStartY, "h").concat(hLength, "a").concat(RADIUS, ",").concat(RADIUS, " 0 0 1 ").concat(RADIUS, ",").concat(RADIUS, "v").concat(vLength - 2 * RADIUS, "a").concat(RADIUS, ",").concat(RADIUS, " 0 0 1 ").concat(-RADIUS, ",").concat(RADIUS, "h").concat(-hLength, "a").concat(RADIUS, ",").concat(RADIUS, " 0 0 1 ").concat(-RADIUS, ",").concat(-RADIUS, "v").concat(2 * RADIUS - vLength, "a").concat(RADIUS, ",").concat(RADIUS, " 0 0 1 ").concat(RADIUS, ",").concat(-RADIUS, "z") + "M".concat(innerStartX, ",").concat(innerStartY, "v").concat(innerVLength - RADIUS, "a").concat(RADIUS, ",").concat(RADIUS, " 0 0 0 ").concat(RADIUS, ",").concat(RADIUS, "h").concat(innerHLength - 2 * RADIUS, "a").concat(RADIUS, ",").concat(RADIUS, " 0 0 0 ").concat(RADIUS, ",").concat(-RADIUS, "v").concat(RADIUS - innerVLength, "a").concat(RADIUS, ",").concat(RADIUS, " 0 0 0 ").concat(-RADIUS, ",").concat(-RADIUS, "h").concat(2 * RADIUS - innerHLength, "a").concat(RADIUS, ",").concat(RADIUS, " 0 0 0 ").concat(-RADIUS, ",").concat(RADIUS, "z");
|
|
1784
|
+
};
|
|
1785
|
+
/**
|
|
1786
|
+
* calculate the position of value marker label
|
|
1787
|
+
* @method positionLabel
|
|
1788
|
+
* @param {Object} input
|
|
1789
|
+
* @param {Number} input.x
|
|
1790
|
+
* @param {Number} input.y
|
|
1791
|
+
* @param {Number} input.length gauge thickness
|
|
1792
|
+
* @param {String} input.orientation
|
|
1793
|
+
* @return {Object} positions
|
|
1794
|
+
* @return {Number} positions.labelRectX x of value marker label rect
|
|
1795
|
+
* @return {Number} positions.labelRectY y of value marker label rect
|
|
1796
|
+
* @return {Number} positions.labelX x of value marker label text
|
|
1797
|
+
* @return {Number} positions.labelY y of value marker label text
|
|
1798
|
+
*/
|
|
1799
|
+
|
|
1800
|
+
var positionLabel = function positionLabel(_ref2) {
|
|
1801
|
+
var x = _ref2.x,
|
|
1802
|
+
y = _ref2.y,
|
|
1803
|
+
length = _ref2.length,
|
|
1804
|
+
orientation = _ref2.orientation,
|
|
1805
|
+
_ref2$alignCenter = _ref2.alignCenter,
|
|
1806
|
+
alignCenter = _ref2$alignCenter === void 0 ? false : _ref2$alignCenter; // for horizontal view
|
|
1807
|
+
|
|
1808
|
+
var labelRectX = alignCenter ? x - MARKER_LABEL_WIDTH / 2 : x - MARKER_THICKNESS / 2 - MARKER_LABEL_WIDTH / 2;
|
|
1809
|
+
var labelRectY = y + length;
|
|
1810
|
+
|
|
1811
|
+
if (orientation === 'vertical') {
|
|
1812
|
+
labelRectX = x + length;
|
|
1813
|
+
labelRectY = alignCenter ? y - MARKER_LABEL_HEIGHT / 2 : y - (MARKER_LABEL_HEIGHT - MARKER_THICKNESS) / 2;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
var labelX = labelRectX + MARKER_LABEL_WIDTH / 2;
|
|
1817
|
+
var labelY = labelRectY + MARKER_LABEL_HEIGHT / 2;
|
|
1818
|
+
return {
|
|
1819
|
+
labelRectX: labelRectX,
|
|
1820
|
+
labelRectY: labelRectY,
|
|
1821
|
+
labelX: labelX,
|
|
1822
|
+
labelY: labelY
|
|
1823
|
+
};
|
|
1824
|
+
};
|
|
1825
|
+
|
|
1826
|
+
var ValueMarker = function ValueMarker(_ref3) {
|
|
1827
|
+
var props = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, _ref3);
|
|
1828
|
+
|
|
1829
|
+
var x = props.x,
|
|
1830
|
+
y = props.y,
|
|
1831
|
+
length = props.length,
|
|
1832
|
+
min = props.min,
|
|
1833
|
+
max = props.max,
|
|
1834
|
+
value = props.value,
|
|
1835
|
+
orientation = props.orientation,
|
|
1836
|
+
showValue = props.showValue,
|
|
1837
|
+
usePercentageValue = props.usePercentageValue,
|
|
1838
|
+
valueMarkerFillColor = props.valueMarkerFillColor,
|
|
1839
|
+
valueMarkerLabelFillColor = props.valueMarkerLabelFillColor,
|
|
1840
|
+
alignCenter = props.alignCenter;
|
|
1841
|
+
var valueMarkerRectLength = length + DELTA_LENGTH;
|
|
1842
|
+
|
|
1843
|
+
var _positionLabel = positionLabel({
|
|
1844
|
+
x: x,
|
|
1845
|
+
y: y,
|
|
1846
|
+
length: length,
|
|
1847
|
+
orientation: orientation,
|
|
1848
|
+
alignCenter: alignCenter
|
|
1849
|
+
}),
|
|
1850
|
+
labelRectX = _positionLabel.labelRectX,
|
|
1851
|
+
labelRectY = _positionLabel.labelRectY,
|
|
1852
|
+
labelX = _positionLabel.labelX,
|
|
1853
|
+
labelY = _positionLabel.labelY;
|
|
1854
|
+
|
|
1855
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("g", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ValueMarkerRect, {
|
|
1856
|
+
"data-test": "value-marker-rect",
|
|
1857
|
+
d: positionValueMarkerRect({
|
|
1858
|
+
x: x,
|
|
1859
|
+
y: y,
|
|
1860
|
+
orientation: orientation,
|
|
1861
|
+
valueMarkerRectLength: valueMarkerRectLength,
|
|
1862
|
+
alignCenter: alignCenter
|
|
1863
|
+
}),
|
|
1864
|
+
valueMarkerFillColor: valueMarkerFillColor
|
|
1865
|
+
}), showValue && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("g", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ValueMarkerLabelRect, {
|
|
1866
|
+
"data-test": "value-marker-label-rect",
|
|
1867
|
+
x: labelRectX,
|
|
1868
|
+
y: labelRectY,
|
|
1869
|
+
width: MARKER_LABEL_WIDTH,
|
|
1870
|
+
height: MARKER_LABEL_HEIGHT,
|
|
1871
|
+
rx: RADIUS,
|
|
1872
|
+
ry: RADIUS,
|
|
1873
|
+
valueMarkerFillColor: valueMarkerFillColor
|
|
1874
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ValueMarkerLabel, {
|
|
1875
|
+
"data-test": "value-marker-label",
|
|
1876
|
+
x: labelX,
|
|
1877
|
+
y: labelY,
|
|
1878
|
+
valueMarkerLabelFillColor: valueMarkerLabelFillColor
|
|
1879
|
+
}, usePercentageValue ? "".concat((value / (max - min) * 100).toFixed(2), "%") : Object(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__["formatNumber"])(value, 0, {
|
|
1880
|
+
useThousandSeparators: true,
|
|
1881
|
+
useTrendUnits: true
|
|
1882
|
+
}))));
|
|
1883
|
+
};
|
|
1884
|
+
|
|
1885
|
+
ValueMarker.propTypes = {
|
|
1886
|
+
x: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1887
|
+
y: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1888
|
+
length: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1889
|
+
min: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1890
|
+
max: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1891
|
+
value: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
|
|
1892
|
+
orientation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1893
|
+
showValue: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1894
|
+
usePercentageValue: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
|
|
1895
|
+
valueMarkerFillColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1896
|
+
valueMarkerLabelFillColor: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
1897
|
+
alignCenter: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool
|
|
1898
|
+
};
|
|
1899
|
+
ValueMarker.defaultProps = {
|
|
1900
|
+
min: 0,
|
|
1901
|
+
max: 100,
|
|
1902
|
+
orientation: 'horizontal',
|
|
1903
|
+
showValue: true,
|
|
1904
|
+
usePercentageValue: false,
|
|
1905
|
+
alignCenter: false
|
|
1906
|
+
};
|
|
1907
|
+
/* harmony default export */ __webpack_exports__["default"] = (ValueMarker);
|
|
1921
1908
|
|
|
1922
1909
|
/***/ }),
|
|
1923
1910
|
|
|
1924
|
-
/***/
|
|
1911
|
+
/***/ 15:
|
|
1925
1912
|
/***/ (function(module, exports) {
|
|
1926
1913
|
|
|
1927
1914
|
module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
1928
1915
|
|
|
1929
1916
|
/***/ }),
|
|
1930
1917
|
|
|
1931
|
-
/***/
|
|
1918
|
+
/***/ 16:
|
|
1932
1919
|
/***/ (function(module, exports) {
|
|
1933
1920
|
|
|
1934
1921
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1935
1922
|
|
|
1936
1923
|
/***/ }),
|
|
1937
1924
|
|
|
1938
|
-
/***/
|
|
1925
|
+
/***/ 17:
|
|
1939
1926
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1940
1927
|
|
|
1941
1928
|
"use strict";
|
|
1942
1929
|
|
|
1943
1930
|
|
|
1944
|
-
var _slicedToArray = __webpack_require__(
|
|
1931
|
+
var _slicedToArray = __webpack_require__(5);
|
|
1945
1932
|
|
|
1946
1933
|
Object.defineProperty(exports, "__esModule", {
|
|
1947
1934
|
value: true
|
|
1948
1935
|
});
|
|
1949
1936
|
|
|
1950
|
-
var React = __webpack_require__(
|
|
1937
|
+
var React = __webpack_require__(1);
|
|
1951
1938
|
|
|
1952
1939
|
var styled_components_1 = __webpack_require__(4);
|
|
1953
1940
|
|
|
1954
|
-
var style_1 = __webpack_require__(
|
|
1941
|
+
var style_1 = __webpack_require__(18);
|
|
1955
1942
|
|
|
1956
|
-
var colorUtils_1 = __webpack_require__(
|
|
1943
|
+
var colorUtils_1 = __webpack_require__(15);
|
|
1957
1944
|
|
|
1958
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
1945
|
+
var SizeAwareWrapper_1 = __webpack_require__(25);
|
|
1959
1946
|
|
|
1960
1947
|
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
1961
1948
|
var width = _ref.width;
|
|
@@ -2026,7 +2013,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
2026
2013
|
|
|
2027
2014
|
return React.createElement(FixSizeItem, {
|
|
2028
2015
|
"data-test": "fix-size-item",
|
|
2029
|
-
"data-splunk-visualization-version": "26.
|
|
2016
|
+
"data-splunk-visualization-version": "26.4.1 - 2b7482c08",
|
|
2030
2017
|
width: width,
|
|
2031
2018
|
height: height,
|
|
2032
2019
|
backgroundColor: backgroundColor
|
|
@@ -2048,7 +2035,14 @@ exports.default = withFixedSizeContainer;
|
|
|
2048
2035
|
|
|
2049
2036
|
/***/ }),
|
|
2050
2037
|
|
|
2051
|
-
/***/
|
|
2038
|
+
/***/ 18:
|
|
2039
|
+
/***/ (function(module, exports) {
|
|
2040
|
+
|
|
2041
|
+
module.exports = require("@splunk/visualizations-shared/style");
|
|
2042
|
+
|
|
2043
|
+
/***/ }),
|
|
2044
|
+
|
|
2045
|
+
/***/ 180:
|
|
2052
2046
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2053
2047
|
|
|
2054
2048
|
"use strict";
|
|
@@ -2072,15 +2066,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2072
2066
|
});
|
|
2073
2067
|
exports.config = exports.computeVizProps = exports.PureMarkerGauge = void 0;
|
|
2074
2068
|
|
|
2075
|
-
var lodash_1 = __webpack_require__(
|
|
2069
|
+
var lodash_1 = __webpack_require__(2);
|
|
2076
2070
|
|
|
2077
|
-
var MarkerGauge_1 = __webpack_require__(
|
|
2071
|
+
var MarkerGauge_1 = __webpack_require__(438);
|
|
2078
2072
|
|
|
2079
|
-
var config_1 = __webpack_require__(
|
|
2073
|
+
var config_1 = __webpack_require__(439);
|
|
2080
2074
|
|
|
2081
2075
|
exports.config = config_1.default;
|
|
2082
2076
|
|
|
2083
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
2077
|
+
var withDashboardViz_1 = __webpack_require__(54);
|
|
2084
2078
|
|
|
2085
2079
|
var gaugeUtils_1 = __webpack_require__(118);
|
|
2086
2080
|
|
|
@@ -2111,21 +2105,14 @@ exports.default = viz;
|
|
|
2111
2105
|
|
|
2112
2106
|
/***/ }),
|
|
2113
2107
|
|
|
2114
|
-
/***/ 19:
|
|
2115
|
-
/***/ (function(module, exports) {
|
|
2116
|
-
|
|
2117
|
-
module.exports = require("@splunk/visualizations-shared/style");
|
|
2118
|
-
|
|
2119
|
-
/***/ }),
|
|
2120
|
-
|
|
2121
2108
|
/***/ 2:
|
|
2122
2109
|
/***/ (function(module, exports) {
|
|
2123
2110
|
|
|
2124
|
-
module.exports = require("
|
|
2111
|
+
module.exports = require("lodash");
|
|
2125
2112
|
|
|
2126
2113
|
/***/ }),
|
|
2127
2114
|
|
|
2128
|
-
/***/
|
|
2115
|
+
/***/ 20:
|
|
2129
2116
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2130
2117
|
|
|
2131
2118
|
"use strict";
|
|
@@ -2140,15 +2127,15 @@ exports.validOutputModes = ['json_cols', 'json'];
|
|
|
2140
2127
|
|
|
2141
2128
|
/***/ }),
|
|
2142
2129
|
|
|
2143
|
-
/***/
|
|
2130
|
+
/***/ 21:
|
|
2144
2131
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2145
2132
|
|
|
2146
2133
|
"use strict";
|
|
2147
2134
|
|
|
2148
2135
|
|
|
2149
|
-
var _classCallCheck = __webpack_require__(
|
|
2136
|
+
var _classCallCheck = __webpack_require__(8);
|
|
2150
2137
|
|
|
2151
|
-
var _createClass = __webpack_require__(
|
|
2138
|
+
var _createClass = __webpack_require__(24);
|
|
2152
2139
|
|
|
2153
2140
|
Object.defineProperty(exports, "__esModule", {
|
|
2154
2141
|
value: true
|
|
@@ -2178,7 +2165,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
|
2178
2165
|
|
|
2179
2166
|
/***/ }),
|
|
2180
2167
|
|
|
2181
|
-
/***/
|
|
2168
|
+
/***/ 22:
|
|
2182
2169
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2183
2170
|
|
|
2184
2171
|
"use strict";
|
|
@@ -2207,7 +2194,7 @@ var VizCategory;
|
|
|
2207
2194
|
|
|
2208
2195
|
/***/ }),
|
|
2209
2196
|
|
|
2210
|
-
/***/
|
|
2197
|
+
/***/ 23:
|
|
2211
2198
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2212
2199
|
|
|
2213
2200
|
"use strict";
|
|
@@ -2240,37 +2227,37 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
|
2240
2227
|
|
|
2241
2228
|
/***/ }),
|
|
2242
2229
|
|
|
2243
|
-
/***/
|
|
2230
|
+
/***/ 24:
|
|
2244
2231
|
/***/ (function(module, exports) {
|
|
2245
2232
|
|
|
2246
2233
|
module.exports = require("@babel/runtime/helpers/createClass");
|
|
2247
2234
|
|
|
2248
2235
|
/***/ }),
|
|
2249
2236
|
|
|
2250
|
-
/***/
|
|
2237
|
+
/***/ 25:
|
|
2251
2238
|
/***/ (function(module, exports) {
|
|
2252
2239
|
|
|
2253
2240
|
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
2254
2241
|
|
|
2255
2242
|
/***/ }),
|
|
2256
2243
|
|
|
2257
|
-
/***/
|
|
2244
|
+
/***/ 26:
|
|
2258
2245
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2259
2246
|
|
|
2260
2247
|
"use strict";
|
|
2261
2248
|
|
|
2262
2249
|
|
|
2263
|
-
var _toConsumableArray = __webpack_require__(
|
|
2250
|
+
var _toConsumableArray = __webpack_require__(6);
|
|
2264
2251
|
|
|
2265
2252
|
Object.defineProperty(exports, "__esModule", {
|
|
2266
2253
|
value: true
|
|
2267
2254
|
});
|
|
2268
2255
|
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceConfig = exports.enhanceOptionsSchemaWithDynamicOptions = void 0;
|
|
2269
2256
|
|
|
2270
|
-
var lodash_1 = __webpack_require__(
|
|
2257
|
+
var lodash_1 = __webpack_require__(2); // included for backwards compatibility
|
|
2271
2258
|
|
|
2272
2259
|
|
|
2273
|
-
var visualization_schemas_1 = __webpack_require__(
|
|
2260
|
+
var visualization_schemas_1 = __webpack_require__(9);
|
|
2274
2261
|
|
|
2275
2262
|
Object.defineProperty(exports, "enhanceOptionsSchemaWithDynamicOptions", {
|
|
2276
2263
|
enumerable: true,
|
|
@@ -2411,42 +2398,42 @@ exports.insertLayout = insertLayout;
|
|
|
2411
2398
|
|
|
2412
2399
|
/***/ }),
|
|
2413
2400
|
|
|
2414
|
-
/***/
|
|
2401
|
+
/***/ 27:
|
|
2415
2402
|
/***/ (function(module, exports) {
|
|
2416
2403
|
|
|
2417
2404
|
module.exports = require("@splunk/visualization-context/FeatureFlagContext");
|
|
2418
2405
|
|
|
2419
2406
|
/***/ }),
|
|
2420
2407
|
|
|
2421
|
-
/***/
|
|
2408
|
+
/***/ 29:
|
|
2422
2409
|
/***/ (function(module, exports) {
|
|
2423
2410
|
|
|
2424
|
-
module.exports = require("
|
|
2411
|
+
module.exports = require("@splunk/themes/pick");
|
|
2425
2412
|
|
|
2426
2413
|
/***/ }),
|
|
2427
2414
|
|
|
2428
|
-
/***/
|
|
2415
|
+
/***/ 3:
|
|
2429
2416
|
/***/ (function(module, exports) {
|
|
2430
2417
|
|
|
2431
|
-
module.exports = require("@splunk/
|
|
2418
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
2432
2419
|
|
|
2433
2420
|
/***/ }),
|
|
2434
2421
|
|
|
2435
|
-
/***/
|
|
2422
|
+
/***/ 30:
|
|
2436
2423
|
/***/ (function(module, exports) {
|
|
2437
2424
|
|
|
2438
2425
|
module.exports = require("@splunk/ui-utils/id");
|
|
2439
2426
|
|
|
2440
2427
|
/***/ }),
|
|
2441
2428
|
|
|
2442
|
-
/***/
|
|
2429
|
+
/***/ 31:
|
|
2443
2430
|
/***/ (function(module, exports) {
|
|
2444
2431
|
|
|
2445
2432
|
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
2446
2433
|
|
|
2447
2434
|
/***/ }),
|
|
2448
2435
|
|
|
2449
|
-
/***/
|
|
2436
|
+
/***/ 32:
|
|
2450
2437
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2451
2438
|
|
|
2452
2439
|
"use strict";
|
|
@@ -2456,7 +2443,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2456
2443
|
value: true
|
|
2457
2444
|
});
|
|
2458
2445
|
|
|
2459
|
-
var react_1 = __webpack_require__(
|
|
2446
|
+
var react_1 = __webpack_require__(1);
|
|
2460
2447
|
|
|
2461
2448
|
function usePrevious(value) {
|
|
2462
2449
|
var ref = (0, react_1.useRef)();
|
|
@@ -2470,21 +2457,21 @@ exports.default = usePrevious;
|
|
|
2470
2457
|
|
|
2471
2458
|
/***/ }),
|
|
2472
2459
|
|
|
2473
|
-
/***/
|
|
2460
|
+
/***/ 33:
|
|
2474
2461
|
/***/ (function(module, exports) {
|
|
2475
2462
|
|
|
2476
2463
|
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
2477
2464
|
|
|
2478
2465
|
/***/ }),
|
|
2479
2466
|
|
|
2480
|
-
/***/
|
|
2467
|
+
/***/ 34:
|
|
2481
2468
|
/***/ (function(module, exports) {
|
|
2482
2469
|
|
|
2483
2470
|
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
2484
2471
|
|
|
2485
2472
|
/***/ }),
|
|
2486
2473
|
|
|
2487
|
-
/***/
|
|
2474
|
+
/***/ 36:
|
|
2488
2475
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2489
2476
|
|
|
2490
2477
|
"use strict";
|
|
@@ -2495,17 +2482,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2495
2482
|
});
|
|
2496
2483
|
exports.shouldShowIconPlaceholder = void 0;
|
|
2497
2484
|
|
|
2498
|
-
var React = __webpack_require__(
|
|
2485
|
+
var React = __webpack_require__(1);
|
|
2499
2486
|
|
|
2500
|
-
var T = __webpack_require__(
|
|
2487
|
+
var T = __webpack_require__(0);
|
|
2501
2488
|
|
|
2502
|
-
var lodash_1 = __webpack_require__(
|
|
2489
|
+
var lodash_1 = __webpack_require__(2);
|
|
2503
2490
|
|
|
2504
|
-
var i18n_1 = __webpack_require__(
|
|
2491
|
+
var i18n_1 = __webpack_require__(3);
|
|
2505
2492
|
|
|
2506
|
-
var Message_1 = __webpack_require__(
|
|
2493
|
+
var Message_1 = __webpack_require__(11);
|
|
2507
2494
|
|
|
2508
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
2495
|
+
var FixedSizeContainer_1 = __webpack_require__(17);
|
|
2509
2496
|
/**
|
|
2510
2497
|
* @method shouldShowIconPlaceholder
|
|
2511
2498
|
* @param {object} dataSources
|
|
@@ -2577,24 +2564,24 @@ exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
|
|
|
2577
2564
|
|
|
2578
2565
|
/***/ }),
|
|
2579
2566
|
|
|
2580
|
-
/***/
|
|
2567
|
+
/***/ 37:
|
|
2581
2568
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2582
2569
|
|
|
2583
2570
|
"use strict";
|
|
2584
2571
|
|
|
2585
2572
|
|
|
2586
|
-
var _defineProperty = __webpack_require__(
|
|
2573
|
+
var _defineProperty = __webpack_require__(12);
|
|
2587
2574
|
|
|
2588
2575
|
Object.defineProperty(exports, "__esModule", {
|
|
2589
2576
|
value: true
|
|
2590
2577
|
});
|
|
2591
2578
|
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
2592
2579
|
|
|
2593
|
-
var T = __webpack_require__(
|
|
2580
|
+
var T = __webpack_require__(0);
|
|
2594
2581
|
|
|
2595
|
-
var lodash_1 = __webpack_require__(
|
|
2582
|
+
var lodash_1 = __webpack_require__(2);
|
|
2596
2583
|
|
|
2597
|
-
var DataSource_1 = __webpack_require__(
|
|
2584
|
+
var DataSource_1 = __webpack_require__(20);
|
|
2598
2585
|
|
|
2599
2586
|
exports.SortParamsPropTypes = T.shape({
|
|
2600
2587
|
currentSortKey: T.string,
|
|
@@ -2648,7 +2635,7 @@ exports.getSortingParams = getSortingParams;
|
|
|
2648
2635
|
|
|
2649
2636
|
/***/ }),
|
|
2650
2637
|
|
|
2651
|
-
/***/
|
|
2638
|
+
/***/ 38:
|
|
2652
2639
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2653
2640
|
|
|
2654
2641
|
"use strict";
|
|
@@ -2659,9 +2646,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2659
2646
|
});
|
|
2660
2647
|
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
2661
2648
|
|
|
2662
|
-
var T = __webpack_require__(
|
|
2649
|
+
var T = __webpack_require__(0);
|
|
2663
2650
|
|
|
2664
|
-
var lodash_1 = __webpack_require__(
|
|
2651
|
+
var lodash_1 = __webpack_require__(2);
|
|
2665
2652
|
|
|
2666
2653
|
exports.PaginatorParamsPropTypes = T.shape({
|
|
2667
2654
|
isPaging: T.bool,
|
|
@@ -2713,14 +2700,7 @@ exports.getPaginationParams = getPaginationParams;
|
|
|
2713
2700
|
|
|
2714
2701
|
/***/ }),
|
|
2715
2702
|
|
|
2716
|
-
/***/
|
|
2717
|
-
/***/ (function(module, exports) {
|
|
2718
|
-
|
|
2719
|
-
module.exports = require("styled-components");
|
|
2720
|
-
|
|
2721
|
-
/***/ }),
|
|
2722
|
-
|
|
2723
|
-
/***/ 40:
|
|
2703
|
+
/***/ 39:
|
|
2724
2704
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2725
2705
|
|
|
2726
2706
|
"use strict";
|
|
@@ -2755,11 +2735,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2755
2735
|
value: true
|
|
2756
2736
|
});
|
|
2757
2737
|
|
|
2738
|
+
__exportStar(__webpack_require__(40), exports);
|
|
2739
|
+
|
|
2758
2740
|
__exportStar(__webpack_require__(41), exports);
|
|
2759
2741
|
|
|
2760
|
-
__exportStar(__webpack_require__(
|
|
2742
|
+
__exportStar(__webpack_require__(20), exports);
|
|
2761
2743
|
|
|
2762
|
-
__exportStar(__webpack_require__(
|
|
2744
|
+
__exportStar(__webpack_require__(42), exports);
|
|
2763
2745
|
|
|
2764
2746
|
__exportStar(__webpack_require__(43), exports);
|
|
2765
2747
|
|
|
@@ -2771,13 +2753,13 @@ __exportStar(__webpack_require__(46), exports);
|
|
|
2771
2753
|
|
|
2772
2754
|
__exportStar(__webpack_require__(47), exports);
|
|
2773
2755
|
|
|
2774
|
-
__exportStar(__webpack_require__(
|
|
2756
|
+
__exportStar(__webpack_require__(21), exports);
|
|
2775
2757
|
|
|
2776
|
-
__exportStar(__webpack_require__(
|
|
2758
|
+
__exportStar(__webpack_require__(7), exports);
|
|
2777
2759
|
|
|
2778
|
-
__exportStar(__webpack_require__(
|
|
2760
|
+
__exportStar(__webpack_require__(22), exports);
|
|
2779
2761
|
|
|
2780
|
-
__exportStar(__webpack_require__(
|
|
2762
|
+
__exportStar(__webpack_require__(48), exports);
|
|
2781
2763
|
|
|
2782
2764
|
__exportStar(__webpack_require__(49), exports);
|
|
2783
2765
|
|
|
@@ -2789,11 +2771,16 @@ __exportStar(__webpack_require__(52), exports);
|
|
|
2789
2771
|
|
|
2790
2772
|
__exportStar(__webpack_require__(53), exports);
|
|
2791
2773
|
|
|
2792
|
-
|
|
2774
|
+
/***/ }),
|
|
2775
|
+
|
|
2776
|
+
/***/ 4:
|
|
2777
|
+
/***/ (function(module, exports) {
|
|
2778
|
+
|
|
2779
|
+
module.exports = require("styled-components");
|
|
2793
2780
|
|
|
2794
2781
|
/***/ }),
|
|
2795
2782
|
|
|
2796
|
-
/***/
|
|
2783
|
+
/***/ 40:
|
|
2797
2784
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2798
2785
|
|
|
2799
2786
|
"use strict";
|
|
@@ -2805,7 +2792,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2805
2792
|
|
|
2806
2793
|
/***/ }),
|
|
2807
2794
|
|
|
2808
|
-
/***/
|
|
2795
|
+
/***/ 41:
|
|
2809
2796
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2810
2797
|
|
|
2811
2798
|
"use strict";
|
|
@@ -2820,7 +2807,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2820
2807
|
|
|
2821
2808
|
/***/ }),
|
|
2822
2809
|
|
|
2823
|
-
/***/
|
|
2810
|
+
/***/ 42:
|
|
2824
2811
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2825
2812
|
|
|
2826
2813
|
"use strict";
|
|
@@ -2832,7 +2819,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2832
2819
|
|
|
2833
2820
|
/***/ }),
|
|
2834
2821
|
|
|
2835
|
-
/***/
|
|
2822
|
+
/***/ 43:
|
|
2836
2823
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2837
2824
|
|
|
2838
2825
|
"use strict";
|
|
@@ -2844,7 +2831,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2844
2831
|
|
|
2845
2832
|
/***/ }),
|
|
2846
2833
|
|
|
2847
|
-
/***/
|
|
2834
|
+
/***/ 437:
|
|
2848
2835
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2849
2836
|
|
|
2850
2837
|
"use strict";
|
|
@@ -2880,9 +2867,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2880
2867
|
});
|
|
2881
2868
|
exports.default = void 0;
|
|
2882
2869
|
|
|
2883
|
-
__exportStar(__webpack_require__(
|
|
2870
|
+
__exportStar(__webpack_require__(180), exports);
|
|
2884
2871
|
|
|
2885
|
-
var MarkerGauge_1 = __webpack_require__(
|
|
2872
|
+
var MarkerGauge_1 = __webpack_require__(180);
|
|
2886
2873
|
|
|
2887
2874
|
Object.defineProperty(exports, "default", {
|
|
2888
2875
|
enumerable: true,
|
|
@@ -2893,13 +2880,13 @@ Object.defineProperty(exports, "default", {
|
|
|
2893
2880
|
|
|
2894
2881
|
/***/ }),
|
|
2895
2882
|
|
|
2896
|
-
/***/
|
|
2883
|
+
/***/ 438:
|
|
2897
2884
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2898
2885
|
|
|
2899
2886
|
"use strict";
|
|
2900
2887
|
|
|
2901
2888
|
|
|
2902
|
-
var _slicedToArray = __webpack_require__(
|
|
2889
|
+
var _slicedToArray = __webpack_require__(5);
|
|
2903
2890
|
|
|
2904
2891
|
var __rest = this && this.__rest || function (s, e) {
|
|
2905
2892
|
var t = {};
|
|
@@ -2918,31 +2905,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2918
2905
|
value: true
|
|
2919
2906
|
});
|
|
2920
2907
|
|
|
2921
|
-
var React = __webpack_require__(
|
|
2908
|
+
var React = __webpack_require__(1);
|
|
2922
2909
|
|
|
2923
|
-
var react_1 = __webpack_require__(
|
|
2910
|
+
var react_1 = __webpack_require__(1);
|
|
2924
2911
|
|
|
2925
|
-
var T = __webpack_require__(
|
|
2912
|
+
var T = __webpack_require__(0);
|
|
2926
2913
|
|
|
2927
2914
|
var styled_components_1 = __webpack_require__(4);
|
|
2928
2915
|
|
|
2929
|
-
var lodash_1 = __webpack_require__(
|
|
2916
|
+
var lodash_1 = __webpack_require__(2);
|
|
2930
2917
|
|
|
2931
|
-
var i18n_1 = __webpack_require__(
|
|
2918
|
+
var i18n_1 = __webpack_require__(3);
|
|
2932
2919
|
|
|
2933
|
-
var style_1 = __webpack_require__(
|
|
2920
|
+
var style_1 = __webpack_require__(18);
|
|
2934
2921
|
|
|
2935
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
2922
|
+
var SizeAwareWrapper_1 = __webpack_require__(25);
|
|
2936
2923
|
|
|
2937
|
-
var Message_1 = __webpack_require__(
|
|
2924
|
+
var Message_1 = __webpack_require__(11);
|
|
2938
2925
|
|
|
2939
|
-
var id_1 = __webpack_require__(
|
|
2926
|
+
var id_1 = __webpack_require__(30);
|
|
2940
2927
|
|
|
2941
2928
|
var gaugeUtils_1 = __webpack_require__(118);
|
|
2942
2929
|
|
|
2943
|
-
var GaugeMajorTicks_1 = __webpack_require__(
|
|
2930
|
+
var GaugeMajorTicks_1 = __webpack_require__(146);
|
|
2944
2931
|
|
|
2945
|
-
var GaugeValueMarker_1 = __webpack_require__(
|
|
2932
|
+
var GaugeValueMarker_1 = __webpack_require__(147);
|
|
2946
2933
|
|
|
2947
2934
|
var MAX_VERTICAL_CONTAINER_WIDTH = 200;
|
|
2948
2935
|
var MIN_VERTICAL_CONTAINER_HEIGHT = 200;
|
|
@@ -3286,7 +3273,7 @@ exports.default = MarkerGauge;
|
|
|
3286
3273
|
|
|
3287
3274
|
/***/ }),
|
|
3288
3275
|
|
|
3289
|
-
/***/
|
|
3276
|
+
/***/ 439:
|
|
3290
3277
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3291
3278
|
|
|
3292
3279
|
"use strict";
|
|
@@ -3296,27 +3283,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3296
3283
|
value: true
|
|
3297
3284
|
});
|
|
3298
3285
|
|
|
3299
|
-
var i18n_1 = __webpack_require__(
|
|
3286
|
+
var i18n_1 = __webpack_require__(3);
|
|
3300
3287
|
|
|
3301
|
-
var GaugeMarker_1 = __webpack_require__(
|
|
3288
|
+
var GaugeMarker_1 = __webpack_require__(440);
|
|
3302
3289
|
|
|
3303
|
-
var placeholders_1 = __webpack_require__(
|
|
3290
|
+
var placeholders_1 = __webpack_require__(70);
|
|
3304
3291
|
|
|
3305
|
-
var visualization_schemas_1 = __webpack_require__(
|
|
3292
|
+
var visualization_schemas_1 = __webpack_require__(9);
|
|
3306
3293
|
|
|
3307
|
-
var variables_1 = __webpack_require__(
|
|
3294
|
+
var variables_1 = __webpack_require__(13);
|
|
3308
3295
|
|
|
3309
|
-
var pick_1 = __webpack_require__(
|
|
3296
|
+
var pick_1 = __webpack_require__(29);
|
|
3310
3297
|
|
|
3311
|
-
var Gauge_1 = __webpack_require__(
|
|
3298
|
+
var Gauge_1 = __webpack_require__(145);
|
|
3312
3299
|
|
|
3313
|
-
var VizBehavior_1 = __webpack_require__(
|
|
3300
|
+
var VizBehavior_1 = __webpack_require__(7);
|
|
3314
3301
|
|
|
3315
|
-
var VizCategory_1 = __webpack_require__(
|
|
3302
|
+
var VizCategory_1 = __webpack_require__(22);
|
|
3316
3303
|
|
|
3317
|
-
var configUtils_1 = __webpack_require__(
|
|
3304
|
+
var configUtils_1 = __webpack_require__(26);
|
|
3318
3305
|
|
|
3319
|
-
var BackgroundColor_1 = __webpack_require__(
|
|
3306
|
+
var BackgroundColor_1 = __webpack_require__(72);
|
|
3320
3307
|
|
|
3321
3308
|
var dataContract = {
|
|
3322
3309
|
requiredDataSources: [{
|
|
@@ -3464,7 +3451,19 @@ exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
|
3464
3451
|
|
|
3465
3452
|
/***/ }),
|
|
3466
3453
|
|
|
3467
|
-
/***/
|
|
3454
|
+
/***/ 44:
|
|
3455
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3456
|
+
|
|
3457
|
+
"use strict";
|
|
3458
|
+
|
|
3459
|
+
|
|
3460
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3461
|
+
value: true
|
|
3462
|
+
});
|
|
3463
|
+
|
|
3464
|
+
/***/ }),
|
|
3465
|
+
|
|
3466
|
+
/***/ 440:
|
|
3468
3467
|
/***/ (function(module, exports) {
|
|
3469
3468
|
|
|
3470
3469
|
module.exports = require("@splunk/react-icons/enterprise/GaugeMarker");
|
|
@@ -3531,6 +3530,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3531
3530
|
|
|
3532
3531
|
/***/ }),
|
|
3533
3532
|
|
|
3533
|
+
/***/ 5:
|
|
3534
|
+
/***/ (function(module, exports) {
|
|
3535
|
+
|
|
3536
|
+
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
3537
|
+
|
|
3538
|
+
/***/ }),
|
|
3539
|
+
|
|
3534
3540
|
/***/ 50:
|
|
3535
3541
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3536
3542
|
|
|
@@ -3585,71 +3591,59 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3585
3591
|
"use strict";
|
|
3586
3592
|
|
|
3587
3593
|
|
|
3588
|
-
|
|
3589
|
-
value: true
|
|
3590
|
-
});
|
|
3591
|
-
|
|
3592
|
-
/***/ }),
|
|
3593
|
-
|
|
3594
|
-
/***/ 55:
|
|
3595
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3596
|
-
|
|
3597
|
-
"use strict";
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
var _slicedToArray = __webpack_require__(6);
|
|
3594
|
+
var _slicedToArray = __webpack_require__(5);
|
|
3601
3595
|
|
|
3602
3596
|
Object.defineProperty(exports, "__esModule", {
|
|
3603
3597
|
value: true
|
|
3604
3598
|
});
|
|
3605
3599
|
|
|
3606
|
-
var React = __webpack_require__(
|
|
3600
|
+
var React = __webpack_require__(1);
|
|
3607
3601
|
|
|
3608
|
-
var lodash_1 = __webpack_require__(
|
|
3602
|
+
var lodash_1 = __webpack_require__(2);
|
|
3609
3603
|
|
|
3610
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
3604
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(55);
|
|
3611
3605
|
|
|
3612
|
-
var Options_1 = __webpack_require__(
|
|
3606
|
+
var Options_1 = __webpack_require__(16);
|
|
3613
3607
|
|
|
3614
|
-
var SanitizeProps_1 = __webpack_require__(
|
|
3608
|
+
var SanitizeProps_1 = __webpack_require__(56);
|
|
3615
3609
|
|
|
3616
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
3610
|
+
var TimezoneContext_1 = __webpack_require__(31);
|
|
3617
3611
|
|
|
3618
|
-
var moment_1 = __webpack_require__(
|
|
3612
|
+
var moment_1 = __webpack_require__(57);
|
|
3619
3613
|
|
|
3620
|
-
var FeatureFlagContext_1 = __webpack_require__(
|
|
3614
|
+
var FeatureFlagContext_1 = __webpack_require__(27);
|
|
3621
3615
|
|
|
3622
3616
|
var styled_components_1 = __webpack_require__(4);
|
|
3623
3617
|
|
|
3624
|
-
var hocUtils_1 = __webpack_require__(
|
|
3618
|
+
var hocUtils_1 = __webpack_require__(33);
|
|
3625
3619
|
|
|
3626
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
3620
|
+
var JSONSchemaUtils_1 = __webpack_require__(34);
|
|
3627
3621
|
|
|
3628
|
-
var async_dynamic_options_evaluator_1 = __webpack_require__(
|
|
3622
|
+
var async_dynamic_options_evaluator_1 = __webpack_require__(58);
|
|
3629
3623
|
|
|
3630
|
-
var id_1 = __webpack_require__(
|
|
3624
|
+
var id_1 = __webpack_require__(30);
|
|
3631
3625
|
|
|
3632
|
-
var SplunkVisualization_1 = __webpack_require__(
|
|
3626
|
+
var SplunkVisualization_1 = __webpack_require__(59);
|
|
3633
3627
|
|
|
3634
|
-
var VizBehavior_1 = __webpack_require__(
|
|
3628
|
+
var VizBehavior_1 = __webpack_require__(7);
|
|
3635
3629
|
|
|
3636
|
-
var getSorting_1 = __webpack_require__(
|
|
3630
|
+
var getSorting_1 = __webpack_require__(37);
|
|
3637
3631
|
|
|
3638
|
-
var getPagination_1 = __webpack_require__(
|
|
3632
|
+
var getPagination_1 = __webpack_require__(38);
|
|
3639
3633
|
|
|
3640
|
-
var useDeepMemo_1 = __webpack_require__(
|
|
3634
|
+
var useDeepMemo_1 = __webpack_require__(60);
|
|
3641
3635
|
|
|
3642
|
-
var MissingPropsMessage_1 = __webpack_require__(
|
|
3636
|
+
var MissingPropsMessage_1 = __webpack_require__(61);
|
|
3643
3637
|
|
|
3644
|
-
var withEditModeCover_1 = __webpack_require__(
|
|
3638
|
+
var withEditModeCover_1 = __webpack_require__(62);
|
|
3645
3639
|
|
|
3646
|
-
var withPlaceholder_1 = __webpack_require__(
|
|
3640
|
+
var withPlaceholder_1 = __webpack_require__(63);
|
|
3647
3641
|
|
|
3648
|
-
var useDownsampleDataSources_1 = __webpack_require__(
|
|
3642
|
+
var useDownsampleDataSources_1 = __webpack_require__(64);
|
|
3649
3643
|
|
|
3650
|
-
var dataUtils_1 = __webpack_require__(
|
|
3644
|
+
var dataUtils_1 = __webpack_require__(14);
|
|
3651
3645
|
|
|
3652
|
-
var featureFlagUtils_1 = __webpack_require__(
|
|
3646
|
+
var featureFlagUtils_1 = __webpack_require__(66);
|
|
3653
3647
|
/**
|
|
3654
3648
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
3655
3649
|
* @param {DashboardVizOpts} opts
|
|
@@ -3982,48 +3976,41 @@ exports.default = withDashboardViz;
|
|
|
3982
3976
|
|
|
3983
3977
|
/***/ }),
|
|
3984
3978
|
|
|
3985
|
-
/***/
|
|
3979
|
+
/***/ 55:
|
|
3986
3980
|
/***/ (function(module, exports) {
|
|
3987
3981
|
|
|
3988
3982
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
3989
3983
|
|
|
3990
3984
|
/***/ }),
|
|
3991
3985
|
|
|
3992
|
-
/***/
|
|
3986
|
+
/***/ 56:
|
|
3993
3987
|
/***/ (function(module, exports) {
|
|
3994
3988
|
|
|
3995
3989
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
3996
3990
|
|
|
3997
3991
|
/***/ }),
|
|
3998
3992
|
|
|
3999
|
-
/***/
|
|
3993
|
+
/***/ 57:
|
|
4000
3994
|
/***/ (function(module, exports) {
|
|
4001
3995
|
|
|
4002
3996
|
module.exports = require("@splunk/moment");
|
|
4003
3997
|
|
|
4004
3998
|
/***/ }),
|
|
4005
3999
|
|
|
4006
|
-
/***/
|
|
4000
|
+
/***/ 58:
|
|
4007
4001
|
/***/ (function(module, exports) {
|
|
4008
4002
|
|
|
4009
4003
|
module.exports = require("@splunk/async-dynamic-options-evaluator");
|
|
4010
4004
|
|
|
4011
4005
|
/***/ }),
|
|
4012
4006
|
|
|
4013
|
-
/***/
|
|
4014
|
-
/***/ (function(module, exports) {
|
|
4015
|
-
|
|
4016
|
-
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
4017
|
-
|
|
4018
|
-
/***/ }),
|
|
4019
|
-
|
|
4020
|
-
/***/ 60:
|
|
4007
|
+
/***/ 59:
|
|
4021
4008
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4022
4009
|
|
|
4023
4010
|
"use strict";
|
|
4024
4011
|
|
|
4025
4012
|
|
|
4026
|
-
var _classCallCheck = __webpack_require__(
|
|
4013
|
+
var _classCallCheck = __webpack_require__(8);
|
|
4027
4014
|
|
|
4028
4015
|
Object.defineProperty(exports, "__esModule", {
|
|
4029
4016
|
value: true
|
|
@@ -4031,11 +4018,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4031
4018
|
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
4032
4019
|
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
4033
4020
|
|
|
4034
|
-
var T = __webpack_require__(
|
|
4021
|
+
var T = __webpack_require__(0);
|
|
4035
4022
|
|
|
4036
|
-
var lodash_1 = __webpack_require__(
|
|
4023
|
+
var lodash_1 = __webpack_require__(2);
|
|
4037
4024
|
|
|
4038
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
4025
|
+
var VizActionHandler_1 = __webpack_require__(21); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
4039
4026
|
|
|
4040
4027
|
|
|
4041
4028
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -4169,7 +4156,14 @@ exports.default = SplunkVisualization;
|
|
|
4169
4156
|
|
|
4170
4157
|
/***/ }),
|
|
4171
4158
|
|
|
4172
|
-
/***/
|
|
4159
|
+
/***/ 6:
|
|
4160
|
+
/***/ (function(module, exports) {
|
|
4161
|
+
|
|
4162
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
4163
|
+
|
|
4164
|
+
/***/ }),
|
|
4165
|
+
|
|
4166
|
+
/***/ 60:
|
|
4173
4167
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4174
4168
|
|
|
4175
4169
|
"use strict";
|
|
@@ -4180,9 +4174,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4180
4174
|
});
|
|
4181
4175
|
exports.useDeepMemo = void 0;
|
|
4182
4176
|
|
|
4183
|
-
var react_1 = __webpack_require__(
|
|
4177
|
+
var react_1 = __webpack_require__(1);
|
|
4184
4178
|
|
|
4185
|
-
var lodash_1 = __webpack_require__(
|
|
4179
|
+
var lodash_1 = __webpack_require__(2);
|
|
4186
4180
|
/**
|
|
4187
4181
|
* This hook evaluates and stores the result of a passed function and only
|
|
4188
4182
|
* re-evaluates the function when passed dependencies change.
|
|
@@ -4215,7 +4209,7 @@ exports.useDeepMemo = useDeepMemo;
|
|
|
4215
4209
|
|
|
4216
4210
|
/***/ }),
|
|
4217
4211
|
|
|
4218
|
-
/***/
|
|
4212
|
+
/***/ 61:
|
|
4219
4213
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4220
4214
|
|
|
4221
4215
|
"use strict";
|
|
@@ -4226,15 +4220,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4226
4220
|
});
|
|
4227
4221
|
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
4228
4222
|
|
|
4229
|
-
var React = __webpack_require__(
|
|
4223
|
+
var React = __webpack_require__(1);
|
|
4230
4224
|
|
|
4231
|
-
var T = __webpack_require__(
|
|
4225
|
+
var T = __webpack_require__(0);
|
|
4232
4226
|
|
|
4233
|
-
var i18n_1 = __webpack_require__(
|
|
4227
|
+
var i18n_1 = __webpack_require__(3);
|
|
4234
4228
|
|
|
4235
|
-
var Message_1 = __webpack_require__(
|
|
4229
|
+
var Message_1 = __webpack_require__(11);
|
|
4236
4230
|
|
|
4237
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
4231
|
+
var FixedSizeContainer_1 = __webpack_require__(17);
|
|
4238
4232
|
/**
|
|
4239
4233
|
* @method isMissing
|
|
4240
4234
|
* @param {any} v
|
|
@@ -4296,7 +4290,7 @@ exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage)
|
|
|
4296
4290
|
|
|
4297
4291
|
/***/ }),
|
|
4298
4292
|
|
|
4299
|
-
/***/
|
|
4293
|
+
/***/ 62:
|
|
4300
4294
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4301
4295
|
|
|
4302
4296
|
"use strict";
|
|
@@ -4306,18 +4300,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4306
4300
|
value: true
|
|
4307
4301
|
});
|
|
4308
4302
|
|
|
4309
|
-
var React = __webpack_require__(
|
|
4303
|
+
var React = __webpack_require__(1);
|
|
4310
4304
|
|
|
4311
4305
|
var styled_components_1 = __webpack_require__(4);
|
|
4312
4306
|
|
|
4313
|
-
var hocUtils_1 = __webpack_require__(
|
|
4307
|
+
var hocUtils_1 = __webpack_require__(23);
|
|
4314
4308
|
|
|
4315
4309
|
var Cover = styled_components_1.default.div.withConfig({
|
|
4316
4310
|
displayName: "withEditModeCover__Cover",
|
|
4317
4311
|
componentId: "sc-1gsbnxb-0"
|
|
4318
4312
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
4319
4313
|
var Blocker = styled_components_1.default.div.attrs({
|
|
4320
|
-
'data-splunk-visualization-version': "26.
|
|
4314
|
+
'data-splunk-visualization-version': "26.4.1 - 2b7482c08"
|
|
4321
4315
|
}).withConfig({
|
|
4322
4316
|
displayName: "withEditModeCover__Blocker",
|
|
4323
4317
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -4349,7 +4343,7 @@ exports.default = withEditModeCover;
|
|
|
4349
4343
|
|
|
4350
4344
|
/***/ }),
|
|
4351
4345
|
|
|
4352
|
-
/***/
|
|
4346
|
+
/***/ 63:
|
|
4353
4347
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4354
4348
|
|
|
4355
4349
|
"use strict";
|
|
@@ -4359,17 +4353,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4359
4353
|
value: true
|
|
4360
4354
|
});
|
|
4361
4355
|
|
|
4362
|
-
var React = __webpack_require__(
|
|
4356
|
+
var React = __webpack_require__(1);
|
|
4363
4357
|
|
|
4364
|
-
var colorUtils_1 = __webpack_require__(
|
|
4358
|
+
var colorUtils_1 = __webpack_require__(15);
|
|
4365
4359
|
|
|
4366
|
-
var variables_1 = __webpack_require__(
|
|
4360
|
+
var variables_1 = __webpack_require__(13);
|
|
4367
4361
|
|
|
4368
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
4362
|
+
var IconPlaceholder_1 = __webpack_require__(36);
|
|
4369
4363
|
|
|
4370
|
-
var VizBehavior_1 = __webpack_require__(
|
|
4364
|
+
var VizBehavior_1 = __webpack_require__(7);
|
|
4371
4365
|
|
|
4372
|
-
var hocUtils_1 = __webpack_require__(
|
|
4366
|
+
var hocUtils_1 = __webpack_require__(23);
|
|
4373
4367
|
|
|
4374
4368
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
4375
4369
|
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
@@ -4414,27 +4408,30 @@ exports.default = withPlaceholder;
|
|
|
4414
4408
|
|
|
4415
4409
|
/***/ }),
|
|
4416
4410
|
|
|
4417
|
-
/***/
|
|
4411
|
+
/***/ 64:
|
|
4418
4412
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4419
4413
|
|
|
4420
4414
|
"use strict";
|
|
4421
4415
|
|
|
4422
4416
|
|
|
4423
|
-
var _slicedToArray = __webpack_require__(
|
|
4417
|
+
var _slicedToArray = __webpack_require__(5);
|
|
4424
4418
|
|
|
4425
4419
|
Object.defineProperty(exports, "__esModule", {
|
|
4426
4420
|
value: true
|
|
4427
4421
|
});
|
|
4428
4422
|
|
|
4429
|
-
var react_1 = __webpack_require__(
|
|
4423
|
+
var react_1 = __webpack_require__(1);
|
|
4424
|
+
|
|
4425
|
+
var lodash_1 = __webpack_require__(2);
|
|
4426
|
+
|
|
4427
|
+
var dataUtils_1 = __webpack_require__(14);
|
|
4430
4428
|
|
|
4431
|
-
var
|
|
4429
|
+
var usePrevious_1 = __webpack_require__(32);
|
|
4432
4430
|
|
|
4433
|
-
var
|
|
4431
|
+
var useGetXAndYFields_1 = __webpack_require__(65); // Options properties which impact/require re-downsample on change.
|
|
4434
4432
|
|
|
4435
|
-
var usePrevious_1 = __webpack_require__(33);
|
|
4436
4433
|
|
|
4437
|
-
var
|
|
4434
|
+
var downsampleVizOptionProperties = ['nullValueDisplay'];
|
|
4438
4435
|
|
|
4439
4436
|
var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
|
|
4440
4437
|
var dataSources = _ref.dataSources,
|
|
@@ -4448,8 +4445,15 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
|
|
|
4448
4445
|
options: options,
|
|
4449
4446
|
context: context,
|
|
4450
4447
|
dataSources: dataSources
|
|
4451
|
-
});
|
|
4452
|
-
|
|
4448
|
+
}); // Extract viz options that impact downsampling.
|
|
4449
|
+
|
|
4450
|
+
var downsampleVizOptions = (0, react_1.useMemo)(function () {
|
|
4451
|
+
return (0, lodash_1.pick)(options, downsampleVizOptionProperties);
|
|
4452
|
+
}, [options]);
|
|
4453
|
+
var downsampleDSOptions = (0, react_1.useMemo)(function () {
|
|
4454
|
+
return Object.assign(Object.assign({}, downsampleVizOptions), xAndYFieldsWithTypes);
|
|
4455
|
+
}, [xAndYFieldsWithTypes, downsampleVizOptions]);
|
|
4456
|
+
var previousDownsampleDSOptions = (0, usePrevious_1.default)(downsampleDSOptions);
|
|
4453
4457
|
var previousDataSources = (0, usePrevious_1.default)(dataSources);
|
|
4454
4458
|
var previousThreshold = (0, usePrevious_1.default)(threshold);
|
|
4455
4459
|
|
|
@@ -4457,7 +4461,7 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
|
|
|
4457
4461
|
return isDownsamplingEnabled ? (0, dataUtils_1.downsampleDataSources)({
|
|
4458
4462
|
dataSources: dataSources,
|
|
4459
4463
|
threshold: threshold,
|
|
4460
|
-
options:
|
|
4464
|
+
options: downsampleDSOptions
|
|
4461
4465
|
}) : dataSources;
|
|
4462
4466
|
}),
|
|
4463
4467
|
_ref3 = _slicedToArray(_ref2, 2),
|
|
@@ -4485,7 +4489,7 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
|
|
|
4485
4489
|
return;
|
|
4486
4490
|
}
|
|
4487
4491
|
|
|
4488
|
-
if ((0, lodash_1.isEqual)(
|
|
4492
|
+
if ((0, lodash_1.isEqual)(previousDownsampleDSOptions, downsampleDSOptions) && previousDataSources === dataSources && previousThreshold === threshold) {
|
|
4489
4493
|
return;
|
|
4490
4494
|
} // Debounce the downsampling so we don't have to downsample and execute DSL multiple times
|
|
4491
4495
|
// while the viz is being resized
|
|
@@ -4493,10 +4497,10 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
|
|
|
4493
4497
|
|
|
4494
4498
|
debouncedDownsampleDataSources({
|
|
4495
4499
|
dataSources: dataSources,
|
|
4496
|
-
options:
|
|
4500
|
+
options: downsampleDSOptions,
|
|
4497
4501
|
threshold: threshold
|
|
4498
4502
|
}); // need to detect if this runs as part of the initial render
|
|
4499
|
-
}, [dataSources, debouncedDownsampleDataSources, xAndYFieldsWithTypes, threshold, isDownsamplingEnabled,
|
|
4503
|
+
}, [dataSources, downsampleDSOptions, debouncedDownsampleDataSources, xAndYFieldsWithTypes, threshold, isDownsamplingEnabled, previousDataSources, previousThreshold, previousDownsampleDSOptions]);
|
|
4500
4504
|
return downsampledDataSources;
|
|
4501
4505
|
};
|
|
4502
4506
|
|
|
@@ -4504,21 +4508,21 @@ exports.default = useDownsampleDataSources;
|
|
|
4504
4508
|
|
|
4505
4509
|
/***/ }),
|
|
4506
4510
|
|
|
4507
|
-
/***/
|
|
4511
|
+
/***/ 65:
|
|
4508
4512
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4509
4513
|
|
|
4510
4514
|
"use strict";
|
|
4511
4515
|
|
|
4512
4516
|
|
|
4513
|
-
var _toConsumableArray = __webpack_require__(
|
|
4517
|
+
var _toConsumableArray = __webpack_require__(6);
|
|
4514
4518
|
|
|
4515
4519
|
Object.defineProperty(exports, "__esModule", {
|
|
4516
4520
|
value: true
|
|
4517
4521
|
});
|
|
4518
4522
|
|
|
4519
|
-
var react_1 = __webpack_require__(
|
|
4523
|
+
var react_1 = __webpack_require__(1);
|
|
4520
4524
|
|
|
4521
|
-
var Options_1 = __webpack_require__(
|
|
4525
|
+
var Options_1 = __webpack_require__(16);
|
|
4522
4526
|
/**
|
|
4523
4527
|
* Hook that evaluates the DSL for subset of a viz's options needed to determine
|
|
4524
4528
|
* its x and y fields as well as the types of all its fields.
|
|
@@ -4619,7 +4623,7 @@ exports.default = useGetXAndYFields;
|
|
|
4619
4623
|
|
|
4620
4624
|
/***/ }),
|
|
4621
4625
|
|
|
4622
|
-
/***/
|
|
4626
|
+
/***/ 66:
|
|
4623
4627
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4624
4628
|
|
|
4625
4629
|
"use strict";
|
|
@@ -4630,7 +4634,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4630
4634
|
});
|
|
4631
4635
|
exports.getFeatureFlag = void 0;
|
|
4632
4636
|
|
|
4633
|
-
var FeatureFlags_1 = __webpack_require__(
|
|
4637
|
+
var FeatureFlags_1 = __webpack_require__(67);
|
|
4634
4638
|
|
|
4635
4639
|
var getFeatureFlag = function getFeatureFlag(context, flagName) {
|
|
4636
4640
|
// look for feature flag in context first
|
|
@@ -4655,42 +4659,75 @@ exports.getFeatureFlag = getFeatureFlag;
|
|
|
4655
4659
|
|
|
4656
4660
|
/***/ }),
|
|
4657
4661
|
|
|
4658
|
-
/***/
|
|
4662
|
+
/***/ 67:
|
|
4659
4663
|
/***/ (function(module, exports) {
|
|
4660
4664
|
|
|
4661
4665
|
module.exports = require("@splunk/visualization-context/FeatureFlags");
|
|
4662
4666
|
|
|
4663
4667
|
/***/ }),
|
|
4664
4668
|
|
|
4665
|
-
/***/
|
|
4669
|
+
/***/ 68:
|
|
4666
4670
|
/***/ (function(module, exports) {
|
|
4667
4671
|
|
|
4668
4672
|
module.exports = require("@babel/runtime/helpers/extends");
|
|
4669
4673
|
|
|
4670
4674
|
/***/ }),
|
|
4671
4675
|
|
|
4672
|
-
/***/
|
|
4676
|
+
/***/ 69:
|
|
4673
4677
|
/***/ (function(module, exports) {
|
|
4674
4678
|
|
|
4675
|
-
module.exports = require("@
|
|
4679
|
+
module.exports = require("@splunk/visualizations-shared/colorConstants");
|
|
4676
4680
|
|
|
4677
4681
|
/***/ }),
|
|
4678
4682
|
|
|
4679
|
-
/***/
|
|
4680
|
-
/***/ (function(module, exports) {
|
|
4683
|
+
/***/ 7:
|
|
4684
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
4681
4685
|
|
|
4682
|
-
|
|
4686
|
+
"use strict";
|
|
4687
|
+
|
|
4688
|
+
|
|
4689
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4690
|
+
value: true
|
|
4691
|
+
});
|
|
4692
|
+
exports.VizBehavior = void 0;
|
|
4693
|
+
var VizBehavior;
|
|
4694
|
+
|
|
4695
|
+
(function (VizBehavior) {
|
|
4696
|
+
/**
|
|
4697
|
+
* Dynamic Options Behavior.
|
|
4698
|
+
* This allows visualization options to be powered by data
|
|
4699
|
+
*
|
|
4700
|
+
* **Example**
|
|
4701
|
+
*
|
|
4702
|
+
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
4703
|
+
* would configure sparklineValues with an array of data points
|
|
4704
|
+
* coming from the first series in the primary datasource
|
|
4705
|
+
*
|
|
4706
|
+
*/
|
|
4707
|
+
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
4708
|
+
VizBehavior["EVENTS"] = "events";
|
|
4709
|
+
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
4710
|
+
/**
|
|
4711
|
+
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
4712
|
+
* missing.
|
|
4713
|
+
* @type {string}
|
|
4714
|
+
*/
|
|
4715
|
+
|
|
4716
|
+
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
4717
|
+
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
4718
|
+
VizBehavior["TRELLIS"] = "trellis";
|
|
4719
|
+
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
4683
4720
|
|
|
4684
4721
|
/***/ }),
|
|
4685
4722
|
|
|
4686
|
-
/***/
|
|
4723
|
+
/***/ 70:
|
|
4687
4724
|
/***/ (function(module, exports) {
|
|
4688
4725
|
|
|
4689
4726
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
4690
4727
|
|
|
4691
4728
|
/***/ }),
|
|
4692
4729
|
|
|
4693
|
-
/***/
|
|
4730
|
+
/***/ 72:
|
|
4694
4731
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4695
4732
|
|
|
4696
4733
|
"use strict";
|
|
@@ -4700,14 +4737,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4700
4737
|
value: true
|
|
4701
4738
|
});
|
|
4702
4739
|
|
|
4703
|
-
var i18n_1 = __webpack_require__(
|
|
4740
|
+
var i18n_1 = __webpack_require__(3);
|
|
4704
4741
|
|
|
4705
4742
|
var background = function background(_ref) {
|
|
4706
4743
|
var label = _ref.label,
|
|
4707
4744
|
themes = _ref.themes,
|
|
4708
4745
|
labelPosition = _ref.labelPosition;
|
|
4709
4746
|
return [{
|
|
4710
|
-
label: (0, i18n_1._)(label || 'Background'),
|
|
4747
|
+
label: (0, i18n_1._)(label || 'Background color'),
|
|
4711
4748
|
option: 'backgroundColor',
|
|
4712
4749
|
editor: 'editor.color',
|
|
4713
4750
|
editorProps: {
|
|
@@ -4722,49 +4759,16 @@ exports.default = background;
|
|
|
4722
4759
|
/***/ }),
|
|
4723
4760
|
|
|
4724
4761
|
/***/ 8:
|
|
4725
|
-
/***/ (function(module, exports
|
|
4726
|
-
|
|
4727
|
-
"use strict";
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4731
|
-
value: true
|
|
4732
|
-
});
|
|
4733
|
-
exports.VizBehavior = void 0;
|
|
4734
|
-
var VizBehavior;
|
|
4735
|
-
|
|
4736
|
-
(function (VizBehavior) {
|
|
4737
|
-
/**
|
|
4738
|
-
* Dynamic Options Behavior.
|
|
4739
|
-
* This allows visualization options to be powered by data
|
|
4740
|
-
*
|
|
4741
|
-
* **Example**
|
|
4742
|
-
*
|
|
4743
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
4744
|
-
* would configure sparklineValues with an array of data points
|
|
4745
|
-
* coming from the first series in the primary datasource
|
|
4746
|
-
*
|
|
4747
|
-
*/
|
|
4748
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
4749
|
-
VizBehavior["EVENTS"] = "events";
|
|
4750
|
-
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
4751
|
-
/**
|
|
4752
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
4753
|
-
* missing.
|
|
4754
|
-
* @type {string}
|
|
4755
|
-
*/
|
|
4762
|
+
/***/ (function(module, exports) {
|
|
4756
4763
|
|
|
4757
|
-
|
|
4758
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
4759
|
-
VizBehavior["TRELLIS"] = "trellis";
|
|
4760
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
4764
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
4761
4765
|
|
|
4762
4766
|
/***/ }),
|
|
4763
4767
|
|
|
4764
4768
|
/***/ 9:
|
|
4765
4769
|
/***/ (function(module, exports) {
|
|
4766
4770
|
|
|
4767
|
-
module.exports = require("@
|
|
4771
|
+
module.exports = require("@splunk/visualization-schemas");
|
|
4768
4772
|
|
|
4769
4773
|
/***/ })
|
|
4770
4774
|
|