@splunk/visualizations 25.1.0 → 25.3.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/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Background_Color_Red.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_for_Numeric_Field_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Dark.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Light.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Background_color_cyan.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_after_default.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_before.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Background_Color_white_Under_Label_and_Unit_specified.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Major_Value_is_null.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_after_default.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_before.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Events_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Background_Color_Light_Blue.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Basic_Events.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Event_Actions.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Actions.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields_with_Highlight.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Show_Placeholder.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Value_Highlighting.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Height.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Percentage_50.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_With_Options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_ES.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Background_Color_af575a.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Basic_Markdown.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Begin_with_Text_Instead_of_Header.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Color_purple.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Size_custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Size_extraLarge.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Markdown_with_number_as_DSL.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_after.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_before.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_After.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_Before.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_After.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_Before.png +0 -0
- package/Area.config.js +72 -22
- package/Area.config.js.map +1 -1
- package/Area.js +246 -185
- package/Area.js.map +1 -1
- package/Bar.config.js +17 -17
- package/Bar.config.js.map +1 -1
- package/Bar.js +191 -180
- package/Bar.js.map +1 -1
- package/Bubble.config.js +21 -14
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +193 -175
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +6 -6
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +180 -170
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +17 -17
- package/Column.config.js.map +1 -1
- package/Column.js +190 -180
- package/Column.js.map +1 -1
- package/Ellipse.config.js +3 -3
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +144 -134
- package/Ellipse.js.map +1 -1
- package/Events.config.js +664 -0
- package/Events.config.js.map +1 -0
- package/Events.js +3114 -0
- package/Events.js.map +1 -0
- package/FillerGauge.config.js +20 -19
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +183 -166
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +5 -5
- package/Image.config.js.map +1 -1
- package/Image.js +128 -128
- package/Image.js.map +1 -1
- package/Line.config.js +73 -22
- package/Line.config.js.map +1 -1
- package/Line.js +253 -186
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +15 -8
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +25270 -434
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +30 -29
- package/Map.config.js.map +1 -1
- package/Map.js +3064 -3125
- package/Map.js.map +1 -1
- package/Markdown.config.js +32 -10
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +576 -529
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +16 -16
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +1287 -1287
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +14 -14
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +532 -639
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +16 -16
- package/Pie.config.js.map +1 -1
- package/Pie.js +1205 -1205
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +14 -14
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +2584 -2700
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +7 -7
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +726 -726
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +18 -18
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +3132 -3253
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +24 -16
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +1402 -1395
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +11 -10
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +2208 -2208
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +32 -32
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +11 -10
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +825 -966
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +11 -10
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1897 -1897
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +7 -7
- package/Table.config.js.map +1 -1
- package/Table.js +2158 -2155
- package/Table.js.map +1 -1
- package/common/EventsDoc.js +15 -8
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +2 -2
- package/common/GaugeValueMarker.js +2 -2
- package/common/OptionsDoc.js +8 -8
- package/common/OptionsDoc.js.map +1 -1
- package/common/ThemesDoc.js +2 -2
- package/common/utils/configUtils.js +3 -3
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +136 -0
- package/common/utils/dataUtils.js.map +1 -0
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/mapUtils.js +11 -10
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +3 -2
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +8 -8
- package/common/utils/testHelper.js.map +1 -1
- package/common/withDashboardViz.js +2 -2
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +15 -13
package/Scatter.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 = 443);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -95,32 +95,39 @@ module.exports =
|
|
|
95
95
|
/***/ 0:
|
|
96
96
|
/***/ (function(module, exports) {
|
|
97
97
|
|
|
98
|
-
module.exports = require("
|
|
98
|
+
module.exports = require("react");
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
102
|
/***/ 1:
|
|
103
103
|
/***/ (function(module, exports) {
|
|
104
104
|
|
|
105
|
-
module.exports = require("
|
|
105
|
+
module.exports = require("prop-types");
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
108
|
|
|
109
109
|
/***/ 10:
|
|
110
110
|
/***/ (function(module, exports) {
|
|
111
111
|
|
|
112
|
-
module.exports = require("@
|
|
112
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
116
|
/***/ 11:
|
|
117
117
|
/***/ (function(module, exports) {
|
|
118
118
|
|
|
119
|
-
module.exports = require("@
|
|
119
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
123
123
|
/***/ 12:
|
|
124
|
+
/***/ (function(module, exports) {
|
|
125
|
+
|
|
126
|
+
module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
127
|
+
|
|
128
|
+
/***/ }),
|
|
129
|
+
|
|
130
|
+
/***/ 13:
|
|
124
131
|
/***/ (function(module, exports, __webpack_require__) {
|
|
125
132
|
|
|
126
133
|
"use strict";
|
|
@@ -130,15 +137,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
130
137
|
value: true
|
|
131
138
|
});
|
|
132
139
|
|
|
133
|
-
var React = __webpack_require__(
|
|
140
|
+
var React = __webpack_require__(0);
|
|
134
141
|
|
|
135
142
|
var styled_components_1 = __webpack_require__(4);
|
|
136
143
|
|
|
137
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
144
|
+
var SizeAwareWrapper_1 = __webpack_require__(20);
|
|
138
145
|
|
|
139
|
-
var style_1 = __webpack_require__(
|
|
146
|
+
var style_1 = __webpack_require__(15);
|
|
140
147
|
|
|
141
|
-
var colorUtils_1 = __webpack_require__(
|
|
148
|
+
var colorUtils_1 = __webpack_require__(12);
|
|
142
149
|
|
|
143
150
|
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
144
151
|
var width = _ref.width;
|
|
@@ -195,7 +202,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
195
202
|
|
|
196
203
|
return React.createElement(FixSizeItem, {
|
|
197
204
|
"data-test": "fix-size-item",
|
|
198
|
-
"data-splunk-visualization-version": "25.
|
|
205
|
+
"data-splunk-visualization-version": "25.3.0 - dae70ec02",
|
|
199
206
|
width: width,
|
|
200
207
|
height: height,
|
|
201
208
|
backgroundColor: backgroundColor
|
|
@@ -217,7 +224,7 @@ exports.default = withFixedSizeContainer;
|
|
|
217
224
|
|
|
218
225
|
/***/ }),
|
|
219
226
|
|
|
220
|
-
/***/
|
|
227
|
+
/***/ 14:
|
|
221
228
|
/***/ (function(module, exports, __webpack_require__) {
|
|
222
229
|
|
|
223
230
|
"use strict";
|
|
@@ -250,7 +257,7 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
|
250
257
|
|
|
251
258
|
/***/ }),
|
|
252
259
|
|
|
253
|
-
/***/
|
|
260
|
+
/***/ 149:
|
|
254
261
|
/***/ (function(module, exports, __webpack_require__) {
|
|
255
262
|
|
|
256
263
|
"use strict";
|
|
@@ -278,21 +285,21 @@ var lodash_1 = __webpack_require__(3); // Charting imports i18n which needs to b
|
|
|
278
285
|
// eslint-disable-next-line import/order
|
|
279
286
|
|
|
280
287
|
|
|
281
|
-
var Charting_1 = __webpack_require__(
|
|
288
|
+
var Charting_1 = __webpack_require__(56);
|
|
282
289
|
|
|
283
|
-
var charting_bundle_1 = __webpack_require__(
|
|
290
|
+
var charting_bundle_1 = __webpack_require__(53);
|
|
284
291
|
|
|
285
|
-
var simpleXMLOptions_1 = __webpack_require__(
|
|
292
|
+
var simpleXMLOptions_1 = __webpack_require__(62);
|
|
286
293
|
|
|
287
|
-
var config_1 = __webpack_require__(
|
|
294
|
+
var config_1 = __webpack_require__(444);
|
|
288
295
|
|
|
289
296
|
exports.config = config_1.default;
|
|
290
297
|
|
|
291
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
298
|
+
var withDashboardViz_1 = __webpack_require__(32);
|
|
292
299
|
|
|
293
|
-
var scatterUtils_1 = __webpack_require__(
|
|
300
|
+
var scatterUtils_1 = __webpack_require__(445);
|
|
294
301
|
|
|
295
|
-
var chartingUtils_1 = __webpack_require__(
|
|
302
|
+
var chartingUtils_1 = __webpack_require__(52);
|
|
296
303
|
|
|
297
304
|
var validOptions = Object.keys(config_1.default.optionsSchema);
|
|
298
305
|
|
|
@@ -368,29 +375,29 @@ exports.default = Column;
|
|
|
368
375
|
|
|
369
376
|
/***/ }),
|
|
370
377
|
|
|
371
|
-
/***/
|
|
378
|
+
/***/ 15:
|
|
372
379
|
/***/ (function(module, exports) {
|
|
373
380
|
|
|
374
381
|
module.exports = require("@splunk/visualizations-shared/style");
|
|
375
382
|
|
|
376
383
|
/***/ }),
|
|
377
384
|
|
|
378
|
-
/***/
|
|
385
|
+
/***/ 16:
|
|
379
386
|
/***/ (function(module, exports) {
|
|
380
387
|
|
|
381
388
|
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
382
389
|
|
|
383
390
|
/***/ }),
|
|
384
391
|
|
|
385
|
-
/***/
|
|
392
|
+
/***/ 17:
|
|
386
393
|
/***/ (function(module, exports, __webpack_require__) {
|
|
387
394
|
|
|
388
395
|
"use strict";
|
|
389
396
|
|
|
390
397
|
|
|
391
|
-
var _toConsumableArray = __webpack_require__(
|
|
398
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
392
399
|
|
|
393
|
-
var _defineProperty = __webpack_require__(
|
|
400
|
+
var _defineProperty = __webpack_require__(7);
|
|
394
401
|
|
|
395
402
|
var __rest = this && this.__rest || function (s, e) {
|
|
396
403
|
var t = {};
|
|
@@ -412,9 +419,9 @@ exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig
|
|
|
412
419
|
|
|
413
420
|
var lodash_1 = __webpack_require__(3);
|
|
414
421
|
|
|
415
|
-
var schemaUtils_1 = __webpack_require__(
|
|
422
|
+
var schemaUtils_1 = __webpack_require__(16);
|
|
416
423
|
|
|
417
|
-
var VizBehavior_1 = __webpack_require__(
|
|
424
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
418
425
|
|
|
419
426
|
var dynamicOptionsDSLType = {
|
|
420
427
|
type: 'string',
|
|
@@ -490,7 +497,7 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
|
|
|
490
497
|
*/
|
|
491
498
|
|
|
492
499
|
function enhanceConfig(vizConfig) {
|
|
493
|
-
var enhancedConfig = vizConfig;
|
|
500
|
+
var enhancedConfig = Object.assign({}, vizConfig);
|
|
494
501
|
|
|
495
502
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
496
503
|
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
@@ -498,7 +505,7 @@ function enhanceConfig(vizConfig) {
|
|
|
498
505
|
|
|
499
506
|
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
500
507
|
return Object.assign(Object.assign({}, config), {
|
|
501
|
-
open: false
|
|
508
|
+
open: config.open || false
|
|
502
509
|
});
|
|
503
510
|
});
|
|
504
511
|
return enhancedConfig;
|
|
@@ -513,7 +520,7 @@ exports.enhanceConfig = enhanceConfig;
|
|
|
513
520
|
*/
|
|
514
521
|
|
|
515
522
|
function uncollapseEditorConfig(vizConfig) {
|
|
516
|
-
var editorPanelUncollapsedConfig = vizConfig;
|
|
523
|
+
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
517
524
|
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
518
525
|
return Object.assign(Object.assign({}, config), {
|
|
519
526
|
open: true
|
|
@@ -619,24 +626,24 @@ exports.insertLayout = insertLayout;
|
|
|
619
626
|
|
|
620
627
|
/***/ }),
|
|
621
628
|
|
|
622
|
-
/***/
|
|
629
|
+
/***/ 19:
|
|
623
630
|
/***/ (function(module, exports) {
|
|
624
631
|
|
|
625
632
|
module.exports = require("@babel/runtime/helpers/createClass");
|
|
626
633
|
|
|
627
634
|
/***/ }),
|
|
628
635
|
|
|
629
|
-
/***/
|
|
636
|
+
/***/ 2:
|
|
630
637
|
/***/ (function(module, exports) {
|
|
631
638
|
|
|
632
|
-
module.exports = require("@splunk/
|
|
639
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
633
640
|
|
|
634
641
|
/***/ }),
|
|
635
642
|
|
|
636
|
-
/***/
|
|
643
|
+
/***/ 20:
|
|
637
644
|
/***/ (function(module, exports) {
|
|
638
645
|
|
|
639
|
-
module.exports = require("@splunk/
|
|
646
|
+
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
640
647
|
|
|
641
648
|
/***/ }),
|
|
642
649
|
|
|
@@ -647,494 +654,299 @@ module.exports = require("@splunk/themes/pick");
|
|
|
647
654
|
|
|
648
655
|
/***/ }),
|
|
649
656
|
|
|
650
|
-
/***/
|
|
657
|
+
/***/ 23:
|
|
651
658
|
/***/ (function(module, exports) {
|
|
652
659
|
|
|
653
660
|
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
654
661
|
|
|
655
662
|
/***/ }),
|
|
656
663
|
|
|
657
|
-
/***/
|
|
664
|
+
/***/ 24:
|
|
658
665
|
/***/ (function(module, exports) {
|
|
659
666
|
|
|
660
667
|
module.exports = require("@splunk/visualizations-shared/propUtils");
|
|
661
668
|
|
|
662
669
|
/***/ }),
|
|
663
670
|
|
|
664
|
-
/***/
|
|
671
|
+
/***/ 25:
|
|
665
672
|
/***/ (function(module, exports) {
|
|
666
673
|
|
|
667
674
|
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
668
675
|
|
|
669
676
|
/***/ }),
|
|
670
677
|
|
|
671
|
-
/***/
|
|
678
|
+
/***/ 26:
|
|
672
679
|
/***/ (function(module, exports) {
|
|
673
680
|
|
|
674
681
|
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
675
682
|
|
|
676
683
|
/***/ }),
|
|
677
684
|
|
|
678
|
-
/***/
|
|
685
|
+
/***/ 27:
|
|
679
686
|
/***/ (function(module, exports, __webpack_require__) {
|
|
680
687
|
|
|
681
688
|
"use strict";
|
|
682
689
|
|
|
683
690
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
Object.defineProperty(o, k2, {
|
|
687
|
-
enumerable: true,
|
|
688
|
-
get: function get() {
|
|
689
|
-
return m[k];
|
|
690
|
-
}
|
|
691
|
-
});
|
|
692
|
-
} : function (o, m, k, k2) {
|
|
693
|
-
if (k2 === undefined) k2 = k;
|
|
694
|
-
o[k2] = m[k];
|
|
691
|
+
Object.defineProperty(exports, "__esModule", {
|
|
692
|
+
value: true
|
|
695
693
|
});
|
|
694
|
+
exports.shouldShowIconPlaceholder = void 0;
|
|
696
695
|
|
|
697
|
-
var
|
|
698
|
-
|
|
699
|
-
|
|
696
|
+
var React = __webpack_require__(0);
|
|
697
|
+
|
|
698
|
+
var T = __webpack_require__(1);
|
|
699
|
+
|
|
700
|
+
var lodash_1 = __webpack_require__(3);
|
|
701
|
+
|
|
702
|
+
var i18n_1 = __webpack_require__(2);
|
|
703
|
+
|
|
704
|
+
var Message_1 = __webpack_require__(10);
|
|
705
|
+
|
|
706
|
+
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
707
|
+
/**
|
|
708
|
+
* @method shouldShowIconPlaceholder
|
|
709
|
+
* @param {object} dataSources
|
|
710
|
+
* @param {boolean} loading
|
|
711
|
+
* @returns {boolean}
|
|
712
|
+
*/
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
716
|
+
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
717
|
+
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
718
|
+
var noData = data === undefined;
|
|
719
|
+
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
720
|
+
var noFields = fields === undefined;
|
|
721
|
+
return loading || noData || noFields;
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
725
|
+
var propTypes = {
|
|
726
|
+
icon: T.func,
|
|
727
|
+
width: T.oneOfType([T.string, T.number]),
|
|
728
|
+
height: T.oneOfType([T.string, T.number]),
|
|
729
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
730
|
+
backgroundColor: T.string,
|
|
731
|
+
iconColor: T.string
|
|
732
|
+
};
|
|
733
|
+
/**
|
|
734
|
+
* @method IconPlaceholder
|
|
735
|
+
* @param {IconPlaceholderProps} props
|
|
736
|
+
* @returns {React.ReactElement}
|
|
737
|
+
*/
|
|
738
|
+
|
|
739
|
+
var IconPlaceholder = function IconPlaceholder(props) {
|
|
740
|
+
var width = props.width,
|
|
741
|
+
height = props.height,
|
|
742
|
+
icon = props.icon,
|
|
743
|
+
iconColor = props.iconColor;
|
|
744
|
+
|
|
745
|
+
if (icon) {
|
|
746
|
+
return React.createElement(icon, {
|
|
747
|
+
style: {
|
|
748
|
+
left: '50%',
|
|
749
|
+
top: '50%',
|
|
750
|
+
color: iconColor,
|
|
751
|
+
opacity: 0.15,
|
|
752
|
+
position: 'absolute',
|
|
753
|
+
transform: 'translate(-50%, -50%)'
|
|
754
|
+
},
|
|
755
|
+
width: '50%',
|
|
756
|
+
height: '50%'
|
|
757
|
+
});
|
|
700
758
|
}
|
|
759
|
+
|
|
760
|
+
return React.createElement(Message_1.default, {
|
|
761
|
+
width: width,
|
|
762
|
+
height: height,
|
|
763
|
+
level: "warning",
|
|
764
|
+
message: i18n_1._('No DataSource Connected')
|
|
765
|
+
});
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
IconPlaceholder.propTypes = propTypes;
|
|
769
|
+
IconPlaceholder.defaultProps = {
|
|
770
|
+
width: '100%',
|
|
771
|
+
height: 250
|
|
701
772
|
};
|
|
773
|
+
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
774
|
+
|
|
775
|
+
/***/ }),
|
|
776
|
+
|
|
777
|
+
/***/ 28:
|
|
778
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
779
|
+
|
|
780
|
+
"use strict";
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
var _defineProperty = __webpack_require__(7);
|
|
702
784
|
|
|
703
785
|
Object.defineProperty(exports, "__esModule", {
|
|
704
786
|
value: true
|
|
705
787
|
});
|
|
706
|
-
exports.
|
|
788
|
+
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
707
789
|
|
|
708
|
-
|
|
790
|
+
var T = __webpack_require__(1);
|
|
709
791
|
|
|
710
|
-
var
|
|
792
|
+
var lodash_1 = __webpack_require__(3);
|
|
711
793
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
794
|
+
var DataSource_1 = __webpack_require__(39);
|
|
795
|
+
|
|
796
|
+
exports.SortParamsPropTypes = T.shape({
|
|
797
|
+
currentSortKey: T.string,
|
|
798
|
+
currentSortDir: T.oneOf(DataSource_1.validSortDirs),
|
|
799
|
+
onSort: T.func
|
|
717
800
|
});
|
|
718
801
|
|
|
802
|
+
var getSortingParams = function getSortingParams(_ref) {
|
|
803
|
+
var requestParams = _ref.requestParams,
|
|
804
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
805
|
+
var currentSortKey;
|
|
806
|
+
var currentSortDir;
|
|
807
|
+
var nextSortDirMap = {
|
|
808
|
+
asc: 'desc',
|
|
809
|
+
desc: 'asc',
|
|
810
|
+
none: 'asc'
|
|
811
|
+
};
|
|
812
|
+
var onSort;
|
|
813
|
+
|
|
814
|
+
if (lodash_1.isFunction(onRequestParamsChange)) {
|
|
815
|
+
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
816
|
+
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
817
|
+
currentSortDir = requestParams.sort[currentSortKey];
|
|
818
|
+
} // undid memoization since there is a dependency on requestParams, which is a deeply nested object
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
onSort = function onSort(e, _ref2) {
|
|
822
|
+
var sortKey = _ref2.sortKey,
|
|
823
|
+
sortDir = _ref2.sortDir;
|
|
824
|
+
|
|
825
|
+
if (typeof sortKey === 'string') {
|
|
826
|
+
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
827
|
+
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
828
|
+
offset: 0,
|
|
829
|
+
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
830
|
+
}));
|
|
831
|
+
} else {
|
|
832
|
+
onRequestParamsChange(requestParams);
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
return {
|
|
838
|
+
currentSortKey: currentSortKey,
|
|
839
|
+
currentSortDir: currentSortDir,
|
|
840
|
+
onSort: onSort
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
exports.getSortingParams = getSortingParams;
|
|
845
|
+
|
|
719
846
|
/***/ }),
|
|
720
847
|
|
|
721
|
-
/***/
|
|
848
|
+
/***/ 29:
|
|
722
849
|
/***/ (function(module, exports, __webpack_require__) {
|
|
723
850
|
|
|
724
851
|
"use strict";
|
|
725
852
|
|
|
726
853
|
|
|
727
|
-
var _toConsumableArray = __webpack_require__(7);
|
|
728
|
-
|
|
729
854
|
Object.defineProperty(exports, "__esModule", {
|
|
730
855
|
value: true
|
|
731
856
|
});
|
|
732
|
-
exports.
|
|
857
|
+
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
733
858
|
|
|
734
|
-
var
|
|
859
|
+
var T = __webpack_require__(1);
|
|
735
860
|
|
|
736
|
-
var
|
|
861
|
+
var lodash_1 = __webpack_require__(3);
|
|
737
862
|
|
|
738
|
-
|
|
863
|
+
exports.PaginatorParamsPropTypes = T.shape({
|
|
864
|
+
isPaging: T.bool,
|
|
865
|
+
current: T.number,
|
|
866
|
+
totalPages: T.number,
|
|
867
|
+
onChange: T.func
|
|
868
|
+
});
|
|
739
869
|
|
|
740
|
-
var
|
|
870
|
+
var getPaginationParams = function getPaginationParams(_ref) {
|
|
871
|
+
var requestParams = _ref.requestParams,
|
|
872
|
+
meta = _ref.meta,
|
|
873
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
874
|
+
var totalCount = meta && meta.totalCount || 0;
|
|
875
|
+
var offset = requestParams && requestParams.offset || 0;
|
|
876
|
+
var count = requestParams && requestParams.count;
|
|
877
|
+
var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
878
|
+
var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
879
|
+
var isPaging = totalPages > 1 && lodash_1.isFunction(onRequestParamsChange);
|
|
741
880
|
|
|
742
|
-
var
|
|
881
|
+
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
882
|
+
var page = _ref2.page,
|
|
883
|
+
countArg = _ref2.count;
|
|
884
|
+
var newParams = lodash_1.cloneDeep(requestParams);
|
|
743
885
|
|
|
744
|
-
|
|
886
|
+
if (typeof countArg === 'number') {
|
|
887
|
+
newParams.count = countArg;
|
|
888
|
+
newParams.offset = 0;
|
|
889
|
+
}
|
|
745
890
|
|
|
746
|
-
var
|
|
891
|
+
var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
|
|
747
892
|
|
|
748
|
-
|
|
893
|
+
if (typeof page === 'number' && page > 0) {
|
|
894
|
+
newParams.count = pageCount;
|
|
895
|
+
newParams.offset = (page - 1) * pageCount;
|
|
896
|
+
}
|
|
749
897
|
|
|
750
|
-
|
|
898
|
+
onRequestParamsChange(newParams);
|
|
899
|
+
};
|
|
751
900
|
|
|
752
|
-
|
|
901
|
+
return {
|
|
902
|
+
isPaging: isPaging,
|
|
903
|
+
current: current,
|
|
904
|
+
totalPages: totalPages,
|
|
905
|
+
onChange: lodash_1.isFunction(onRequestParamsChange) ? onChangeHandler : lodash_1.noop
|
|
906
|
+
};
|
|
907
|
+
};
|
|
753
908
|
|
|
754
|
-
|
|
909
|
+
exports.getPaginationParams = getPaginationParams;
|
|
755
910
|
|
|
756
|
-
|
|
911
|
+
/***/ }),
|
|
757
912
|
|
|
758
|
-
|
|
913
|
+
/***/ 3:
|
|
914
|
+
/***/ (function(module, exports) {
|
|
759
915
|
|
|
760
|
-
|
|
916
|
+
module.exports = require("lodash");
|
|
761
917
|
|
|
762
|
-
|
|
918
|
+
/***/ }),
|
|
763
919
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
name: 'primary',
|
|
767
|
-
description: 'DataSource that powers the visualization'
|
|
768
|
-
}],
|
|
769
|
-
optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
|
|
770
|
-
// {
|
|
771
|
-
// name: 'annotation',
|
|
772
|
-
// description: 'DataSource that populates event annotations',
|
|
773
|
-
// },
|
|
774
|
-
],
|
|
775
|
-
initialRequestParams: {
|
|
776
|
-
primary: {
|
|
777
|
-
offset: 0,
|
|
778
|
-
count: 10000
|
|
779
|
-
},
|
|
780
|
-
annotation: {
|
|
781
|
-
offset: 0,
|
|
782
|
-
count: 10000
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
};
|
|
786
|
-
var size = {
|
|
787
|
-
initialWidth: 300,
|
|
788
|
-
initialHeight: 300
|
|
789
|
-
};
|
|
790
|
-
var defaultContext = {};
|
|
791
|
-
exports.optionsSchema = {
|
|
792
|
-
x: {
|
|
793
|
-
default: '> primary | seriesByIndex(0)',
|
|
794
|
-
description: 'Specify the dataSource applied to the x-axis.',
|
|
795
|
-
type: 'array',
|
|
796
|
-
items: {
|
|
797
|
-
type: ['string', 'number']
|
|
798
|
-
}
|
|
799
|
-
},
|
|
800
|
-
y: {
|
|
801
|
-
default: '> primary | seriesByIndex(1)',
|
|
802
|
-
description: 'Specify the dataSource applied to the y-axis.',
|
|
803
|
-
type: 'array',
|
|
804
|
-
items: {
|
|
805
|
-
type: ['string', 'number']
|
|
806
|
-
}
|
|
807
|
-
},
|
|
808
|
-
category: {
|
|
809
|
-
description: 'Specify a sequence of dataSource events to be plotted on the chart.',
|
|
810
|
-
type: 'array',
|
|
811
|
-
items: {
|
|
812
|
-
type: ['string', 'number']
|
|
813
|
-
},
|
|
814
|
-
default: '> primary | seriesByIndex(2)'
|
|
815
|
-
},
|
|
816
|
-
xField: {
|
|
817
|
-
default: '> x | getField()',
|
|
818
|
-
description: 'Specify the field that should be mapped to the x-axis.',
|
|
819
|
-
type: 'string'
|
|
820
|
-
},
|
|
821
|
-
yField: {
|
|
822
|
-
default: '> y | getField()',
|
|
823
|
-
description: 'Specify the field that should be mapped to the y-axis.',
|
|
824
|
-
type: 'string'
|
|
825
|
-
},
|
|
826
|
-
categoryField: {
|
|
827
|
-
default: '> category | getField()',
|
|
828
|
-
description: 'Specify the field that should be mapped to the series categories.',
|
|
829
|
-
type: 'string'
|
|
830
|
-
},
|
|
831
|
-
backgroundColor: {
|
|
832
|
-
default: '> themes.defaultBackgroundColor',
|
|
833
|
-
description: 'Specify the color used for the background. The default for enterprise light is "#ffffff". The default for enterprise dark is "#000000". The default for prisma dark is "#0b0c0e".',
|
|
834
|
-
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
|
|
835
|
-
type: 'string'
|
|
836
|
-
},
|
|
837
|
-
legendDisplay: {
|
|
838
|
-
default: 'right',
|
|
839
|
-
description: 'Specify the location of the legend on the panel.',
|
|
840
|
-
pattern: schemaUtils_1.getPattern(['right', 'left', 'top', 'bottom', 'off']),
|
|
841
|
-
type: 'string'
|
|
842
|
-
},
|
|
843
|
-
legendTruncation: {
|
|
844
|
-
default: 'ellipsisEnd',
|
|
845
|
-
description: 'Specify how to display legend labels when they overflow the layout boundaries by replacing overflow text with an ellipsis.',
|
|
846
|
-
pattern: schemaUtils_1.getPattern(['ellipsisEnd', 'ellipsisMiddle', 'ellipsisStart', 'ellipsisOff']),
|
|
847
|
-
type: 'string'
|
|
848
|
-
},
|
|
849
|
-
markerSize: {
|
|
850
|
-
description: 'Specify, in pixels, the size of each scatter marker.',
|
|
851
|
-
type: 'number',
|
|
852
|
-
default: 4
|
|
853
|
-
},
|
|
854
|
-
resultLimit: {
|
|
855
|
-
default: 50000,
|
|
856
|
-
description: 'Specify the number of data points rendered in a chart.',
|
|
857
|
-
type: 'number'
|
|
858
|
-
},
|
|
859
|
-
seriesColors: {
|
|
860
|
-
default: visualization_color_palettes_1.VIZ_CATEGORICAL,
|
|
861
|
-
description: 'Specify the colors used for a series. For example, ["#FF0000", "#0000FF", "#008000"].',
|
|
862
|
-
type: 'array',
|
|
863
|
-
items: {
|
|
864
|
-
type: 'string'
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
seriesColorsByField: {
|
|
868
|
-
description: 'Specify the colors used for specific fields in a series. For example: {"count": "#008000", "percent": "#FFA500"}.',
|
|
869
|
-
type: 'object'
|
|
870
|
-
},
|
|
871
|
-
showXAxisExtendedRange: {
|
|
872
|
-
default: true,
|
|
873
|
-
description: 'Specify whether the x-axis should be extended to snap to whole major tick marks.',
|
|
874
|
-
type: 'boolean'
|
|
875
|
-
},
|
|
876
|
-
showYAxisExtendedRange: {
|
|
877
|
-
default: true,
|
|
878
|
-
description: 'Specify whether the y-axis should be extended to snap to whole major tick marks.',
|
|
879
|
-
type: 'boolean'
|
|
880
|
-
},
|
|
881
|
-
showXAxisWithZero: {
|
|
882
|
-
default: false,
|
|
883
|
-
description: 'Specify whether the x-axis range includes zero.',
|
|
884
|
-
type: 'boolean'
|
|
885
|
-
},
|
|
886
|
-
showYAxisWithZero: {
|
|
887
|
-
default: false,
|
|
888
|
-
description: 'Specify whether the y-axis range includes zero.',
|
|
889
|
-
type: 'boolean'
|
|
890
|
-
},
|
|
891
|
-
showRoundedXAxisLabels: {
|
|
892
|
-
default: false,
|
|
893
|
-
description: 'Specify whether to round x-axis values to the nearest integer.',
|
|
894
|
-
type: 'boolean'
|
|
895
|
-
},
|
|
896
|
-
// TODO: figure out if we want to change splunk-charting behavior for Bubble/Scatter, which hardcodes XMajorGridlines to false
|
|
897
|
-
// showXMajorGridLines: {
|
|
898
|
-
// default: false,
|
|
899
|
-
// description: 'Specify whether major grid lines are visible on the x-axis.',
|
|
900
|
-
// type: 'boolean',
|
|
901
|
-
// },
|
|
902
|
-
showYMajorGridLines: {
|
|
903
|
-
default: true,
|
|
904
|
-
description: 'Specify whether major grid lines are visible on the y-axis.',
|
|
905
|
-
type: 'boolean'
|
|
906
|
-
},
|
|
907
|
-
showXMinorGridLines: {
|
|
908
|
-
default: false,
|
|
909
|
-
description: 'Specify whether minor grid lines are visible on the x-axis.',
|
|
910
|
-
type: 'boolean'
|
|
911
|
-
},
|
|
912
|
-
showYMinorGridLines: {
|
|
913
|
-
default: false,
|
|
914
|
-
description: 'Specify whether minor grid lines are visible on the y-axis.',
|
|
915
|
-
type: 'boolean'
|
|
916
|
-
},
|
|
917
|
-
xAxisLabelRotation: {
|
|
918
|
-
default: 0,
|
|
919
|
-
description: 'Specify the rotation of the x-axis labels in degrees.',
|
|
920
|
-
type: 'number',
|
|
921
|
-
enum: [-90, -45, 0, 45, 90]
|
|
922
|
-
},
|
|
923
|
-
xAxisAbbreviation: {
|
|
924
|
-
default: 'off',
|
|
925
|
-
description: 'Specify whether to abbreviate large x-axis values with the closest SI prefix.',
|
|
926
|
-
enum: ['off', 'auto'],
|
|
927
|
-
pattern: schemaUtils_1.getPattern(['auto', 'off']),
|
|
928
|
-
type: 'string'
|
|
929
|
-
},
|
|
930
|
-
yAxisAbbreviation: {
|
|
931
|
-
default: 'auto',
|
|
932
|
-
description: 'Specify whether to abbreviate large y-axis values with the closest SI prefix.',
|
|
933
|
-
enum: ['off', 'auto'],
|
|
934
|
-
pattern: schemaUtils_1.getPattern(['auto', 'off']),
|
|
935
|
-
type: 'string'
|
|
936
|
-
},
|
|
937
|
-
xAxisLabelVisibility: {
|
|
938
|
-
default: 'auto',
|
|
939
|
-
description: 'Specify whether to show or hide labels on the x-axis.',
|
|
940
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
941
|
-
type: 'string'
|
|
942
|
-
},
|
|
943
|
-
yAxisLabelVisibility: {
|
|
944
|
-
default: 'auto',
|
|
945
|
-
description: 'Specify whether to show or hide labels on the y-axis.',
|
|
946
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
947
|
-
type: 'string'
|
|
948
|
-
},
|
|
949
|
-
xAxisLineVisibility: {
|
|
950
|
-
default: 'hide',
|
|
951
|
-
description: 'Specify whether to show or hide the x-axis line.',
|
|
952
|
-
enum: ['hide', 'show'],
|
|
953
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
954
|
-
type: 'string'
|
|
955
|
-
},
|
|
956
|
-
yAxisLineVisibility: {
|
|
957
|
-
default: 'hide',
|
|
958
|
-
description: 'Specify whether to show or hide the y-axis line.',
|
|
959
|
-
enum: ['hide', 'show'],
|
|
960
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
961
|
-
type: 'string'
|
|
962
|
-
},
|
|
963
|
-
xAxisMajorTickInterval: {
|
|
964
|
-
default: 'auto',
|
|
965
|
-
description: 'Specify the spacing interval at which to place major tick marks along the numeric x-axis. By default, this value is automatically calculated based on the scale of the related axis.',
|
|
966
|
-
type: ['string', 'number']
|
|
967
|
-
},
|
|
968
|
-
yAxisMajorTickInterval: {
|
|
969
|
-
default: 'auto',
|
|
970
|
-
description: 'Specify the spacing interval at which to place major tick marks along the numeric y-axis. By default, this value is automatically calculated based on the scale of the related axis.',
|
|
971
|
-
type: ['string', 'number']
|
|
972
|
-
},
|
|
973
|
-
xAxisMajorTickSize: {
|
|
974
|
-
default: 6,
|
|
975
|
-
description: 'Specify the size, in pixels, of major tick marks on the x-axis.',
|
|
976
|
-
type: 'number'
|
|
977
|
-
},
|
|
978
|
-
yAxisMajorTickSize: {
|
|
979
|
-
default: 6,
|
|
980
|
-
description: 'Specify the size, in pixels, of major tick marks on the y-axis.',
|
|
981
|
-
type: 'number'
|
|
982
|
-
},
|
|
983
|
-
xAxisMinorTickSize: {
|
|
984
|
-
default: 6,
|
|
985
|
-
description: 'Specify the size, in pixels, of minor tick marks on the x-axis.',
|
|
986
|
-
type: 'number'
|
|
987
|
-
},
|
|
988
|
-
yAxisMinorTickSize: {
|
|
989
|
-
default: 6,
|
|
990
|
-
description: 'Specify the size, in pixels, of minor tick marks on the y-axis.',
|
|
991
|
-
type: 'number'
|
|
992
|
-
},
|
|
993
|
-
xAxisMajorTickVisibility: {
|
|
994
|
-
default: 'auto',
|
|
995
|
-
description: 'Specify whether to show or hide major tick marks on the x-axis.',
|
|
996
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
997
|
-
type: 'string'
|
|
998
|
-
},
|
|
999
|
-
yAxisMajorTickVisibility: {
|
|
1000
|
-
default: 'auto',
|
|
1001
|
-
description: 'Specify whether to show or hide major tick marks on the y-axis.',
|
|
1002
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
1003
|
-
type: 'string'
|
|
1004
|
-
},
|
|
1005
|
-
xAxisMinorTickVisibility: {
|
|
1006
|
-
default: 'auto',
|
|
1007
|
-
description: 'Specify whether to show or hide minor tick marks on the x-axis .',
|
|
1008
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
1009
|
-
type: 'string'
|
|
1010
|
-
},
|
|
1011
|
-
yAxisMinorTickVisibility: {
|
|
1012
|
-
default: 'auto',
|
|
1013
|
-
description: 'Specify whether to show or hide minor tick marks on the y-axis.',
|
|
1014
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
1015
|
-
type: 'string'
|
|
1016
|
-
},
|
|
1017
|
-
xAxisMax: {
|
|
1018
|
-
default: 'auto',
|
|
1019
|
-
description: 'Specify the maximum number for the range of the visible x-axis.',
|
|
1020
|
-
type: ['string', 'number']
|
|
1021
|
-
},
|
|
1022
|
-
yAxisMax: {
|
|
1023
|
-
default: 'auto',
|
|
1024
|
-
description: 'Specify the maximum number for the range of the visible y-axis.',
|
|
1025
|
-
type: ['string', 'number']
|
|
1026
|
-
},
|
|
1027
|
-
xAxisMin: {
|
|
1028
|
-
default: 'auto',
|
|
1029
|
-
description: 'Specify the minimum number for the range of the visible x-axis.',
|
|
1030
|
-
type: ['string', 'number']
|
|
1031
|
-
},
|
|
1032
|
-
yAxisMin: {
|
|
1033
|
-
default: 'auto',
|
|
1034
|
-
description: 'Specify the minimum number for the range of the visible y-axis.',
|
|
1035
|
-
type: ['string', 'number']
|
|
1036
|
-
},
|
|
1037
|
-
xAxisScale: {
|
|
1038
|
-
default: 'linear',
|
|
1039
|
-
description: 'Specify the type of scale that applies to a numerical x-axis.',
|
|
1040
|
-
pattern: schemaUtils_1.getPattern(['linear', 'log']),
|
|
1041
|
-
type: 'string'
|
|
1042
|
-
},
|
|
1043
|
-
yAxisScale: {
|
|
1044
|
-
default: 'linear',
|
|
1045
|
-
description: 'Specify the type of scale that applies to a numerical y-axis.',
|
|
1046
|
-
pattern: schemaUtils_1.getPattern(['linear', 'log']),
|
|
1047
|
-
type: 'string'
|
|
1048
|
-
},
|
|
1049
|
-
xAxisTitleText: {
|
|
1050
|
-
description: 'Specify the title of the x-axis.',
|
|
1051
|
-
type: 'string'
|
|
1052
|
-
},
|
|
1053
|
-
yAxisTitleText: {
|
|
1054
|
-
description: 'Specify the title of the y-axis.',
|
|
1055
|
-
type: 'string'
|
|
1056
|
-
},
|
|
1057
|
-
xAxisTitleVisibility: {
|
|
1058
|
-
default: 'show',
|
|
1059
|
-
description: 'Specify whether to show or hide the title of the x-axis.',
|
|
1060
|
-
enum: ['hide', 'show'],
|
|
1061
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
1062
|
-
type: 'string'
|
|
1063
|
-
},
|
|
1064
|
-
yAxisTitleVisibility: {
|
|
1065
|
-
default: 'show',
|
|
1066
|
-
description: 'Specify whether to show or hide the title of the y-axis.',
|
|
1067
|
-
enum: ['hide', 'show'],
|
|
1068
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
1069
|
-
type: 'string'
|
|
1070
|
-
}
|
|
1071
|
-
};
|
|
1072
|
-
var themes = {
|
|
1073
|
-
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
1074
|
-
return pick_1.default({
|
|
1075
|
-
enterprise: {
|
|
1076
|
-
dark: variables_1.default.black(props),
|
|
1077
|
-
light: variables_1.default.backgroundColor(props)
|
|
1078
|
-
},
|
|
1079
|
-
prisma: variables_1.default.backgroundColorSidebar(props)
|
|
1080
|
-
})(props);
|
|
1081
|
-
}
|
|
1082
|
-
};
|
|
1083
|
-
var editorConfig = [AxesChartDataConfig_1.AxesChartDataConfigScatter, {
|
|
1084
|
-
label: AxesChartColorAndStyle_1.default.label,
|
|
1085
|
-
layout: [].concat(_toConsumableArray(AxesChartColorAndStyle_1.default.layout), [[{
|
|
1086
|
-
label: i18n_1._('Marker size'),
|
|
1087
|
-
option: 'markerSize',
|
|
1088
|
-
editor: 'editor.slider',
|
|
1089
|
-
editorProps: {
|
|
1090
|
-
min: 0,
|
|
1091
|
-
max: 20,
|
|
1092
|
-
step: 1
|
|
1093
|
-
}
|
|
1094
|
-
}]])
|
|
1095
|
-
}, AxesChartLegend_1.default, AxesChartXGridAndLabels_1.AxesChartXGridAndLabelsBubbleScatter, AxesChartYGridAndLabels_1.default];
|
|
1096
|
-
/**
|
|
1097
|
-
* visualization configuration
|
|
1098
|
-
*/
|
|
920
|
+
/***/ 31:
|
|
921
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1099
922
|
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* unique viz key
|
|
1103
|
-
*/
|
|
1104
|
-
key: 'splunk.scatter',
|
|
923
|
+
"use strict";
|
|
1105
924
|
|
|
1106
|
-
/**
|
|
1107
|
-
* viz name
|
|
1108
|
-
*/
|
|
1109
|
-
name: 'Scatter',
|
|
1110
|
-
category: VizCategory_1.VizCategory.COMPARISONS,
|
|
1111
925
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
};
|
|
1133
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
926
|
+
Object.defineProperty(exports, "__esModule", {
|
|
927
|
+
value: true
|
|
928
|
+
});
|
|
929
|
+
exports.VizCategory = void 0;
|
|
930
|
+
var VizCategory;
|
|
931
|
+
|
|
932
|
+
(function (VizCategory) {
|
|
933
|
+
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
934
|
+
VizCategory["TRENDS"] = "Trends";
|
|
935
|
+
VizCategory["COMPARISONS"] = "Comparisons";
|
|
936
|
+
VizCategory["TABLE"] = "Table";
|
|
937
|
+
VizCategory["GAUGE"] = "Gauge";
|
|
938
|
+
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
939
|
+
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
940
|
+
VizCategory["SHAPES"] = "Shapes";
|
|
941
|
+
VizCategory["MISC"] = "misc";
|
|
942
|
+
VizCategory["FLOW"] = "Flow";
|
|
943
|
+
VizCategory["CORRELATION"] = "Correlation";
|
|
944
|
+
VizCategory["SPATIAL"] = "Spatial";
|
|
945
|
+
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
1134
946
|
|
|
1135
947
|
/***/ }),
|
|
1136
948
|
|
|
1137
|
-
/***/
|
|
949
|
+
/***/ 32:
|
|
1138
950
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1139
951
|
|
|
1140
952
|
"use strict";
|
|
@@ -1143,371 +955,462 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
1143
955
|
Object.defineProperty(exports, "__esModule", {
|
|
1144
956
|
value: true
|
|
1145
957
|
});
|
|
1146
|
-
|
|
958
|
+
|
|
959
|
+
var React = __webpack_require__(0);
|
|
1147
960
|
|
|
1148
961
|
var lodash_1 = __webpack_require__(3);
|
|
1149
962
|
|
|
1150
|
-
var
|
|
963
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(33);
|
|
1151
964
|
|
|
1152
|
-
var
|
|
965
|
+
var Options_1 = __webpack_require__(34);
|
|
1153
966
|
|
|
967
|
+
var SanitizeProps_1 = __webpack_require__(35);
|
|
1154
968
|
|
|
1155
|
-
var
|
|
1156
|
-
xAxisLabelRotation: 'xAxisMajorLabelRotation',
|
|
1157
|
-
xAxisLabelVisibility: 'xAxisMajorLabelVisibility',
|
|
1158
|
-
yAxisLabelVisibility: 'yAxisMajorLabelVisibility',
|
|
1159
|
-
showRoundedXAxisLabels: 'roundXAxisLabelsToInteger',
|
|
1160
|
-
xAxisLineVisibility: 'xAxisVisibility',
|
|
1161
|
-
yAxisLineVisibility: 'yAxisVisibility',
|
|
1162
|
-
showYMajorGridLines: 'showMajorYGridLines',
|
|
1163
|
-
showXMinorGridLines: 'showMinorXGridLines',
|
|
1164
|
-
showYMinorGridLines: 'showMinorYGridLines',
|
|
1165
|
-
xAxisMajorTickInterval: 'xAxisMajorUnit',
|
|
1166
|
-
yAxisMajorTickInterval: 'yAxisMajorUnit',
|
|
1167
|
-
showXAxisExtendedRange: 'xAxisExtendsAxisRange',
|
|
1168
|
-
showYAxisExtendedRange: 'yAxisExtendsAxisRange',
|
|
1169
|
-
showXAxisWithZero: 'xAxisIncludeZero',
|
|
1170
|
-
showYAxisWithZero: 'yAxisIncludeZero',
|
|
1171
|
-
legendTruncation: 'legendLabelOverflowMode',
|
|
1172
|
-
legendDisplay: 'legendPlacement',
|
|
1173
|
-
resultLimit: 'resultTruncationLimit',
|
|
1174
|
-
seriesColorsByField: 'fieldColors',
|
|
1175
|
-
bubbleSizeMax: 'bubbleMaxSize',
|
|
1176
|
-
bubbleSizeMin: 'bubbleMinSize',
|
|
1177
|
-
bubbleSizeMethod: 'bubbleSizeBy'
|
|
1178
|
-
}; // key value mapping of what options (and their corresponding values) which we expose in config.ts to property values SC understands
|
|
969
|
+
var TimezoneContext_1 = __webpack_require__(23);
|
|
1179
970
|
|
|
1180
|
-
|
|
1181
|
-
xAxisTitleVisibility: {
|
|
1182
|
-
hide: 'collapsed'
|
|
1183
|
-
},
|
|
1184
|
-
yAxisTitleVisibility: {
|
|
1185
|
-
hide: 'collapsed'
|
|
1186
|
-
},
|
|
1187
|
-
yAxisAbbreviation: {
|
|
1188
|
-
off: 'none'
|
|
1189
|
-
},
|
|
1190
|
-
legendPlacement: {
|
|
1191
|
-
off: 'none'
|
|
1192
|
-
},
|
|
1193
|
-
legendLabelOverflowMode: {
|
|
1194
|
-
ellipsisOff: 'ellipsisNone'
|
|
1195
|
-
}
|
|
1196
|
-
};
|
|
1197
|
-
/**
|
|
1198
|
-
* Helper method to convert option which contains object literal values (e.g. arrays, objects)
|
|
1199
|
-
* to strings as SC can only accept their stringified equivalents
|
|
1200
|
-
* @method convertToStringValues
|
|
1201
|
-
* @param {Object} options
|
|
1202
|
-
* @returns {Object}
|
|
1203
|
-
*/
|
|
971
|
+
var moment_1 = __webpack_require__(36);
|
|
1204
972
|
|
|
1205
|
-
var
|
|
1206
|
-
var updatedOptions = propUtils_1.convertPropsToString({
|
|
1207
|
-
vizProps: options,
|
|
1208
|
-
propNames: ['seriesColors', 'fieldColors']
|
|
1209
|
-
});
|
|
1210
|
-
return Object.assign(Object.assign({}, options), updatedOptions);
|
|
1211
|
-
};
|
|
973
|
+
var styled_components_1 = __webpack_require__(4);
|
|
1212
974
|
|
|
1213
|
-
|
|
1214
|
-
/**
|
|
1215
|
-
* Helper method to update the option names which can be mapped to SimpleXML options or
|
|
1216
|
-
* can be used directly with SC if don't have a 1-1 mapping in SimpleXML
|
|
1217
|
-
* @method mapToOldKey
|
|
1218
|
-
* @param {Object} options
|
|
1219
|
-
* @returns {Object}
|
|
1220
|
-
*/
|
|
975
|
+
var hocUtils_1 = __webpack_require__(25);
|
|
1221
976
|
|
|
1222
|
-
var
|
|
1223
|
-
return lodash_1.mapKeys(options, function (val, key) {
|
|
1224
|
-
return scatterOptionsSCMapping[key] ? scatterOptionsSCMapping[key] : key;
|
|
1225
|
-
});
|
|
1226
|
-
};
|
|
977
|
+
var JSONSchemaUtils_1 = __webpack_require__(26);
|
|
1227
978
|
|
|
1228
|
-
|
|
979
|
+
var SplunkVisualization_1 = __webpack_require__(37);
|
|
980
|
+
|
|
981
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
982
|
+
|
|
983
|
+
var getSorting_1 = __webpack_require__(28);
|
|
984
|
+
|
|
985
|
+
var getPagination_1 = __webpack_require__(29);
|
|
986
|
+
|
|
987
|
+
var useDeepMemo_1 = __webpack_require__(40);
|
|
988
|
+
|
|
989
|
+
var MissingPropsMessage_1 = __webpack_require__(41);
|
|
990
|
+
|
|
991
|
+
var withEditModeCover_1 = __webpack_require__(42);
|
|
992
|
+
|
|
993
|
+
var withPlaceholder_1 = __webpack_require__(43);
|
|
1229
994
|
/**
|
|
1230
|
-
*
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
* @method convertToScatterSCProperties
|
|
1234
|
-
* @param {Object} originalOptions
|
|
1235
|
-
* @returns {Object}
|
|
995
|
+
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
996
|
+
* @param {DashboardVizOpts} opts
|
|
997
|
+
* @returns {HOC}
|
|
1236
998
|
*/
|
|
1237
999
|
|
|
1238
|
-
var convertToScatterSCProperties = function convertToScatterSCProperties(originalOptions) {
|
|
1239
|
-
return lodash_1.chain(exports.mapToOldKey(originalOptions)).thru(chartingUtils_1.mapToValues(exports.scatterOptionValuesSCMapping)).thru(exports.convertToStringValues).value();
|
|
1240
|
-
};
|
|
1241
1000
|
|
|
1242
|
-
|
|
1001
|
+
var withDashboardViz = function withDashboardViz(opts) {
|
|
1002
|
+
var ReactViz = opts.ReactViz,
|
|
1003
|
+
vizConfig = opts.vizConfig,
|
|
1004
|
+
_opts$computeVizProps = opts.computeVizProps,
|
|
1005
|
+
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
1006
|
+
disableEditModeCover = opts.disableEditModeCover,
|
|
1007
|
+
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
1008
|
+
|
|
1009
|
+
var SanitizedReactViz = SanitizeProps_1.withSanitizedProps(ReactViz);
|
|
1010
|
+
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
|
|
1011
|
+
|
|
1012
|
+
var DashboardViz = function DashboardViz(props) {
|
|
1013
|
+
var mode = props.mode,
|
|
1014
|
+
hasEventHandlers = props.hasEventHandlers,
|
|
1015
|
+
dataSources = props.dataSources,
|
|
1016
|
+
options = props.options,
|
|
1017
|
+
_props$context = props.context,
|
|
1018
|
+
context = _props$context === void 0 ? {} : _props$context,
|
|
1019
|
+
width = props.width,
|
|
1020
|
+
height = props.height,
|
|
1021
|
+
onComputedProps = props.onComputedProps,
|
|
1022
|
+
onEventTrigger = props.onEventTrigger,
|
|
1023
|
+
theme = props.theme,
|
|
1024
|
+
onRequestParamsChange = props.onRequestParamsChange;
|
|
1025
|
+
|
|
1026
|
+
var _React$useContext = React.useContext(TimezoneContext_1.default),
|
|
1027
|
+
serializedTimezone = _React$useContext.serializedTimezone;
|
|
1028
|
+
|
|
1029
|
+
if (serializedTimezone) {
|
|
1030
|
+
/*
|
|
1031
|
+
@splunk/moment currently does not allow us to customize the timezone on a per visualization basis.
|
|
1032
|
+
This ensures that if a timezone was provided via TimezoneContext @splunk/moment time formatting
|
|
1033
|
+
will use it.
|
|
1034
|
+
@TODO(pwied):
|
|
1035
|
+
- remove when we moved away from @splunk/moment
|
|
1036
|
+
- provide timezone context to dynamic option evaluation phase
|
|
1037
|
+
*/
|
|
1038
|
+
if (!moment_1.default.getDefaultSplunkTimezone()) {
|
|
1039
|
+
moment_1.default.setDefaultSplunkTimezone(serializedTimezone);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
var themeFunc = function themeFunc(themeVar) {
|
|
1044
|
+
var _a, _b;
|
|
1045
|
+
|
|
1046
|
+
return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
var bgColorFromTheme = themeFunc('defaultBackgroundColor');
|
|
1243
1050
|
|
|
1244
|
-
|
|
1051
|
+
var _getSettingsFromTheme = getSettingsFromThemedProps_1.default({
|
|
1052
|
+
theme: theme
|
|
1053
|
+
}),
|
|
1054
|
+
currentThemeFamily = _getSettingsFromTheme.family,
|
|
1055
|
+
currentThemeColorScheme = _getSettingsFromTheme.colorScheme,
|
|
1056
|
+
currentThemeDensity = _getSettingsFromTheme.density;
|
|
1245
1057
|
|
|
1246
|
-
|
|
1247
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1058
|
+
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
1248
1059
|
|
|
1249
|
-
|
|
1060
|
+
evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
|
|
1061
|
+
try {
|
|
1062
|
+
return Options_1.Options.evaluate({
|
|
1063
|
+
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1064
|
+
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1065
|
+
}, dataSources, themeFunc);
|
|
1066
|
+
} catch (e) {
|
|
1067
|
+
// eslint-disable-next-line no-console
|
|
1068
|
+
console.error("unexpected error evaluating options: + ".concat(e.message));
|
|
1069
|
+
return {};
|
|
1070
|
+
}
|
|
1071
|
+
}, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone]); // useEffect hook needs to be initialized before any early returns
|
|
1072
|
+
// this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
|
|
1250
1073
|
|
|
1074
|
+
React.useEffect(function () {
|
|
1075
|
+
onComputedProps(evaluatedOptions);
|
|
1076
|
+
}); // present warning message if any required props are missing
|
|
1251
1077
|
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1078
|
+
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
1079
|
+
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
1080
|
+
supports = vizConfig.supports;
|
|
1081
|
+
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptions);
|
|
1256
1082
|
|
|
1257
|
-
|
|
1083
|
+
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER)) {
|
|
1084
|
+
return React.createElement(MissingPropsMessage_1.default, {
|
|
1085
|
+
"data-test": "missing-props-message",
|
|
1086
|
+
width: width,
|
|
1087
|
+
height: height,
|
|
1088
|
+
missingProps: missing,
|
|
1089
|
+
backgroundColor: bgColorFromTheme
|
|
1090
|
+
});
|
|
1091
|
+
} // events
|
|
1258
1092
|
|
|
1259
|
-
var T = __webpack_require__(0);
|
|
1260
1093
|
|
|
1261
|
-
var
|
|
1094
|
+
var eventCallbackProps = {};
|
|
1262
1095
|
|
|
1263
|
-
|
|
1096
|
+
if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
|
|
1097
|
+
var supportedEvents = vizConfig.events;
|
|
1098
|
+
Object.keys(supportedEvents).forEach(function (eventName) {
|
|
1099
|
+
var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
|
|
1100
|
+
eventCallbackProps[eventCallbackPropName] = null; // todo: refactor single value and single value icon to send payload from viz
|
|
1101
|
+
// then remove these lines
|
|
1264
1102
|
|
|
1265
|
-
var
|
|
1103
|
+
var payloadKeys = supportedEvents[eventName].payloadKeys;
|
|
1104
|
+
var payload = {};
|
|
1266
1105
|
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
* @returns {boolean}
|
|
1273
|
-
*/
|
|
1106
|
+
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
1107
|
+
payloadKeys.forEach(function (p) {
|
|
1108
|
+
payload[p] = evaluatedOptions[p];
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1274
1111
|
|
|
1112
|
+
eventCallbackProps[eventCallbackPropName] = function (ev) {
|
|
1113
|
+
if (ev && ev.payload) {
|
|
1114
|
+
payload = ev.payload;
|
|
1115
|
+
}
|
|
1275
1116
|
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
}
|
|
1117
|
+
return onEventTrigger({
|
|
1118
|
+
originalEvent: ev,
|
|
1119
|
+
payload: payload,
|
|
1120
|
+
type: eventName
|
|
1121
|
+
});
|
|
1122
|
+
};
|
|
1123
|
+
});
|
|
1124
|
+
} // compute pure viz props which are not from options
|
|
1284
1125
|
|
|
1285
|
-
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
1286
|
-
var propTypes = {
|
|
1287
|
-
icon: T.func,
|
|
1288
|
-
width: T.oneOfType([T.string, T.number]),
|
|
1289
|
-
height: T.oneOfType([T.string, T.number]),
|
|
1290
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
1291
|
-
backgroundColor: T.string,
|
|
1292
|
-
iconColor: T.string
|
|
1293
|
-
};
|
|
1294
|
-
/**
|
|
1295
|
-
* @method IconPlaceholder
|
|
1296
|
-
* @param {IconPlaceholderProps} props
|
|
1297
|
-
* @returns {React.ReactElement}
|
|
1298
|
-
*/
|
|
1299
1126
|
|
|
1300
|
-
var
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1127
|
+
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptions), eventCallbackProps), {
|
|
1128
|
+
themeFunc: themeFunc
|
|
1129
|
+
}));
|
|
1130
|
+
/**
|
|
1131
|
+
* PAGE_AND_SORT behavior
|
|
1132
|
+
*
|
|
1133
|
+
* Some visualizations, like table, requires metadata about the datasource,
|
|
1134
|
+
* like total number of results, current count, offset, and sort, for rendering
|
|
1135
|
+
* paginator and sorting direction. In this approach, the visualization
|
|
1136
|
+
* allow users to set 'paginateDataSourceKey' to select which datasource
|
|
1137
|
+
* should the visualization extract the metadata from. It defaults to 'primary' datasource.
|
|
1138
|
+
* The visualization config should set the PAGE_AND_SORT behavior to receive
|
|
1139
|
+
* 'requestParams', 'meta' and onRequestParams callback as props.
|
|
1140
|
+
*
|
|
1141
|
+
* In future, we could automatically detect which all datasources are being used
|
|
1142
|
+
* and bind those magically to pagination/sorting behavior.
|
|
1143
|
+
*/
|
|
1305
1144
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
left: '50%',
|
|
1310
|
-
top: '50%',
|
|
1311
|
-
color: iconColor,
|
|
1312
|
-
opacity: 0.15,
|
|
1313
|
-
position: 'absolute',
|
|
1314
|
-
transform: 'translate(-50%, -50%)'
|
|
1315
|
-
},
|
|
1316
|
-
width: '50%',
|
|
1317
|
-
height: '50%'
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1145
|
+
var dataSourceMetadata = {};
|
|
1146
|
+
var OptionKey = 'paginateDataSourceKey';
|
|
1147
|
+
var paginateDataSourceKey = lodash_1.has(evaluatedOptions, OptionKey) && evaluatedOptions[OptionKey] || 'primary';
|
|
1320
1148
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
level: "warning",
|
|
1325
|
-
message: i18n_1._('No DataSource Connected')
|
|
1326
|
-
});
|
|
1327
|
-
};
|
|
1149
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
|
|
1150
|
+
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1151
|
+
var meta = lodash_1.get(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1328
1152
|
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
height: 250
|
|
1333
|
-
};
|
|
1334
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
1153
|
+
var handleRequestParamsChange = function handleRequestParamsChange(payload) {
|
|
1154
|
+
return onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1155
|
+
};
|
|
1335
1156
|
|
|
1336
|
-
|
|
1157
|
+
var sortParams = getSorting_1.getSortingParams({
|
|
1158
|
+
requestParams: requestParams,
|
|
1159
|
+
meta: meta,
|
|
1160
|
+
onRequestParamsChange: handleRequestParamsChange
|
|
1161
|
+
});
|
|
1162
|
+
var paginatorParams = getPagination_1.getPaginationParams({
|
|
1163
|
+
requestParams: requestParams,
|
|
1164
|
+
meta: meta,
|
|
1165
|
+
onRequestParamsChange: handleRequestParamsChange
|
|
1166
|
+
});
|
|
1167
|
+
dataSourceMetadata = {
|
|
1168
|
+
sortParams: sortParams,
|
|
1169
|
+
paginatorParams: paginatorParams
|
|
1170
|
+
};
|
|
1171
|
+
}
|
|
1337
1172
|
|
|
1338
|
-
|
|
1339
|
-
|
|
1173
|
+
return React.createElement(SanitizedReactViz, Object.assign({
|
|
1174
|
+
mode: mode,
|
|
1175
|
+
width: width,
|
|
1176
|
+
height: height
|
|
1177
|
+
}, evaluatedOptions, computedVizProps, eventCallbackProps, dataSourceMetadata));
|
|
1178
|
+
};
|
|
1340
1179
|
|
|
1341
|
-
|
|
1180
|
+
DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
|
|
1181
|
+
DashboardViz.defaultProps = Object.assign(Object.assign(Object.assign({}, SplunkVisualization_1.default.defaultProps), ReactViz.defaultProps), {
|
|
1182
|
+
// using withTheme requires component to receive theme prop. In case the consumer did not provide ThemeProvider, a default empty object will prevent warnings.
|
|
1183
|
+
theme: {}
|
|
1184
|
+
}); // attach viz config
|
|
1185
|
+
|
|
1186
|
+
DashboardViz.config = vizConfig; // @ts-ignore: TODO fix sc upgrade TS issues
|
|
1342
1187
|
|
|
1188
|
+
return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1189
|
+
};
|
|
1343
1190
|
|
|
1344
|
-
|
|
1191
|
+
exports.default = withDashboardViz;
|
|
1345
1192
|
|
|
1346
|
-
|
|
1347
|
-
value: true
|
|
1348
|
-
});
|
|
1349
|
-
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
1193
|
+
/***/ }),
|
|
1350
1194
|
|
|
1351
|
-
|
|
1195
|
+
/***/ 33:
|
|
1196
|
+
/***/ (function(module, exports) {
|
|
1352
1197
|
|
|
1353
|
-
|
|
1198
|
+
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1354
1199
|
|
|
1355
|
-
|
|
1200
|
+
/***/ }),
|
|
1356
1201
|
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
currentSortDir: T.oneOf(DataSource_1.validSortDirs),
|
|
1360
|
-
onSort: T.func
|
|
1361
|
-
});
|
|
1202
|
+
/***/ 34:
|
|
1203
|
+
/***/ (function(module, exports) {
|
|
1362
1204
|
|
|
1363
|
-
|
|
1364
|
-
var requestParams = _ref.requestParams,
|
|
1365
|
-
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
1366
|
-
var currentSortKey;
|
|
1367
|
-
var currentSortDir;
|
|
1368
|
-
var nextSortDirMap = {
|
|
1369
|
-
asc: 'desc',
|
|
1370
|
-
desc: 'asc',
|
|
1371
|
-
none: 'asc'
|
|
1372
|
-
};
|
|
1373
|
-
var onSort;
|
|
1205
|
+
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1374
1206
|
|
|
1375
|
-
|
|
1376
|
-
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
1377
|
-
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
1378
|
-
currentSortDir = requestParams.sort[currentSortKey];
|
|
1379
|
-
} // undid memoization since there is a dependency on requestParams, which is a deeply nested object
|
|
1207
|
+
/***/ }),
|
|
1380
1208
|
|
|
1209
|
+
/***/ 35:
|
|
1210
|
+
/***/ (function(module, exports) {
|
|
1381
1211
|
|
|
1382
|
-
|
|
1383
|
-
var sortKey = _ref2.sortKey,
|
|
1384
|
-
sortDir = _ref2.sortDir;
|
|
1212
|
+
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1385
1213
|
|
|
1386
|
-
|
|
1387
|
-
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
1388
|
-
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
1389
|
-
offset: 0,
|
|
1390
|
-
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
1391
|
-
}));
|
|
1392
|
-
} else {
|
|
1393
|
-
onRequestParamsChange(requestParams);
|
|
1394
|
-
}
|
|
1395
|
-
};
|
|
1396
|
-
}
|
|
1214
|
+
/***/ }),
|
|
1397
1215
|
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
currentSortDir: currentSortDir,
|
|
1401
|
-
onSort: onSort
|
|
1402
|
-
};
|
|
1403
|
-
};
|
|
1216
|
+
/***/ 36:
|
|
1217
|
+
/***/ (function(module, exports) {
|
|
1404
1218
|
|
|
1405
|
-
exports
|
|
1219
|
+
module.exports = require("@splunk/moment");
|
|
1406
1220
|
|
|
1407
1221
|
/***/ }),
|
|
1408
1222
|
|
|
1409
|
-
/***/
|
|
1223
|
+
/***/ 37:
|
|
1410
1224
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1411
1225
|
|
|
1412
1226
|
"use strict";
|
|
1413
1227
|
|
|
1414
1228
|
|
|
1229
|
+
var _classCallCheck = __webpack_require__(11);
|
|
1230
|
+
|
|
1415
1231
|
Object.defineProperty(exports, "__esModule", {
|
|
1416
1232
|
value: true
|
|
1417
1233
|
});
|
|
1418
|
-
exports.
|
|
1234
|
+
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
1235
|
+
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1419
1236
|
|
|
1420
|
-
var T = __webpack_require__(
|
|
1237
|
+
var T = __webpack_require__(1);
|
|
1421
1238
|
|
|
1422
1239
|
var lodash_1 = __webpack_require__(3);
|
|
1423
1240
|
|
|
1424
|
-
|
|
1425
|
-
isPaging: T.bool,
|
|
1426
|
-
current: T.number,
|
|
1427
|
-
totalPages: T.number,
|
|
1428
|
-
onChange: T.func
|
|
1429
|
-
});
|
|
1241
|
+
var VizActionHandler_1 = __webpack_require__(38); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1430
1242
|
|
|
1431
|
-
var getPaginationParams = function getPaginationParams(_ref) {
|
|
1432
|
-
var requestParams = _ref.requestParams,
|
|
1433
|
-
meta = _ref.meta,
|
|
1434
|
-
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
1435
|
-
var totalCount = meta && meta.totalCount || 0;
|
|
1436
|
-
var offset = requestParams && requestParams.offset || 0;
|
|
1437
|
-
var count = requestParams && requestParams.count;
|
|
1438
|
-
var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
1439
|
-
var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
1440
|
-
var isPaging = totalPages > 1 && lodash_1.isFunction(onRequestParamsChange);
|
|
1441
1243
|
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1244
|
+
exports.INITIAL_WIDTH = 250;
|
|
1245
|
+
exports.INITIAL_HEIGHT = 250;
|
|
1246
|
+
/**
|
|
1247
|
+
* A Splunk visualization
|
|
1248
|
+
*/
|
|
1446
1249
|
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
}
|
|
1250
|
+
var SplunkVisualization = function SplunkVisualization() {
|
|
1251
|
+
_classCallCheck(this, SplunkVisualization);
|
|
1252
|
+
};
|
|
1451
1253
|
|
|
1452
|
-
|
|
1254
|
+
SplunkVisualization.propTypes = {
|
|
1255
|
+
/**
|
|
1256
|
+
* display mode
|
|
1257
|
+
*/
|
|
1258
|
+
mode: T.oneOf(['view', 'edit', 'export']).isRequired,
|
|
1453
1259
|
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1260
|
+
/**
|
|
1261
|
+
* width in pixel or string, defaults to 100%
|
|
1262
|
+
*/
|
|
1263
|
+
width: T.oneOfType([T.string, T.number]).isRequired,
|
|
1458
1264
|
|
|
1459
|
-
|
|
1460
|
-
|
|
1265
|
+
/**
|
|
1266
|
+
* height in pixel or string
|
|
1267
|
+
*/
|
|
1268
|
+
height: T.oneOfType([T.string, T.number]).isRequired,
|
|
1461
1269
|
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
onChange: lodash_1.isFunction(onRequestParamsChange) ? onChangeHandler : lodash_1.noop
|
|
1467
|
-
};
|
|
1468
|
-
};
|
|
1270
|
+
/**
|
|
1271
|
+
* visualization context used for dynamic option evaluation
|
|
1272
|
+
*/
|
|
1273
|
+
context: T.object,
|
|
1469
1274
|
|
|
1470
|
-
|
|
1275
|
+
/**
|
|
1276
|
+
* visualization formatting options
|
|
1277
|
+
*/
|
|
1278
|
+
options: T.object,
|
|
1471
1279
|
|
|
1472
|
-
|
|
1280
|
+
/**
|
|
1281
|
+
* A callback to update formatting options
|
|
1282
|
+
*/
|
|
1283
|
+
onOptionsChange: T.func,
|
|
1473
1284
|
|
|
1474
|
-
|
|
1475
|
-
|
|
1285
|
+
/**
|
|
1286
|
+
* datasource state which include data and request params, object key indicate the datasource type.
|
|
1287
|
+
*/
|
|
1288
|
+
dataSources: T.objectOf(T.shape({
|
|
1289
|
+
/**
|
|
1290
|
+
* current request params
|
|
1291
|
+
*/
|
|
1292
|
+
requestParams: T.object,
|
|
1476
1293
|
|
|
1477
|
-
|
|
1294
|
+
/**
|
|
1295
|
+
* current dataset
|
|
1296
|
+
*/
|
|
1297
|
+
data: T.shape({
|
|
1298
|
+
fields: T.array,
|
|
1299
|
+
columns: T.array
|
|
1300
|
+
}),
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* error
|
|
1304
|
+
*/
|
|
1305
|
+
error: T.shape({
|
|
1306
|
+
level: T.string,
|
|
1307
|
+
message: T.string
|
|
1308
|
+
}),
|
|
1309
|
+
|
|
1310
|
+
/**
|
|
1311
|
+
* meta data that came with the dataset
|
|
1312
|
+
*/
|
|
1313
|
+
meta: T.object
|
|
1314
|
+
})),
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* A callback to trigger event
|
|
1318
|
+
*/
|
|
1319
|
+
onEventTrigger: T.func,
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* Inform viz if there are handlers listening to events
|
|
1323
|
+
*/
|
|
1324
|
+
hasEventHandlers: T.bool,
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* A callback to communicate computed props to a consumer
|
|
1328
|
+
*/
|
|
1329
|
+
onComputedProps: T.func,
|
|
1330
|
+
|
|
1331
|
+
/**
|
|
1332
|
+
* A callback to obtain visualization api
|
|
1333
|
+
*/
|
|
1334
|
+
vizActionHandlerRef: T.func,
|
|
1335
|
+
loading: T.bool,
|
|
1336
|
+
theme: T.object,
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* A callback to request new data with updated request params
|
|
1340
|
+
*/
|
|
1341
|
+
onRequestParamsChange: T.func
|
|
1342
|
+
};
|
|
1343
|
+
/**
|
|
1344
|
+
*
|
|
1345
|
+
*/
|
|
1346
|
+
|
|
1347
|
+
SplunkVisualization.defaultProps = {
|
|
1348
|
+
// BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
|
|
1349
|
+
width: '100%',
|
|
1350
|
+
height: exports.INITIAL_HEIGHT,
|
|
1351
|
+
dataSources: {},
|
|
1352
|
+
onEventTrigger: function onEventTrigger() {
|
|
1353
|
+
return {};
|
|
1354
|
+
},
|
|
1355
|
+
mode: 'view',
|
|
1356
|
+
hasEventHandlers: false,
|
|
1357
|
+
options: {},
|
|
1358
|
+
context: {},
|
|
1359
|
+
onOptionsChange: function onOptionsChange() {
|
|
1360
|
+
return {};
|
|
1361
|
+
},
|
|
1362
|
+
vizActionHandlerRef: function vizActionHandlerRef() {
|
|
1363
|
+
return new VizActionHandler_1.DefaultVizActionHandler();
|
|
1364
|
+
},
|
|
1365
|
+
onComputedProps: function onComputedProps() {
|
|
1366
|
+
return {};
|
|
1367
|
+
},
|
|
1368
|
+
loading: false,
|
|
1369
|
+
onRequestParamsChange: lodash_1.noop
|
|
1370
|
+
};
|
|
1371
|
+
exports.default = SplunkVisualization;
|
|
1478
1372
|
|
|
1479
1373
|
/***/ }),
|
|
1480
1374
|
|
|
1481
|
-
/***/
|
|
1375
|
+
/***/ 38:
|
|
1482
1376
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1483
1377
|
|
|
1484
1378
|
"use strict";
|
|
1485
1379
|
|
|
1486
1380
|
|
|
1381
|
+
var _classCallCheck = __webpack_require__(11);
|
|
1382
|
+
|
|
1383
|
+
var _createClass = __webpack_require__(19);
|
|
1384
|
+
|
|
1487
1385
|
Object.defineProperty(exports, "__esModule", {
|
|
1488
1386
|
value: true
|
|
1489
1387
|
});
|
|
1490
|
-
exports.
|
|
1491
|
-
var VizCategory;
|
|
1388
|
+
exports.DefaultVizActionHandler = void 0;
|
|
1492
1389
|
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
}
|
|
1390
|
+
var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
1391
|
+
function DefaultVizActionHandler() {
|
|
1392
|
+
_classCallCheck(this, DefaultVizActionHandler);
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
_createClass(DefaultVizActionHandler, [{
|
|
1396
|
+
key: "focus",
|
|
1397
|
+
value: function focus() {// noop
|
|
1398
|
+
}
|
|
1399
|
+
}, {
|
|
1400
|
+
key: "snapshot",
|
|
1401
|
+
value: function snapshot() {
|
|
1402
|
+
return null; // noop
|
|
1403
|
+
}
|
|
1404
|
+
}]);
|
|
1405
|
+
|
|
1406
|
+
return DefaultVizActionHandler;
|
|
1407
|
+
}();
|
|
1408
|
+
|
|
1409
|
+
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1507
1410
|
|
|
1508
1411
|
/***/ }),
|
|
1509
1412
|
|
|
1510
|
-
/***/
|
|
1413
|
+
/***/ 39:
|
|
1511
1414
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1512
1415
|
|
|
1513
1416
|
"use strict";
|
|
@@ -1516,663 +1419,737 @@ var VizCategory;
|
|
|
1516
1419
|
Object.defineProperty(exports, "__esModule", {
|
|
1517
1420
|
value: true
|
|
1518
1421
|
});
|
|
1422
|
+
exports.validSortDirs = void 0;
|
|
1423
|
+
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
1519
1424
|
|
|
1520
|
-
|
|
1425
|
+
/***/ }),
|
|
1521
1426
|
|
|
1522
|
-
|
|
1427
|
+
/***/ 4:
|
|
1428
|
+
/***/ (function(module, exports) {
|
|
1523
1429
|
|
|
1524
|
-
|
|
1430
|
+
module.exports = require("styled-components");
|
|
1525
1431
|
|
|
1526
|
-
|
|
1432
|
+
/***/ }),
|
|
1527
1433
|
|
|
1528
|
-
|
|
1434
|
+
/***/ 40:
|
|
1435
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1529
1436
|
|
|
1530
|
-
|
|
1437
|
+
"use strict";
|
|
1531
1438
|
|
|
1532
|
-
var moment_1 = __webpack_require__(35);
|
|
1533
1439
|
|
|
1534
|
-
|
|
1440
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1441
|
+
value: true
|
|
1442
|
+
});
|
|
1443
|
+
exports.useDeepMemo = void 0;
|
|
1535
1444
|
|
|
1536
|
-
var
|
|
1445
|
+
var react_1 = __webpack_require__(0);
|
|
1537
1446
|
|
|
1538
|
-
var
|
|
1447
|
+
var lodash_1 = __webpack_require__(3);
|
|
1448
|
+
/**
|
|
1449
|
+
* This hook evaluates and stores the result of a passed function and only
|
|
1450
|
+
* re-evaluates the function when passed dependencies change.
|
|
1451
|
+
*
|
|
1452
|
+
* It is different from the internal React useMemo in the following aspects:
|
|
1453
|
+
* - it only stores the last evaluated result
|
|
1454
|
+
* - it uses a deep equality check to determine if dependencies have changed
|
|
1455
|
+
*
|
|
1456
|
+
* Inspired by apollo-client's useDeepMemo
|
|
1457
|
+
*
|
|
1458
|
+
* @param fn the function to be executed and
|
|
1459
|
+
* @param dependencies an array of dependencies
|
|
1460
|
+
*/
|
|
1539
1461
|
|
|
1540
|
-
var SplunkVisualization_1 = __webpack_require__(36);
|
|
1541
1462
|
|
|
1542
|
-
var
|
|
1463
|
+
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1464
|
+
var ref = react_1.useRef();
|
|
1543
1465
|
|
|
1544
|
-
|
|
1466
|
+
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
1467
|
+
ref.current = {
|
|
1468
|
+
dependencies: dependencies,
|
|
1469
|
+
value: fn()
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1545
1472
|
|
|
1546
|
-
|
|
1473
|
+
return ref.current.value;
|
|
1474
|
+
};
|
|
1547
1475
|
|
|
1548
|
-
|
|
1476
|
+
exports.useDeepMemo = useDeepMemo;
|
|
1549
1477
|
|
|
1550
|
-
|
|
1478
|
+
/***/ }),
|
|
1551
1479
|
|
|
1552
|
-
|
|
1480
|
+
/***/ 41:
|
|
1481
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1553
1482
|
|
|
1554
|
-
|
|
1555
|
-
/**
|
|
1556
|
-
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
1557
|
-
* @param {DashboardVizOpts} opts
|
|
1558
|
-
* @returns {HOC}
|
|
1559
|
-
*/
|
|
1483
|
+
"use strict";
|
|
1560
1484
|
|
|
1561
1485
|
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
1567
|
-
disableEditModeCover = opts.disableEditModeCover,
|
|
1568
|
-
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
1486
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1487
|
+
value: true
|
|
1488
|
+
});
|
|
1489
|
+
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
1569
1490
|
|
|
1570
|
-
|
|
1571
|
-
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
|
|
1491
|
+
var React = __webpack_require__(0);
|
|
1572
1492
|
|
|
1573
|
-
|
|
1574
|
-
var mode = props.mode,
|
|
1575
|
-
hasEventHandlers = props.hasEventHandlers,
|
|
1576
|
-
dataSources = props.dataSources,
|
|
1577
|
-
options = props.options,
|
|
1578
|
-
_props$context = props.context,
|
|
1579
|
-
context = _props$context === void 0 ? {} : _props$context,
|
|
1580
|
-
width = props.width,
|
|
1581
|
-
height = props.height,
|
|
1582
|
-
onComputedProps = props.onComputedProps,
|
|
1583
|
-
onEventTrigger = props.onEventTrigger,
|
|
1584
|
-
theme = props.theme,
|
|
1585
|
-
onRequestParamsChange = props.onRequestParamsChange;
|
|
1493
|
+
var T = __webpack_require__(1);
|
|
1586
1494
|
|
|
1587
|
-
|
|
1588
|
-
serializedTimezone = _React$useContext.serializedTimezone;
|
|
1495
|
+
var i18n_1 = __webpack_require__(2);
|
|
1589
1496
|
|
|
1590
|
-
|
|
1591
|
-
/*
|
|
1592
|
-
@splunk/moment currently does not allow us to customize the timezone on a per visualization basis.
|
|
1593
|
-
This ensures that if a timezone was provided via TimezoneContext @splunk/moment time formatting
|
|
1594
|
-
will use it.
|
|
1595
|
-
@TODO(pwied):
|
|
1596
|
-
- remove when we moved away from @splunk/moment
|
|
1597
|
-
- provide timezone context to dynamic option evaluation phase
|
|
1598
|
-
*/
|
|
1599
|
-
if (!moment_1.default.getDefaultSplunkTimezone()) {
|
|
1600
|
-
moment_1.default.setDefaultSplunkTimezone(serializedTimezone);
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1497
|
+
var Message_1 = __webpack_require__(10);
|
|
1603
1498
|
|
|
1604
|
-
|
|
1605
|
-
|
|
1499
|
+
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1500
|
+
/**
|
|
1501
|
+
* @method isMissing
|
|
1502
|
+
* @param {any} v
|
|
1503
|
+
* @returns {boolean} true if the input value === null or undefined
|
|
1504
|
+
*/
|
|
1606
1505
|
|
|
1607
|
-
return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
|
|
1608
|
-
};
|
|
1609
1506
|
|
|
1610
|
-
|
|
1507
|
+
var isMissing = function isMissing(v) {
|
|
1508
|
+
return v === null || v === undefined;
|
|
1509
|
+
};
|
|
1611
1510
|
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1511
|
+
exports.isMissing = isMissing;
|
|
1512
|
+
/**
|
|
1513
|
+
* @method misskingKeys
|
|
1514
|
+
* @param {string[]} keys
|
|
1515
|
+
* @param {object} target
|
|
1516
|
+
* @returns {string[]} the keys of missing required props
|
|
1517
|
+
*/
|
|
1618
1518
|
|
|
1619
|
-
|
|
1519
|
+
var missingKeys = function missingKeys(keys, target) {
|
|
1520
|
+
return keys.filter(function (k) {
|
|
1521
|
+
return exports.isMissing(target[k]);
|
|
1522
|
+
});
|
|
1523
|
+
};
|
|
1620
1524
|
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1525
|
+
exports.missingKeys = missingKeys;
|
|
1526
|
+
var propTypes = {
|
|
1527
|
+
width: T.oneOfType([T.string, T.number]),
|
|
1528
|
+
height: T.oneOfType([T.string, T.number]),
|
|
1529
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
1530
|
+
backgroundColor: T.string,
|
|
1531
|
+
missingProps: T.arrayOf(T.string)
|
|
1532
|
+
};
|
|
1533
|
+
/**
|
|
1534
|
+
* @method MissingPropsMessage
|
|
1535
|
+
* @param {MissingPropsProps} props
|
|
1536
|
+
* @returns {React.ReactElement}
|
|
1537
|
+
*/
|
|
1634
1538
|
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1539
|
+
var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
1540
|
+
var width = props.width,
|
|
1541
|
+
height = props.height,
|
|
1542
|
+
missingProps = props.missingProps;
|
|
1543
|
+
return React.createElement(Message_1.default, {
|
|
1544
|
+
"data-test": "message",
|
|
1545
|
+
width: width,
|
|
1546
|
+
height: height,
|
|
1547
|
+
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
1548
|
+
});
|
|
1549
|
+
};
|
|
1638
1550
|
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1551
|
+
exports.MissingPropsMessage = MissingPropsMessage;
|
|
1552
|
+
exports.MissingPropsMessage.propTypes = propTypes;
|
|
1553
|
+
exports.MissingPropsMessage.defaultProps = {
|
|
1554
|
+
width: '100%',
|
|
1555
|
+
height: 250
|
|
1556
|
+
};
|
|
1557
|
+
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
1643
1558
|
|
|
1644
|
-
|
|
1645
|
-
return React.createElement(MissingPropsMessage_1.default, {
|
|
1646
|
-
"data-test": "missing-props-message",
|
|
1647
|
-
width: width,
|
|
1648
|
-
height: height,
|
|
1649
|
-
missingProps: missing,
|
|
1650
|
-
backgroundColor: bgColorFromTheme
|
|
1651
|
-
});
|
|
1652
|
-
} // events
|
|
1559
|
+
/***/ }),
|
|
1653
1560
|
|
|
1561
|
+
/***/ 42:
|
|
1562
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1654
1563
|
|
|
1655
|
-
|
|
1564
|
+
"use strict";
|
|
1656
1565
|
|
|
1657
|
-
if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
|
|
1658
|
-
var supportedEvents = vizConfig.events;
|
|
1659
|
-
Object.keys(supportedEvents).forEach(function (eventName) {
|
|
1660
|
-
var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
|
|
1661
|
-
eventCallbackProps[eventCallbackPropName] = null; // todo: refactor single value and single value icon to send payload from viz
|
|
1662
|
-
// then remove these lines
|
|
1663
1566
|
|
|
1664
|
-
|
|
1665
|
-
|
|
1567
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1568
|
+
value: true
|
|
1569
|
+
});
|
|
1666
1570
|
|
|
1667
|
-
|
|
1668
|
-
payloadKeys.forEach(function (p) {
|
|
1669
|
-
payload[p] = evaluatedOptions[p];
|
|
1670
|
-
});
|
|
1671
|
-
}
|
|
1571
|
+
var React = __webpack_require__(0);
|
|
1672
1572
|
|
|
1673
|
-
|
|
1674
|
-
if (ev && ev.payload) {
|
|
1675
|
-
payload = ev.payload;
|
|
1676
|
-
}
|
|
1573
|
+
var styled_components_1 = __webpack_require__(4);
|
|
1677
1574
|
|
|
1678
|
-
|
|
1679
|
-
originalEvent: ev,
|
|
1680
|
-
payload: payload,
|
|
1681
|
-
type: eventName
|
|
1682
|
-
});
|
|
1683
|
-
};
|
|
1684
|
-
});
|
|
1685
|
-
} // compute pure viz props which are not from options
|
|
1575
|
+
var hocUtils_1 = __webpack_require__(14);
|
|
1686
1576
|
|
|
1577
|
+
var Cover = styled_components_1.default.div.withConfig({
|
|
1578
|
+
displayName: "withEditModeCover__Cover",
|
|
1579
|
+
componentId: "sc-1gsbnxb-0"
|
|
1580
|
+
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1581
|
+
var Blocker = styled_components_1.default.div.attrs({
|
|
1582
|
+
'data-splunk-visualization-version': "25.3.0 - dae70ec02"
|
|
1583
|
+
}).withConfig({
|
|
1584
|
+
displayName: "withEditModeCover__Blocker",
|
|
1585
|
+
componentId: "sc-1gsbnxb-1"
|
|
1586
|
+
})(["position:relative;width:100%;height:100%;"]);
|
|
1587
|
+
/**
|
|
1588
|
+
* HOC that renders a cover layer in edit mode
|
|
1589
|
+
* @method withEditModeCover
|
|
1590
|
+
* @param {ExtendedDashViz} Visualization
|
|
1591
|
+
* @returns {ExtendedDashViz} Wrapper
|
|
1592
|
+
*/
|
|
1687
1593
|
|
|
1688
|
-
|
|
1689
|
-
|
|
1594
|
+
var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
|
|
1595
|
+
var Wrapper = function Wrapper(props) {
|
|
1596
|
+
var mode = props.mode;
|
|
1597
|
+
var showEditCover = mode === 'edit' && !disableEditModeCover;
|
|
1598
|
+
return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
|
|
1599
|
+
"data-test": "edit-mode-cover"
|
|
1690
1600
|
}));
|
|
1691
|
-
|
|
1692
|
-
* PAGE_AND_SORT behavior
|
|
1693
|
-
*
|
|
1694
|
-
* Some visualizations, like table, requires metadata about the datasource,
|
|
1695
|
-
* like total number of results, current count, offset, and sort, for rendering
|
|
1696
|
-
* paginator and sorting direction. In this approach, the visualization
|
|
1697
|
-
* allow users to set 'paginateDataSourceKey' to select which datasource
|
|
1698
|
-
* should the visualization extract the metadata from. It defaults to 'primary' datasource.
|
|
1699
|
-
* The visualization config should set the PAGE_AND_SORT behavior to receive
|
|
1700
|
-
* 'requestParams', 'meta' and onRequestParams callback as props.
|
|
1701
|
-
*
|
|
1702
|
-
* In future, we could automatically detect which all datasources are being used
|
|
1703
|
-
* and bind those magically to pagination/sorting behavior.
|
|
1704
|
-
*/
|
|
1601
|
+
};
|
|
1705
1602
|
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1603
|
+
hocUtils_1.extendStaticWrapperProps({
|
|
1604
|
+
Wrapper: Wrapper,
|
|
1605
|
+
Visualization: Visualization
|
|
1606
|
+
});
|
|
1607
|
+
return Wrapper;
|
|
1608
|
+
};
|
|
1709
1609
|
|
|
1710
|
-
|
|
1711
|
-
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1712
|
-
var meta = lodash_1.get(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1610
|
+
exports.default = withEditModeCover;
|
|
1713
1611
|
|
|
1714
|
-
|
|
1715
|
-
return onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1716
|
-
};
|
|
1612
|
+
/***/ }),
|
|
1717
1613
|
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
});
|
|
1723
|
-
var paginatorParams = getPagination_1.getPaginationParams({
|
|
1724
|
-
requestParams: requestParams,
|
|
1725
|
-
meta: meta,
|
|
1726
|
-
onRequestParamsChange: handleRequestParamsChange
|
|
1727
|
-
});
|
|
1728
|
-
dataSourceMetadata = {
|
|
1729
|
-
sortParams: sortParams,
|
|
1730
|
-
paginatorParams: paginatorParams
|
|
1731
|
-
};
|
|
1732
|
-
}
|
|
1614
|
+
/***/ 43:
|
|
1615
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1616
|
+
|
|
1617
|
+
"use strict";
|
|
1733
1618
|
|
|
1734
|
-
return React.createElement(SanitizedReactViz, Object.assign({
|
|
1735
|
-
mode: mode,
|
|
1736
|
-
width: width,
|
|
1737
|
-
height: height
|
|
1738
|
-
}, evaluatedOptions, computedVizProps, eventCallbackProps, dataSourceMetadata));
|
|
1739
|
-
};
|
|
1740
1619
|
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
theme: {}
|
|
1745
|
-
}); // attach viz config
|
|
1620
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1621
|
+
value: true
|
|
1622
|
+
});
|
|
1746
1623
|
|
|
1747
|
-
|
|
1624
|
+
var React = __webpack_require__(0);
|
|
1748
1625
|
|
|
1749
|
-
|
|
1750
|
-
};
|
|
1626
|
+
var colorUtils_1 = __webpack_require__(12);
|
|
1751
1627
|
|
|
1752
|
-
|
|
1628
|
+
var variables_1 = __webpack_require__(9);
|
|
1753
1629
|
|
|
1754
|
-
|
|
1630
|
+
var IconPlaceholder_1 = __webpack_require__(27);
|
|
1755
1631
|
|
|
1756
|
-
|
|
1757
|
-
/***/ (function(module, exports) {
|
|
1632
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
1758
1633
|
|
|
1759
|
-
|
|
1634
|
+
var hocUtils_1 = __webpack_require__(14);
|
|
1760
1635
|
|
|
1761
|
-
|
|
1636
|
+
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
1637
|
+
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
1638
|
+
var config = Visualization.config;
|
|
1639
|
+
var themes = config.themes;
|
|
1762
1640
|
|
|
1763
|
-
|
|
1764
|
-
|
|
1641
|
+
var Wrapper = function Wrapper(props) {
|
|
1642
|
+
var _a, _b;
|
|
1765
1643
|
|
|
1766
|
-
|
|
1644
|
+
var dataSources = props.dataSources,
|
|
1645
|
+
loading = props.loading,
|
|
1646
|
+
options = props.options,
|
|
1647
|
+
height = props.height,
|
|
1648
|
+
width = props.width;
|
|
1649
|
+
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
1650
|
+
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);
|
|
1651
|
+
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
1652
|
+
var iconColor = variables_1.default.contentColorActive(props);
|
|
1767
1653
|
|
|
1768
|
-
|
|
1654
|
+
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
1655
|
+
return React.createElement(IconPlaceholder_1.default, {
|
|
1656
|
+
"data-test": "icon-placeholder",
|
|
1657
|
+
icon: icon,
|
|
1658
|
+
width: width,
|
|
1659
|
+
height: height,
|
|
1660
|
+
backgroundColor: bgColorFromTheme,
|
|
1661
|
+
iconColor: iconColor
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1769
1664
|
|
|
1770
|
-
|
|
1771
|
-
|
|
1665
|
+
return React.createElement(Visualization, Object.assign({}, props));
|
|
1666
|
+
};
|
|
1772
1667
|
|
|
1773
|
-
|
|
1668
|
+
hocUtils_1.extendStaticWrapperProps({
|
|
1669
|
+
Wrapper: Wrapper,
|
|
1670
|
+
Visualization: Visualization
|
|
1671
|
+
});
|
|
1672
|
+
return Wrapper;
|
|
1673
|
+
};
|
|
1674
|
+
|
|
1675
|
+
exports.default = withPlaceholder;
|
|
1774
1676
|
|
|
1775
1677
|
/***/ }),
|
|
1776
1678
|
|
|
1777
|
-
/***/
|
|
1679
|
+
/***/ 44:
|
|
1778
1680
|
/***/ (function(module, exports) {
|
|
1779
1681
|
|
|
1780
|
-
module.exports = require("@splunk/
|
|
1682
|
+
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
1781
1683
|
|
|
1782
1684
|
/***/ }),
|
|
1783
1685
|
|
|
1784
|
-
/***/
|
|
1686
|
+
/***/ 443:
|
|
1785
1687
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1786
1688
|
|
|
1787
1689
|
"use strict";
|
|
1788
1690
|
|
|
1789
1691
|
|
|
1790
|
-
var
|
|
1692
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1693
|
+
if (k2 === undefined) k2 = k;
|
|
1694
|
+
Object.defineProperty(o, k2, {
|
|
1695
|
+
enumerable: true,
|
|
1696
|
+
get: function get() {
|
|
1697
|
+
return m[k];
|
|
1698
|
+
}
|
|
1699
|
+
});
|
|
1700
|
+
} : function (o, m, k, k2) {
|
|
1701
|
+
if (k2 === undefined) k2 = k;
|
|
1702
|
+
o[k2] = m[k];
|
|
1703
|
+
});
|
|
1704
|
+
|
|
1705
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
1706
|
+
for (var p in m) {
|
|
1707
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1708
|
+
}
|
|
1709
|
+
};
|
|
1791
1710
|
|
|
1792
1711
|
Object.defineProperty(exports, "__esModule", {
|
|
1793
1712
|
value: true
|
|
1794
1713
|
});
|
|
1795
|
-
exports.
|
|
1796
|
-
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1714
|
+
exports.default = void 0;
|
|
1797
1715
|
|
|
1798
|
-
|
|
1716
|
+
__exportStar(__webpack_require__(149), exports);
|
|
1799
1717
|
|
|
1800
|
-
var
|
|
1718
|
+
var Scatter_1 = __webpack_require__(149);
|
|
1801
1719
|
|
|
1802
|
-
|
|
1720
|
+
Object.defineProperty(exports, "default", {
|
|
1721
|
+
enumerable: true,
|
|
1722
|
+
get: function get() {
|
|
1723
|
+
return Scatter_1.default;
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1803
1726
|
|
|
1727
|
+
/***/ }),
|
|
1804
1728
|
|
|
1805
|
-
|
|
1806
|
-
exports
|
|
1807
|
-
/**
|
|
1808
|
-
* A Splunk visualization
|
|
1809
|
-
*/
|
|
1729
|
+
/***/ 444:
|
|
1730
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1810
1731
|
|
|
1811
|
-
|
|
1812
|
-
_classCallCheck(this, SplunkVisualization);
|
|
1813
|
-
};
|
|
1732
|
+
"use strict";
|
|
1814
1733
|
|
|
1815
|
-
SplunkVisualization.propTypes = {
|
|
1816
|
-
/**
|
|
1817
|
-
* display mode
|
|
1818
|
-
*/
|
|
1819
|
-
mode: T.oneOf(['view', 'edit', 'export']).isRequired,
|
|
1820
1734
|
|
|
1821
|
-
|
|
1822
|
-
* width in pixel or string, defaults to 100%
|
|
1823
|
-
*/
|
|
1824
|
-
width: T.oneOfType([T.string, T.number]).isRequired,
|
|
1735
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
1825
1736
|
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1737
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1738
|
+
value: true
|
|
1739
|
+
});
|
|
1740
|
+
exports.optionsSchema = void 0;
|
|
1830
1741
|
|
|
1831
|
-
|
|
1832
|
-
* visualization context used for dynamic option evaluation
|
|
1833
|
-
*/
|
|
1834
|
-
context: T.object,
|
|
1742
|
+
var visualization_icons_1 = __webpack_require__(47);
|
|
1835
1743
|
|
|
1836
|
-
|
|
1837
|
-
* visualization formatting options
|
|
1838
|
-
*/
|
|
1839
|
-
options: T.object,
|
|
1744
|
+
var placeholders_1 = __webpack_require__(44);
|
|
1840
1745
|
|
|
1841
|
-
|
|
1842
|
-
* A callback to update formatting options
|
|
1843
|
-
*/
|
|
1844
|
-
onOptionsChange: T.func,
|
|
1746
|
+
var pick_1 = __webpack_require__(21);
|
|
1845
1747
|
|
|
1846
|
-
|
|
1847
|
-
* datasource state which include data and request params, object key indicate the datasource type.
|
|
1848
|
-
*/
|
|
1849
|
-
dataSources: T.objectOf(T.shape({
|
|
1850
|
-
/**
|
|
1851
|
-
* current request params
|
|
1852
|
-
*/
|
|
1853
|
-
requestParams: T.object,
|
|
1748
|
+
var variables_1 = __webpack_require__(9);
|
|
1854
1749
|
|
|
1855
|
-
|
|
1856
|
-
* current dataset
|
|
1857
|
-
*/
|
|
1858
|
-
data: T.shape({
|
|
1859
|
-
fields: T.array,
|
|
1860
|
-
columns: T.array
|
|
1861
|
-
}),
|
|
1750
|
+
var schemaUtils_1 = __webpack_require__(16);
|
|
1862
1751
|
|
|
1863
|
-
|
|
1864
|
-
* error
|
|
1865
|
-
*/
|
|
1866
|
-
error: T.shape({
|
|
1867
|
-
level: T.string,
|
|
1868
|
-
message: T.string
|
|
1869
|
-
}),
|
|
1752
|
+
var visualization_color_palettes_1 = __webpack_require__(46);
|
|
1870
1753
|
|
|
1871
|
-
|
|
1872
|
-
* meta data that came with the dataset
|
|
1873
|
-
*/
|
|
1874
|
-
meta: T.object
|
|
1875
|
-
})),
|
|
1754
|
+
var i18n_1 = __webpack_require__(2);
|
|
1876
1755
|
|
|
1877
|
-
|
|
1878
|
-
* A callback to trigger event
|
|
1879
|
-
*/
|
|
1880
|
-
onEventTrigger: T.func,
|
|
1756
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
1881
1757
|
|
|
1882
|
-
|
|
1883
|
-
* Inform viz if there are handlers listening to events
|
|
1884
|
-
*/
|
|
1885
|
-
hasEventHandlers: T.bool,
|
|
1758
|
+
var VizCategory_1 = __webpack_require__(31);
|
|
1886
1759
|
|
|
1887
|
-
|
|
1888
|
-
* A callback to communicate computed props to a consumer
|
|
1889
|
-
*/
|
|
1890
|
-
onComputedProps: T.func,
|
|
1760
|
+
var configUtils_1 = __webpack_require__(17);
|
|
1891
1761
|
|
|
1892
|
-
|
|
1893
|
-
* A callback to obtain visualization api
|
|
1894
|
-
*/
|
|
1895
|
-
vizActionHandlerRef: T.func,
|
|
1896
|
-
loading: T.bool,
|
|
1897
|
-
theme: T.object,
|
|
1762
|
+
var AxesChartDataConfig_1 = __webpack_require__(64);
|
|
1898
1763
|
|
|
1899
|
-
|
|
1900
|
-
* A callback to request new data with updated request params
|
|
1901
|
-
*/
|
|
1902
|
-
onRequestParamsChange: T.func
|
|
1903
|
-
};
|
|
1904
|
-
/**
|
|
1905
|
-
*
|
|
1906
|
-
*/
|
|
1764
|
+
var AxesChartXGridAndLabels_1 = __webpack_require__(67);
|
|
1907
1765
|
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1766
|
+
var AxesChartColorAndStyle_1 = __webpack_require__(65);
|
|
1767
|
+
|
|
1768
|
+
var AxesChartLegend_1 = __webpack_require__(66);
|
|
1769
|
+
|
|
1770
|
+
var AxesChartYGridAndLabels_1 = __webpack_require__(68);
|
|
1771
|
+
|
|
1772
|
+
var dataContract = {
|
|
1773
|
+
requiredDataSources: [{
|
|
1774
|
+
name: 'primary',
|
|
1775
|
+
description: 'DataSource that powers the visualization'
|
|
1776
|
+
}],
|
|
1777
|
+
optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
|
|
1778
|
+
// {
|
|
1779
|
+
// name: 'annotation',
|
|
1780
|
+
// description: 'DataSource that populates event annotations',
|
|
1781
|
+
// },
|
|
1782
|
+
],
|
|
1783
|
+
initialRequestParams: {
|
|
1784
|
+
primary: {
|
|
1785
|
+
offset: 0,
|
|
1786
|
+
count: 10000
|
|
1787
|
+
},
|
|
1788
|
+
annotation: {
|
|
1789
|
+
offset: 0,
|
|
1790
|
+
count: 10000
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
};
|
|
1794
|
+
var size = {
|
|
1795
|
+
initialWidth: 300,
|
|
1796
|
+
initialHeight: 300
|
|
1797
|
+
};
|
|
1798
|
+
var defaultContext = {};
|
|
1799
|
+
exports.optionsSchema = {
|
|
1800
|
+
x: {
|
|
1801
|
+
default: '> primary | seriesByIndex(0)',
|
|
1802
|
+
description: 'Specify the dataSource applied to the x-axis.',
|
|
1803
|
+
type: 'array',
|
|
1804
|
+
items: {
|
|
1805
|
+
type: ['string', 'number']
|
|
1806
|
+
}
|
|
1807
|
+
},
|
|
1808
|
+
y: {
|
|
1809
|
+
default: '> primary | seriesByIndex(1)',
|
|
1810
|
+
description: 'Specify the dataSource applied to the y-axis.',
|
|
1811
|
+
type: 'array',
|
|
1812
|
+
items: {
|
|
1813
|
+
type: ['string', 'number']
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
category: {
|
|
1817
|
+
description: 'Specify a sequence of dataSource events to be plotted on the chart.',
|
|
1818
|
+
type: 'array',
|
|
1819
|
+
items: {
|
|
1820
|
+
type: ['string', 'number']
|
|
1821
|
+
},
|
|
1822
|
+
default: '> primary | seriesByIndex(2)'
|
|
1823
|
+
},
|
|
1824
|
+
xField: {
|
|
1825
|
+
default: '> x | getField()',
|
|
1826
|
+
description: 'Specify the field that should be mapped to the x-axis.',
|
|
1827
|
+
type: 'string'
|
|
1828
|
+
},
|
|
1829
|
+
yField: {
|
|
1830
|
+
default: '> y | getField()',
|
|
1831
|
+
description: 'Specify the field that should be mapped to the y-axis.',
|
|
1832
|
+
type: 'string'
|
|
1915
1833
|
},
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
onOptionsChange: function onOptionsChange() {
|
|
1921
|
-
return {};
|
|
1834
|
+
categoryField: {
|
|
1835
|
+
default: '> category | getField()',
|
|
1836
|
+
description: 'Specify the field that should be mapped to the series categories.',
|
|
1837
|
+
type: 'string'
|
|
1922
1838
|
},
|
|
1923
|
-
|
|
1924
|
-
|
|
1839
|
+
backgroundColor: {
|
|
1840
|
+
default: '> themes.defaultBackgroundColor',
|
|
1841
|
+
description: 'Specify the color used for the background. The default for enterprise light is "#ffffff". The default for enterprise dark is "#000000". The default for prisma dark is "#0b0c0e".',
|
|
1842
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
|
|
1843
|
+
type: 'string'
|
|
1925
1844
|
},
|
|
1926
|
-
|
|
1927
|
-
|
|
1845
|
+
legendDisplay: {
|
|
1846
|
+
default: 'right',
|
|
1847
|
+
description: 'Specify the location of the legend on the panel.',
|
|
1848
|
+
pattern: schemaUtils_1.getPattern(['right', 'left', 'top', 'bottom', 'off']),
|
|
1849
|
+
type: 'string'
|
|
1928
1850
|
},
|
|
1929
|
-
|
|
1930
|
-
|
|
1851
|
+
legendTruncation: {
|
|
1852
|
+
default: 'ellipsisEnd',
|
|
1853
|
+
description: 'Specify how to display legend labels when they overflow the layout boundaries by replacing overflow text with an ellipsis.',
|
|
1854
|
+
pattern: schemaUtils_1.getPattern(['ellipsisEnd', 'ellipsisMiddle', 'ellipsisStart', 'ellipsisOff']),
|
|
1855
|
+
type: 'string'
|
|
1856
|
+
},
|
|
1857
|
+
markerSize: {
|
|
1858
|
+
description: 'Specify, in pixels, the size of each scatter marker.',
|
|
1859
|
+
type: 'number',
|
|
1860
|
+
default: 4
|
|
1861
|
+
},
|
|
1862
|
+
resultLimit: {
|
|
1863
|
+
default: 50000,
|
|
1864
|
+
description: 'Specify the number of data points rendered in a chart.',
|
|
1865
|
+
type: 'number'
|
|
1866
|
+
},
|
|
1867
|
+
seriesColors: {
|
|
1868
|
+
default: visualization_color_palettes_1.VIZ_CATEGORICAL,
|
|
1869
|
+
description: 'Specify the colors used for a series. For example, ["#FF0000", "#0000FF", "#008000"].',
|
|
1870
|
+
type: 'array',
|
|
1871
|
+
items: {
|
|
1872
|
+
type: 'string'
|
|
1873
|
+
}
|
|
1874
|
+
},
|
|
1875
|
+
seriesColorsByField: {
|
|
1876
|
+
description: 'Specify the colors to use for specific categories, or series names, derived from distinct values in the selected category field. For example, {"user1": "#008000", "user2": "#FFA500"}.',
|
|
1877
|
+
type: 'object'
|
|
1878
|
+
},
|
|
1879
|
+
showXAxisExtendedRange: {
|
|
1880
|
+
default: true,
|
|
1881
|
+
description: 'Specify whether the x-axis should be extended to snap to whole major tick marks.',
|
|
1882
|
+
type: 'boolean'
|
|
1883
|
+
},
|
|
1884
|
+
showYAxisExtendedRange: {
|
|
1885
|
+
default: true,
|
|
1886
|
+
description: 'Specify whether the y-axis should be extended to snap to whole major tick marks.',
|
|
1887
|
+
type: 'boolean'
|
|
1888
|
+
},
|
|
1889
|
+
showXAxisWithZero: {
|
|
1890
|
+
default: false,
|
|
1891
|
+
description: 'Specify whether the x-axis range includes zero.',
|
|
1892
|
+
type: 'boolean'
|
|
1893
|
+
},
|
|
1894
|
+
showYAxisWithZero: {
|
|
1895
|
+
default: false,
|
|
1896
|
+
description: 'Specify whether the y-axis range includes zero.',
|
|
1897
|
+
type: 'boolean'
|
|
1898
|
+
},
|
|
1899
|
+
showRoundedXAxisLabels: {
|
|
1900
|
+
default: false,
|
|
1901
|
+
description: 'Specify whether to round x-axis values to the nearest integer.',
|
|
1902
|
+
type: 'boolean'
|
|
1903
|
+
},
|
|
1904
|
+
// TODO: figure out if we want to change splunk-charting behavior for Bubble/Scatter, which hardcodes XMajorGridlines to false
|
|
1905
|
+
// showXMajorGridLines: {
|
|
1906
|
+
// default: false,
|
|
1907
|
+
// description: 'Specify whether major grid lines are visible on the x-axis.',
|
|
1908
|
+
// type: 'boolean',
|
|
1909
|
+
// },
|
|
1910
|
+
showYMajorGridLines: {
|
|
1911
|
+
default: true,
|
|
1912
|
+
description: 'Specify whether major grid lines are visible on the y-axis.',
|
|
1913
|
+
type: 'boolean'
|
|
1914
|
+
},
|
|
1915
|
+
showXMinorGridLines: {
|
|
1916
|
+
default: false,
|
|
1917
|
+
description: 'Specify whether minor grid lines are visible on the x-axis.',
|
|
1918
|
+
type: 'boolean'
|
|
1919
|
+
},
|
|
1920
|
+
showYMinorGridLines: {
|
|
1921
|
+
default: false,
|
|
1922
|
+
description: 'Specify whether minor grid lines are visible on the y-axis.',
|
|
1923
|
+
type: 'boolean'
|
|
1924
|
+
},
|
|
1925
|
+
xAxisLabelRotation: {
|
|
1926
|
+
default: 0,
|
|
1927
|
+
description: 'Specify the rotation of the x-axis labels in degrees.',
|
|
1928
|
+
type: 'number',
|
|
1929
|
+
enum: [-90, -45, 0, 45, 90]
|
|
1930
|
+
},
|
|
1931
|
+
xAxisAbbreviation: {
|
|
1932
|
+
default: 'off',
|
|
1933
|
+
description: 'Specify whether to abbreviate large x-axis values with the closest SI prefix.',
|
|
1934
|
+
enum: ['off', 'auto'],
|
|
1935
|
+
pattern: schemaUtils_1.getPattern(['auto', 'off']),
|
|
1936
|
+
type: 'string'
|
|
1937
|
+
},
|
|
1938
|
+
yAxisAbbreviation: {
|
|
1939
|
+
default: 'auto',
|
|
1940
|
+
description: 'Specify whether to abbreviate large y-axis values with the closest SI prefix.',
|
|
1941
|
+
enum: ['off', 'auto'],
|
|
1942
|
+
pattern: schemaUtils_1.getPattern(['auto', 'off']),
|
|
1943
|
+
type: 'string'
|
|
1944
|
+
},
|
|
1945
|
+
xAxisLabelVisibility: {
|
|
1946
|
+
default: 'auto',
|
|
1947
|
+
description: 'Specify whether to show or hide labels on the x-axis.',
|
|
1948
|
+
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
1949
|
+
type: 'string'
|
|
1950
|
+
},
|
|
1951
|
+
yAxisLabelVisibility: {
|
|
1952
|
+
default: 'auto',
|
|
1953
|
+
description: 'Specify whether to show or hide labels on the y-axis.',
|
|
1954
|
+
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
1955
|
+
type: 'string'
|
|
1956
|
+
},
|
|
1957
|
+
xAxisLineVisibility: {
|
|
1958
|
+
default: 'hide',
|
|
1959
|
+
description: 'Specify whether to show or hide the x-axis line.',
|
|
1960
|
+
enum: ['hide', 'show'],
|
|
1961
|
+
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
1962
|
+
type: 'string'
|
|
1963
|
+
},
|
|
1964
|
+
yAxisLineVisibility: {
|
|
1965
|
+
default: 'hide',
|
|
1966
|
+
description: 'Specify whether to show or hide the y-axis line.',
|
|
1967
|
+
enum: ['hide', 'show'],
|
|
1968
|
+
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
1969
|
+
type: 'string'
|
|
1970
|
+
},
|
|
1971
|
+
xAxisMajorTickInterval: {
|
|
1972
|
+
default: 'auto',
|
|
1973
|
+
description: 'Specify the spacing interval at which to place major tick marks along the numeric x-axis. By default, this value is automatically calculated based on the scale of the related axis.',
|
|
1974
|
+
type: ['string', 'number']
|
|
1975
|
+
},
|
|
1976
|
+
yAxisMajorTickInterval: {
|
|
1977
|
+
default: 'auto',
|
|
1978
|
+
description: 'Specify the spacing interval at which to place major tick marks along the numeric y-axis. By default, this value is automatically calculated based on the scale of the related axis.',
|
|
1979
|
+
type: ['string', 'number']
|
|
1980
|
+
},
|
|
1981
|
+
xAxisMajorTickSize: {
|
|
1982
|
+
default: 6,
|
|
1983
|
+
description: 'Specify the size, in pixels, of major tick marks on the x-axis.',
|
|
1984
|
+
type: 'number'
|
|
1985
|
+
},
|
|
1986
|
+
yAxisMajorTickSize: {
|
|
1987
|
+
default: 6,
|
|
1988
|
+
description: 'Specify the size, in pixels, of major tick marks on the y-axis.',
|
|
1989
|
+
type: 'number'
|
|
1990
|
+
},
|
|
1991
|
+
xAxisMinorTickSize: {
|
|
1992
|
+
default: 6,
|
|
1993
|
+
description: 'Specify the size, in pixels, of minor tick marks on the x-axis.',
|
|
1994
|
+
type: 'number'
|
|
1995
|
+
},
|
|
1996
|
+
yAxisMinorTickSize: {
|
|
1997
|
+
default: 6,
|
|
1998
|
+
description: 'Specify the size, in pixels, of minor tick marks on the y-axis.',
|
|
1999
|
+
type: 'number'
|
|
2000
|
+
},
|
|
2001
|
+
xAxisMajorTickVisibility: {
|
|
2002
|
+
default: 'auto',
|
|
2003
|
+
description: 'Specify whether to show or hide major tick marks on the x-axis.',
|
|
2004
|
+
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
2005
|
+
type: 'string'
|
|
2006
|
+
},
|
|
2007
|
+
yAxisMajorTickVisibility: {
|
|
2008
|
+
default: 'auto',
|
|
2009
|
+
description: 'Specify whether to show or hide major tick marks on the y-axis.',
|
|
2010
|
+
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
2011
|
+
type: 'string'
|
|
2012
|
+
},
|
|
2013
|
+
xAxisMinorTickVisibility: {
|
|
2014
|
+
default: 'auto',
|
|
2015
|
+
description: 'Specify whether to show or hide minor tick marks on the x-axis .',
|
|
2016
|
+
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
2017
|
+
type: 'string'
|
|
2018
|
+
},
|
|
2019
|
+
yAxisMinorTickVisibility: {
|
|
2020
|
+
default: 'auto',
|
|
2021
|
+
description: 'Specify whether to show or hide minor tick marks on the y-axis.',
|
|
2022
|
+
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
2023
|
+
type: 'string'
|
|
2024
|
+
},
|
|
2025
|
+
xAxisMax: {
|
|
2026
|
+
default: 'auto',
|
|
2027
|
+
description: 'Specify the maximum number for the range of the visible x-axis.',
|
|
2028
|
+
type: ['string', 'number']
|
|
2029
|
+
},
|
|
2030
|
+
yAxisMax: {
|
|
2031
|
+
default: 'auto',
|
|
2032
|
+
description: 'Specify the maximum number for the range of the visible y-axis.',
|
|
2033
|
+
type: ['string', 'number']
|
|
2034
|
+
},
|
|
2035
|
+
xAxisMin: {
|
|
2036
|
+
default: 'auto',
|
|
2037
|
+
description: 'Specify the minimum number for the range of the visible x-axis.',
|
|
2038
|
+
type: ['string', 'number']
|
|
2039
|
+
},
|
|
2040
|
+
yAxisMin: {
|
|
2041
|
+
default: 'auto',
|
|
2042
|
+
description: 'Specify the minimum number for the range of the visible y-axis.',
|
|
2043
|
+
type: ['string', 'number']
|
|
2044
|
+
},
|
|
2045
|
+
xAxisScale: {
|
|
2046
|
+
default: 'linear',
|
|
2047
|
+
description: 'Specify the type of scale that applies to a numerical x-axis.',
|
|
2048
|
+
pattern: schemaUtils_1.getPattern(['linear', 'log']),
|
|
2049
|
+
type: 'string'
|
|
2050
|
+
},
|
|
2051
|
+
yAxisScale: {
|
|
2052
|
+
default: 'linear',
|
|
2053
|
+
description: 'Specify the type of scale that applies to a numerical y-axis.',
|
|
2054
|
+
pattern: schemaUtils_1.getPattern(['linear', 'log']),
|
|
2055
|
+
type: 'string'
|
|
2056
|
+
},
|
|
2057
|
+
xAxisTitleText: {
|
|
2058
|
+
description: 'Specify the title of the x-axis.',
|
|
2059
|
+
type: 'string'
|
|
2060
|
+
},
|
|
2061
|
+
yAxisTitleText: {
|
|
2062
|
+
description: 'Specify the title of the y-axis.',
|
|
2063
|
+
type: 'string'
|
|
2064
|
+
},
|
|
2065
|
+
xAxisTitleVisibility: {
|
|
2066
|
+
default: 'show',
|
|
2067
|
+
description: 'Specify whether to show or hide the title of the x-axis.',
|
|
2068
|
+
enum: ['hide', 'show'],
|
|
2069
|
+
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
2070
|
+
type: 'string'
|
|
2071
|
+
},
|
|
2072
|
+
yAxisTitleVisibility: {
|
|
2073
|
+
default: 'show',
|
|
2074
|
+
description: 'Specify whether to show or hide the title of the y-axis.',
|
|
2075
|
+
enum: ['hide', 'show'],
|
|
2076
|
+
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
2077
|
+
type: 'string'
|
|
2078
|
+
}
|
|
1931
2079
|
};
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
var _classCallCheck = __webpack_require__(10);
|
|
1943
|
-
|
|
1944
|
-
var _createClass = __webpack_require__(18);
|
|
1945
|
-
|
|
1946
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1947
|
-
value: true
|
|
1948
|
-
});
|
|
1949
|
-
exports.DefaultVizActionHandler = void 0;
|
|
1950
|
-
|
|
1951
|
-
var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
1952
|
-
function DefaultVizActionHandler() {
|
|
1953
|
-
_classCallCheck(this, DefaultVizActionHandler);
|
|
2080
|
+
var themes = {
|
|
2081
|
+
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
2082
|
+
return pick_1.default({
|
|
2083
|
+
enterprise: {
|
|
2084
|
+
dark: variables_1.default.black(props),
|
|
2085
|
+
light: variables_1.default.backgroundColor(props)
|
|
2086
|
+
},
|
|
2087
|
+
prisma: variables_1.default.backgroundColorSidebar(props)
|
|
2088
|
+
})(props);
|
|
1954
2089
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
2090
|
+
};
|
|
2091
|
+
var editorConfig = [AxesChartDataConfig_1.AxesChartDataConfigScatter, {
|
|
2092
|
+
label: AxesChartColorAndStyle_1.default.label,
|
|
2093
|
+
layout: [].concat(_toConsumableArray(AxesChartColorAndStyle_1.default.layout.slice(0, 2)), [[{
|
|
2094
|
+
label: i18n_1._('Series colors by category name'),
|
|
2095
|
+
option: 'seriesColorsByField',
|
|
2096
|
+
editor: 'editor.seriesColorsByField',
|
|
2097
|
+
editorProps: {
|
|
2098
|
+
isCategorical: true
|
|
1959
2099
|
}
|
|
1960
|
-
}, {
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
2100
|
+
}], [{
|
|
2101
|
+
label: i18n_1._('Marker size'),
|
|
2102
|
+
option: 'markerSize',
|
|
2103
|
+
editor: 'editor.slider',
|
|
2104
|
+
editorProps: {
|
|
2105
|
+
min: 0,
|
|
2106
|
+
max: 20,
|
|
2107
|
+
step: 1
|
|
1964
2108
|
}
|
|
1965
|
-
}])
|
|
1966
|
-
|
|
1967
|
-
return DefaultVizActionHandler;
|
|
1968
|
-
}();
|
|
1969
|
-
|
|
1970
|
-
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1971
|
-
|
|
1972
|
-
/***/ }),
|
|
1973
|
-
|
|
1974
|
-
/***/ 38:
|
|
1975
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1976
|
-
|
|
1977
|
-
"use strict";
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1981
|
-
value: true
|
|
1982
|
-
});
|
|
1983
|
-
exports.validSortDirs = void 0;
|
|
1984
|
-
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
1985
|
-
|
|
1986
|
-
/***/ }),
|
|
1987
|
-
|
|
1988
|
-
/***/ 39:
|
|
1989
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1990
|
-
|
|
1991
|
-
"use strict";
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1995
|
-
value: true
|
|
1996
|
-
});
|
|
1997
|
-
exports.useDeepMemo = void 0;
|
|
1998
|
-
|
|
1999
|
-
var react_1 = __webpack_require__(1);
|
|
2000
|
-
|
|
2001
|
-
var lodash_1 = __webpack_require__(3);
|
|
2002
|
-
/**
|
|
2003
|
-
* This hook evaluates and stores the result of a passed function and only
|
|
2004
|
-
* re-evaluates the function when passed dependencies change.
|
|
2005
|
-
*
|
|
2006
|
-
* It is different from the internal React useMemo in the following aspects:
|
|
2007
|
-
* - it only stores the last evaluated result
|
|
2008
|
-
* - it uses a deep equality check to determine if dependencies have changed
|
|
2009
|
-
*
|
|
2010
|
-
* Inspired by apollo-client's useDeepMemo
|
|
2011
|
-
*
|
|
2012
|
-
* @param fn the function to be executed and
|
|
2013
|
-
* @param dependencies an array of dependencies
|
|
2014
|
-
*/
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
2018
|
-
var ref = react_1.useRef();
|
|
2019
|
-
|
|
2020
|
-
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
2021
|
-
ref.current = {
|
|
2022
|
-
dependencies: dependencies,
|
|
2023
|
-
value: fn()
|
|
2024
|
-
};
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
return ref.current.value;
|
|
2028
|
-
};
|
|
2029
|
-
|
|
2030
|
-
exports.useDeepMemo = useDeepMemo;
|
|
2031
|
-
|
|
2032
|
-
/***/ }),
|
|
2033
|
-
|
|
2034
|
-
/***/ 4:
|
|
2035
|
-
/***/ (function(module, exports) {
|
|
2036
|
-
|
|
2037
|
-
module.exports = require("styled-components");
|
|
2038
|
-
|
|
2039
|
-
/***/ }),
|
|
2040
|
-
|
|
2041
|
-
/***/ 40:
|
|
2042
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2043
|
-
|
|
2044
|
-
"use strict";
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2048
|
-
value: true
|
|
2049
|
-
});
|
|
2050
|
-
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
2051
|
-
|
|
2052
|
-
var React = __webpack_require__(1);
|
|
2053
|
-
|
|
2054
|
-
var T = __webpack_require__(0);
|
|
2055
|
-
|
|
2056
|
-
var i18n_1 = __webpack_require__(2);
|
|
2057
|
-
|
|
2058
|
-
var Message_1 = __webpack_require__(9);
|
|
2059
|
-
|
|
2060
|
-
var FixedSizeContainer_1 = __webpack_require__(12);
|
|
2061
|
-
/**
|
|
2062
|
-
* @method isMissing
|
|
2063
|
-
* @param {any} v
|
|
2064
|
-
* @returns {boolean} true if the input value === null or undefined
|
|
2065
|
-
*/
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
var isMissing = function isMissing(v) {
|
|
2069
|
-
return v === null || v === undefined;
|
|
2070
|
-
};
|
|
2071
|
-
|
|
2072
|
-
exports.isMissing = isMissing;
|
|
2073
|
-
/**
|
|
2074
|
-
* @method misskingKeys
|
|
2075
|
-
* @param {string[]} keys
|
|
2076
|
-
* @param {object} target
|
|
2077
|
-
* @returns {string[]} the keys of missing required props
|
|
2078
|
-
*/
|
|
2079
|
-
|
|
2080
|
-
var missingKeys = function missingKeys(keys, target) {
|
|
2081
|
-
return keys.filter(function (k) {
|
|
2082
|
-
return exports.isMissing(target[k]);
|
|
2083
|
-
});
|
|
2084
|
-
};
|
|
2085
|
-
|
|
2086
|
-
exports.missingKeys = missingKeys;
|
|
2087
|
-
var propTypes = {
|
|
2088
|
-
width: T.oneOfType([T.string, T.number]),
|
|
2089
|
-
height: T.oneOfType([T.string, T.number]),
|
|
2090
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
2091
|
-
backgroundColor: T.string,
|
|
2092
|
-
missingProps: T.arrayOf(T.string)
|
|
2093
|
-
};
|
|
2094
|
-
/**
|
|
2095
|
-
* @method MissingPropsMessage
|
|
2096
|
-
* @param {MissingPropsProps} props
|
|
2097
|
-
* @returns {React.ReactElement}
|
|
2098
|
-
*/
|
|
2099
|
-
|
|
2100
|
-
var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
2101
|
-
var width = props.width,
|
|
2102
|
-
height = props.height,
|
|
2103
|
-
missingProps = props.missingProps;
|
|
2104
|
-
return React.createElement(Message_1.default, {
|
|
2105
|
-
"data-test": "message",
|
|
2106
|
-
width: width,
|
|
2107
|
-
height: height,
|
|
2108
|
-
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
2109
|
-
});
|
|
2110
|
-
};
|
|
2111
|
-
|
|
2112
|
-
exports.MissingPropsMessage = MissingPropsMessage;
|
|
2113
|
-
exports.MissingPropsMessage.propTypes = propTypes;
|
|
2114
|
-
exports.MissingPropsMessage.defaultProps = {
|
|
2115
|
-
width: '100%',
|
|
2116
|
-
height: 250
|
|
2117
|
-
};
|
|
2118
|
-
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
2119
|
-
|
|
2120
|
-
/***/ }),
|
|
2121
|
-
|
|
2122
|
-
/***/ 41:
|
|
2123
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2124
|
-
|
|
2125
|
-
"use strict";
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2129
|
-
value: true
|
|
2130
|
-
});
|
|
2131
|
-
|
|
2132
|
-
var React = __webpack_require__(1);
|
|
2133
|
-
|
|
2134
|
-
var styled_components_1 = __webpack_require__(4);
|
|
2135
|
-
|
|
2136
|
-
var hocUtils_1 = __webpack_require__(13);
|
|
2137
|
-
|
|
2138
|
-
var Cover = styled_components_1.default.div.withConfig({
|
|
2139
|
-
displayName: "withEditModeCover__Cover",
|
|
2140
|
-
componentId: "sc-1gsbnxb-0"
|
|
2141
|
-
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
2142
|
-
var Blocker = styled_components_1.default.div.attrs({
|
|
2143
|
-
'data-splunk-visualization-version': "25.1.0 - 812a9a4d8"
|
|
2144
|
-
}).withConfig({
|
|
2145
|
-
displayName: "withEditModeCover__Blocker",
|
|
2146
|
-
componentId: "sc-1gsbnxb-1"
|
|
2147
|
-
})(["position:relative;width:100%;height:100%;"]);
|
|
2109
|
+
}]])
|
|
2110
|
+
}, AxesChartLegend_1.default, AxesChartXGridAndLabels_1.AxesChartXGridAndLabelsBubbleScatter, AxesChartYGridAndLabels_1.default];
|
|
2148
2111
|
/**
|
|
2149
|
-
*
|
|
2150
|
-
* @method withEditModeCover
|
|
2151
|
-
* @param {ExtendedDashViz} Visualization
|
|
2152
|
-
* @returns {ExtendedDashViz} Wrapper
|
|
2112
|
+
* visualization configuration
|
|
2153
2113
|
*/
|
|
2154
2114
|
|
|
2155
|
-
var
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
"data-test": "edit-mode-cover"
|
|
2161
|
-
}));
|
|
2162
|
-
};
|
|
2115
|
+
var config = {
|
|
2116
|
+
/**
|
|
2117
|
+
* unique viz key
|
|
2118
|
+
*/
|
|
2119
|
+
key: 'splunk.scatter',
|
|
2163
2120
|
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
};
|
|
2121
|
+
/**
|
|
2122
|
+
* viz name
|
|
2123
|
+
*/
|
|
2124
|
+
name: 'Scatter',
|
|
2125
|
+
category: VizCategory_1.VizCategory.COMPARISONS,
|
|
2170
2126
|
|
|
2171
|
-
|
|
2127
|
+
/**
|
|
2128
|
+
* viz icon
|
|
2129
|
+
*/
|
|
2130
|
+
icon: visualization_icons_1.Scatter,
|
|
2131
|
+
placeholderIcon: placeholders_1.Scatter,
|
|
2132
|
+
dataContract: dataContract,
|
|
2133
|
+
size: size,
|
|
2134
|
+
defaultContext: defaultContext,
|
|
2135
|
+
optionsSchema: exports.optionsSchema,
|
|
2136
|
+
editorConfig: editorConfig,
|
|
2137
|
+
events: {
|
|
2138
|
+
'legend.click': {
|
|
2139
|
+
description: 'triggered when user clicks on chart legend'
|
|
2140
|
+
},
|
|
2141
|
+
'point.click': {
|
|
2142
|
+
description: 'triggered when user clicks on a point in the scatter chart'
|
|
2143
|
+
}
|
|
2144
|
+
},
|
|
2145
|
+
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
2146
|
+
themes: themes
|
|
2147
|
+
};
|
|
2148
|
+
exports.default = configUtils_1.enhanceConfig(config);
|
|
2172
2149
|
|
|
2173
2150
|
/***/ }),
|
|
2174
2151
|
|
|
2175
|
-
/***/
|
|
2152
|
+
/***/ 445:
|
|
2176
2153
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2177
2154
|
|
|
2178
2155
|
"use strict";
|
|
@@ -2181,84 +2158,121 @@ exports.default = withEditModeCover;
|
|
|
2181
2158
|
Object.defineProperty(exports, "__esModule", {
|
|
2182
2159
|
value: true
|
|
2183
2160
|
});
|
|
2161
|
+
exports.convertToScatterSCProperties = exports.mapToOldKey = exports.convertToStringValues = exports.scatterOptionValuesSCMapping = void 0;
|
|
2184
2162
|
|
|
2185
|
-
var
|
|
2186
|
-
|
|
2187
|
-
var colorUtils_1 = __webpack_require__(11);
|
|
2188
|
-
|
|
2189
|
-
var variables_1 = __webpack_require__(8);
|
|
2190
|
-
|
|
2191
|
-
var IconPlaceholder_1 = __webpack_require__(27);
|
|
2163
|
+
var lodash_1 = __webpack_require__(3);
|
|
2192
2164
|
|
|
2193
|
-
var
|
|
2165
|
+
var propUtils_1 = __webpack_require__(24);
|
|
2194
2166
|
|
|
2195
|
-
var
|
|
2167
|
+
var chartingUtils_1 = __webpack_require__(52); // map for key names which are either new or not present in SimpleXML options mapping
|
|
2196
2168
|
|
|
2197
|
-
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
2198
|
-
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
2199
|
-
var config = Visualization.config;
|
|
2200
|
-
var themes = config.themes;
|
|
2201
2169
|
|
|
2202
|
-
|
|
2203
|
-
|
|
2170
|
+
var scatterOptionsSCMapping = {
|
|
2171
|
+
xAxisLabelRotation: 'xAxisMajorLabelRotation',
|
|
2172
|
+
xAxisLabelVisibility: 'xAxisMajorLabelVisibility',
|
|
2173
|
+
yAxisLabelVisibility: 'yAxisMajorLabelVisibility',
|
|
2174
|
+
showRoundedXAxisLabels: 'roundXAxisLabelsToInteger',
|
|
2175
|
+
xAxisLineVisibility: 'xAxisVisibility',
|
|
2176
|
+
yAxisLineVisibility: 'yAxisVisibility',
|
|
2177
|
+
showYMajorGridLines: 'showMajorYGridLines',
|
|
2178
|
+
showXMinorGridLines: 'showMinorXGridLines',
|
|
2179
|
+
showYMinorGridLines: 'showMinorYGridLines',
|
|
2180
|
+
xAxisMajorTickInterval: 'xAxisMajorUnit',
|
|
2181
|
+
yAxisMajorTickInterval: 'yAxisMajorUnit',
|
|
2182
|
+
showXAxisExtendedRange: 'xAxisExtendsAxisRange',
|
|
2183
|
+
showYAxisExtendedRange: 'yAxisExtendsAxisRange',
|
|
2184
|
+
showXAxisWithZero: 'xAxisIncludeZero',
|
|
2185
|
+
showYAxisWithZero: 'yAxisIncludeZero',
|
|
2186
|
+
legendTruncation: 'legendLabelOverflowMode',
|
|
2187
|
+
legendDisplay: 'legendPlacement',
|
|
2188
|
+
resultLimit: 'resultTruncationLimit',
|
|
2189
|
+
seriesColorsByField: 'fieldColors',
|
|
2190
|
+
bubbleSizeMax: 'bubbleMaxSize',
|
|
2191
|
+
bubbleSizeMin: 'bubbleMinSize',
|
|
2192
|
+
bubbleSizeMethod: 'bubbleSizeBy'
|
|
2193
|
+
}; // key value mapping of what options (and their corresponding values) which we expose in config.ts to property values SC understands
|
|
2204
2194
|
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2195
|
+
exports.scatterOptionValuesSCMapping = {
|
|
2196
|
+
xAxisTitleVisibility: {
|
|
2197
|
+
hide: 'collapsed'
|
|
2198
|
+
},
|
|
2199
|
+
yAxisTitleVisibility: {
|
|
2200
|
+
hide: 'collapsed'
|
|
2201
|
+
},
|
|
2202
|
+
yAxisAbbreviation: {
|
|
2203
|
+
off: 'none'
|
|
2204
|
+
},
|
|
2205
|
+
legendPlacement: {
|
|
2206
|
+
off: 'none'
|
|
2207
|
+
},
|
|
2208
|
+
legendLabelOverflowMode: {
|
|
2209
|
+
ellipsisOff: 'ellipsisNone'
|
|
2210
|
+
}
|
|
2211
|
+
};
|
|
2212
|
+
/**
|
|
2213
|
+
* Helper method to convert option which contains object literal values (e.g. arrays, objects)
|
|
2214
|
+
* to strings as SC can only accept their stringified equivalents
|
|
2215
|
+
* @method convertToStringValues
|
|
2216
|
+
* @param {Object} options
|
|
2217
|
+
* @returns {Object}
|
|
2218
|
+
*/
|
|
2214
2219
|
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
iconColor: iconColor
|
|
2223
|
-
});
|
|
2224
|
-
}
|
|
2220
|
+
var convertToStringValues = function convertToStringValues(options) {
|
|
2221
|
+
var updatedOptions = propUtils_1.convertPropsToString({
|
|
2222
|
+
vizProps: options,
|
|
2223
|
+
propNames: ['seriesColors', 'fieldColors']
|
|
2224
|
+
});
|
|
2225
|
+
return Object.assign(Object.assign({}, options), updatedOptions);
|
|
2226
|
+
};
|
|
2225
2227
|
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
+
exports.convertToStringValues = convertToStringValues;
|
|
2229
|
+
/**
|
|
2230
|
+
* Helper method to update the option names which can be mapped to SimpleXML options or
|
|
2231
|
+
* can be used directly with SC if don't have a 1-1 mapping in SimpleXML
|
|
2232
|
+
* @method mapToOldKey
|
|
2233
|
+
* @param {Object} options
|
|
2234
|
+
* @returns {Object}
|
|
2235
|
+
*/
|
|
2228
2236
|
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2237
|
+
var mapToOldKey = function mapToOldKey(options) {
|
|
2238
|
+
return lodash_1.mapKeys(options, function (val, key) {
|
|
2239
|
+
return scatterOptionsSCMapping[key] ? scatterOptionsSCMapping[key] : key;
|
|
2232
2240
|
});
|
|
2233
|
-
return Wrapper;
|
|
2234
2241
|
};
|
|
2235
2242
|
|
|
2236
|
-
exports.
|
|
2237
|
-
|
|
2238
|
-
|
|
2243
|
+
exports.mapToOldKey = mapToOldKey;
|
|
2244
|
+
/**
|
|
2245
|
+
* Chained helper for mapping the option properties (and values) we expose in config.ts into property values that splunk-charting accepts
|
|
2246
|
+
* This is for options that has new key name and can not directly be mapped with SimpleXML or
|
|
2247
|
+
* don't have a 1-1 mapping in SimpleXML (i.e. a straightforward name mapping where values are preserved)
|
|
2248
|
+
* @method convertToScatterSCProperties
|
|
2249
|
+
* @param {Object} originalOptions
|
|
2250
|
+
* @returns {Object}
|
|
2251
|
+
*/
|
|
2239
2252
|
|
|
2240
|
-
|
|
2241
|
-
|
|
2253
|
+
var convertToScatterSCProperties = function convertToScatterSCProperties(originalOptions) {
|
|
2254
|
+
return lodash_1.chain(exports.mapToOldKey(originalOptions)).thru(chartingUtils_1.mapToValues(exports.scatterOptionValuesSCMapping)).thru(exports.convertToStringValues).value();
|
|
2255
|
+
};
|
|
2242
2256
|
|
|
2243
|
-
|
|
2257
|
+
exports.convertToScatterSCProperties = convertToScatterSCProperties;
|
|
2244
2258
|
|
|
2245
2259
|
/***/ }),
|
|
2246
2260
|
|
|
2247
|
-
/***/
|
|
2261
|
+
/***/ 46:
|
|
2248
2262
|
/***/ (function(module, exports) {
|
|
2249
2263
|
|
|
2250
|
-
module.exports = require("@splunk/visualization-
|
|
2264
|
+
module.exports = require("@splunk/visualization-color-palettes");
|
|
2251
2265
|
|
|
2252
2266
|
/***/ }),
|
|
2253
2267
|
|
|
2254
|
-
/***/
|
|
2268
|
+
/***/ 47:
|
|
2255
2269
|
/***/ (function(module, exports) {
|
|
2256
2270
|
|
|
2257
2271
|
module.exports = require("@splunk/visualization-icons");
|
|
2258
2272
|
|
|
2259
2273
|
/***/ }),
|
|
2260
2274
|
|
|
2261
|
-
/***/
|
|
2275
|
+
/***/ 50:
|
|
2262
2276
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2263
2277
|
|
|
2264
2278
|
"use strict";
|
|
@@ -2289,51 +2303,13 @@ exports.default = background;
|
|
|
2289
2303
|
|
|
2290
2304
|
/***/ }),
|
|
2291
2305
|
|
|
2292
|
-
/***/
|
|
2293
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2294
|
-
|
|
2295
|
-
"use strict";
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2299
|
-
value: true
|
|
2300
|
-
});
|
|
2301
|
-
exports.VizBehavior = void 0;
|
|
2302
|
-
var VizBehavior;
|
|
2303
|
-
|
|
2304
|
-
(function (VizBehavior) {
|
|
2305
|
-
/**
|
|
2306
|
-
* Dynamic Options Behavior.
|
|
2307
|
-
* This allows visualization options to be powered by data
|
|
2308
|
-
*
|
|
2309
|
-
* **Example**
|
|
2310
|
-
*
|
|
2311
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
2312
|
-
* would configure sparklineValues with an array of data points
|
|
2313
|
-
* coming from the first series in the primary datasource
|
|
2314
|
-
*
|
|
2315
|
-
*/
|
|
2316
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
2317
|
-
VizBehavior["EVENTS"] = "events";
|
|
2318
|
-
/**
|
|
2319
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
2320
|
-
* missing.
|
|
2321
|
-
* @type {string}
|
|
2322
|
-
*/
|
|
2323
|
-
|
|
2324
|
-
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
2325
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
2326
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
2327
|
-
|
|
2328
|
-
/***/ }),
|
|
2329
|
-
|
|
2330
|
-
/***/ 50:
|
|
2306
|
+
/***/ 52:
|
|
2331
2307
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2332
2308
|
|
|
2333
2309
|
"use strict";
|
|
2334
2310
|
|
|
2335
2311
|
|
|
2336
|
-
var _toConsumableArray = __webpack_require__(
|
|
2312
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
2337
2313
|
|
|
2338
2314
|
var __rest = this && this.__rest || function (s, e) {
|
|
2339
2315
|
var t = {};
|
|
@@ -2549,14 +2525,14 @@ exports.constructFieldsAndColumns = constructFieldsAndColumns;
|
|
|
2549
2525
|
|
|
2550
2526
|
/***/ }),
|
|
2551
2527
|
|
|
2552
|
-
/***/
|
|
2528
|
+
/***/ 53:
|
|
2553
2529
|
/***/ (function(module, exports) {
|
|
2554
2530
|
|
|
2555
2531
|
module.exports = require("@splunk/charting-bundle");
|
|
2556
2532
|
|
|
2557
2533
|
/***/ }),
|
|
2558
2534
|
|
|
2559
|
-
/***/
|
|
2535
|
+
/***/ 56:
|
|
2560
2536
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2561
2537
|
|
|
2562
2538
|
"use strict";
|
|
@@ -2572,34 +2548,34 @@ var lodash_1 = __webpack_require__(3);
|
|
|
2572
2548
|
|
|
2573
2549
|
var i18n_1 = __webpack_require__(2);
|
|
2574
2550
|
|
|
2575
|
-
var visualization_color_palettes_1 = __webpack_require__(
|
|
2551
|
+
var visualization_color_palettes_1 = __webpack_require__(46);
|
|
2576
2552
|
|
|
2577
|
-
var react_1 = __webpack_require__(
|
|
2553
|
+
var react_1 = __webpack_require__(0);
|
|
2578
2554
|
|
|
2579
|
-
var React = __webpack_require__(
|
|
2555
|
+
var React = __webpack_require__(0);
|
|
2580
2556
|
|
|
2581
|
-
var T = __webpack_require__(
|
|
2557
|
+
var T = __webpack_require__(1);
|
|
2582
2558
|
|
|
2583
|
-
var react_event_listener_1 = __webpack_require__(
|
|
2559
|
+
var react_event_listener_1 = __webpack_require__(57);
|
|
2584
2560
|
|
|
2585
|
-
__webpack_require__(
|
|
2561
|
+
__webpack_require__(58); // fixme, @splunk/charting should be refactor to use locale & timezone instead of i18n functions
|
|
2586
2562
|
|
|
2587
2563
|
|
|
2588
|
-
var charting_bundle_1 = __webpack_require__(
|
|
2564
|
+
var charting_bundle_1 = __webpack_require__(53);
|
|
2589
2565
|
|
|
2590
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
2566
|
+
var TimezoneContext_1 = __webpack_require__(23);
|
|
2591
2567
|
|
|
2592
|
-
var style_1 = __webpack_require__(
|
|
2568
|
+
var style_1 = __webpack_require__(15);
|
|
2593
2569
|
|
|
2594
2570
|
var styled_components_1 = __webpack_require__(4);
|
|
2595
2571
|
|
|
2596
|
-
var Message_1 = __webpack_require__(
|
|
2572
|
+
var Message_1 = __webpack_require__(10);
|
|
2597
2573
|
|
|
2598
|
-
var useSplunkTheme_1 = __webpack_require__(
|
|
2574
|
+
var useSplunkTheme_1 = __webpack_require__(59);
|
|
2599
2575
|
|
|
2600
|
-
var themeUtils_1 = __webpack_require__(
|
|
2576
|
+
var themeUtils_1 = __webpack_require__(60);
|
|
2601
2577
|
|
|
2602
|
-
var ChartingApi_1 = __webpack_require__(
|
|
2578
|
+
var ChartingApi_1 = __webpack_require__(61);
|
|
2603
2579
|
|
|
2604
2580
|
exports.NO_INPLACE_PROPS = ['chart', 'chart.orientation', 'layout.splitSeries', 'chart.style', 'legend.placement'];
|
|
2605
2581
|
|
|
@@ -2979,50 +2955,81 @@ exports.default = withEmptyChartMessage(Charting);
|
|
|
2979
2955
|
|
|
2980
2956
|
/***/ }),
|
|
2981
2957
|
|
|
2982
|
-
/***/
|
|
2958
|
+
/***/ 57:
|
|
2983
2959
|
/***/ (function(module, exports) {
|
|
2984
2960
|
|
|
2985
2961
|
module.exports = require("react-event-listener");
|
|
2986
2962
|
|
|
2987
2963
|
/***/ }),
|
|
2988
2964
|
|
|
2989
|
-
/***/
|
|
2965
|
+
/***/ 58:
|
|
2990
2966
|
/***/ (function(module, exports) {
|
|
2991
2967
|
|
|
2992
2968
|
module.exports = require("@splunk/visualizations-shared/i18n");
|
|
2993
2969
|
|
|
2994
2970
|
/***/ }),
|
|
2995
2971
|
|
|
2996
|
-
/***/
|
|
2972
|
+
/***/ 59:
|
|
2997
2973
|
/***/ (function(module, exports) {
|
|
2998
2974
|
|
|
2999
2975
|
module.exports = require("@splunk/themes/useSplunkTheme");
|
|
3000
2976
|
|
|
3001
2977
|
/***/ }),
|
|
3002
2978
|
|
|
3003
|
-
/***/
|
|
3004
|
-
/***/ (function(module, exports) {
|
|
2979
|
+
/***/ 6:
|
|
2980
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3005
2981
|
|
|
3006
|
-
|
|
2982
|
+
"use strict";
|
|
2983
|
+
|
|
2984
|
+
|
|
2985
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2986
|
+
value: true
|
|
2987
|
+
});
|
|
2988
|
+
exports.VizBehavior = void 0;
|
|
2989
|
+
var VizBehavior;
|
|
2990
|
+
|
|
2991
|
+
(function (VizBehavior) {
|
|
2992
|
+
/**
|
|
2993
|
+
* Dynamic Options Behavior.
|
|
2994
|
+
* This allows visualization options to be powered by data
|
|
2995
|
+
*
|
|
2996
|
+
* **Example**
|
|
2997
|
+
*
|
|
2998
|
+
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
2999
|
+
* would configure sparklineValues with an array of data points
|
|
3000
|
+
* coming from the first series in the primary datasource
|
|
3001
|
+
*
|
|
3002
|
+
*/
|
|
3003
|
+
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
3004
|
+
VizBehavior["EVENTS"] = "events";
|
|
3005
|
+
/**
|
|
3006
|
+
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
3007
|
+
* missing.
|
|
3008
|
+
* @type {string}
|
|
3009
|
+
*/
|
|
3010
|
+
|
|
3011
|
+
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
3012
|
+
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
3013
|
+
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
3007
3014
|
|
|
3008
3015
|
/***/ }),
|
|
3009
3016
|
|
|
3010
|
-
/***/
|
|
3017
|
+
/***/ 60:
|
|
3011
3018
|
/***/ (function(module, exports) {
|
|
3012
3019
|
|
|
3013
|
-
module.exports = require("@
|
|
3020
|
+
module.exports = require("@splunk/visualizations-shared/themeUtils");
|
|
3014
3021
|
|
|
3015
3022
|
/***/ }),
|
|
3016
3023
|
|
|
3017
|
-
/***/
|
|
3024
|
+
/***/ 61:
|
|
3018
3025
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3019
3026
|
|
|
3020
3027
|
"use strict";
|
|
3021
3028
|
|
|
3022
3029
|
|
|
3023
|
-
var _classCallCheck = __webpack_require__(
|
|
3030
|
+
var _classCallCheck = __webpack_require__(11);
|
|
3024
3031
|
|
|
3025
|
-
var _createClass = __webpack_require__(
|
|
3032
|
+
var _createClass = __webpack_require__(19);
|
|
3026
3033
|
|
|
3027
3034
|
Object.defineProperty(exports, "__esModule", {
|
|
3028
3035
|
value: true
|
|
@@ -3083,20 +3090,20 @@ exports.ChartingApiFunctional = ChartingApiFunctional;
|
|
|
3083
3090
|
|
|
3084
3091
|
/***/ }),
|
|
3085
3092
|
|
|
3086
|
-
/***/
|
|
3093
|
+
/***/ 62:
|
|
3087
3094
|
/***/ (function(module, exports) {
|
|
3088
3095
|
|
|
3089
3096
|
module.exports = require("@splunk/visualizations-shared/simpleXMLOptions");
|
|
3090
3097
|
|
|
3091
3098
|
/***/ }),
|
|
3092
3099
|
|
|
3093
|
-
/***/
|
|
3100
|
+
/***/ 64:
|
|
3094
3101
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3095
3102
|
|
|
3096
3103
|
"use strict";
|
|
3097
3104
|
|
|
3098
3105
|
|
|
3099
|
-
var _toConsumableArray = __webpack_require__(
|
|
3106
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
3100
3107
|
|
|
3101
3108
|
Object.defineProperty(exports, "__esModule", {
|
|
3102
3109
|
value: true
|
|
@@ -3105,7 +3112,7 @@ exports.AxesChartDataConfigAreaColumnLine = exports.AxesChartDataConfigBubble =
|
|
|
3105
3112
|
|
|
3106
3113
|
var i18n_1 = __webpack_require__(2);
|
|
3107
3114
|
|
|
3108
|
-
var configUtils_1 = __webpack_require__(
|
|
3115
|
+
var configUtils_1 = __webpack_require__(17);
|
|
3109
3116
|
|
|
3110
3117
|
var AxesChartDataConfig = {
|
|
3111
3118
|
label: i18n_1._('Data configurations'),
|
|
@@ -3210,7 +3217,7 @@ exports.default = AxesChartDataConfig;
|
|
|
3210
3217
|
|
|
3211
3218
|
/***/ }),
|
|
3212
3219
|
|
|
3213
|
-
/***/
|
|
3220
|
+
/***/ 65:
|
|
3214
3221
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3215
3222
|
|
|
3216
3223
|
"use strict";
|
|
@@ -3224,9 +3231,9 @@ var i18n_1 = __webpack_require__(2);
|
|
|
3224
3231
|
|
|
3225
3232
|
var pick_1 = __webpack_require__(21);
|
|
3226
3233
|
|
|
3227
|
-
var variables_1 = __webpack_require__(
|
|
3234
|
+
var variables_1 = __webpack_require__(9);
|
|
3228
3235
|
|
|
3229
|
-
var BackgroundColor_1 = __webpack_require__(
|
|
3236
|
+
var BackgroundColor_1 = __webpack_require__(50);
|
|
3230
3237
|
|
|
3231
3238
|
var themes = {
|
|
3232
3239
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
@@ -3257,7 +3264,7 @@ exports.default = AxesChartColorAndStyle;
|
|
|
3257
3264
|
|
|
3258
3265
|
/***/ }),
|
|
3259
3266
|
|
|
3260
|
-
/***/
|
|
3267
|
+
/***/ 66:
|
|
3261
3268
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3262
3269
|
|
|
3263
3270
|
"use strict";
|
|
@@ -3322,13 +3329,13 @@ exports.default = AxesChartLegend;
|
|
|
3322
3329
|
|
|
3323
3330
|
/***/ }),
|
|
3324
3331
|
|
|
3325
|
-
/***/
|
|
3332
|
+
/***/ 67:
|
|
3326
3333
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3327
3334
|
|
|
3328
3335
|
"use strict";
|
|
3329
3336
|
|
|
3330
3337
|
|
|
3331
|
-
var _toConsumableArray = __webpack_require__(
|
|
3338
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
3332
3339
|
|
|
3333
3340
|
Object.defineProperty(exports, "__esModule", {
|
|
3334
3341
|
value: true
|
|
@@ -3337,7 +3344,7 @@ exports.AxesChartXGridAndLabelsBubbleScatter = exports.AxesChartXGridAndLabelsCo
|
|
|
3337
3344
|
|
|
3338
3345
|
var i18n_1 = __webpack_require__(2);
|
|
3339
3346
|
|
|
3340
|
-
var configUtils_1 = __webpack_require__(
|
|
3347
|
+
var configUtils_1 = __webpack_require__(17);
|
|
3341
3348
|
|
|
3342
3349
|
exports.AxesChartXGridAndLabelsCommon = {
|
|
3343
3350
|
label: i18n_1._('X-axis grid and labels'),
|
|
@@ -3468,7 +3475,7 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
3468
3475
|
}])), [[{
|
|
3469
3476
|
label: i18n_1._('Label rotation'),
|
|
3470
3477
|
option: 'xAxisLabelRotation',
|
|
3471
|
-
editor: 'editor.
|
|
3478
|
+
editor: 'editor.select',
|
|
3472
3479
|
editorProps: {
|
|
3473
3480
|
values: [{
|
|
3474
3481
|
label: i18n_1._('-90'),
|
|
@@ -3611,7 +3618,7 @@ exports.default = AxesChartXGridAndLabels;
|
|
|
3611
3618
|
|
|
3612
3619
|
/***/ }),
|
|
3613
3620
|
|
|
3614
|
-
/***/
|
|
3621
|
+
/***/ 68:
|
|
3615
3622
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3616
3623
|
|
|
3617
3624
|
"use strict";
|
|
@@ -3777,21 +3784,21 @@ exports.default = AxesChartYGridAndLabels;
|
|
|
3777
3784
|
/***/ 7:
|
|
3778
3785
|
/***/ (function(module, exports) {
|
|
3779
3786
|
|
|
3780
|
-
module.exports = require("@babel/runtime/helpers/
|
|
3787
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
3781
3788
|
|
|
3782
3789
|
/***/ }),
|
|
3783
3790
|
|
|
3784
3791
|
/***/ 8:
|
|
3785
3792
|
/***/ (function(module, exports) {
|
|
3786
3793
|
|
|
3787
|
-
module.exports = require("@
|
|
3794
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
3788
3795
|
|
|
3789
3796
|
/***/ }),
|
|
3790
3797
|
|
|
3791
3798
|
/***/ 9:
|
|
3792
3799
|
/***/ (function(module, exports) {
|
|
3793
3800
|
|
|
3794
|
-
module.exports = require("@splunk/
|
|
3801
|
+
module.exports = require("@splunk/themes/variables");
|
|
3795
3802
|
|
|
3796
3803
|
/***/ })
|
|
3797
3804
|
|