@splunk/visualizations 25.13.1 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +216 -216
- package/Area.config.js.map +1 -1
- package/Area.js +529 -561
- package/Area.js.map +1 -1
- package/Bar.config.js +213 -213
- package/Bar.config.js.map +1 -1
- package/Bar.js +394 -386
- package/Bar.js.map +1 -1
- package/Bubble.config.js +140 -140
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +313 -305
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +15 -15
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +149 -144
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +205 -205
- package/Column.config.js.map +1 -1
- package/Column.js +387 -379
- package/Column.js.map +1 -1
- package/Ellipse.config.js +45 -45
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +157 -144
- package/Ellipse.js.map +1 -1
- package/Events.config.js +11 -11
- package/Events.config.js.map +1 -1
- package/Events.js +273 -261
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +46 -46
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +267 -262
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +8 -8
- package/Image.config.js.map +1 -1
- package/Image.js +110 -104
- package/Image.js.map +1 -1
- package/Line.config.js +220 -220
- package/Line.config.js.map +1 -1
- package/Line.js +404 -396
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +27 -27
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +557 -548
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +71 -71
- package/Map.config.js.map +1 -1
- package/Map.js +471 -465
- package/Map.js.map +1 -1
- package/Markdown.config.js +23 -23
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +151 -145
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +84 -84
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +295 -289
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +23 -23
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +164 -162
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +24 -24
- package/Pie.config.js.map +1 -1
- package/Pie.js +233 -228
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +33 -33
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +278 -279
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +46 -46
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +154 -142
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +19 -19
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +281 -275
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +135 -135
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +304 -299
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +119 -119
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +359 -341
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +14 -14
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +117 -117
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +373 -371
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +157 -115
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1114 -540
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +50 -20
- package/SparkLine.js.map +1 -1
- package/Table.config.js +54 -54
- package/Table.config.js.map +1 -1
- package/Table.js +302 -286
- package/Table.js.map +1 -1
- package/common/Charting.js +41 -41
- package/common/Charting.js.map +1 -1
- package/common/EventsDoc.js +15 -14
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +2 -2
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +2 -2
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +22 -22
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +32 -27
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +4 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +2 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +14 -14
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +12 -12
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +4 -4
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +112 -112
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +21 -15
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +10 -9
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +2 -2
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +2 -2
- package/common/utils/layoutUtils.js.map +1 -1
- package/common/utils/mapUtils.js +84 -80
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +2 -2
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +27 -9
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +26 -26
- package/common/utils/trellisUtils.js.map +1 -1
- package/common/utils/urlUtils.js +2 -2
- package/common/utils/urlUtils.js.map +1 -1
- package/common/withDashboardViz.js +107 -104
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +19 -19
package/Events.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 = 202);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ([
|
|
@@ -212,14 +212,14 @@ var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
|
212
212
|
var width = _ref.width;
|
|
213
213
|
return {
|
|
214
214
|
style: {
|
|
215
|
-
width: style_1.toPx(width)
|
|
215
|
+
width: (0, style_1.toPx)(width)
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
}).withConfig({
|
|
219
219
|
displayName: "FixedSizeContainer__Item",
|
|
220
220
|
componentId: "sc-1yhgpod-0"
|
|
221
221
|
})(["position:relative;background-color:", "};"], function (props) {
|
|
222
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
222
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
223
223
|
});
|
|
224
224
|
// Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
225
225
|
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
@@ -227,16 +227,16 @@ var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
|
227
227
|
height = _ref2.height;
|
|
228
228
|
return {
|
|
229
229
|
style: Object.assign(Object.assign({}, width && {
|
|
230
|
-
width: style_1.toPx(width)
|
|
230
|
+
width: (0, style_1.toPx)(width)
|
|
231
231
|
}), height && {
|
|
232
|
-
height: style_1.toPx(height)
|
|
232
|
+
height: (0, style_1.toPx)(height)
|
|
233
233
|
})
|
|
234
234
|
};
|
|
235
235
|
}).withConfig({
|
|
236
236
|
displayName: "FixedSizeContainer__FixSizeItem",
|
|
237
237
|
componentId: "sc-1yhgpod-1"
|
|
238
238
|
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
239
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
239
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
240
240
|
});
|
|
241
241
|
var ItemContent = styled_components_1.default.div.withConfig({
|
|
242
242
|
displayName: "FixedSizeContainer__ItemContent",
|
|
@@ -260,7 +260,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
260
260
|
}
|
|
261
261
|
return React.createElement(FixSizeItem, {
|
|
262
262
|
"data-test": "fix-size-item",
|
|
263
|
-
"data-splunk-visualization-version": "
|
|
263
|
+
"data-splunk-visualization-version": "26.0.0 - 2f7458907",
|
|
264
264
|
width: width,
|
|
265
265
|
height: height,
|
|
266
266
|
backgroundColor: backgroundColor
|
|
@@ -499,8 +499,8 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
|
499
499
|
*/
|
|
500
500
|
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
501
501
|
return presets.find(function (preset) {
|
|
502
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
503
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
502
|
+
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
503
|
+
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
504
504
|
var presetContextKeys = Object.keys(presetContext);
|
|
505
505
|
var presetOptionKeys = Object.keys(presetOptions);
|
|
506
506
|
// all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
@@ -517,7 +517,7 @@ exports.getInitialPreset = getInitialPreset;
|
|
|
517
517
|
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
518
518
|
*/
|
|
519
519
|
function generatePrecisionValues(numPrecisionValues) {
|
|
520
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
520
|
+
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
521
521
|
return {
|
|
522
522
|
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
523
523
|
value: i
|
|
@@ -559,35 +559,41 @@ module.exports = require("@splunk/themes/pick");
|
|
|
559
559
|
/* 25 */
|
|
560
560
|
/***/ (function(module, exports) {
|
|
561
561
|
|
|
562
|
-
module.exports = require("@splunk/
|
|
562
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
563
563
|
|
|
564
564
|
/***/ }),
|
|
565
565
|
/* 26 */
|
|
566
566
|
/***/ (function(module, exports) {
|
|
567
567
|
|
|
568
|
-
module.exports = require("@splunk/
|
|
568
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
569
569
|
|
|
570
570
|
/***/ }),
|
|
571
571
|
/* 27 */
|
|
572
572
|
/***/ (function(module, exports) {
|
|
573
573
|
|
|
574
|
+
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
575
|
+
|
|
576
|
+
/***/ }),
|
|
577
|
+
/* 28 */
|
|
578
|
+
/***/ (function(module, exports) {
|
|
579
|
+
|
|
574
580
|
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
575
581
|
|
|
576
582
|
/***/ }),
|
|
577
|
-
/*
|
|
578
|
-
/*
|
|
583
|
+
/* 29 */,
|
|
584
|
+
/* 30 */
|
|
579
585
|
/***/ (function(module, exports) {
|
|
580
586
|
|
|
581
587
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
582
588
|
|
|
583
589
|
/***/ }),
|
|
584
|
-
/*
|
|
590
|
+
/* 31 */
|
|
585
591
|
/***/ (function(module, exports) {
|
|
586
592
|
|
|
587
593
|
module.exports = require("@splunk/visualizations-shared/numberUtils");
|
|
588
594
|
|
|
589
595
|
/***/ }),
|
|
590
|
-
/*
|
|
596
|
+
/* 32 */
|
|
591
597
|
/***/ (function(module, exports, __webpack_require__) {
|
|
592
598
|
|
|
593
599
|
"use strict";
|
|
@@ -611,9 +617,9 @@ var FixedSizeContainer_1 = __webpack_require__(13);
|
|
|
611
617
|
*/
|
|
612
618
|
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
613
619
|
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
614
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
620
|
+
var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
|
|
615
621
|
var noData = data === undefined;
|
|
616
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
622
|
+
var fields = (0, lodash_1.get)(dataSources, 'primary.data.fields[0]', undefined);
|
|
617
623
|
var noFields = fields === undefined;
|
|
618
624
|
return loading || noData || noFields;
|
|
619
625
|
};
|
|
@@ -654,7 +660,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
|
|
|
654
660
|
width: width,
|
|
655
661
|
height: height,
|
|
656
662
|
level: "warning",
|
|
657
|
-
message: i18n_1._('No DataSource Connected')
|
|
663
|
+
message: (0, i18n_1._)('No DataSource Connected')
|
|
658
664
|
});
|
|
659
665
|
};
|
|
660
666
|
IconPlaceholder.propTypes = propTypes;
|
|
@@ -662,13 +668,7 @@ IconPlaceholder.defaultProps = {
|
|
|
662
668
|
width: '100%',
|
|
663
669
|
height: 250
|
|
664
670
|
};
|
|
665
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
666
|
-
|
|
667
|
-
/***/ }),
|
|
668
|
-
/* 32 */
|
|
669
|
-
/***/ (function(module, exports) {
|
|
670
|
-
|
|
671
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
671
|
+
exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
|
|
672
672
|
|
|
673
673
|
/***/ }),
|
|
674
674
|
/* 33 */
|
|
@@ -702,7 +702,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
702
702
|
};
|
|
703
703
|
var onSort;
|
|
704
704
|
if (typeof onRequestParamsChange === 'function') {
|
|
705
|
-
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
705
|
+
if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
|
|
706
706
|
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
707
707
|
currentSortDir = requestParams.sort[currentSortKey];
|
|
708
708
|
}
|
|
@@ -711,7 +711,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
711
711
|
var sortKey = _ref2.sortKey,
|
|
712
712
|
sortDir = _ref2.sortDir;
|
|
713
713
|
if (typeof sortKey === 'string') {
|
|
714
|
-
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
714
|
+
var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
715
715
|
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
716
716
|
offset: 0,
|
|
717
717
|
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
@@ -761,7 +761,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
761
761
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
762
762
|
var page = _ref2.page,
|
|
763
763
|
countArg = _ref2.count;
|
|
764
|
-
var newParams = lodash_1.cloneDeep(requestParams);
|
|
764
|
+
var newParams = (0, lodash_1.cloneDeep)(requestParams);
|
|
765
765
|
if (typeof countArg === 'number') {
|
|
766
766
|
newParams.count = countArg;
|
|
767
767
|
newParams.offset = 0;
|
|
@@ -823,16 +823,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
823
823
|
var React = __webpack_require__(1);
|
|
824
824
|
var lodash_1 = __webpack_require__(3);
|
|
825
825
|
var getSettingsFromThemedProps_1 = __webpack_require__(37);
|
|
826
|
-
var Options_1 = __webpack_require__(
|
|
826
|
+
var Options_1 = __webpack_require__(30);
|
|
827
827
|
var SanitizeProps_1 = __webpack_require__(38);
|
|
828
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
828
|
+
var TimezoneContext_1 = __webpack_require__(26);
|
|
829
829
|
var moment_1 = __webpack_require__(39);
|
|
830
830
|
var FeatureFlagContext_1 = __webpack_require__(21);
|
|
831
831
|
var styled_components_1 = __webpack_require__(4);
|
|
832
|
-
var hocUtils_1 = __webpack_require__(
|
|
833
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
832
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
833
|
+
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
834
834
|
var async_dynamic_options_evaluator_1 = __webpack_require__(40);
|
|
835
|
-
var id_1 = __webpack_require__(
|
|
835
|
+
var id_1 = __webpack_require__(25);
|
|
836
836
|
var SplunkVisualization_1 = __webpack_require__(41);
|
|
837
837
|
var VizBehavior_1 = __webpack_require__(6);
|
|
838
838
|
var getSorting_1 = __webpack_require__(33);
|
|
@@ -853,8 +853,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
853
853
|
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
854
854
|
disableEditModeCover = opts.disableEditModeCover,
|
|
855
855
|
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
856
|
-
var SanitizedReactViz = SanitizeProps_1.withSanitizedProps(ReactViz);
|
|
857
|
-
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
|
|
856
|
+
var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
|
|
857
|
+
var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
|
|
858
858
|
var DashboardViz = function DashboardViz(props) {
|
|
859
859
|
var _a;
|
|
860
860
|
var mode = props.mode,
|
|
@@ -889,19 +889,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
889
889
|
return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
|
|
890
890
|
};
|
|
891
891
|
var bgColorFromTheme = themeFunc('defaultBackgroundColor');
|
|
892
|
-
var
|
|
892
|
+
var _ref = (0, getSettingsFromThemedProps_1.default)({
|
|
893
893
|
theme: theme
|
|
894
894
|
}),
|
|
895
|
-
currentThemeFamily =
|
|
896
|
-
currentThemeColorScheme =
|
|
897
|
-
currentThemeDensity =
|
|
895
|
+
currentThemeFamily = _ref.family,
|
|
896
|
+
currentThemeColorScheme = _ref.colorScheme,
|
|
897
|
+
currentThemeDensity = _ref.density;
|
|
898
898
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
899
899
|
var _React$useState = React.useState({}),
|
|
900
900
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
901
901
|
evaluatedOptionsAsync = _React$useState2[0],
|
|
902
902
|
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
903
903
|
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
904
|
-
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(id_1.createGUID())),
|
|
904
|
+
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
|
|
905
905
|
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
906
906
|
visualizationID = _React$useState4[0];
|
|
907
907
|
var _React$useState5 = React.useState({}),
|
|
@@ -912,16 +912,17 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
912
912
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
913
913
|
dataFramesInState = _React$useState8[0],
|
|
914
914
|
setDataFramesInState = _React$useState8[1];
|
|
915
|
-
var _React$useState9 = React.useState(Boolean(featureFlagContext
|
|
915
|
+
var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
|
|
916
916
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
917
917
|
useAsyncEvaluatedOptions = _React$useState10[0],
|
|
918
918
|
setUseAsyncEvaluatedOptions = _React$useState10[1];
|
|
919
|
-
|
|
919
|
+
var isMounted = React.useRef(true);
|
|
920
|
+
evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
|
|
920
921
|
try {
|
|
921
922
|
if (useAsyncEvaluatedOptions) {
|
|
922
923
|
var optionsToEvaluate = {
|
|
923
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
924
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
924
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
925
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
925
926
|
};
|
|
926
927
|
var asyncDynamicOptionsEvaluatorParams = {
|
|
927
928
|
visualizationID: visualizationID,
|
|
@@ -932,10 +933,10 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
932
933
|
};
|
|
933
934
|
async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
|
|
934
935
|
setEvaluatedOptionsAsync(results.results);
|
|
935
|
-
}).catch(function (
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
936
|
+
}).catch(function () {
|
|
937
|
+
if (isMounted.current) {
|
|
938
|
+
setUseAsyncEvaluatedOptions(false);
|
|
939
|
+
}
|
|
939
940
|
});
|
|
940
941
|
} else {
|
|
941
942
|
var dataFrames = dataFramesInState;
|
|
@@ -945,8 +946,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
945
946
|
setDataFramesInState(dataFrames);
|
|
946
947
|
}
|
|
947
948
|
return Options_1.Options.evaluate({
|
|
948
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
949
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
949
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
950
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
950
951
|
}, dataSources, themeFunc, dataFrames);
|
|
951
952
|
}
|
|
952
953
|
} catch (e) {
|
|
@@ -975,6 +976,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
975
976
|
React.useEffect(function () {
|
|
976
977
|
return function () {
|
|
977
978
|
if (useAsyncEvaluatedOptions) {
|
|
979
|
+
isMounted.current = false;
|
|
978
980
|
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
979
981
|
}
|
|
980
982
|
};
|
|
@@ -984,7 +986,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
984
986
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
985
987
|
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
986
988
|
supports = vizConfig.supports;
|
|
987
|
-
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
989
|
+
var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
|
|
988
990
|
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && vizConfig.key !== 'splunk.singlevalue' // For SV missing props msg is not displayed if required props majorValue is missing, instead this will be handled from the component, instead handled within component
|
|
989
991
|
) {
|
|
990
992
|
return React.createElement(MissingPropsMessage_1.default, {
|
|
@@ -1000,7 +1002,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1000
1002
|
if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
|
|
1001
1003
|
var supportedEvents = vizConfig.events;
|
|
1002
1004
|
Object.keys(supportedEvents).forEach(function (eventName) {
|
|
1003
|
-
var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
|
|
1005
|
+
var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
|
|
1004
1006
|
eventCallbackProps[eventCallbackPropName] = null;
|
|
1005
1007
|
// todo: refactor single value and single value icon to send payload from viz
|
|
1006
1008
|
// then remove these lines
|
|
@@ -1043,19 +1045,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1043
1045
|
*/
|
|
1044
1046
|
var dataSourceMetadata = {};
|
|
1045
1047
|
var OptionKey = 'paginateDataSourceKey';
|
|
1046
|
-
var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1047
|
-
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
|
|
1048
|
-
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1049
|
-
var meta = lodash_1.get(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1048
|
+
var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1049
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
|
|
1050
|
+
var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1051
|
+
var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1050
1052
|
var handleRequestParamsChange = function handleRequestParamsChange(payload) {
|
|
1051
1053
|
return onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1052
1054
|
};
|
|
1053
|
-
var sortParams = getSorting_1.getSortingParams({
|
|
1055
|
+
var sortParams = (0, getSorting_1.getSortingParams)({
|
|
1054
1056
|
requestParams: requestParams,
|
|
1055
1057
|
meta: meta,
|
|
1056
1058
|
onRequestParamsChange: handleRequestParamsChange
|
|
1057
1059
|
});
|
|
1058
|
-
var paginatorParams = getPagination_1.getPaginationParams({
|
|
1060
|
+
var paginatorParams = (0, getPagination_1.getPaginationParams)({
|
|
1059
1061
|
requestParams: requestParams,
|
|
1060
1062
|
meta: meta,
|
|
1061
1063
|
onRequestParamsChange: handleRequestParamsChange
|
|
@@ -1083,7 +1085,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1083
1085
|
// attach viz config
|
|
1084
1086
|
DashboardViz.config = vizConfig;
|
|
1085
1087
|
// @ts-ignore: TODO fix sc upgrade TS issues
|
|
1086
|
-
return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1088
|
+
return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1087
1089
|
};
|
|
1088
1090
|
exports.default = withDashboardViz;
|
|
1089
1091
|
|
|
@@ -1312,8 +1314,8 @@ var lodash_1 = __webpack_require__(3);
|
|
|
1312
1314
|
* @param dependencies an array of dependencies
|
|
1313
1315
|
*/
|
|
1314
1316
|
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1315
|
-
var ref = react_1.useRef();
|
|
1316
|
-
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
1317
|
+
var ref = (0, react_1.useRef)();
|
|
1318
|
+
if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
|
|
1317
1319
|
ref.current = {
|
|
1318
1320
|
dependencies: dependencies,
|
|
1319
1321
|
value: fn()
|
|
@@ -1356,7 +1358,7 @@ exports.isMissing = isMissing;
|
|
|
1356
1358
|
*/
|
|
1357
1359
|
var missingKeys = function missingKeys(keys, target) {
|
|
1358
1360
|
return keys.filter(function (k) {
|
|
1359
|
-
return exports.isMissing(target[k]);
|
|
1361
|
+
return (0, exports.isMissing)(target[k]);
|
|
1360
1362
|
});
|
|
1361
1363
|
};
|
|
1362
1364
|
exports.missingKeys = missingKeys;
|
|
@@ -1380,7 +1382,7 @@ var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
|
1380
1382
|
"data-test": "message",
|
|
1381
1383
|
width: width,
|
|
1382
1384
|
height: height,
|
|
1383
|
-
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
1385
|
+
message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
|
|
1384
1386
|
});
|
|
1385
1387
|
};
|
|
1386
1388
|
exports.MissingPropsMessage = MissingPropsMessage;
|
|
@@ -1389,7 +1391,7 @@ exports.MissingPropsMessage.defaultProps = {
|
|
|
1389
1391
|
width: '100%',
|
|
1390
1392
|
height: 250
|
|
1391
1393
|
};
|
|
1392
|
-
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
1394
|
+
exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage);
|
|
1393
1395
|
|
|
1394
1396
|
/***/ }),
|
|
1395
1397
|
/* 46 */
|
|
@@ -1409,7 +1411,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
1409
1411
|
componentId: "sc-1gsbnxb-0"
|
|
1410
1412
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1411
1413
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1412
|
-
'data-splunk-visualization-version': "
|
|
1414
|
+
'data-splunk-visualization-version': "26.0.0 - 2f7458907"
|
|
1413
1415
|
}).withConfig({
|
|
1414
1416
|
displayName: "withEditModeCover__Blocker",
|
|
1415
1417
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1428,7 +1430,7 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
|
|
|
1428
1430
|
"data-test": "edit-mode-cover"
|
|
1429
1431
|
}));
|
|
1430
1432
|
};
|
|
1431
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
1433
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1432
1434
|
Wrapper: Wrapper,
|
|
1433
1435
|
Visualization: Visualization
|
|
1434
1436
|
});
|
|
@@ -1449,7 +1451,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1449
1451
|
var React = __webpack_require__(1);
|
|
1450
1452
|
var colorUtils_1 = __webpack_require__(12);
|
|
1451
1453
|
var variables_1 = __webpack_require__(11);
|
|
1452
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
1454
|
+
var IconPlaceholder_1 = __webpack_require__(32);
|
|
1453
1455
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1454
1456
|
var hocUtils_1 = __webpack_require__(15);
|
|
1455
1457
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
@@ -1464,7 +1466,7 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1464
1466
|
height = props.height,
|
|
1465
1467
|
width = props.width;
|
|
1466
1468
|
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
1467
|
-
var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
1469
|
+
var bgColorFromTheme = (0, colorUtils_1.isColor)(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
1468
1470
|
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
1469
1471
|
var iconColor = variables_1.default.contentColorActive(props);
|
|
1470
1472
|
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
@@ -1479,7 +1481,7 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1479
1481
|
}
|
|
1480
1482
|
return React.createElement(Visualization, Object.assign({}, props));
|
|
1481
1483
|
};
|
|
1482
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
1484
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1483
1485
|
Wrapper: Wrapper,
|
|
1484
1486
|
Visualization: Visualization
|
|
1485
1487
|
});
|
|
@@ -1489,13 +1491,13 @@ exports.default = withPlaceholder;
|
|
|
1489
1491
|
|
|
1490
1492
|
/***/ }),
|
|
1491
1493
|
/* 48 */,
|
|
1492
|
-
/* 49
|
|
1494
|
+
/* 49 */,
|
|
1495
|
+
/* 50 */
|
|
1493
1496
|
/***/ (function(module, exports) {
|
|
1494
1497
|
|
|
1495
1498
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
1496
1499
|
|
|
1497
1500
|
/***/ }),
|
|
1498
|
-
/* 50 */,
|
|
1499
1501
|
/* 51 */,
|
|
1500
1502
|
/* 52 */
|
|
1501
1503
|
/***/ (function(module, exports) {
|
|
@@ -1518,7 +1520,7 @@ var background = function background(_ref) {
|
|
|
1518
1520
|
themes = _ref.themes,
|
|
1519
1521
|
labelPosition = _ref.labelPosition;
|
|
1520
1522
|
return [{
|
|
1521
|
-
label: i18n_1._(label || 'Background'),
|
|
1523
|
+
label: (0, i18n_1._)(label || 'Background'),
|
|
1522
1524
|
option: 'backgroundColor',
|
|
1523
1525
|
editor: 'editor.color',
|
|
1524
1526
|
editorProps: {
|
|
@@ -1538,17 +1540,22 @@ exports.default = background;
|
|
|
1538
1540
|
/* 59 */
|
|
1539
1541
|
/***/ (function(module, exports) {
|
|
1540
1542
|
|
|
1543
|
+
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
1544
|
+
|
|
1545
|
+
/***/ }),
|
|
1546
|
+
/* 60 */
|
|
1547
|
+
/***/ (function(module, exports) {
|
|
1548
|
+
|
|
1541
1549
|
module.exports = require("@splunk/themes");
|
|
1542
1550
|
|
|
1543
1551
|
/***/ }),
|
|
1544
|
-
/*
|
|
1545
|
-
/*
|
|
1552
|
+
/* 61 */,
|
|
1553
|
+
/* 62 */
|
|
1546
1554
|
/***/ (function(module, exports) {
|
|
1547
1555
|
|
|
1548
1556
|
module.exports = require("@splunk/react-ui/Popover");
|
|
1549
1557
|
|
|
1550
1558
|
/***/ }),
|
|
1551
|
-
/* 62 */,
|
|
1552
1559
|
/* 63 */,
|
|
1553
1560
|
/* 64 */,
|
|
1554
1561
|
/* 65 */,
|
|
@@ -1568,7 +1575,12 @@ module.exports = require("@splunk/react-ui/Popover");
|
|
|
1568
1575
|
/* 79 */,
|
|
1569
1576
|
/* 80 */,
|
|
1570
1577
|
/* 81 */,
|
|
1571
|
-
/* 82
|
|
1578
|
+
/* 82 */
|
|
1579
|
+
/***/ (function(module, exports) {
|
|
1580
|
+
|
|
1581
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
1582
|
+
|
|
1583
|
+
/***/ }),
|
|
1572
1584
|
/* 83 */,
|
|
1573
1585
|
/* 84 */,
|
|
1574
1586
|
/* 85 */,
|
|
@@ -1579,21 +1591,16 @@ module.exports = require("@splunk/react-ui/Popover");
|
|
|
1579
1591
|
/* 90 */,
|
|
1580
1592
|
/* 91 */,
|
|
1581
1593
|
/* 92 */,
|
|
1582
|
-
/* 93
|
|
1583
|
-
/***/ (function(module, exports) {
|
|
1584
|
-
|
|
1585
|
-
module.exports = require("@babel/runtime/helpers/typeof");
|
|
1586
|
-
|
|
1587
|
-
/***/ }),
|
|
1594
|
+
/* 93 */,
|
|
1588
1595
|
/* 94 */,
|
|
1589
1596
|
/* 95 */,
|
|
1590
|
-
/* 96
|
|
1597
|
+
/* 96 */,
|
|
1598
|
+
/* 97 */
|
|
1591
1599
|
/***/ (function(module, exports) {
|
|
1592
1600
|
|
|
1593
1601
|
module.exports = require("@splunk/visualizations-shared/dataSourceUtils");
|
|
1594
1602
|
|
|
1595
1603
|
/***/ }),
|
|
1596
|
-
/* 97 */,
|
|
1597
1604
|
/* 98 */,
|
|
1598
1605
|
/* 99 */,
|
|
1599
1606
|
/* 100 */,
|
|
@@ -1614,19 +1621,20 @@ module.exports = require("@splunk/visualizations-shared/dataSourceUtils");
|
|
|
1614
1621
|
/* 115 */,
|
|
1615
1622
|
/* 116 */,
|
|
1616
1623
|
/* 117 */,
|
|
1617
|
-
/* 118
|
|
1624
|
+
/* 118 */,
|
|
1625
|
+
/* 119 */
|
|
1618
1626
|
/***/ (function(module, exports) {
|
|
1619
1627
|
|
|
1620
1628
|
module.exports = require("@splunk/react-ui/Menu");
|
|
1621
1629
|
|
|
1622
1630
|
/***/ }),
|
|
1623
|
-
/*
|
|
1631
|
+
/* 120 */
|
|
1624
1632
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1625
1633
|
|
|
1626
1634
|
"use strict";
|
|
1627
1635
|
|
|
1628
1636
|
|
|
1629
|
-
var _typeof = __webpack_require__(
|
|
1637
|
+
var _typeof = __webpack_require__(82);
|
|
1630
1638
|
var _slicedToArray = __webpack_require__(17);
|
|
1631
1639
|
var _toConsumableArray = __webpack_require__(8);
|
|
1632
1640
|
var _defineProperty = __webpack_require__(7);
|
|
@@ -1634,9 +1642,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1634
1642
|
value: true
|
|
1635
1643
|
});
|
|
1636
1644
|
exports.truncateString = exports.getCustomTimeInterval = exports.getPredefinedTimeInterval = exports.getEpochTime = exports.generateTokenReplacementMap = exports.replaceTokens = exports.mergeFieldActions = exports.mergeEventActions = exports.getFieldSummaryMapping = exports.convertToPayloadFormat = void 0;
|
|
1637
|
-
var time_1 = __webpack_require__(
|
|
1645
|
+
var time_1 = __webpack_require__(206);
|
|
1638
1646
|
var lodash_1 = __webpack_require__(3);
|
|
1639
|
-
var dataUtils_1 = __webpack_require__(
|
|
1647
|
+
var dataUtils_1 = __webpack_require__(121);
|
|
1640
1648
|
// util to convert a field-value map into an object with row.<fieldname>.value keys for payloads
|
|
1641
1649
|
var convertToPayloadFormat = function convertToPayloadFormat(obj) {
|
|
1642
1650
|
var initialValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -1649,7 +1657,7 @@ var convertToPayloadFormat = function convertToPayloadFormat(obj) {
|
|
|
1649
1657
|
exports.convertToPayloadFormat = convertToPayloadFormat;
|
|
1650
1658
|
var getFieldSummaryMapping = function getFieldSummaryMapping(columns, fields) {
|
|
1651
1659
|
// convert the `fieldsummary` payload to an array of objects
|
|
1652
|
-
var arr = dataUtils_1.convertToArrOfObjects(columns, fields);
|
|
1660
|
+
var arr = (0, dataUtils_1.convertToArrOfObjects)(columns, fields);
|
|
1653
1661
|
// forms an array of FieldData elements expected by the @splunk/react-field-summary component
|
|
1654
1662
|
var fieldSummaryData = arr.map(function (d) {
|
|
1655
1663
|
return {
|
|
@@ -1706,8 +1714,8 @@ var mergeFieldActions = function mergeFieldActions(fieldActions1, fieldActions2)
|
|
|
1706
1714
|
fieldActions2WithoutDefault['*'] = '*' in fieldActions2WithoutDefault ? [].concat(_toConsumableArray(fieldActions2WithoutDefault['*']), _toConsumableArray(fieldActions2WithoutDefault.default)) : fieldActions2WithoutDefault.default;
|
|
1707
1715
|
delete fieldActions2WithoutDefault.default;
|
|
1708
1716
|
}
|
|
1709
|
-
return lodash_1.mergeWith(fieldActions1WithoutDefault, fieldActions2WithoutDefault, function (fieldAction1value, fieldAction2value) {
|
|
1710
|
-
return Array.isArray(fieldAction1value) && Array.isArray(fieldAction2value) ? lodash_1.union(fieldAction1value, fieldAction2value) : undefined;
|
|
1717
|
+
return (0, lodash_1.mergeWith)(fieldActions1WithoutDefault, fieldActions2WithoutDefault, function (fieldAction1value, fieldAction2value) {
|
|
1718
|
+
return Array.isArray(fieldAction1value) && Array.isArray(fieldAction2value) ? (0, lodash_1.union)(fieldAction1value, fieldAction2value) : undefined;
|
|
1711
1719
|
});
|
|
1712
1720
|
};
|
|
1713
1721
|
exports.mergeFieldActions = mergeFieldActions;
|
|
@@ -1796,8 +1804,8 @@ var generateTokenReplacementMap = function generateTokenReplacementMap(_ref6) {
|
|
|
1796
1804
|
// handling of _raw and _time fields matches SXML behaviour. Implementation is based on fieldSubstitute() from splunkcore-web-ui
|
|
1797
1805
|
var replacedValue;
|
|
1798
1806
|
if (fieldName === '_time' && typeof fieldValue === 'string') {
|
|
1799
|
-
var splunkTime = time_1.getISOWithTimeZone(fieldValue);
|
|
1800
|
-
var epochTime = exports.getEpochTime(splunkTime);
|
|
1807
|
+
var splunkTime = (0, time_1.getISOWithTimeZone)(fieldValue);
|
|
1808
|
+
var epochTime = (0, exports.getEpochTime)(splunkTime);
|
|
1801
1809
|
replacedValue = Math.floor(epochTime).toString();
|
|
1802
1810
|
} else if (fieldName === '_raw' && _typeof(fieldValue) === 'object') {
|
|
1803
1811
|
var rawFieldValue = Array.isArray(fieldValue) ? fieldValue[0] : fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.value;
|
|
@@ -1813,7 +1821,7 @@ exports.generateTokenReplacementMap = generateTokenReplacementMap;
|
|
|
1813
1821
|
// return epoch unix timestamp in seconds
|
|
1814
1822
|
var getEpochTime = function getEpochTime(time) {
|
|
1815
1823
|
// if not a valid time string, then indicate an error and return NaN.
|
|
1816
|
-
if (!time_1.isISO(time)) {
|
|
1824
|
+
if (!(0, time_1.isISO)(time)) {
|
|
1817
1825
|
console.error("'".concat(time, "' is not a valid time string."));
|
|
1818
1826
|
return NaN;
|
|
1819
1827
|
}
|
|
@@ -1835,7 +1843,7 @@ exports.getEpochTime = getEpochTime;
|
|
|
1835
1843
|
var getPredefinedTimeInterval = function getPredefinedTimeInterval(_ref9) {
|
|
1836
1844
|
var time = _ref9.time,
|
|
1837
1845
|
when = _ref9.when;
|
|
1838
|
-
var epochTime = exports.getEpochTime(time);
|
|
1846
|
+
var epochTime = (0, exports.getEpochTime)(time);
|
|
1839
1847
|
switch (when) {
|
|
1840
1848
|
case 'before':
|
|
1841
1849
|
return {
|
|
@@ -1878,7 +1886,7 @@ var getCustomTimeInterval = function getCustomTimeInterval(_ref10) {
|
|
|
1878
1886
|
rangeType = _ref10.rangeType,
|
|
1879
1887
|
rangeAmount = _ref10.rangeAmount,
|
|
1880
1888
|
rangeUnit = _ref10.rangeUnit;
|
|
1881
|
-
var timeRange = time_1.getAcceleratedTimeRange(time, rangeAmount, rangeUnit);
|
|
1889
|
+
var timeRange = (0, time_1.getAcceleratedTimeRange)(time, rangeAmount, rangeUnit);
|
|
1882
1890
|
var timeInterval;
|
|
1883
1891
|
if (rangeType === 'plusminus') {
|
|
1884
1892
|
timeInterval = Object.assign({}, timeRange);
|
|
@@ -1893,8 +1901,8 @@ var getCustomTimeInterval = function getCustomTimeInterval(_ref10) {
|
|
|
1893
1901
|
}
|
|
1894
1902
|
// converts to use epoch time in the interval, and adds 0.001 to `latest` per spec
|
|
1895
1903
|
return {
|
|
1896
|
-
earliest: exports.getEpochTime(timeInterval.earliest),
|
|
1897
|
-
latest: exports.getEpochTime(timeInterval.latest) + 0.001
|
|
1904
|
+
earliest: (0, exports.getEpochTime)(timeInterval.earliest),
|
|
1905
|
+
latest: (0, exports.getEpochTime)(timeInterval.latest) + 0.001
|
|
1898
1906
|
};
|
|
1899
1907
|
};
|
|
1900
1908
|
exports.getCustomTimeInterval = getCustomTimeInterval;
|
|
@@ -1917,7 +1925,7 @@ var truncateString = function truncateString(stringToTruncate) {
|
|
|
1917
1925
|
exports.truncateString = truncateString;
|
|
1918
1926
|
|
|
1919
1927
|
/***/ }),
|
|
1920
|
-
/*
|
|
1928
|
+
/* 121 */
|
|
1921
1929
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1922
1930
|
|
|
1923
1931
|
"use strict";
|
|
@@ -1951,31 +1959,30 @@ var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
|
|
|
1951
1959
|
exports.convertToArrOfObjects = convertToArrOfObjects;
|
|
1952
1960
|
|
|
1953
1961
|
/***/ }),
|
|
1954
|
-
/*
|
|
1962
|
+
/* 122 */
|
|
1955
1963
|
/***/ (function(module, exports) {
|
|
1956
1964
|
|
|
1957
1965
|
module.exports = require("@splunk/react-ui/Markdown");
|
|
1958
1966
|
|
|
1959
1967
|
/***/ }),
|
|
1960
|
-
/*
|
|
1968
|
+
/* 123 */
|
|
1961
1969
|
/***/ (function(module, exports) {
|
|
1962
1970
|
|
|
1963
1971
|
module.exports = require("@splunk/react-ui/Button");
|
|
1964
1972
|
|
|
1965
1973
|
/***/ }),
|
|
1966
|
-
/*
|
|
1974
|
+
/* 124 */
|
|
1967
1975
|
/***/ (function(module, exports) {
|
|
1968
1976
|
|
|
1969
1977
|
module.exports = require("@splunk/react-ui/Message");
|
|
1970
1978
|
|
|
1971
1979
|
/***/ }),
|
|
1972
|
-
/*
|
|
1980
|
+
/* 125 */
|
|
1973
1981
|
/***/ (function(module, exports) {
|
|
1974
1982
|
|
|
1975
1983
|
module.exports = require("@splunk/react-ui/Heading");
|
|
1976
1984
|
|
|
1977
1985
|
/***/ }),
|
|
1978
|
-
/* 125 */,
|
|
1979
1986
|
/* 126 */,
|
|
1980
1987
|
/* 127 */,
|
|
1981
1988
|
/* 128 */,
|
|
@@ -1997,7 +2004,10 @@ module.exports = require("@splunk/react-ui/Heading");
|
|
|
1997
2004
|
/* 144 */,
|
|
1998
2005
|
/* 145 */,
|
|
1999
2006
|
/* 146 */,
|
|
2000
|
-
/* 147
|
|
2007
|
+
/* 147 */,
|
|
2008
|
+
/* 148 */,
|
|
2009
|
+
/* 149 */,
|
|
2010
|
+
/* 150 */
|
|
2001
2011
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2002
2012
|
|
|
2003
2013
|
"use strict";
|
|
@@ -2018,14 +2028,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2018
2028
|
});
|
|
2019
2029
|
exports.replaceTokens = exports.PureEvents = exports.config = exports.themes = exports.computeVizProps = exports.showPlaceHolderIcon = void 0;
|
|
2020
2030
|
var lodash_1 = __webpack_require__(3);
|
|
2021
|
-
var dataSourceUtils_1 = __webpack_require__(
|
|
2031
|
+
var dataSourceUtils_1 = __webpack_require__(97);
|
|
2022
2032
|
var withDashboardViz_1 = __webpack_require__(36);
|
|
2023
|
-
var constants_1 = __webpack_require__(
|
|
2024
|
-
var config_1 = __webpack_require__(
|
|
2033
|
+
var constants_1 = __webpack_require__(151);
|
|
2034
|
+
var config_1 = __webpack_require__(203);
|
|
2025
2035
|
exports.config = config_1.default;
|
|
2026
|
-
var PureEvents_1 = __webpack_require__(
|
|
2036
|
+
var PureEvents_1 = __webpack_require__(204);
|
|
2027
2037
|
exports.PureEvents = PureEvents_1.default;
|
|
2028
|
-
var EventUtils_1 = __webpack_require__(
|
|
2038
|
+
var EventUtils_1 = __webpack_require__(120);
|
|
2029
2039
|
Object.defineProperty(exports, "replaceTokens", {
|
|
2030
2040
|
enumerable: true,
|
|
2031
2041
|
get: function get() {
|
|
@@ -2038,9 +2048,9 @@ Object.defineProperty(exports, "replaceTokens", {
|
|
|
2038
2048
|
* @returns {Boolean} return true if loading, error, non existent state or without columns in dataSources
|
|
2039
2049
|
*/
|
|
2040
2050
|
var showPlaceHolderIcon = function showPlaceHolderIcon(dataSources) {
|
|
2041
|
-
var columns = lodash_1.get(dataSources, 'primary.data.columns', undefined);
|
|
2051
|
+
var columns = (0, lodash_1.get)(dataSources, 'primary.data.columns', undefined);
|
|
2042
2052
|
var noColumns = columns === undefined;
|
|
2043
|
-
var dataSourceState = dataSourceUtils_1.getDataSourceStateInfo(dataSources);
|
|
2053
|
+
var dataSourceState = (0, dataSourceUtils_1.getDataSourceStateInfo)(dataSources);
|
|
2044
2054
|
return dataSourceState === dataSourceUtils_1.DataSourceState.ERROR || dataSourceState === dataSourceUtils_1.DataSourceState.LOADING || dataSourceState === dataSourceUtils_1.DataSourceState.NONEXISTENT || noColumns;
|
|
2045
2055
|
};
|
|
2046
2056
|
exports.showPlaceHolderIcon = showPlaceHolderIcon;
|
|
@@ -2055,13 +2065,13 @@ var computeVizProps = function computeVizProps(_a) {
|
|
|
2055
2065
|
});
|
|
2056
2066
|
};
|
|
2057
2067
|
exports.computeVizProps = computeVizProps;
|
|
2058
|
-
var Events = withDashboardViz_1.default({
|
|
2068
|
+
var Events = (0, withDashboardViz_1.default)({
|
|
2059
2069
|
ReactViz: PureEvents_1.default,
|
|
2060
2070
|
vizConfig: config_1.default,
|
|
2061
2071
|
computeVizProps: exports.computeVizProps,
|
|
2062
2072
|
disableEditModeCover: true,
|
|
2063
2073
|
useIconPlaceholder: function useIconPlaceholder(dataSources) {
|
|
2064
|
-
return exports.showPlaceHolderIcon(dataSources);
|
|
2074
|
+
return (0, exports.showPlaceHolderIcon)(dataSources);
|
|
2065
2075
|
}
|
|
2066
2076
|
});
|
|
2067
2077
|
var themes = config_1.default.themes;
|
|
@@ -2069,7 +2079,7 @@ exports.themes = themes;
|
|
|
2069
2079
|
exports.default = Events;
|
|
2070
2080
|
|
|
2071
2081
|
/***/ }),
|
|
2072
|
-
/*
|
|
2082
|
+
/* 151 */
|
|
2073
2083
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2074
2084
|
|
|
2075
2085
|
"use strict";
|
|
@@ -2081,7 +2091,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2081
2091
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY_DATASOURCE", function() { return EMPTY_DATASOURCE; });
|
|
2082
2092
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FIELDSUMMARY_DS_STORYBOOK", function() { return FIELDSUMMARY_DS_STORYBOOK; });
|
|
2083
2093
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FIELDSUMMARY_DS_DOC_HUB", function() { return FIELDSUMMARY_DS_DOC_HUB; });
|
|
2084
|
-
/* harmony import */ var _splunk_datasource_utils_DataSet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2094
|
+
/* harmony import */ var _splunk_datasource_utils_DataSet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
|
|
2085
2095
|
/* harmony import */ var _splunk_datasource_utils_DataSet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_datasource_utils_DataSet__WEBPACK_IMPORTED_MODULE_0__);
|
|
2086
2096
|
// TODO: convert this file to .ts - created as .js as copied from SUI EventsViewer repo
|
|
2087
2097
|
|
|
@@ -2565,15 +2575,12 @@ var FIELDSUMMARY_DS_DOC_HUB = {
|
|
|
2565
2575
|
};
|
|
2566
2576
|
|
|
2567
2577
|
/***/ }),
|
|
2568
|
-
/*
|
|
2578
|
+
/* 152 */
|
|
2569
2579
|
/***/ (function(module, exports) {
|
|
2570
2580
|
|
|
2571
2581
|
module.exports = require("@splunk/visualization-context/EventsContext");
|
|
2572
2582
|
|
|
2573
2583
|
/***/ }),
|
|
2574
|
-
/* 150 */,
|
|
2575
|
-
/* 151 */,
|
|
2576
|
-
/* 152 */,
|
|
2577
2584
|
/* 153 */,
|
|
2578
2585
|
/* 154 */,
|
|
2579
2586
|
/* 155 */,
|
|
@@ -2587,15 +2594,15 @@ module.exports = require("@splunk/visualization-context/EventsContext");
|
|
|
2587
2594
|
/* 163 */,
|
|
2588
2595
|
/* 164 */,
|
|
2589
2596
|
/* 165 */,
|
|
2590
|
-
/* 166
|
|
2597
|
+
/* 166 */,
|
|
2598
|
+
/* 167 */,
|
|
2599
|
+
/* 168 */,
|
|
2600
|
+
/* 169 */
|
|
2591
2601
|
/***/ (function(module, exports) {
|
|
2592
2602
|
|
|
2593
2603
|
module.exports = require("@splunk/datasource-utils/DataSet");
|
|
2594
2604
|
|
|
2595
2605
|
/***/ }),
|
|
2596
|
-
/* 167 */,
|
|
2597
|
-
/* 168 */,
|
|
2598
|
-
/* 169 */,
|
|
2599
2606
|
/* 170 */,
|
|
2600
2607
|
/* 171 */,
|
|
2601
2608
|
/* 172 */,
|
|
@@ -2625,7 +2632,10 @@ module.exports = require("@splunk/datasource-utils/DataSet");
|
|
|
2625
2632
|
/* 196 */,
|
|
2626
2633
|
/* 197 */,
|
|
2627
2634
|
/* 198 */,
|
|
2628
|
-
/* 199
|
|
2635
|
+
/* 199 */,
|
|
2636
|
+
/* 200 */,
|
|
2637
|
+
/* 201 */,
|
|
2638
|
+
/* 202 */
|
|
2629
2639
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2630
2640
|
|
|
2631
2641
|
"use strict";
|
|
@@ -2633,12 +2643,16 @@ module.exports = require("@splunk/datasource-utils/DataSet");
|
|
|
2633
2643
|
|
|
2634
2644
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
2635
2645
|
if (k2 === undefined) k2 = k;
|
|
2636
|
-
Object.
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2646
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2647
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2648
|
+
desc = {
|
|
2649
|
+
enumerable: true,
|
|
2650
|
+
get: function get() {
|
|
2651
|
+
return m[k];
|
|
2652
|
+
}
|
|
2653
|
+
};
|
|
2654
|
+
}
|
|
2655
|
+
Object.defineProperty(o, k2, desc);
|
|
2642
2656
|
} : function (o, m, k, k2) {
|
|
2643
2657
|
if (k2 === undefined) k2 = k;
|
|
2644
2658
|
o[k2] = m[k];
|
|
@@ -2652,8 +2666,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2652
2666
|
value: true
|
|
2653
2667
|
});
|
|
2654
2668
|
exports.default = void 0;
|
|
2655
|
-
__exportStar(__webpack_require__(
|
|
2656
|
-
var Events_1 = __webpack_require__(
|
|
2669
|
+
__exportStar(__webpack_require__(150), exports);
|
|
2670
|
+
var Events_1 = __webpack_require__(150);
|
|
2657
2671
|
Object.defineProperty(exports, "default", {
|
|
2658
2672
|
enumerable: true,
|
|
2659
2673
|
get: function get() {
|
|
@@ -2662,7 +2676,7 @@ Object.defineProperty(exports, "default", {
|
|
|
2662
2676
|
});
|
|
2663
2677
|
|
|
2664
2678
|
/***/ }),
|
|
2665
|
-
/*
|
|
2679
|
+
/* 203 */
|
|
2666
2680
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2667
2681
|
|
|
2668
2682
|
"use strict";
|
|
@@ -2672,9 +2686,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2672
2686
|
value: true
|
|
2673
2687
|
});
|
|
2674
2688
|
var visualization_icons_1 = __webpack_require__(52);
|
|
2675
|
-
var placeholders_1 = __webpack_require__(
|
|
2689
|
+
var placeholders_1 = __webpack_require__(50);
|
|
2676
2690
|
var schemaUtils_1 = __webpack_require__(16);
|
|
2677
|
-
var themes_1 = __webpack_require__(
|
|
2691
|
+
var themes_1 = __webpack_require__(60);
|
|
2678
2692
|
var i18n_1 = __webpack_require__(2);
|
|
2679
2693
|
var VizBehavior_1 = __webpack_require__(6);
|
|
2680
2694
|
var VizCategory_1 = __webpack_require__(35);
|
|
@@ -2817,7 +2831,7 @@ var optionsSchema = {
|
|
|
2817
2831
|
};
|
|
2818
2832
|
var themes = {
|
|
2819
2833
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
2820
|
-
return themes_1.pick({
|
|
2834
|
+
return (0, themes_1.pick)({
|
|
2821
2835
|
enterprise: {
|
|
2822
2836
|
dark: themes_1.variables.black(props),
|
|
2823
2837
|
light: themes_1.variables.backgroundColor(props)
|
|
@@ -2827,9 +2841,9 @@ var themes = {
|
|
|
2827
2841
|
}
|
|
2828
2842
|
};
|
|
2829
2843
|
var editorConfig = [{
|
|
2830
|
-
label: i18n_1._('Data display'),
|
|
2844
|
+
label: (0, i18n_1._)('Data display'),
|
|
2831
2845
|
layout: [[{
|
|
2832
|
-
label: i18n_1._('Show field summary'),
|
|
2846
|
+
label: (0, i18n_1._)('Show field summary'),
|
|
2833
2847
|
option: 'showFieldSummary',
|
|
2834
2848
|
editor: 'editor.checkbox',
|
|
2835
2849
|
editorProps: {
|
|
@@ -2837,8 +2851,8 @@ var editorConfig = [{
|
|
|
2837
2851
|
}
|
|
2838
2852
|
}]]
|
|
2839
2853
|
}, {
|
|
2840
|
-
label: i18n_1._('Color and style'),
|
|
2841
|
-
layout: [BackgroundColor_1.default({
|
|
2854
|
+
label: (0, i18n_1._)('Color and style'),
|
|
2855
|
+
layout: [(0, BackgroundColor_1.default)({
|
|
2842
2856
|
themes: themes
|
|
2843
2857
|
})]
|
|
2844
2858
|
}];
|
|
@@ -2853,7 +2867,7 @@ var config = {
|
|
|
2853
2867
|
/**
|
|
2854
2868
|
* viz name
|
|
2855
2869
|
*/
|
|
2856
|
-
name: i18n_1._('Events'),
|
|
2870
|
+
name: (0, i18n_1._)('Events'),
|
|
2857
2871
|
category: VizCategory_1.VizCategory.TABLE,
|
|
2858
2872
|
status: 'preview',
|
|
2859
2873
|
/**
|
|
@@ -2887,16 +2901,16 @@ var config = {
|
|
|
2887
2901
|
themes: themes,
|
|
2888
2902
|
requiredProps: []
|
|
2889
2903
|
};
|
|
2890
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
2904
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
2891
2905
|
|
|
2892
2906
|
/***/ }),
|
|
2893
|
-
/*
|
|
2907
|
+
/* 204 */
|
|
2894
2908
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2895
2909
|
|
|
2896
2910
|
"use strict";
|
|
2897
2911
|
|
|
2898
2912
|
|
|
2899
|
-
var _typeof = __webpack_require__(
|
|
2913
|
+
var _typeof = __webpack_require__(82);
|
|
2900
2914
|
var _slicedToArray = __webpack_require__(17);
|
|
2901
2915
|
Object.defineProperty(exports, "__esModule", {
|
|
2902
2916
|
value: true
|
|
@@ -2904,34 +2918,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2904
2918
|
var React = __webpack_require__(1);
|
|
2905
2919
|
var react_1 = __webpack_require__(1);
|
|
2906
2920
|
var T = __webpack_require__(0);
|
|
2907
|
-
var EventsViewer_1 = __webpack_require__(
|
|
2921
|
+
var EventsViewer_1 = __webpack_require__(205);
|
|
2908
2922
|
var styled_components_1 = __webpack_require__(4);
|
|
2909
2923
|
var pick_1 = __webpack_require__(23);
|
|
2910
2924
|
var variables_1 = __webpack_require__(11);
|
|
2911
2925
|
var colorUtils_1 = __webpack_require__(12);
|
|
2912
2926
|
var style_1 = __webpack_require__(14);
|
|
2913
|
-
var EventsContext_1 = __webpack_require__(
|
|
2927
|
+
var EventsContext_1 = __webpack_require__(152);
|
|
2914
2928
|
var lodash_1 = __webpack_require__(3);
|
|
2915
|
-
var Menu_1 = __webpack_require__(
|
|
2916
|
-
var constants_1 = __webpack_require__(
|
|
2929
|
+
var Menu_1 = __webpack_require__(119);
|
|
2930
|
+
var constants_1 = __webpack_require__(151);
|
|
2917
2931
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
2918
|
-
var EventUtils_1 = __webpack_require__(
|
|
2919
|
-
var FieldSummaryTooltip_1 = __webpack_require__(
|
|
2920
|
-
var TimeControlsPopover_1 = __webpack_require__(
|
|
2932
|
+
var EventUtils_1 = __webpack_require__(120);
|
|
2933
|
+
var FieldSummaryTooltip_1 = __webpack_require__(207);
|
|
2934
|
+
var TimeControlsPopover_1 = __webpack_require__(209);
|
|
2921
2935
|
// Inspired by VizTableContainer in PureTable.tsx
|
|
2922
2936
|
var EventsContainer = styled_components_1.default.div.withConfig({
|
|
2923
2937
|
displayName: "PureEvents__EventsContainer",
|
|
2924
2938
|
componentId: "iniqvm-0"
|
|
2925
|
-
})(["width:", ";height:", ";box-sizing:border-box;padding:", ";display:flex;flex-flow:column nowrap;overflow:hidden;background-color:", ";table[data-test='main-table']{background-color:", ";}table[data-test='main-table']{td:nth-child(3){word-break:break-word;white-space:pre-
|
|
2926
|
-
return lodash_1.isNumber(props.width) ? "".concat(props.width, "px") : props.width;
|
|
2939
|
+
})(["width:", ";height:", ";box-sizing:border-box;padding:", ";display:flex;flex-flow:column nowrap;overflow:hidden;background-color:", ";table[data-test='main-table']{background-color:", ";}table[data-test='main-table']{td:nth-child(3){word-break:break-word;white-space:pre-wrap;}}"], function (props) {
|
|
2940
|
+
return (0, lodash_1.isNumber)(props.width) ? "".concat(props.width, "px") : props.width;
|
|
2927
2941
|
}, function (props) {
|
|
2928
|
-
return lodash_1.isNumber(props.height) ? "".concat(props.height, "px") : props.height;
|
|
2929
|
-
}, pick_1.default({
|
|
2942
|
+
return (0, lodash_1.isNumber)(props.height) ? "".concat(props.height, "px") : props.height;
|
|
2943
|
+
}, (0, pick_1.default)({
|
|
2930
2944
|
enterprise: variables_1.default.spacingHalf,
|
|
2931
2945
|
prisma: variables_1.default.spacingSmall
|
|
2932
2946
|
}), function (props) {
|
|
2933
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
2934
|
-
}, pick_1.default({
|
|
2947
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
2948
|
+
}, (0, pick_1.default)({
|
|
2935
2949
|
enterprise: variables_1.default.backgroundColorPage,
|
|
2936
2950
|
prisma: variables_1.default.backgroundColorPage
|
|
2937
2951
|
}));
|
|
@@ -2943,7 +2957,7 @@ var SUIEventsViewerContainer = styled_components_1.default.div.withConfig({
|
|
|
2943
2957
|
var width = _ref.width,
|
|
2944
2958
|
height = _ref.height,
|
|
2945
2959
|
theme = _ref.theme;
|
|
2946
|
-
var padding = pick_1.default({
|
|
2960
|
+
var padding = (0, pick_1.default)({
|
|
2947
2961
|
enterprise: variables_1.default.spacingHalf({
|
|
2948
2962
|
theme: theme
|
|
2949
2963
|
}),
|
|
@@ -2954,7 +2968,7 @@ var SUIEventsViewerContainer = styled_components_1.default.div.withConfig({
|
|
|
2954
2968
|
theme: theme
|
|
2955
2969
|
});
|
|
2956
2970
|
var paddingOffset = parseInt(padding, 10) * 2;
|
|
2957
|
-
return style_1.toDimension({
|
|
2971
|
+
return (0, style_1.toDimension)({
|
|
2958
2972
|
width: width - paddingOffset,
|
|
2959
2973
|
height: height - paddingOffset
|
|
2960
2974
|
});
|
|
@@ -2979,24 +2993,24 @@ var PureEvents = function PureEvents(props) {
|
|
|
2979
2993
|
var fieldSummaryMap = React.useMemo(function () {
|
|
2980
2994
|
var _a, _b, _c, _d;
|
|
2981
2995
|
// if the `fieldsummary` datasource isn't configured, no field summary can be shown
|
|
2982
|
-
if (!showFieldSummary || !lodash_1.get(dataSources, 'fieldsummary')) {
|
|
2996
|
+
if (!showFieldSummary || !(0, lodash_1.get)(dataSources, 'fieldsummary')) {
|
|
2983
2997
|
return {};
|
|
2984
2998
|
}
|
|
2985
2999
|
try {
|
|
2986
|
-
var fieldSummaryMapping = EventUtils_1.getFieldSummaryMapping((_b = (_a = dataSources.fieldsummary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.columns, (_d = (_c = dataSources.fieldsummary) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.fields);
|
|
3000
|
+
var fieldSummaryMapping = (0, EventUtils_1.getFieldSummaryMapping)((_b = (_a = dataSources.fieldsummary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.columns, (_d = (_c = dataSources.fieldsummary) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.fields);
|
|
2987
3001
|
return fieldSummaryMapping;
|
|
2988
3002
|
} catch (e) {
|
|
2989
3003
|
console.error("Unexpected error parsing fieldsummary datasource: + ".concat(e.message));
|
|
2990
3004
|
return {};
|
|
2991
3005
|
}
|
|
2992
3006
|
}, [dataSources, showFieldSummary]);
|
|
2993
|
-
var
|
|
2994
|
-
|
|
2995
|
-
eventActionsContext =
|
|
2996
|
-
|
|
2997
|
-
fieldActionsContext =
|
|
2998
|
-
var eventActions = EventUtils_1.mergeEventActions(eventActionsProps, eventActionsContext);
|
|
2999
|
-
var fieldActions = EventUtils_1.mergeFieldActions(fieldActionsProps, fieldActionsContext);
|
|
3007
|
+
var _ref2 = (0, react_1.useContext)(EventsContext_1.default),
|
|
3008
|
+
_ref2$eventActions = _ref2.eventActions,
|
|
3009
|
+
eventActionsContext = _ref2$eventActions === void 0 ? [] : _ref2$eventActions,
|
|
3010
|
+
_ref2$fieldActions = _ref2.fieldActions,
|
|
3011
|
+
fieldActionsContext = _ref2$fieldActions === void 0 ? {} : _ref2$fieldActions;
|
|
3012
|
+
var eventActions = (0, EventUtils_1.mergeEventActions)(eventActionsProps, eventActionsContext);
|
|
3013
|
+
var fieldActions = (0, EventUtils_1.mergeFieldActions)(fieldActionsProps, fieldActionsContext);
|
|
3000
3014
|
var _React$useState = React.useState(null),
|
|
3001
3015
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
3002
3016
|
fieldSummaryField = _React$useState2[0],
|
|
@@ -3016,15 +3030,15 @@ var PureEvents = function PureEvents(props) {
|
|
|
3016
3030
|
// and eventActionComponent (needs to be Menu.Item and will be rendered inside a Menu component)
|
|
3017
3031
|
// to display in the Event Actions dropdown
|
|
3018
3032
|
var renderEventActions = React.useMemo(function () {
|
|
3019
|
-
return !Array.isArray(eventActions) ? [] : eventActions.map(function (
|
|
3020
|
-
var eventType =
|
|
3021
|
-
label =
|
|
3022
|
-
|
|
3023
|
-
eventtypeValues =
|
|
3024
|
-
|
|
3025
|
-
fieldFilters =
|
|
3033
|
+
return !Array.isArray(eventActions) ? [] : eventActions.map(function (_ref3) {
|
|
3034
|
+
var eventType = _ref3.eventType,
|
|
3035
|
+
label = _ref3.label,
|
|
3036
|
+
_ref3$eventtypeValues = _ref3.eventtypeValues,
|
|
3037
|
+
eventtypeValues = _ref3$eventtypeValues === void 0 ? [] : _ref3$eventtypeValues,
|
|
3038
|
+
_ref3$fieldFilters = _ref3.fieldFilters,
|
|
3039
|
+
fieldFilters = _ref3$fieldFilters === void 0 ? [] : _ref3$fieldFilters;
|
|
3026
3040
|
var onMenuItemClick = function onMenuItemClick(e, eventActionProps, tokenReplacementMap) {
|
|
3027
|
-
var payload = EventUtils_1.convertToPayloadFormat(eventActionProps.event, {
|
|
3041
|
+
var payload = (0, EventUtils_1.convertToPayloadFormat)(eventActionProps.event, {
|
|
3028
3042
|
tokenReplacementMap: tokenReplacementMap
|
|
3029
3043
|
});
|
|
3030
3044
|
onEventTrigger({
|
|
@@ -3037,19 +3051,19 @@ var PureEvents = function PureEvents(props) {
|
|
|
3037
3051
|
var rowIndex = eventActionProps.rowIndex,
|
|
3038
3052
|
pageNumber = eventActionProps.pageNumber,
|
|
3039
3053
|
event = eventActionProps.event;
|
|
3040
|
-
var tokenReplacementMap = EventUtils_1.generateTokenReplacementMap({
|
|
3054
|
+
var tokenReplacementMap = (0, EventUtils_1.generateTokenReplacementMap)({
|
|
3041
3055
|
dataSources: dataSources,
|
|
3042
3056
|
rowIndex: rowIndex,
|
|
3043
3057
|
pageNumber: pageNumber,
|
|
3044
3058
|
event: event
|
|
3045
3059
|
});
|
|
3046
|
-
var replacedLabel = EventUtils_1.replaceTokens({
|
|
3060
|
+
var replacedLabel = (0, EventUtils_1.replaceTokens)({
|
|
3047
3061
|
text: label,
|
|
3048
3062
|
tokenReplacementMap: tokenReplacementMap,
|
|
3049
3063
|
allowSpecialParametersEscape: false,
|
|
3050
3064
|
allowFieldValuesEscape: false
|
|
3051
3065
|
});
|
|
3052
|
-
var truncatedLabel = EventUtils_1.truncateString(replacedLabel);
|
|
3066
|
+
var truncatedLabel = (0, EventUtils_1.truncateString)(replacedLabel);
|
|
3053
3067
|
return React.createElement(Menu_1.default.Item, {
|
|
3054
3068
|
key: "event-action-".concat(truncatedLabel),
|
|
3055
3069
|
onClick: function onClick(e) {
|
|
@@ -3070,17 +3084,17 @@ var PureEvents = function PureEvents(props) {
|
|
|
3070
3084
|
var renderFieldActions = React.useMemo(function () {
|
|
3071
3085
|
if (_typeof(fieldActions) !== 'object') return {};
|
|
3072
3086
|
var fieldActionsMap = {};
|
|
3073
|
-
Object.entries(fieldActions).forEach(function (
|
|
3074
|
-
var
|
|
3075
|
-
currentFieldName =
|
|
3076
|
-
currentFieldActions =
|
|
3077
|
-
fieldActionsMap[currentFieldName] = currentFieldActions.map(function (
|
|
3078
|
-
var eventType =
|
|
3079
|
-
label =
|
|
3080
|
-
|
|
3081
|
-
eventtypeValues =
|
|
3087
|
+
Object.entries(fieldActions).forEach(function (_ref4) {
|
|
3088
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
3089
|
+
currentFieldName = _ref5[0],
|
|
3090
|
+
currentFieldActions = _ref5[1];
|
|
3091
|
+
fieldActionsMap[currentFieldName] = currentFieldActions.map(function (_ref6) {
|
|
3092
|
+
var eventType = _ref6.eventType,
|
|
3093
|
+
label = _ref6.label,
|
|
3094
|
+
_ref6$eventtypeValues = _ref6.eventtypeValues,
|
|
3095
|
+
eventtypeValues = _ref6$eventtypeValues === void 0 ? [] : _ref6$eventtypeValues;
|
|
3082
3096
|
var onMenuItemClick = function onMenuItemClick(e, fieldActionProps, tokenReplacementMap) {
|
|
3083
|
-
var payload = EventUtils_1.convertToPayloadFormat(fieldActionProps.event, {
|
|
3097
|
+
var payload = (0, EventUtils_1.convertToPayloadFormat)(fieldActionProps.event, {
|
|
3084
3098
|
name: fieldActionProps.field,
|
|
3085
3099
|
value: fieldActionProps.value,
|
|
3086
3100
|
tokenReplacementMap: tokenReplacementMap
|
|
@@ -3097,7 +3111,7 @@ var PureEvents = function PureEvents(props) {
|
|
|
3097
3111
|
rowIndex = fieldActionProps.rowIndex,
|
|
3098
3112
|
pageNumber = fieldActionProps.pageNumber,
|
|
3099
3113
|
event = fieldActionProps.event;
|
|
3100
|
-
var tokenReplacementMap = EventUtils_1.generateTokenReplacementMap({
|
|
3114
|
+
var tokenReplacementMap = (0, EventUtils_1.generateTokenReplacementMap)({
|
|
3101
3115
|
dataSources: dataSources,
|
|
3102
3116
|
rowIndex: rowIndex,
|
|
3103
3117
|
pageNumber: pageNumber,
|
|
@@ -3105,13 +3119,13 @@ var PureEvents = function PureEvents(props) {
|
|
|
3105
3119
|
value: value,
|
|
3106
3120
|
event: event
|
|
3107
3121
|
});
|
|
3108
|
-
var replacedLabel = EventUtils_1.replaceTokens({
|
|
3122
|
+
var replacedLabel = (0, EventUtils_1.replaceTokens)({
|
|
3109
3123
|
text: label,
|
|
3110
3124
|
tokenReplacementMap: tokenReplacementMap,
|
|
3111
3125
|
allowSpecialParametersEscape: false,
|
|
3112
3126
|
allowFieldValuesEscape: false
|
|
3113
3127
|
});
|
|
3114
|
-
var truncatedLabel = EventUtils_1.truncateString(replacedLabel);
|
|
3128
|
+
var truncatedLabel = (0, EventUtils_1.truncateString)(replacedLabel);
|
|
3115
3129
|
return React.createElement(Menu_1.default.Item, {
|
|
3116
3130
|
key: "".concat(currentFieldName, "-field-action-").concat(truncatedLabel),
|
|
3117
3131
|
onClick: function onClick(e) {
|
|
@@ -3134,19 +3148,19 @@ var PureEvents = function PureEvents(props) {
|
|
|
3134
3148
|
footerFields: footerFields,
|
|
3135
3149
|
fieldValueHighlightMap: highlightValuesByField
|
|
3136
3150
|
};
|
|
3137
|
-
var handleFieldClicked = showFieldSummary && function (e,
|
|
3138
|
-
var field =
|
|
3151
|
+
var handleFieldClicked = showFieldSummary && function (e, _ref7) {
|
|
3152
|
+
var field = _ref7.field;
|
|
3139
3153
|
setFieldSummaryField(field);
|
|
3140
3154
|
setFieldSummaryAnchor(e.currentTarget.parentElement);
|
|
3141
3155
|
};
|
|
3142
|
-
var handleTimeClicked = function handleTimeClicked(e,
|
|
3143
|
-
var time =
|
|
3156
|
+
var handleTimeClicked = function handleTimeClicked(e, _ref8) {
|
|
3157
|
+
var time = _ref8.time;
|
|
3144
3158
|
setTimeValue(time);
|
|
3145
3159
|
setTimeFieldAnchor(e.currentTarget);
|
|
3146
3160
|
};
|
|
3147
|
-
var handleValueClicked = function handleValueClicked(e,
|
|
3148
|
-
var field =
|
|
3149
|
-
value =
|
|
3161
|
+
var handleValueClicked = function handleValueClicked(e, _ref9) {
|
|
3162
|
+
var field = _ref9.field,
|
|
3163
|
+
value = _ref9.value;
|
|
3150
3164
|
onEventTrigger({
|
|
3151
3165
|
originalEvent: e,
|
|
3152
3166
|
type: 'value.click',
|
|
@@ -3156,9 +3170,9 @@ var PureEvents = function PureEvents(props) {
|
|
|
3156
3170
|
}
|
|
3157
3171
|
});
|
|
3158
3172
|
};
|
|
3159
|
-
var handleTagClicked = function handleTagClicked(e,
|
|
3160
|
-
var field =
|
|
3161
|
-
value =
|
|
3173
|
+
var handleTagClicked = function handleTagClicked(e, _ref10) {
|
|
3174
|
+
var field = _ref10.field,
|
|
3175
|
+
value = _ref10.value;
|
|
3162
3176
|
onEventTrigger({
|
|
3163
3177
|
originalEvent: e,
|
|
3164
3178
|
type: 'tag.click',
|
|
@@ -3175,7 +3189,7 @@ var PureEvents = function PureEvents(props) {
|
|
|
3175
3189
|
payload: {
|
|
3176
3190
|
name: '_time',
|
|
3177
3191
|
value: timeValue,
|
|
3178
|
-
epochTime: EventUtils_1.getEpochTime(timeValue),
|
|
3192
|
+
epochTime: (0, EventUtils_1.getEpochTime)(timeValue),
|
|
3179
3193
|
window: timeInterval
|
|
3180
3194
|
}
|
|
3181
3195
|
});
|
|
@@ -3273,79 +3287,78 @@ PureEvents.defaultProps = {
|
|
|
3273
3287
|
onRequestParamsChange: lodash_1.noop,
|
|
3274
3288
|
onEventTrigger: lodash_1.noop
|
|
3275
3289
|
};
|
|
3276
|
-
exports.default = FixedSizeContainer_1.default(PureEvents);
|
|
3290
|
+
exports.default = (0, FixedSizeContainer_1.default)(PureEvents);
|
|
3277
3291
|
|
|
3278
3292
|
/***/ }),
|
|
3279
|
-
/*
|
|
3293
|
+
/* 205 */
|
|
3280
3294
|
/***/ (function(module, exports) {
|
|
3281
3295
|
|
|
3282
3296
|
module.exports = require("@splunk/react-events-viewer/components/EventsViewer");
|
|
3283
3297
|
|
|
3284
3298
|
/***/ }),
|
|
3285
|
-
/*
|
|
3299
|
+
/* 206 */
|
|
3286
3300
|
/***/ (function(module, exports) {
|
|
3287
3301
|
|
|
3288
3302
|
module.exports = require("@splunk/time-range-utils/time");
|
|
3289
3303
|
|
|
3290
3304
|
/***/ }),
|
|
3291
|
-
/*
|
|
3305
|
+
/* 207 */
|
|
3292
3306
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3293
3307
|
|
|
3294
3308
|
"use strict";
|
|
3295
3309
|
|
|
3296
3310
|
|
|
3311
|
+
var _taggedTemplateLiteral = __webpack_require__(59);
|
|
3312
|
+
var _templateObject;
|
|
3297
3313
|
Object.defineProperty(exports, "__esModule", {
|
|
3298
3314
|
value: true
|
|
3299
3315
|
});
|
|
3300
3316
|
var React = __webpack_require__(1);
|
|
3301
3317
|
var react_1 = __webpack_require__(1);
|
|
3302
|
-
var Popover_1 = __webpack_require__(
|
|
3303
|
-
var Markdown_1 = __webpack_require__(
|
|
3304
|
-
var FieldSummary_1 = __webpack_require__(
|
|
3318
|
+
var Popover_1 = __webpack_require__(62);
|
|
3319
|
+
var Markdown_1 = __webpack_require__(122);
|
|
3320
|
+
var FieldSummary_1 = __webpack_require__(208);
|
|
3305
3321
|
var lodash_1 = __webpack_require__(3);
|
|
3306
3322
|
var i18n_1 = __webpack_require__(2);
|
|
3307
3323
|
var styled_components_1 = __webpack_require__(4);
|
|
3308
|
-
var EventsContext_1 = __webpack_require__(
|
|
3324
|
+
var EventsContext_1 = __webpack_require__(152);
|
|
3309
3325
|
var popoverContainerStyle = {
|
|
3310
3326
|
padding: '20px',
|
|
3311
3327
|
width: 500
|
|
3312
3328
|
};
|
|
3313
|
-
var StyledMarkdown = styled_components_1.default(Markdown_1.default)
|
|
3314
|
-
displayName: "FieldSummaryTooltip__StyledMarkdown",
|
|
3315
|
-
componentId: "sc-1k26kpm-0"
|
|
3316
|
-
})(["p{margin:0;}"]);
|
|
3329
|
+
var StyledMarkdown = (0, styled_components_1.default)(Markdown_1.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* removes unnecessary margin on the internal paragraph component */\n p {\n margin: 0;\n }\n"])));
|
|
3317
3330
|
var actionsForField = function actionsForField(field) {
|
|
3318
3331
|
var actions = [];
|
|
3319
3332
|
// this logic is used in determining whether to display numeric stats in ui-platform (FieldStats.tsx)
|
|
3320
3333
|
if (typeof field.mean === 'number') {
|
|
3321
3334
|
actions.push({
|
|
3322
3335
|
name: 'avgByTime',
|
|
3323
|
-
label: i18n_1._('Average over time')
|
|
3336
|
+
label: (0, i18n_1._)('Average over time')
|
|
3324
3337
|
});
|
|
3325
3338
|
actions.push({
|
|
3326
3339
|
name: 'maxByTime',
|
|
3327
|
-
label: i18n_1._('Max value over time')
|
|
3340
|
+
label: (0, i18n_1._)('Max value over time')
|
|
3328
3341
|
});
|
|
3329
3342
|
actions.push({
|
|
3330
3343
|
name: 'minByTime',
|
|
3331
|
-
label: i18n_1._('Min value over time')
|
|
3344
|
+
label: (0, i18n_1._)('Min value over time')
|
|
3332
3345
|
});
|
|
3333
3346
|
}
|
|
3334
3347
|
actions.push({
|
|
3335
3348
|
name: 'topValues',
|
|
3336
|
-
label: i18n_1._('Top values')
|
|
3349
|
+
label: (0, i18n_1._)('Top values')
|
|
3337
3350
|
});
|
|
3338
3351
|
actions.push({
|
|
3339
3352
|
name: 'topValuesByTime',
|
|
3340
|
-
label: i18n_1._('Top values by time')
|
|
3353
|
+
label: (0, i18n_1._)('Top values by time')
|
|
3341
3354
|
});
|
|
3342
3355
|
actions.push({
|
|
3343
3356
|
name: 'rareValues',
|
|
3344
|
-
label: i18n_1._('Rare values')
|
|
3357
|
+
label: (0, i18n_1._)('Rare values')
|
|
3345
3358
|
});
|
|
3346
3359
|
actions.push({
|
|
3347
3360
|
name: 'allValues',
|
|
3348
|
-
label: i18n_1._('Events with this field')
|
|
3361
|
+
label: (0, i18n_1._)('Events with this field')
|
|
3349
3362
|
});
|
|
3350
3363
|
return actions;
|
|
3351
3364
|
};
|
|
@@ -3357,9 +3370,9 @@ var FieldSummaryTooltip = function FieldSummaryTooltip(props) {
|
|
|
3357
3370
|
fieldSummaryMap = props.fieldSummaryMap,
|
|
3358
3371
|
onActionClicked = props.onActionClicked,
|
|
3359
3372
|
onFieldValueClicked = props.onFieldValueClicked;
|
|
3360
|
-
var
|
|
3361
|
-
isSplunkWebAvailable =
|
|
3362
|
-
var getActionsForField = react_1.useCallback(function (field) {
|
|
3373
|
+
var _ref = (0, react_1.useContext)(EventsContext_1.default),
|
|
3374
|
+
isSplunkWebAvailable = _ref.isSplunkWebAvailable;
|
|
3375
|
+
var getActionsForField = (0, react_1.useCallback)(function (field) {
|
|
3363
3376
|
return isSplunkWebAvailable ? actionsForField(field) : [];
|
|
3364
3377
|
}, [isSplunkWebAvailable]);
|
|
3365
3378
|
// if the anchor is null or no field has been clicked, do not render the tooltip
|
|
@@ -3367,7 +3380,7 @@ var FieldSummaryTooltip = function FieldSummaryTooltip(props) {
|
|
|
3367
3380
|
// retrieve the field summary for this field. if there is no field data, show fallback messaging
|
|
3368
3381
|
var field = fieldSummaryMap[fieldName];
|
|
3369
3382
|
var fieldSummaryExists = !!field;
|
|
3370
|
-
var fallbackText = i18n_1._("Please configure an additional datasource called `fieldsummary` using the `... | fieldsummary maxvals=10` SPL command for field summaries to be shown.");
|
|
3383
|
+
var fallbackText = (0, i18n_1._)("Please configure an additional datasource called `fieldsummary` using the `... | fieldsummary maxvals=10` SPL command for field summaries to be shown.");
|
|
3371
3384
|
return React.createElement(Popover_1.default, {
|
|
3372
3385
|
open: open,
|
|
3373
3386
|
defaultPlacement: "below",
|
|
@@ -3398,48 +3411,50 @@ FieldSummaryTooltip.defaultProps = {
|
|
|
3398
3411
|
exports.default = FieldSummaryTooltip;
|
|
3399
3412
|
|
|
3400
3413
|
/***/ }),
|
|
3401
|
-
/*
|
|
3414
|
+
/* 208 */
|
|
3402
3415
|
/***/ (function(module, exports) {
|
|
3403
3416
|
|
|
3404
3417
|
module.exports = require("@splunk/react-field-summary/components/FieldSummary");
|
|
3405
3418
|
|
|
3406
3419
|
/***/ }),
|
|
3407
|
-
/*
|
|
3420
|
+
/* 209 */
|
|
3408
3421
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3409
3422
|
|
|
3410
3423
|
"use strict";
|
|
3411
3424
|
|
|
3412
3425
|
|
|
3413
3426
|
var _slicedToArray = __webpack_require__(17);
|
|
3427
|
+
var _taggedTemplateLiteral = __webpack_require__(59);
|
|
3428
|
+
var _templateObject;
|
|
3414
3429
|
Object.defineProperty(exports, "__esModule", {
|
|
3415
3430
|
value: true
|
|
3416
3431
|
});
|
|
3417
3432
|
var React = __webpack_require__(1);
|
|
3418
|
-
var Popover_1 = __webpack_require__(
|
|
3419
|
-
var ControlGroup_1 = __webpack_require__(
|
|
3420
|
-
var Button_1 = __webpack_require__(
|
|
3421
|
-
var Text_1 = __webpack_require__(
|
|
3422
|
-
var Message_1 = __webpack_require__(
|
|
3423
|
-
var Select_1 = __webpack_require__(
|
|
3424
|
-
var Link_1 = __webpack_require__(
|
|
3425
|
-
var Heading_1 = __webpack_require__(
|
|
3433
|
+
var Popover_1 = __webpack_require__(62);
|
|
3434
|
+
var ControlGroup_1 = __webpack_require__(210);
|
|
3435
|
+
var Button_1 = __webpack_require__(123);
|
|
3436
|
+
var Text_1 = __webpack_require__(211);
|
|
3437
|
+
var Message_1 = __webpack_require__(124);
|
|
3438
|
+
var Select_1 = __webpack_require__(212);
|
|
3439
|
+
var Link_1 = __webpack_require__(213);
|
|
3440
|
+
var Heading_1 = __webpack_require__(125);
|
|
3426
3441
|
var lodash_1 = __webpack_require__(3);
|
|
3427
3442
|
var i18n_1 = __webpack_require__(2);
|
|
3428
3443
|
var styled_components_1 = __webpack_require__(4);
|
|
3429
|
-
var numberUtils_1 = __webpack_require__(
|
|
3444
|
+
var numberUtils_1 = __webpack_require__(31);
|
|
3430
3445
|
var pick_1 = __webpack_require__(23);
|
|
3431
|
-
var EventUtils_1 = __webpack_require__(
|
|
3446
|
+
var EventUtils_1 = __webpack_require__(120);
|
|
3432
3447
|
// custom popover sizing for Enterprise vs. Prisma themes - additional px for Prisma theme to fit controls
|
|
3433
3448
|
var TimePopoverContainer = styled_components_1.default.div.withConfig({
|
|
3434
3449
|
displayName: "TimeControlsPopover__TimePopoverContainer",
|
|
3435
3450
|
componentId: "fj32ze-0"
|
|
3436
3451
|
})(["padding:20px;width:", ";.time-drilldown-header{margin:0px;}[data-test='nearby-controls']{margin:0px;width:", ";}"], function (props) {
|
|
3437
|
-
return pick_1.default({
|
|
3452
|
+
return (0, pick_1.default)({
|
|
3438
3453
|
enterprise: '372px',
|
|
3439
3454
|
prisma: '422px'
|
|
3440
3455
|
})(props);
|
|
3441
3456
|
}, function (props) {
|
|
3442
|
-
return pick_1.default({
|
|
3457
|
+
return (0, pick_1.default)({
|
|
3443
3458
|
enterprise: '289.75px',
|
|
3444
3459
|
prisma: '329.75px'
|
|
3445
3460
|
})(props);
|
|
@@ -3452,10 +3467,7 @@ var NearbyValueRow = styled_components_1.default.div.withConfig({
|
|
|
3452
3467
|
displayName: "TimeControlsPopover__NearbyValueRow",
|
|
3453
3468
|
componentId: "fj32ze-2"
|
|
3454
3469
|
})(["display:flex;align-items:flex-start;justify-content:center;"]);
|
|
3455
|
-
var SectionHeading = styled_components_1.default(Heading_1.default)
|
|
3456
|
-
displayName: "TimeControlsPopover__SectionHeading",
|
|
3457
|
-
componentId: "fj32ze-3"
|
|
3458
|
-
})(["margin-top:20px;"]);
|
|
3470
|
+
var SectionHeading = (0, styled_components_1.default)(Heading_1.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: 20px;\n"])));
|
|
3459
3471
|
var rangeTypeInputStyle = {
|
|
3460
3472
|
minWidth: 80
|
|
3461
3473
|
};
|
|
@@ -3492,7 +3504,7 @@ var TimeControlsPopover = function TimeControlsPopover(props) {
|
|
|
3492
3504
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
3493
3505
|
isInvalidInput = _React$useState8[0],
|
|
3494
3506
|
setInvalidInput = _React$useState8[1];
|
|
3495
|
-
var errorMessage = i18n_1._('Value must be an integer greater than 0');
|
|
3507
|
+
var errorMessage = (0, i18n_1._)('Value must be an integer greater than 0');
|
|
3496
3508
|
var handleRangeTypeChange = function handleRangeTypeChange(e, _ref) {
|
|
3497
3509
|
var value = _ref.value;
|
|
3498
3510
|
setRangeType(value);
|
|
@@ -3507,13 +3519,13 @@ var TimeControlsPopover = function TimeControlsPopover(props) {
|
|
|
3507
3519
|
};
|
|
3508
3520
|
var handleSubmit = function handleSubmit(e) {
|
|
3509
3521
|
// if the entered range amount is not a number, is not greater than 0, or is not an integer, then it is invalid
|
|
3510
|
-
var parsedIntervalAmount = numberUtils_1.parseNumber(rangeAmount);
|
|
3522
|
+
var parsedIntervalAmount = (0, numberUtils_1.parseNumber)(rangeAmount);
|
|
3511
3523
|
if (Number.isNaN(parsedIntervalAmount) || parsedIntervalAmount <= 0 || !Number.isInteger(parsedIntervalAmount)) {
|
|
3512
3524
|
setInvalidInput(true);
|
|
3513
3525
|
return;
|
|
3514
3526
|
}
|
|
3515
3527
|
setInvalidInput(false);
|
|
3516
|
-
var timeInterval = EventUtils_1.getCustomTimeInterval({
|
|
3528
|
+
var timeInterval = (0, EventUtils_1.getCustomTimeInterval)({
|
|
3517
3529
|
time: time,
|
|
3518
3530
|
rangeType: rangeType,
|
|
3519
3531
|
rangeAmount: rangeAmount,
|
|
@@ -3523,7 +3535,7 @@ var TimeControlsPopover = function TimeControlsPopover(props) {
|
|
|
3523
3535
|
};
|
|
3524
3536
|
var handleEventIntervalClick = function handleEventIntervalClick(e, when) {
|
|
3525
3537
|
e.preventDefault();
|
|
3526
|
-
var timeInterval = EventUtils_1.getPredefinedTimeInterval({
|
|
3538
|
+
var timeInterval = (0, EventUtils_1.getPredefinedTimeInterval)({
|
|
3527
3539
|
time: time,
|
|
3528
3540
|
when: when
|
|
3529
3541
|
});
|
|
@@ -3545,7 +3557,7 @@ var TimeControlsPopover = function TimeControlsPopover(props) {
|
|
|
3545
3557
|
"data-test": "invalid-time-input-message"
|
|
3546
3558
|
}, errorMessage), React.createElement(SectionHeading, {
|
|
3547
3559
|
level: 4
|
|
3548
|
-
}, i18n_1._('Events Before or After')), React.createElement(TimeTable, null, React.createElement("tbody", null, React.createElement("tr", {
|
|
3560
|
+
}, (0, i18n_1._)('Events Before or After')), React.createElement(TimeTable, null, React.createElement("tbody", null, React.createElement("tr", {
|
|
3549
3561
|
className: "before-after-values"
|
|
3550
3562
|
}, React.createElement("td", null, React.createElement(Link_1.default, {
|
|
3551
3563
|
"data-test": "before-time",
|
|
@@ -3553,22 +3565,22 @@ var TimeControlsPopover = function TimeControlsPopover(props) {
|
|
|
3553
3565
|
onClick: function onClick(e) {
|
|
3554
3566
|
handleEventIntervalClick(e, 'before');
|
|
3555
3567
|
}
|
|
3556
|
-
}, i18n_1._('Before this time'))), React.createElement("td", null, React.createElement(Link_1.default, {
|
|
3568
|
+
}, (0, i18n_1._)('Before this time'))), React.createElement("td", null, React.createElement(Link_1.default, {
|
|
3557
3569
|
"data-test": "after-time",
|
|
3558
3570
|
to: "#",
|
|
3559
3571
|
onClick: function onClick(e) {
|
|
3560
3572
|
handleEventIntervalClick(e, 'after');
|
|
3561
3573
|
}
|
|
3562
|
-
}, i18n_1._('After this time'))), React.createElement("td", null, React.createElement(Link_1.default, {
|
|
3574
|
+
}, (0, i18n_1._)('After this time'))), React.createElement("td", null, React.createElement(Link_1.default, {
|
|
3563
3575
|
"data-test": "at-time",
|
|
3564
3576
|
to: "#",
|
|
3565
3577
|
onClick: function onClick(e) {
|
|
3566
3578
|
handleEventIntervalClick(e, 'at');
|
|
3567
3579
|
}
|
|
3568
|
-
}, i18n_1._('At this time')))))), React.createElement(SectionHeading, {
|
|
3580
|
+
}, (0, i18n_1._)('At this time')))))), React.createElement(SectionHeading, {
|
|
3569
3581
|
level: 4,
|
|
3570
3582
|
className: "nearby-header"
|
|
3571
|
-
}, i18n_1._('Nearby Events')), React.createElement(NearbyValueRow, {
|
|
3583
|
+
}, (0, i18n_1._)('Nearby Events')), React.createElement(NearbyValueRow, {
|
|
3572
3584
|
className: "nearby-value"
|
|
3573
3585
|
}, React.createElement(ControlGroup_1.default, {
|
|
3574
3586
|
"data-test": "nearby-controls",
|
|
@@ -3625,7 +3637,7 @@ var TimeControlsPopover = function TimeControlsPopover(props) {
|
|
|
3625
3637
|
label: "millisecond(s)",
|
|
3626
3638
|
value: "ms"
|
|
3627
3639
|
}))), React.createElement(Button_1.default, {
|
|
3628
|
-
label: i18n_1._('Apply'),
|
|
3640
|
+
label: (0, i18n_1._)('Apply'),
|
|
3629
3641
|
onClick: handleSubmit,
|
|
3630
3642
|
style: applyButtonStyle,
|
|
3631
3643
|
"data-test": "apply-custom-time"
|
|
@@ -3641,25 +3653,25 @@ TimeControlsPopover.defaultProps = {
|
|
|
3641
3653
|
exports.default = TimeControlsPopover;
|
|
3642
3654
|
|
|
3643
3655
|
/***/ }),
|
|
3644
|
-
/*
|
|
3656
|
+
/* 210 */
|
|
3645
3657
|
/***/ (function(module, exports) {
|
|
3646
3658
|
|
|
3647
3659
|
module.exports = require("@splunk/react-ui/ControlGroup");
|
|
3648
3660
|
|
|
3649
3661
|
/***/ }),
|
|
3650
|
-
/*
|
|
3662
|
+
/* 211 */
|
|
3651
3663
|
/***/ (function(module, exports) {
|
|
3652
3664
|
|
|
3653
3665
|
module.exports = require("@splunk/react-ui/Text");
|
|
3654
3666
|
|
|
3655
3667
|
/***/ }),
|
|
3656
|
-
/*
|
|
3668
|
+
/* 212 */
|
|
3657
3669
|
/***/ (function(module, exports) {
|
|
3658
3670
|
|
|
3659
3671
|
module.exports = require("@splunk/react-ui/Select");
|
|
3660
3672
|
|
|
3661
3673
|
/***/ }),
|
|
3662
|
-
/*
|
|
3674
|
+
/* 213 */
|
|
3663
3675
|
/***/ (function(module, exports) {
|
|
3664
3676
|
|
|
3665
3677
|
module.exports = require("@splunk/react-ui/Link");
|