@splunk/visualizations 25.5.0 → 25.7.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_TimeControlsPopover_Dark.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_DarkPrisma.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_Light.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_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_FillerGauge_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_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_Rectangle_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_Bar_Bar_Legend_Mode_Series_Compare.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Column_Column_Legend_Mode_Series_Compare.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_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_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Chart.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Chart_Count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Timechart.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_assign_default_trellisSplitBy_value_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_avg_count_max_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_avg_count_max_count_by_status_value_by_max_count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_value_by_max_count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_max_count_avg_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Major_value_data_null_show_N_A.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Background_Color_Based_On_The_Major_Value_Trellis.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage_100_no_paginator.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage_50_no_paginator.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Width.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparklines_Adv.png +0 -0
- package/Area.config.js +12 -7
- package/Area.config.js.map +1 -1
- package/Area.js +330 -226
- package/Area.js.map +1 -1
- package/Bar.config.js +36 -8
- package/Bar.config.js.map +1 -1
- package/Bar.js +354 -227
- package/Bar.js.map +1 -1
- package/Bubble.config.js +7 -2
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +318 -214
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +12 -8
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +324 -229
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +36 -8
- package/Column.config.js.map +1 -1
- package/Column.js +354 -227
- package/Column.js.map +1 -1
- package/Ellipse.config.js +23 -20
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +289 -187
- package/Ellipse.js.map +1 -1
- package/Events.config.js +82 -19
- package/Events.config.js.map +1 -1
- package/Events.js +1276 -416
- package/Events.js.map +1 -1
- package/FEATUREFLAGS.md +40 -0
- package/FillerGauge.config.js +22 -19
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +311 -204
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +3 -3
- package/Image.config.js.map +1 -1
- package/Image.js +249 -151
- package/Image.js.map +1 -1
- package/LICENSE.md +444 -8
- package/Line.config.js +12 -7
- package/Line.config.js.map +1 -1
- package/Line.js +335 -226
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +9 -15
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +881 -790
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +51 -48
- package/Map.config.js.map +1 -1
- package/Map.js +804 -711
- package/Map.js.map +1 -1
- package/Markdown.config.js +10 -9
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +365 -266
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +71 -70
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +422 -330
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +3 -3
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +532 -430
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +30 -6
- package/Pie.config.js.map +1 -1
- package/Pie.js +553 -431
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +3 -2
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +556 -464
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +22 -23
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +383 -286
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +14 -13
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +3126 -3034
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +552 -580
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +410 -311
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +242 -52
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +1605 -414
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +41 -30
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +267 -58
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +1622 -410
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +249 -41
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1517 -283
- package/SingleValueRadial.js.map +1 -1
- package/TRELLIS.md +296 -0
- package/Table.config.js +39 -41
- package/Table.config.js.map +1 -1
- package/Table.js +435 -311
- package/Table.js.map +1 -1
- package/common/EventsDoc.js +12 -6
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +2 -2
- package/common/GaugeValueMarker.js +2 -2
- package/common/OptionsDoc.js +14 -14
- package/common/OptionsDoc.js.map +1 -1
- package/common/ThemesDoc.js +10 -10
- package/common/ThemesDoc.js.map +1 -1
- package/common/docUtils.js +1 -1
- package/common/docUtils.js.map +1 -1
- package/common/utils/configUtils.js +26 -20
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +2 -2
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +115 -0
- package/common/utils/layoutUtils.js.map +1 -0
- package/common/utils/mapUtils.js +1166 -23
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +54 -46
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +14 -14
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +612 -0
- package/common/utils/trellisUtils.js.map +1 -0
- package/common/withDashboardViz.js +148 -54
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +14 -12
package/Events.js
CHANGED
|
@@ -87,20 +87,20 @@ 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 = 196);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ([
|
|
94
94
|
/* 0 */
|
|
95
95
|
/***/ (function(module, exports) {
|
|
96
96
|
|
|
97
|
-
module.exports = require("
|
|
97
|
+
module.exports = require("react");
|
|
98
98
|
|
|
99
99
|
/***/ }),
|
|
100
100
|
/* 1 */
|
|
101
101
|
/***/ (function(module, exports) {
|
|
102
102
|
|
|
103
|
-
module.exports = require("
|
|
103
|
+
module.exports = require("prop-types");
|
|
104
104
|
|
|
105
105
|
/***/ }),
|
|
106
106
|
/* 2 */
|
|
@@ -156,31 +156,32 @@ var VizBehavior;
|
|
|
156
156
|
|
|
157
157
|
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
158
158
|
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
159
|
+
VizBehavior["TRELLIS"] = "trellis";
|
|
159
160
|
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
160
161
|
|
|
161
162
|
/***/ }),
|
|
162
163
|
/* 7 */
|
|
163
164
|
/***/ (function(module, exports) {
|
|
164
165
|
|
|
165
|
-
module.exports = require("@babel/runtime/helpers/
|
|
166
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
166
167
|
|
|
167
168
|
/***/ }),
|
|
168
169
|
/* 8 */
|
|
169
170
|
/***/ (function(module, exports) {
|
|
170
171
|
|
|
171
|
-
module.exports = require("@babel/runtime/helpers/
|
|
172
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
172
173
|
|
|
173
174
|
/***/ }),
|
|
174
175
|
/* 9 */
|
|
175
176
|
/***/ (function(module, exports) {
|
|
176
177
|
|
|
177
|
-
module.exports = require("@splunk/
|
|
178
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
178
179
|
|
|
179
180
|
/***/ }),
|
|
180
181
|
/* 10 */
|
|
181
182
|
/***/ (function(module, exports) {
|
|
182
183
|
|
|
183
|
-
module.exports = require("@splunk/
|
|
184
|
+
module.exports = require("@splunk/themes/variables");
|
|
184
185
|
|
|
185
186
|
/***/ }),
|
|
186
187
|
/* 11 */
|
|
@@ -205,13 +206,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
205
206
|
value: true
|
|
206
207
|
});
|
|
207
208
|
|
|
208
|
-
var React = __webpack_require__(
|
|
209
|
+
var React = __webpack_require__(0);
|
|
209
210
|
|
|
210
211
|
var styled_components_1 = __webpack_require__(4);
|
|
211
212
|
|
|
212
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
213
|
+
var SizeAwareWrapper_1 = __webpack_require__(18);
|
|
213
214
|
|
|
214
|
-
var style_1 = __webpack_require__(
|
|
215
|
+
var style_1 = __webpack_require__(14);
|
|
215
216
|
|
|
216
217
|
var colorUtils_1 = __webpack_require__(12);
|
|
217
218
|
|
|
@@ -270,7 +271,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
270
271
|
|
|
271
272
|
return React.createElement(FixSizeItem, {
|
|
272
273
|
"data-test": "fix-size-item",
|
|
273
|
-
"data-splunk-visualization-version": "25.
|
|
274
|
+
"data-splunk-visualization-version": "25.7.0 - d10a7789b",
|
|
274
275
|
width: width,
|
|
275
276
|
height: height,
|
|
276
277
|
backgroundColor: backgroundColor
|
|
@@ -292,6 +293,12 @@ exports.default = withFixedSizeContainer;
|
|
|
292
293
|
|
|
293
294
|
/***/ }),
|
|
294
295
|
/* 14 */
|
|
296
|
+
/***/ (function(module, exports) {
|
|
297
|
+
|
|
298
|
+
module.exports = require("@splunk/visualizations-shared/style");
|
|
299
|
+
|
|
300
|
+
/***/ }),
|
|
301
|
+
/* 15 */
|
|
295
302
|
/***/ (function(module, exports, __webpack_require__) {
|
|
296
303
|
|
|
297
304
|
"use strict";
|
|
@@ -323,27 +330,33 @@ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
|
|
|
323
330
|
exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
324
331
|
|
|
325
332
|
/***/ }),
|
|
326
|
-
/*
|
|
333
|
+
/* 16 */
|
|
327
334
|
/***/ (function(module, exports) {
|
|
328
335
|
|
|
329
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
336
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
330
337
|
|
|
331
338
|
/***/ }),
|
|
332
|
-
/*
|
|
339
|
+
/* 17 */
|
|
333
340
|
/***/ (function(module, exports) {
|
|
334
341
|
|
|
335
|
-
module.exports = require("@
|
|
342
|
+
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
336
343
|
|
|
337
344
|
/***/ }),
|
|
338
|
-
/*
|
|
345
|
+
/* 18 */
|
|
346
|
+
/***/ (function(module, exports) {
|
|
347
|
+
|
|
348
|
+
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
349
|
+
|
|
350
|
+
/***/ }),
|
|
351
|
+
/* 19 */
|
|
339
352
|
/***/ (function(module, exports, __webpack_require__) {
|
|
340
353
|
|
|
341
354
|
"use strict";
|
|
342
355
|
|
|
343
356
|
|
|
344
|
-
var _toConsumableArray = __webpack_require__(
|
|
357
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
345
358
|
|
|
346
|
-
var _defineProperty = __webpack_require__(
|
|
359
|
+
var _defineProperty = __webpack_require__(8);
|
|
347
360
|
|
|
348
361
|
var __rest = this && this.__rest || function (s, e) {
|
|
349
362
|
var t = {};
|
|
@@ -571,46 +584,58 @@ var insertLayout = function insertLayout(layout, index) {
|
|
|
571
584
|
exports.insertLayout = insertLayout;
|
|
572
585
|
|
|
573
586
|
/***/ }),
|
|
574
|
-
/*
|
|
575
|
-
/* 19 */
|
|
587
|
+
/* 20 */
|
|
576
588
|
/***/ (function(module, exports) {
|
|
577
589
|
|
|
578
|
-
module.exports = require("@
|
|
590
|
+
module.exports = require("@splunk/visualization-context/FeatureFlagContext");
|
|
579
591
|
|
|
580
592
|
/***/ }),
|
|
581
|
-
/*
|
|
593
|
+
/* 21 */,
|
|
594
|
+
/* 22 */
|
|
582
595
|
/***/ (function(module, exports) {
|
|
583
596
|
|
|
584
|
-
module.exports = require("@
|
|
597
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
585
598
|
|
|
586
599
|
/***/ }),
|
|
587
|
-
/*
|
|
600
|
+
/* 23 */
|
|
588
601
|
/***/ (function(module, exports) {
|
|
589
602
|
|
|
590
603
|
module.exports = require("@splunk/themes/pick");
|
|
591
604
|
|
|
592
605
|
/***/ }),
|
|
593
|
-
/*
|
|
594
|
-
/*
|
|
606
|
+
/* 24 */,
|
|
607
|
+
/* 25 */
|
|
595
608
|
/***/ (function(module, exports) {
|
|
596
609
|
|
|
597
610
|
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
598
611
|
|
|
599
612
|
/***/ }),
|
|
600
|
-
/*
|
|
601
|
-
/* 25 */
|
|
613
|
+
/* 26 */
|
|
602
614
|
/***/ (function(module, exports) {
|
|
603
615
|
|
|
604
616
|
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
605
617
|
|
|
606
618
|
/***/ }),
|
|
607
|
-
/*
|
|
619
|
+
/* 27 */
|
|
608
620
|
/***/ (function(module, exports) {
|
|
609
621
|
|
|
610
622
|
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
611
623
|
|
|
612
624
|
/***/ }),
|
|
613
|
-
/*
|
|
625
|
+
/* 28 */,
|
|
626
|
+
/* 29 */
|
|
627
|
+
/***/ (function(module, exports) {
|
|
628
|
+
|
|
629
|
+
module.exports = require("@splunk/visualization-encoding/Options");
|
|
630
|
+
|
|
631
|
+
/***/ }),
|
|
632
|
+
/* 30 */
|
|
633
|
+
/***/ (function(module, exports) {
|
|
634
|
+
|
|
635
|
+
module.exports = require("@splunk/visualizations-shared/numberUtils");
|
|
636
|
+
|
|
637
|
+
/***/ }),
|
|
638
|
+
/* 31 */
|
|
614
639
|
/***/ (function(module, exports, __webpack_require__) {
|
|
615
640
|
|
|
616
641
|
"use strict";
|
|
@@ -621,15 +646,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
621
646
|
});
|
|
622
647
|
exports.shouldShowIconPlaceholder = void 0;
|
|
623
648
|
|
|
624
|
-
var React = __webpack_require__(
|
|
649
|
+
var React = __webpack_require__(0);
|
|
625
650
|
|
|
626
|
-
var T = __webpack_require__(
|
|
651
|
+
var T = __webpack_require__(1);
|
|
627
652
|
|
|
628
653
|
var lodash_1 = __webpack_require__(3);
|
|
629
654
|
|
|
630
655
|
var i18n_1 = __webpack_require__(2);
|
|
631
656
|
|
|
632
|
-
var Message_1 = __webpack_require__(
|
|
657
|
+
var Message_1 = __webpack_require__(9);
|
|
633
658
|
|
|
634
659
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
635
660
|
/**
|
|
@@ -701,24 +726,30 @@ IconPlaceholder.defaultProps = {
|
|
|
701
726
|
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
702
727
|
|
|
703
728
|
/***/ }),
|
|
704
|
-
/*
|
|
729
|
+
/* 32 */
|
|
730
|
+
/***/ (function(module, exports) {
|
|
731
|
+
|
|
732
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
733
|
+
|
|
734
|
+
/***/ }),
|
|
735
|
+
/* 33 */
|
|
705
736
|
/***/ (function(module, exports, __webpack_require__) {
|
|
706
737
|
|
|
707
738
|
"use strict";
|
|
708
739
|
|
|
709
740
|
|
|
710
|
-
var _defineProperty = __webpack_require__(
|
|
741
|
+
var _defineProperty = __webpack_require__(8);
|
|
711
742
|
|
|
712
743
|
Object.defineProperty(exports, "__esModule", {
|
|
713
744
|
value: true
|
|
714
745
|
});
|
|
715
746
|
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
716
747
|
|
|
717
|
-
var T = __webpack_require__(
|
|
748
|
+
var T = __webpack_require__(1);
|
|
718
749
|
|
|
719
750
|
var lodash_1 = __webpack_require__(3);
|
|
720
751
|
|
|
721
|
-
var DataSource_1 = __webpack_require__(
|
|
752
|
+
var DataSource_1 = __webpack_require__(43);
|
|
722
753
|
|
|
723
754
|
exports.SortParamsPropTypes = T.shape({
|
|
724
755
|
currentSortKey: T.string,
|
|
@@ -738,7 +769,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
738
769
|
};
|
|
739
770
|
var onSort;
|
|
740
771
|
|
|
741
|
-
if (
|
|
772
|
+
if (typeof onRequestParamsChange === 'function') {
|
|
742
773
|
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
743
774
|
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
744
775
|
currentSortDir = requestParams.sort[currentSortKey];
|
|
@@ -771,7 +802,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
771
802
|
exports.getSortingParams = getSortingParams;
|
|
772
803
|
|
|
773
804
|
/***/ }),
|
|
774
|
-
/*
|
|
805
|
+
/* 34 */
|
|
775
806
|
/***/ (function(module, exports, __webpack_require__) {
|
|
776
807
|
|
|
777
808
|
"use strict";
|
|
@@ -782,7 +813,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
782
813
|
});
|
|
783
814
|
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
784
815
|
|
|
785
|
-
var T = __webpack_require__(
|
|
816
|
+
var T = __webpack_require__(1);
|
|
786
817
|
|
|
787
818
|
var lodash_1 = __webpack_require__(3);
|
|
788
819
|
|
|
@@ -802,7 +833,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
802
833
|
var count = requestParams && requestParams.count;
|
|
803
834
|
var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
804
835
|
var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
805
|
-
var isPaging = totalPages > 1 &&
|
|
836
|
+
var isPaging = totalPages > 1 && typeof onRequestParamsChange === 'function';
|
|
806
837
|
|
|
807
838
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
808
839
|
var page = _ref2.page,
|
|
@@ -828,15 +859,14 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
828
859
|
isPaging: isPaging,
|
|
829
860
|
current: current,
|
|
830
861
|
totalPages: totalPages,
|
|
831
|
-
onChange:
|
|
862
|
+
onChange: typeof onRequestParamsChange === 'function' ? onChangeHandler : lodash_1.noop
|
|
832
863
|
};
|
|
833
864
|
};
|
|
834
865
|
|
|
835
866
|
exports.getPaginationParams = getPaginationParams;
|
|
836
867
|
|
|
837
868
|
/***/ }),
|
|
838
|
-
/*
|
|
839
|
-
/* 31 */
|
|
869
|
+
/* 35 */
|
|
840
870
|
/***/ (function(module, exports, __webpack_require__) {
|
|
841
871
|
|
|
842
872
|
"use strict";
|
|
@@ -864,58 +894,67 @@ var VizCategory;
|
|
|
864
894
|
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
865
895
|
|
|
866
896
|
/***/ }),
|
|
867
|
-
/*
|
|
897
|
+
/* 36 */
|
|
868
898
|
/***/ (function(module, exports, __webpack_require__) {
|
|
869
899
|
|
|
870
900
|
"use strict";
|
|
871
901
|
|
|
872
902
|
|
|
903
|
+
var _slicedToArray = __webpack_require__(17);
|
|
904
|
+
|
|
873
905
|
Object.defineProperty(exports, "__esModule", {
|
|
874
906
|
value: true
|
|
875
907
|
});
|
|
876
908
|
|
|
877
|
-
var React = __webpack_require__(
|
|
909
|
+
var React = __webpack_require__(0);
|
|
878
910
|
|
|
879
911
|
var lodash_1 = __webpack_require__(3);
|
|
880
912
|
|
|
881
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
913
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(37);
|
|
914
|
+
|
|
915
|
+
var Options_1 = __webpack_require__(29);
|
|
882
916
|
|
|
883
|
-
var
|
|
917
|
+
var SanitizeProps_1 = __webpack_require__(38);
|
|
884
918
|
|
|
885
|
-
var
|
|
919
|
+
var TimezoneContext_1 = __webpack_require__(25);
|
|
886
920
|
|
|
887
|
-
var
|
|
921
|
+
var moment_1 = __webpack_require__(39);
|
|
888
922
|
|
|
889
|
-
var
|
|
923
|
+
var FeatureFlagContext_1 = __webpack_require__(20);
|
|
890
924
|
|
|
891
925
|
var styled_components_1 = __webpack_require__(4);
|
|
892
926
|
|
|
893
|
-
var hocUtils_1 = __webpack_require__(
|
|
927
|
+
var hocUtils_1 = __webpack_require__(26);
|
|
928
|
+
|
|
929
|
+
var JSONSchemaUtils_1 = __webpack_require__(27);
|
|
930
|
+
|
|
931
|
+
var async_dynamic_options_evaluator_1 = __webpack_require__(40);
|
|
894
932
|
|
|
895
|
-
var
|
|
933
|
+
var id_1 = __webpack_require__(32);
|
|
896
934
|
|
|
897
|
-
var SplunkVisualization_1 = __webpack_require__(
|
|
935
|
+
var SplunkVisualization_1 = __webpack_require__(41);
|
|
898
936
|
|
|
899
937
|
var VizBehavior_1 = __webpack_require__(6);
|
|
900
938
|
|
|
901
|
-
var getSorting_1 = __webpack_require__(
|
|
939
|
+
var getSorting_1 = __webpack_require__(33);
|
|
902
940
|
|
|
903
|
-
var getPagination_1 = __webpack_require__(
|
|
941
|
+
var getPagination_1 = __webpack_require__(34);
|
|
904
942
|
|
|
905
|
-
var useDeepMemo_1 = __webpack_require__(
|
|
943
|
+
var useDeepMemo_1 = __webpack_require__(44);
|
|
906
944
|
|
|
907
|
-
var MissingPropsMessage_1 = __webpack_require__(
|
|
945
|
+
var MissingPropsMessage_1 = __webpack_require__(45);
|
|
908
946
|
|
|
909
|
-
var withEditModeCover_1 = __webpack_require__(
|
|
947
|
+
var withEditModeCover_1 = __webpack_require__(46);
|
|
910
948
|
|
|
911
|
-
var withPlaceholder_1 = __webpack_require__(
|
|
949
|
+
var withPlaceholder_1 = __webpack_require__(47);
|
|
950
|
+
|
|
951
|
+
var UUID = id_1.createGUID();
|
|
912
952
|
/**
|
|
913
953
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
914
954
|
* @param {DashboardVizOpts} opts
|
|
915
955
|
* @returns {HOC}
|
|
916
956
|
*/
|
|
917
957
|
|
|
918
|
-
|
|
919
958
|
var withDashboardViz = function withDashboardViz(opts) {
|
|
920
959
|
var ReactViz = opts.ReactViz,
|
|
921
960
|
vizConfig = opts.vizConfig,
|
|
@@ -928,6 +967,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
928
967
|
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
|
|
929
968
|
|
|
930
969
|
var DashboardViz = function DashboardViz(props) {
|
|
970
|
+
var _a;
|
|
971
|
+
|
|
931
972
|
var mode = props.mode,
|
|
932
973
|
hasEventHandlers = props.hasEventHandlers,
|
|
933
974
|
dataSources = props.dataSources,
|
|
@@ -975,38 +1016,97 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
975
1016
|
|
|
976
1017
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
977
1018
|
|
|
1019
|
+
var _React$useState = React.useState({}),
|
|
1020
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1021
|
+
evaluatedOptionsAsync = _React$useState2[0],
|
|
1022
|
+
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
1026
|
+
|
|
1027
|
+
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(UUID)),
|
|
1028
|
+
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
1029
|
+
visualizationID = _React$useState4[0];
|
|
1030
|
+
|
|
1031
|
+
var _React$useState5 = React.useState(Boolean(featureFlagContext && featureFlagContext.visualizations_useWebWorkersForDSL && typeof Worker !== 'undefined')),
|
|
1032
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
1033
|
+
useAsyncEvaluatedOptions = _React$useState6[0],
|
|
1034
|
+
setUseAsyncEvaluatedOptions = _React$useState6[1];
|
|
1035
|
+
|
|
978
1036
|
evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
|
|
979
1037
|
try {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1038
|
+
if (useAsyncEvaluatedOptions) {
|
|
1039
|
+
var optionsToEvaluate = {
|
|
1040
|
+
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1041
|
+
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1042
|
+
};
|
|
1043
|
+
var asyncDynamicOptionsEvaluatorParams = {
|
|
1044
|
+
visualizationID: visualizationID,
|
|
1045
|
+
props: props,
|
|
1046
|
+
options: optionsToEvaluate,
|
|
1047
|
+
dataSources: dataSources,
|
|
1048
|
+
theme: vizConfig.themes
|
|
1049
|
+
};
|
|
1050
|
+
async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
|
|
1051
|
+
setEvaluatedOptionsAsync(results.results);
|
|
1052
|
+
}).catch(function (e) {
|
|
1053
|
+
// eslint-disable-next-line no-console
|
|
1054
|
+
console.error("unexpected error evaluating options - async: ".concat(e.message));
|
|
1055
|
+
setUseAsyncEvaluatedOptions(false);
|
|
1056
|
+
});
|
|
1057
|
+
} else {
|
|
1058
|
+
return Options_1.Options.evaluate({
|
|
1059
|
+
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1060
|
+
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1061
|
+
}, dataSources, themeFunc);
|
|
1062
|
+
}
|
|
984
1063
|
} catch (e) {
|
|
985
1064
|
// eslint-disable-next-line no-console
|
|
986
|
-
console.error("unexpected error evaluating options:
|
|
1065
|
+
console.error("unexpected error evaluating options: ".concat(e.message));
|
|
987
1066
|
return {};
|
|
988
1067
|
}
|
|
989
|
-
|
|
1068
|
+
|
|
1069
|
+
return {};
|
|
1070
|
+
}, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
|
|
1071
|
+
var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // trellis specific backgroundColor update for onComputedProps
|
|
1072
|
+
// if trellis is enabled following these three criteria - 1) trellis feature flag is enabled 2) vizConfig supports array has 'trellis' 3) option 'splitByLayout' is set to 'trellis
|
|
1073
|
+
// onComputedProps api should return back trellisBackgroundColor value for backgroundColor option to support coloring of sibling panels (for eg:- title/ description on UDF side)
|
|
1074
|
+
|
|
1075
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
1076
|
+
var clonedEvaluatedOptions = lodash_1.cloneDeep(evaluatedOptionsToUse);
|
|
1077
|
+
|
|
1078
|
+
if (isTrellisFeatureFlagOn && ((_a = vizConfig === null || vizConfig === void 0 ? void 0 : vizConfig.supports) === null || _a === void 0 ? void 0 : _a.includes(VizBehavior_1.VizBehavior.TRELLIS)) && (clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.splitByLayout) === VizBehavior_1.VizBehavior.TRELLIS) {
|
|
1079
|
+
clonedEvaluatedOptions.backgroundColor = clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor;
|
|
1080
|
+
} // useEffect hook needs to be initialized before any early returns
|
|
990
1081
|
// this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
|
|
991
1082
|
|
|
1083
|
+
|
|
1084
|
+
React.useEffect(function () {
|
|
1085
|
+
onComputedProps(clonedEvaluatedOptions);
|
|
1086
|
+
});
|
|
992
1087
|
React.useEffect(function () {
|
|
993
|
-
|
|
994
|
-
|
|
1088
|
+
return function () {
|
|
1089
|
+
if (useAsyncEvaluatedOptions) {
|
|
1090
|
+
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
1091
|
+
}
|
|
1092
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1093
|
+
}, []); // present warning message if any required props are missing
|
|
995
1094
|
|
|
996
1095
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
997
1096
|
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
998
1097
|
supports = vizConfig.supports;
|
|
999
|
-
var missing = MissingPropsMessage_1.missingKeys(requiredProps,
|
|
1000
|
-
|
|
1001
|
-
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER)
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1098
|
+
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
1099
|
+
|
|
1100
|
+
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && vizConfig.key !== 'splunk.singlevalue' // For SV missing props msg is not displayed if required props majorValue is missing, instead this will be handled from the component, instead handled within component
|
|
1101
|
+
) {
|
|
1102
|
+
return React.createElement(MissingPropsMessage_1.default, {
|
|
1103
|
+
"data-test": "missing-props-message",
|
|
1104
|
+
width: width,
|
|
1105
|
+
height: height,
|
|
1106
|
+
missingProps: missing,
|
|
1107
|
+
backgroundColor: bgColorFromTheme
|
|
1108
|
+
});
|
|
1109
|
+
} // events
|
|
1010
1110
|
|
|
1011
1111
|
|
|
1012
1112
|
var eventCallbackProps = {};
|
|
@@ -1023,7 +1123,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1023
1123
|
|
|
1024
1124
|
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
1025
1125
|
payloadKeys.forEach(function (p) {
|
|
1026
|
-
payload[p] =
|
|
1126
|
+
payload[p] = evaluatedOptionsToUse[p];
|
|
1027
1127
|
});
|
|
1028
1128
|
}
|
|
1029
1129
|
|
|
@@ -1042,7 +1142,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1042
1142
|
} // compute pure viz props which are not from options
|
|
1043
1143
|
|
|
1044
1144
|
|
|
1045
|
-
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props),
|
|
1145
|
+
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
1046
1146
|
themeFunc: themeFunc
|
|
1047
1147
|
}));
|
|
1048
1148
|
/**
|
|
@@ -1062,7 +1162,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1062
1162
|
|
|
1063
1163
|
var dataSourceMetadata = {};
|
|
1064
1164
|
var OptionKey = 'paginateDataSourceKey';
|
|
1065
|
-
var paginateDataSourceKey = lodash_1.has(
|
|
1165
|
+
var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1066
1166
|
|
|
1067
1167
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
|
|
1068
1168
|
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
@@ -1092,7 +1192,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1092
1192
|
mode: mode,
|
|
1093
1193
|
width: width,
|
|
1094
1194
|
height: height
|
|
1095
|
-
},
|
|
1195
|
+
}, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
|
|
1096
1196
|
};
|
|
1097
1197
|
|
|
1098
1198
|
DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
|
|
@@ -1109,31 +1209,31 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1109
1209
|
exports.default = withDashboardViz;
|
|
1110
1210
|
|
|
1111
1211
|
/***/ }),
|
|
1112
|
-
/*
|
|
1212
|
+
/* 37 */
|
|
1113
1213
|
/***/ (function(module, exports) {
|
|
1114
1214
|
|
|
1115
1215
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1116
1216
|
|
|
1117
1217
|
/***/ }),
|
|
1118
|
-
/*
|
|
1218
|
+
/* 38 */
|
|
1119
1219
|
/***/ (function(module, exports) {
|
|
1120
1220
|
|
|
1121
|
-
module.exports = require("@splunk/
|
|
1221
|
+
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1122
1222
|
|
|
1123
1223
|
/***/ }),
|
|
1124
|
-
/*
|
|
1224
|
+
/* 39 */
|
|
1125
1225
|
/***/ (function(module, exports) {
|
|
1126
1226
|
|
|
1127
|
-
module.exports = require("@splunk/
|
|
1227
|
+
module.exports = require("@splunk/moment");
|
|
1128
1228
|
|
|
1129
1229
|
/***/ }),
|
|
1130
|
-
/*
|
|
1230
|
+
/* 40 */
|
|
1131
1231
|
/***/ (function(module, exports) {
|
|
1132
1232
|
|
|
1133
|
-
module.exports = require("@splunk/
|
|
1233
|
+
module.exports = require("@splunk/async-dynamic-options-evaluator");
|
|
1134
1234
|
|
|
1135
1235
|
/***/ }),
|
|
1136
|
-
/*
|
|
1236
|
+
/* 41 */
|
|
1137
1237
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1138
1238
|
|
|
1139
1239
|
"use strict";
|
|
@@ -1147,11 +1247,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1147
1247
|
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
1148
1248
|
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1149
1249
|
|
|
1150
|
-
var T = __webpack_require__(
|
|
1250
|
+
var T = __webpack_require__(1);
|
|
1151
1251
|
|
|
1152
1252
|
var lodash_1 = __webpack_require__(3);
|
|
1153
1253
|
|
|
1154
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
1254
|
+
var VizActionHandler_1 = __webpack_require__(42); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1155
1255
|
|
|
1156
1256
|
|
|
1157
1257
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -1284,7 +1384,7 @@ SplunkVisualization.defaultProps = {
|
|
|
1284
1384
|
exports.default = SplunkVisualization;
|
|
1285
1385
|
|
|
1286
1386
|
/***/ }),
|
|
1287
|
-
/*
|
|
1387
|
+
/* 42 */
|
|
1288
1388
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1289
1389
|
|
|
1290
1390
|
"use strict";
|
|
@@ -1292,7 +1392,7 @@ exports.default = SplunkVisualization;
|
|
|
1292
1392
|
|
|
1293
1393
|
var _classCallCheck = __webpack_require__(11);
|
|
1294
1394
|
|
|
1295
|
-
var _createClass = __webpack_require__(
|
|
1395
|
+
var _createClass = __webpack_require__(22);
|
|
1296
1396
|
|
|
1297
1397
|
Object.defineProperty(exports, "__esModule", {
|
|
1298
1398
|
value: true
|
|
@@ -1321,7 +1421,7 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
|
1321
1421
|
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1322
1422
|
|
|
1323
1423
|
/***/ }),
|
|
1324
|
-
/*
|
|
1424
|
+
/* 43 */
|
|
1325
1425
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1326
1426
|
|
|
1327
1427
|
"use strict";
|
|
@@ -1334,7 +1434,7 @@ exports.validSortDirs = void 0;
|
|
|
1334
1434
|
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
1335
1435
|
|
|
1336
1436
|
/***/ }),
|
|
1337
|
-
/*
|
|
1437
|
+
/* 44 */
|
|
1338
1438
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1339
1439
|
|
|
1340
1440
|
"use strict";
|
|
@@ -1345,7 +1445,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1345
1445
|
});
|
|
1346
1446
|
exports.useDeepMemo = void 0;
|
|
1347
1447
|
|
|
1348
|
-
var react_1 = __webpack_require__(
|
|
1448
|
+
var react_1 = __webpack_require__(0);
|
|
1349
1449
|
|
|
1350
1450
|
var lodash_1 = __webpack_require__(3);
|
|
1351
1451
|
/**
|
|
@@ -1379,7 +1479,7 @@ var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
|
1379
1479
|
exports.useDeepMemo = useDeepMemo;
|
|
1380
1480
|
|
|
1381
1481
|
/***/ }),
|
|
1382
|
-
/*
|
|
1482
|
+
/* 45 */
|
|
1383
1483
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1384
1484
|
|
|
1385
1485
|
"use strict";
|
|
@@ -1390,13 +1490,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1390
1490
|
});
|
|
1391
1491
|
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
1392
1492
|
|
|
1393
|
-
var React = __webpack_require__(
|
|
1493
|
+
var React = __webpack_require__(0);
|
|
1394
1494
|
|
|
1395
|
-
var T = __webpack_require__(
|
|
1495
|
+
var T = __webpack_require__(1);
|
|
1396
1496
|
|
|
1397
1497
|
var i18n_1 = __webpack_require__(2);
|
|
1398
1498
|
|
|
1399
|
-
var Message_1 = __webpack_require__(
|
|
1499
|
+
var Message_1 = __webpack_require__(9);
|
|
1400
1500
|
|
|
1401
1501
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1402
1502
|
/**
|
|
@@ -1459,7 +1559,7 @@ exports.MissingPropsMessage.defaultProps = {
|
|
|
1459
1559
|
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
1460
1560
|
|
|
1461
1561
|
/***/ }),
|
|
1462
|
-
/*
|
|
1562
|
+
/* 46 */
|
|
1463
1563
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1464
1564
|
|
|
1465
1565
|
"use strict";
|
|
@@ -1469,18 +1569,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1469
1569
|
value: true
|
|
1470
1570
|
});
|
|
1471
1571
|
|
|
1472
|
-
var React = __webpack_require__(
|
|
1572
|
+
var React = __webpack_require__(0);
|
|
1473
1573
|
|
|
1474
1574
|
var styled_components_1 = __webpack_require__(4);
|
|
1475
1575
|
|
|
1476
|
-
var hocUtils_1 = __webpack_require__(
|
|
1576
|
+
var hocUtils_1 = __webpack_require__(15);
|
|
1477
1577
|
|
|
1478
1578
|
var Cover = styled_components_1.default.div.withConfig({
|
|
1479
1579
|
displayName: "withEditModeCover__Cover",
|
|
1480
1580
|
componentId: "sc-1gsbnxb-0"
|
|
1481
1581
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1482
1582
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1483
|
-
'data-splunk-visualization-version': "25.
|
|
1583
|
+
'data-splunk-visualization-version': "25.7.0 - d10a7789b"
|
|
1484
1584
|
}).withConfig({
|
|
1485
1585
|
displayName: "withEditModeCover__Blocker",
|
|
1486
1586
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1511,7 +1611,7 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
|
|
|
1511
1611
|
exports.default = withEditModeCover;
|
|
1512
1612
|
|
|
1513
1613
|
/***/ }),
|
|
1514
|
-
/*
|
|
1614
|
+
/* 47 */
|
|
1515
1615
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1516
1616
|
|
|
1517
1617
|
"use strict";
|
|
@@ -1521,17 +1621,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1521
1621
|
value: true
|
|
1522
1622
|
});
|
|
1523
1623
|
|
|
1524
|
-
var React = __webpack_require__(
|
|
1624
|
+
var React = __webpack_require__(0);
|
|
1525
1625
|
|
|
1526
1626
|
var colorUtils_1 = __webpack_require__(12);
|
|
1527
1627
|
|
|
1528
|
-
var variables_1 = __webpack_require__(
|
|
1628
|
+
var variables_1 = __webpack_require__(10);
|
|
1529
1629
|
|
|
1530
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
1630
|
+
var IconPlaceholder_1 = __webpack_require__(31);
|
|
1531
1631
|
|
|
1532
1632
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1533
1633
|
|
|
1534
|
-
var hocUtils_1 = __webpack_require__(
|
|
1634
|
+
var hocUtils_1 = __webpack_require__(15);
|
|
1535
1635
|
|
|
1536
1636
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
1537
1637
|
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
@@ -1575,22 +1675,22 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1575
1675
|
exports.default = withPlaceholder;
|
|
1576
1676
|
|
|
1577
1677
|
/***/ }),
|
|
1578
|
-
/*
|
|
1678
|
+
/* 48 */
|
|
1579
1679
|
/***/ (function(module, exports) {
|
|
1580
1680
|
|
|
1581
1681
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
1582
1682
|
|
|
1583
1683
|
/***/ }),
|
|
1584
|
-
/*
|
|
1585
|
-
/*
|
|
1586
|
-
/*
|
|
1684
|
+
/* 49 */,
|
|
1685
|
+
/* 50 */,
|
|
1686
|
+
/* 51 */
|
|
1587
1687
|
/***/ (function(module, exports) {
|
|
1588
1688
|
|
|
1589
1689
|
module.exports = require("@splunk/visualization-icons");
|
|
1590
1690
|
|
|
1591
1691
|
/***/ }),
|
|
1592
|
-
/*
|
|
1593
|
-
/*
|
|
1692
|
+
/* 52 */,
|
|
1693
|
+
/* 53 */
|
|
1594
1694
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1595
1695
|
|
|
1596
1696
|
"use strict";
|
|
@@ -1620,21 +1720,17 @@ var background = function background(_ref) {
|
|
|
1620
1720
|
exports.default = background;
|
|
1621
1721
|
|
|
1622
1722
|
/***/ }),
|
|
1623
|
-
/* 50 */,
|
|
1624
|
-
/* 51 */
|
|
1625
|
-
/***/ (function(module, exports) {
|
|
1626
|
-
|
|
1627
|
-
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
1628
|
-
|
|
1629
|
-
/***/ }),
|
|
1630
|
-
/* 52 */,
|
|
1631
|
-
/* 53 */,
|
|
1632
1723
|
/* 54 */,
|
|
1633
1724
|
/* 55 */,
|
|
1634
1725
|
/* 56 */,
|
|
1635
1726
|
/* 57 */,
|
|
1636
1727
|
/* 58 */,
|
|
1637
|
-
/* 59
|
|
1728
|
+
/* 59 */
|
|
1729
|
+
/***/ (function(module, exports) {
|
|
1730
|
+
|
|
1731
|
+
module.exports = require("@splunk/themes");
|
|
1732
|
+
|
|
1733
|
+
/***/ }),
|
|
1638
1734
|
/* 60 */,
|
|
1639
1735
|
/* 61 */,
|
|
1640
1736
|
/* 62 */,
|
|
@@ -1644,12 +1740,7 @@ module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
|
1644
1740
|
/* 66 */,
|
|
1645
1741
|
/* 67 */,
|
|
1646
1742
|
/* 68 */,
|
|
1647
|
-
/* 69
|
|
1648
|
-
/***/ (function(module, exports) {
|
|
1649
|
-
|
|
1650
|
-
module.exports = require("@splunk/themes");
|
|
1651
|
-
|
|
1652
|
-
/***/ }),
|
|
1743
|
+
/* 69 */,
|
|
1653
1744
|
/* 70 */,
|
|
1654
1745
|
/* 71 */,
|
|
1655
1746
|
/* 72 */,
|
|
@@ -1662,31 +1753,31 @@ module.exports = require("@splunk/themes");
|
|
|
1662
1753
|
/* 79 */,
|
|
1663
1754
|
/* 80 */,
|
|
1664
1755
|
/* 81 */,
|
|
1665
|
-
/* 82
|
|
1756
|
+
/* 82 */,
|
|
1757
|
+
/* 83 */,
|
|
1758
|
+
/* 84 */,
|
|
1759
|
+
/* 85 */,
|
|
1760
|
+
/* 86 */,
|
|
1761
|
+
/* 87 */,
|
|
1762
|
+
/* 88 */
|
|
1666
1763
|
/***/ (function(module, exports) {
|
|
1667
1764
|
|
|
1668
|
-
module.exports = require("@
|
|
1765
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
1669
1766
|
|
|
1670
1767
|
/***/ }),
|
|
1671
|
-
/*
|
|
1768
|
+
/* 89 */
|
|
1672
1769
|
/***/ (function(module, exports) {
|
|
1673
1770
|
|
|
1674
|
-
module.exports = require("@
|
|
1771
|
+
module.exports = require("@splunk/react-ui/Popover");
|
|
1675
1772
|
|
|
1676
1773
|
/***/ }),
|
|
1677
|
-
/*
|
|
1774
|
+
/* 90 */,
|
|
1775
|
+
/* 91 */
|
|
1678
1776
|
/***/ (function(module, exports) {
|
|
1679
1777
|
|
|
1680
|
-
module.exports = require("@splunk/
|
|
1778
|
+
module.exports = require("@splunk/visualizations-shared/dataSourceUtils");
|
|
1681
1779
|
|
|
1682
1780
|
/***/ }),
|
|
1683
|
-
/* 85 */,
|
|
1684
|
-
/* 86 */,
|
|
1685
|
-
/* 87 */,
|
|
1686
|
-
/* 88 */,
|
|
1687
|
-
/* 89 */,
|
|
1688
|
-
/* 90 */,
|
|
1689
|
-
/* 91 */,
|
|
1690
1781
|
/* 92 */,
|
|
1691
1782
|
/* 93 */,
|
|
1692
1783
|
/* 94 */,
|
|
@@ -1704,89 +1795,466 @@ module.exports = require("@splunk/react-ui/Popover");
|
|
|
1704
1795
|
/* 106 */,
|
|
1705
1796
|
/* 107 */,
|
|
1706
1797
|
/* 108 */,
|
|
1707
|
-
/* 109
|
|
1798
|
+
/* 109 */,
|
|
1799
|
+
/* 110 */,
|
|
1800
|
+
/* 111 */,
|
|
1801
|
+
/* 112 */,
|
|
1802
|
+
/* 113 */,
|
|
1803
|
+
/* 114 */,
|
|
1804
|
+
/* 115 */,
|
|
1805
|
+
/* 116 */,
|
|
1806
|
+
/* 117 */,
|
|
1807
|
+
/* 118 */
|
|
1708
1808
|
/***/ (function(module, exports) {
|
|
1709
1809
|
|
|
1710
1810
|
module.exports = require("@splunk/react-ui/Menu");
|
|
1711
1811
|
|
|
1712
1812
|
/***/ }),
|
|
1713
|
-
/*
|
|
1813
|
+
/* 119 */
|
|
1714
1814
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1715
1815
|
|
|
1716
1816
|
"use strict";
|
|
1717
1817
|
|
|
1718
1818
|
|
|
1819
|
+
var _typeof = __webpack_require__(88);
|
|
1820
|
+
|
|
1821
|
+
var _slicedToArray = __webpack_require__(17);
|
|
1822
|
+
|
|
1823
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
1824
|
+
|
|
1825
|
+
var _defineProperty = __webpack_require__(8);
|
|
1826
|
+
|
|
1719
1827
|
Object.defineProperty(exports, "__esModule", {
|
|
1720
1828
|
value: true
|
|
1721
1829
|
});
|
|
1722
|
-
exports.
|
|
1830
|
+
exports.truncateString = exports.getCustomTimeInterval = exports.getPredefinedTimeInterval = exports.getEpochTime = exports.generateTokenReplacementMap = exports.replaceTokens = exports.mergeFieldActions = exports.mergeEventActions = exports.getFieldSummaryMapping = exports.convertToPayloadFormat = void 0;
|
|
1723
1831
|
|
|
1724
|
-
var
|
|
1725
|
-
if (!columns || !columns[0].length) return [];
|
|
1726
|
-
var data = [];
|
|
1832
|
+
var time_1 = __webpack_require__(200);
|
|
1727
1833
|
|
|
1728
|
-
|
|
1729
|
-
var newObj = {};
|
|
1730
|
-
fields.forEach(function (field, index) {
|
|
1731
|
-
var fieldName = typeof field === 'string' ? field : field.name;
|
|
1834
|
+
var lodash_1 = __webpack_require__(3);
|
|
1732
1835
|
|
|
1733
|
-
|
|
1734
|
-
newObj[fieldName] = null;
|
|
1735
|
-
} else {
|
|
1736
|
-
newObj[fieldName] = columns[index][i];
|
|
1737
|
-
}
|
|
1738
|
-
});
|
|
1739
|
-
data.push(newObj);
|
|
1740
|
-
};
|
|
1836
|
+
var dataUtils_1 = __webpack_require__(120); // util to convert a field-value map into an object with row.<fieldname>.value keys for payloads
|
|
1741
1837
|
|
|
1742
|
-
for (var i = 0; i < columns[0].length; i += 1) {
|
|
1743
|
-
_loop(i);
|
|
1744
|
-
}
|
|
1745
1838
|
|
|
1746
|
-
|
|
1839
|
+
var convertToPayloadFormat = function convertToPayloadFormat(obj) {
|
|
1840
|
+
var initialValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1841
|
+
if (!obj) return {};
|
|
1842
|
+
return Object.keys(obj).reduce(function (acc, curr) {
|
|
1843
|
+
var key = "row.".concat(curr, ".value");
|
|
1844
|
+
return Object.assign(Object.assign({}, acc), _defineProperty({}, key, obj[curr]));
|
|
1845
|
+
}, initialValue);
|
|
1747
1846
|
};
|
|
1748
1847
|
|
|
1749
|
-
exports.
|
|
1750
|
-
|
|
1751
|
-
/***/ }),
|
|
1752
|
-
/* 111 */
|
|
1753
|
-
/***/ (function(module, exports) {
|
|
1754
|
-
|
|
1755
|
-
module.exports = require("@splunk/react-ui/Markdown");
|
|
1848
|
+
exports.convertToPayloadFormat = convertToPayloadFormat;
|
|
1756
1849
|
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
/* 114 */,
|
|
1761
|
-
/* 115 */,
|
|
1762
|
-
/* 116 */,
|
|
1763
|
-
/* 117 */,
|
|
1764
|
-
/* 118 */,
|
|
1765
|
-
/* 119 */,
|
|
1766
|
-
/* 120 */,
|
|
1767
|
-
/* 121 */,
|
|
1768
|
-
/* 122 */,
|
|
1769
|
-
/* 123 */,
|
|
1770
|
-
/* 124 */,
|
|
1771
|
-
/* 125 */,
|
|
1772
|
-
/* 126 */,
|
|
1773
|
-
/* 127 */,
|
|
1774
|
-
/* 128 */,
|
|
1775
|
-
/* 129 */,
|
|
1776
|
-
/* 130 */,
|
|
1777
|
-
/* 131 */,
|
|
1778
|
-
/* 132 */
|
|
1779
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1850
|
+
var getFieldSummaryMapping = function getFieldSummaryMapping(columns, fields) {
|
|
1851
|
+
// convert the `fieldsummary` payload to an array of objects
|
|
1852
|
+
var arr = dataUtils_1.convertToArrOfObjects(columns, fields); // forms an array of FieldData elements expected by the @splunk/react-field-summary component
|
|
1780
1853
|
|
|
1781
|
-
|
|
1854
|
+
var fieldSummaryData = arr.map(function (d) {
|
|
1855
|
+
return {
|
|
1856
|
+
name: d.field,
|
|
1857
|
+
count: +d.count,
|
|
1858
|
+
distinctCount: +d.distinct_count,
|
|
1859
|
+
numericCount: +d.numeric_count,
|
|
1860
|
+
max: d.max === null ? null : +d.max,
|
|
1861
|
+
mean: d.mean === null ? null : +d.mean,
|
|
1862
|
+
min: d.min === null ? null : +d.min,
|
|
1863
|
+
stdev: d.stdev === null ? null : +d.stdev,
|
|
1864
|
+
modes: JSON.parse(d.values)
|
|
1865
|
+
};
|
|
1866
|
+
}); // creates a map of field name to its data for O(1) retrieval in the tooltip component
|
|
1782
1867
|
|
|
1868
|
+
var fieldSummaryMapping = fieldSummaryData.reduce(function (map, fieldData) {
|
|
1869
|
+
return Object.assign(Object.assign({}, map), _defineProperty({}, fieldData.name, fieldData));
|
|
1870
|
+
}, {});
|
|
1871
|
+
return fieldSummaryMapping;
|
|
1872
|
+
};
|
|
1783
1873
|
|
|
1784
|
-
|
|
1785
|
-
|
|
1874
|
+
exports.getFieldSummaryMapping = getFieldSummaryMapping;
|
|
1875
|
+
/**
|
|
1876
|
+
* Helper to merge event actions into one array of event actions.
|
|
1877
|
+
* @method mergeEventActions
|
|
1878
|
+
* @param {EventAction[]} eventActions1
|
|
1879
|
+
* @param {EventAction[]} eventActions2
|
|
1880
|
+
* @returns {EventAction[]} merged event actions
|
|
1881
|
+
*/
|
|
1786
1882
|
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1883
|
+
var mergeEventActions = function mergeEventActions(eventActions1, eventActions2) {
|
|
1884
|
+
return eventActions1.concat(eventActions2);
|
|
1885
|
+
};
|
|
1886
|
+
|
|
1887
|
+
exports.mergeEventActions = mergeEventActions;
|
|
1888
|
+
/**
|
|
1889
|
+
* Helper to merge field actions. If same key exists in both field actions,
|
|
1890
|
+
* combine each array of actions under one key.
|
|
1891
|
+
*
|
|
1892
|
+
* Actions under the `default` key should be merged into actions under the `*` key.
|
|
1893
|
+
* Although the `default` key is supported to indicate actions that apply to all fields,
|
|
1894
|
+
* we are working towards deprecating the `default` key in favour of the `*` key.
|
|
1895
|
+
* As of 5.0.0, the react-events-viewer only supports the `*` key to indicate common field actions.
|
|
1896
|
+
* @method mergeFieldActions
|
|
1897
|
+
* @param {FieldActions} fieldActions1
|
|
1898
|
+
* @param {FieldActions} fieldActions2
|
|
1899
|
+
* @returns {FieldActions} merged field actions
|
|
1900
|
+
*/
|
|
1901
|
+
|
|
1902
|
+
var mergeFieldActions = function mergeFieldActions(fieldActions1, fieldActions2) {
|
|
1903
|
+
var fieldActions1WithoutDefault = Object.assign({}, fieldActions1);
|
|
1904
|
+
|
|
1905
|
+
if ('default' in fieldActions1WithoutDefault) {
|
|
1906
|
+
fieldActions1WithoutDefault['*'] = '*' in fieldActions1WithoutDefault ? [].concat(_toConsumableArray(fieldActions1WithoutDefault['*']), _toConsumableArray(fieldActions1WithoutDefault.default)) : fieldActions1WithoutDefault.default;
|
|
1907
|
+
delete fieldActions1WithoutDefault.default;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
var fieldActions2WithoutDefault = Object.assign({}, fieldActions2);
|
|
1911
|
+
|
|
1912
|
+
if ('default' in fieldActions2WithoutDefault) {
|
|
1913
|
+
fieldActions2WithoutDefault['*'] = '*' in fieldActions2WithoutDefault ? [].concat(_toConsumableArray(fieldActions2WithoutDefault['*']), _toConsumableArray(fieldActions2WithoutDefault.default)) : fieldActions2WithoutDefault.default;
|
|
1914
|
+
delete fieldActions2WithoutDefault.default;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
return lodash_1.mergeWith(fieldActions1WithoutDefault, fieldActions2WithoutDefault, function (fieldAction1value, fieldAction2value) {
|
|
1918
|
+
return Array.isArray(fieldAction1value) && Array.isArray(fieldAction2value) ? lodash_1.union(fieldAction1value, fieldAction2value) : undefined;
|
|
1919
|
+
});
|
|
1920
|
+
};
|
|
1921
|
+
|
|
1922
|
+
exports.mergeFieldActions = mergeFieldActions;
|
|
1923
|
+
/**
|
|
1924
|
+
* Helper to replace all tokens from the tokenReplacementMap in text with their corresponding values.
|
|
1925
|
+
* Special parameters will only be escaped if allowSpecialParametersEscape is true.
|
|
1926
|
+
* Field values will only be escaped if allowFieldValuesEscape is true, and the field does not begin with `!`.
|
|
1927
|
+
* https://dev.splunk.com/enterprise/docs/devtools/customworkflowactions/#Prevent-field-value-escape
|
|
1928
|
+
*
|
|
1929
|
+
* @method replaceTokens
|
|
1930
|
+
* @param {string} text
|
|
1931
|
+
* @param {TokenReplacementMap} tokenReplacementMap
|
|
1932
|
+
* @param {boolean} allowSpecialParametersEscape
|
|
1933
|
+
* @param {boolean} allowFieldValuesEscape
|
|
1934
|
+
* @returns {string} text with replaced tokens
|
|
1935
|
+
*/
|
|
1936
|
+
|
|
1937
|
+
var replaceTokens = function replaceTokens(_ref) {
|
|
1938
|
+
var text = _ref.text,
|
|
1939
|
+
tokenReplacementMap = _ref.tokenReplacementMap,
|
|
1940
|
+
allowSpecialParametersEscape = _ref.allowSpecialParametersEscape,
|
|
1941
|
+
allowFieldValuesEscape = _ref.allowFieldValuesEscape;
|
|
1942
|
+
var replacedText = text; // replace special parameters
|
|
1943
|
+
|
|
1944
|
+
Object.entries(tokenReplacementMap.specialParameters).forEach(function (_ref2) {
|
|
1945
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
1946
|
+
tokenName = _ref3[0],
|
|
1947
|
+
tokenValue = _ref3[1];
|
|
1948
|
+
|
|
1949
|
+
var maybeEscapedTokenValue = allowSpecialParametersEscape ? encodeURIComponent(tokenValue) : tokenValue;
|
|
1950
|
+
replacedText = replacedText.split("$".concat(tokenName, "$")).join(maybeEscapedTokenValue);
|
|
1951
|
+
}); // replace field values
|
|
1952
|
+
|
|
1953
|
+
Object.entries(tokenReplacementMap.fields).forEach(function (_ref4) {
|
|
1954
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
1955
|
+
tokenName = _ref5[0],
|
|
1956
|
+
tokenValue = _ref5[1];
|
|
1957
|
+
|
|
1958
|
+
// when allowFieldValuesEscape is true, replace field with escaped value
|
|
1959
|
+
var maybeEscapedTokenValue = allowFieldValuesEscape ? encodeURIComponent(tokenValue) : tokenValue;
|
|
1960
|
+
replacedText = replacedText.split("$".concat(tokenName, "$")).join(maybeEscapedTokenValue); // If field starts with `!`, always replace with the unescaped value
|
|
1961
|
+
|
|
1962
|
+
replacedText = replacedText.split("$!".concat(tokenName, "$")).join(tokenValue);
|
|
1963
|
+
});
|
|
1964
|
+
return replacedText;
|
|
1965
|
+
};
|
|
1966
|
+
|
|
1967
|
+
exports.replaceTokens = replaceTokens;
|
|
1968
|
+
/**
|
|
1969
|
+
* Generate a token replacement map taking into account Special Parameters and field replacements.
|
|
1970
|
+
*/
|
|
1971
|
+
|
|
1972
|
+
var generateTokenReplacementMap = function generateTokenReplacementMap(_ref6) {
|
|
1973
|
+
var dataSources = _ref6.dataSources,
|
|
1974
|
+
rowIndex = _ref6.rowIndex,
|
|
1975
|
+
pageNumber = _ref6.pageNumber,
|
|
1976
|
+
field = _ref6.field,
|
|
1977
|
+
value = _ref6.value,
|
|
1978
|
+
_ref6$event = _ref6.event,
|
|
1979
|
+
event = _ref6$event === void 0 ? {} : _ref6$event;
|
|
1980
|
+
|
|
1981
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1982
|
+
|
|
1983
|
+
var tokenReplacementMap = {
|
|
1984
|
+
specialParameters: {},
|
|
1985
|
+
fields: {}
|
|
1986
|
+
}; // Map special parameters for workflow actions with values
|
|
1987
|
+
// Note that @latest_time will not be supported since it does not work in sxml
|
|
1988
|
+
// https://dev.splunk.com/enterprise/docs/devtools/customworkflowactions/#Special-parameters
|
|
1989
|
+
|
|
1990
|
+
var count = (_b = (_a = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary) === null || _a === void 0 ? void 0 : _a.requestParams) === null || _b === void 0 ? void 0 : _b.count;
|
|
1991
|
+
var offset = rowIndex !== undefined && pageNumber !== undefined && count !== undefined ? rowIndex + count * (pageNumber - 1) : undefined;
|
|
1992
|
+
|
|
1993
|
+
if (offset !== undefined) {
|
|
1994
|
+
tokenReplacementMap.specialParameters['@offset'] = String(offset);
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
if ((_d = (_c = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary) === null || _c === void 0 ? void 0 : _c.meta) === null || _d === void 0 ? void 0 : _d.sid) {
|
|
1998
|
+
tokenReplacementMap.specialParameters['@sid'] = (_f = (_e = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary) === null || _e === void 0 ? void 0 : _e.meta) === null || _f === void 0 ? void 0 : _f.sid;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
if ((_h = (_g = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary) === null || _g === void 0 ? void 0 : _g.meta) === null || _h === void 0 ? void 0 : _h.app) {
|
|
2002
|
+
tokenReplacementMap.specialParameters['@namespace'] = (_k = (_j = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary) === null || _j === void 0 ? void 0 : _j.meta) === null || _k === void 0 ? void 0 : _k.app;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
if (field) {
|
|
2006
|
+
tokenReplacementMap.specialParameters['@field_name'] = field;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
if (value) {
|
|
2010
|
+
tokenReplacementMap.specialParameters['@field_value'] = value;
|
|
2011
|
+
} // Map fields with field values
|
|
2012
|
+
|
|
2013
|
+
|
|
2014
|
+
Object.entries(event).forEach(function (_ref7) {
|
|
2015
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
2016
|
+
fieldName = _ref8[0],
|
|
2017
|
+
fieldValue = _ref8[1];
|
|
2018
|
+
|
|
2019
|
+
// handling of _raw and _time fields matches SXML behaviour. Implementation is based on fieldSubstitute() from splunkcore-web-ui
|
|
2020
|
+
var replacedValue;
|
|
2021
|
+
|
|
2022
|
+
if (fieldName === '_time' && typeof fieldValue === 'string') {
|
|
2023
|
+
var splunkTime = time_1.getISOWithTimeZone(fieldValue);
|
|
2024
|
+
var epochTime = exports.getEpochTime(splunkTime);
|
|
2025
|
+
replacedValue = Math.floor(epochTime).toString();
|
|
2026
|
+
} else if (fieldName === '_raw' && _typeof(fieldValue) === 'object') {
|
|
2027
|
+
var rawFieldValue = Array.isArray(fieldValue) ? fieldValue[0] : fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.value;
|
|
2028
|
+
replacedValue = rawFieldValue ? rawFieldValue.toString() : '';
|
|
2029
|
+
} else {
|
|
2030
|
+
replacedValue = typeof fieldValue === 'string' ? fieldValue : JSON.stringify(fieldValue);
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
tokenReplacementMap.fields["".concat(fieldName)] = replacedValue;
|
|
2034
|
+
});
|
|
2035
|
+
return tokenReplacementMap;
|
|
2036
|
+
};
|
|
2037
|
+
|
|
2038
|
+
exports.generateTokenReplacementMap = generateTokenReplacementMap; // return epoch unix timestamp in seconds
|
|
2039
|
+
|
|
2040
|
+
var getEpochTime = function getEpochTime(time) {
|
|
2041
|
+
// if not a valid time string, then indicate an error and return NaN.
|
|
2042
|
+
if (!time_1.isISO(time)) {
|
|
2043
|
+
console.error("'".concat(time, "' is not a valid time string."));
|
|
2044
|
+
return NaN;
|
|
2045
|
+
} // retrieves the epoch time in milliseconds, and divides by 1000
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
return new Date(time).getTime() / 1000;
|
|
2049
|
+
};
|
|
2050
|
+
|
|
2051
|
+
exports.getEpochTime = getEpochTime;
|
|
2052
|
+
/**
|
|
2053
|
+
* Helper to calculate the start (`earliest`) and end (`latest`) times when user clicks a predefined control in the Time Controls Popover
|
|
2054
|
+
* (Before this time/After this time/At this time). If `Before this time` is selected, the time window only includes `latest`, as there is
|
|
2055
|
+
* no `earliest` start time, and adds a 0.001 increment is order to capture all events at `time`. If `After this time` is selected, the
|
|
2056
|
+
* window is from `time` to `now`. If `At this time` is selected, the window starts at `time` (in epoch time) and ends at `time` plus 0.001
|
|
2057
|
+
* in order to include all events at `time`.
|
|
2058
|
+
* @method getPredefinedTimeInterval
|
|
2059
|
+
* @param {string} time
|
|
2060
|
+
* @param {('before'|'after'|'at')} when
|
|
2061
|
+
* @returns {TimeInterval} interval with `earliest` and `latest` defined in epoch time
|
|
2062
|
+
*/
|
|
2063
|
+
|
|
2064
|
+
var getPredefinedTimeInterval = function getPredefinedTimeInterval(_ref9) {
|
|
2065
|
+
var time = _ref9.time,
|
|
2066
|
+
when = _ref9.when;
|
|
2067
|
+
var epochTime = exports.getEpochTime(time);
|
|
2068
|
+
|
|
2069
|
+
switch (when) {
|
|
2070
|
+
case 'before':
|
|
2071
|
+
return {
|
|
2072
|
+
latest: epochTime + 0.001
|
|
2073
|
+
};
|
|
2074
|
+
|
|
2075
|
+
case 'after':
|
|
2076
|
+
return {
|
|
2077
|
+
earliest: epochTime,
|
|
2078
|
+
latest: 'now'
|
|
2079
|
+
};
|
|
2080
|
+
|
|
2081
|
+
case 'at':
|
|
2082
|
+
return {
|
|
2083
|
+
earliest: epochTime,
|
|
2084
|
+
latest: epochTime + 0.001
|
|
2085
|
+
};
|
|
2086
|
+
|
|
2087
|
+
default:
|
|
2088
|
+
// returns 'at' interval by default
|
|
2089
|
+
return {
|
|
2090
|
+
earliest: epochTime,
|
|
2091
|
+
latest: epochTime + 0.001
|
|
2092
|
+
};
|
|
2093
|
+
}
|
|
2094
|
+
};
|
|
2095
|
+
|
|
2096
|
+
exports.getPredefinedTimeInterval = getPredefinedTimeInterval;
|
|
2097
|
+
/**
|
|
2098
|
+
* Helper to calculate the start (`earliest`) and end (`latest`) times when user clicks `Apply` in the Time Controls Popover.
|
|
2099
|
+
* If the `plusminus` type is selected, the window expands either way with the `time` as a midpoint, and amount and interval length
|
|
2100
|
+
* dependent on `rangeAmount` and `rangeUnit`. `plus` indicates starting at `time` and `minus` indicates ending at `time`.
|
|
2101
|
+
* To match sXML behavior, the time interval is converted to epoch time and 0.001 is added to the `latest` time to ensure the
|
|
2102
|
+
* time window is inclusive of the end time.
|
|
2103
|
+
* @method getCustomTimeInterval
|
|
2104
|
+
* @param {string} time
|
|
2105
|
+
* @param {string} rangeType
|
|
2106
|
+
* @param {string} rangeAmount
|
|
2107
|
+
* @param {string} rangeUnit
|
|
2108
|
+
* @returns {TimeInterval} interval with `earliest` and `latest` defined in epoch time
|
|
2109
|
+
*/
|
|
2110
|
+
|
|
2111
|
+
var getCustomTimeInterval = function getCustomTimeInterval(_ref10) {
|
|
2112
|
+
var time = _ref10.time,
|
|
2113
|
+
rangeType = _ref10.rangeType,
|
|
2114
|
+
rangeAmount = _ref10.rangeAmount,
|
|
2115
|
+
rangeUnit = _ref10.rangeUnit;
|
|
2116
|
+
var timeRange = time_1.getAcceleratedTimeRange(time, rangeAmount, rangeUnit);
|
|
2117
|
+
var timeInterval;
|
|
2118
|
+
|
|
2119
|
+
if (rangeType === 'plusminus') {
|
|
2120
|
+
timeInterval = Object.assign({}, timeRange);
|
|
2121
|
+
} else if (rangeType === 'plus') {
|
|
2122
|
+
timeInterval = Object.assign(Object.assign({}, timeRange), {
|
|
2123
|
+
earliest: time
|
|
2124
|
+
});
|
|
2125
|
+
} else if (rangeType === 'minus') {
|
|
2126
|
+
timeInterval = Object.assign(Object.assign({}, timeRange), {
|
|
2127
|
+
latest: time
|
|
2128
|
+
});
|
|
2129
|
+
} // converts to use epoch time in the interval, and adds 0.001 to `latest` per spec
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
return {
|
|
2133
|
+
earliest: exports.getEpochTime(timeInterval.earliest),
|
|
2134
|
+
latest: exports.getEpochTime(timeInterval.latest) + 0.001
|
|
2135
|
+
};
|
|
2136
|
+
};
|
|
2137
|
+
|
|
2138
|
+
exports.getCustomTimeInterval = getCustomTimeInterval;
|
|
2139
|
+
/**
|
|
2140
|
+
* Helper to truncate strings to a maximum length.
|
|
2141
|
+
* The string is broken up into the leading characters, followed by ellipsis and the trailing characters.
|
|
2142
|
+
* @method truncateString
|
|
2143
|
+
* @param {string} stringToTruncate
|
|
2144
|
+
* @returns {string} truncated string
|
|
2145
|
+
*/
|
|
2146
|
+
|
|
2147
|
+
var truncateString = function truncateString(stringToTruncate) {
|
|
2148
|
+
var MAX_LENGTH = 100;
|
|
2149
|
+
var LEAD_AND_TRAIL_LENGTH = 50;
|
|
2150
|
+
var truncatedString = stringToTruncate;
|
|
2151
|
+
|
|
2152
|
+
if (truncatedString.length > MAX_LENGTH) {
|
|
2153
|
+
truncatedString = "".concat(truncatedString.substring(0, LEAD_AND_TRAIL_LENGTH), "...").concat(truncatedString.substring(truncatedString.length - LEAD_AND_TRAIL_LENGTH));
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
return truncatedString;
|
|
2157
|
+
};
|
|
2158
|
+
|
|
2159
|
+
exports.truncateString = truncateString;
|
|
2160
|
+
|
|
2161
|
+
/***/ }),
|
|
2162
|
+
/* 120 */
|
|
2163
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2164
|
+
|
|
2165
|
+
"use strict";
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2169
|
+
value: true
|
|
2170
|
+
});
|
|
2171
|
+
exports.convertToArrOfObjects = void 0; // TODO: utilize this fn in ParallelCoordinates
|
|
2172
|
+
|
|
2173
|
+
var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
|
|
2174
|
+
if (!columns || !columns[0].length) return [];
|
|
2175
|
+
var data = [];
|
|
2176
|
+
|
|
2177
|
+
var _loop = function _loop(i) {
|
|
2178
|
+
var newObj = {};
|
|
2179
|
+
fields.forEach(function (field, index) {
|
|
2180
|
+
var fieldName = typeof field === 'string' ? field : field.name;
|
|
2181
|
+
|
|
2182
|
+
if (columns[index][i] === '') {
|
|
2183
|
+
newObj[fieldName] = null;
|
|
2184
|
+
} else {
|
|
2185
|
+
newObj[fieldName] = columns[index][i];
|
|
2186
|
+
}
|
|
2187
|
+
});
|
|
2188
|
+
data.push(newObj);
|
|
2189
|
+
};
|
|
2190
|
+
|
|
2191
|
+
for (var i = 0; i < columns[0].length; i += 1) {
|
|
2192
|
+
_loop(i);
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
return data;
|
|
2196
|
+
};
|
|
2197
|
+
|
|
2198
|
+
exports.convertToArrOfObjects = convertToArrOfObjects;
|
|
2199
|
+
|
|
2200
|
+
/***/ }),
|
|
2201
|
+
/* 121 */
|
|
2202
|
+
/***/ (function(module, exports) {
|
|
2203
|
+
|
|
2204
|
+
module.exports = require("@splunk/react-ui/Markdown");
|
|
2205
|
+
|
|
2206
|
+
/***/ }),
|
|
2207
|
+
/* 122 */
|
|
2208
|
+
/***/ (function(module, exports) {
|
|
2209
|
+
|
|
2210
|
+
module.exports = require("@splunk/react-ui/Button");
|
|
2211
|
+
|
|
2212
|
+
/***/ }),
|
|
2213
|
+
/* 123 */
|
|
2214
|
+
/***/ (function(module, exports) {
|
|
2215
|
+
|
|
2216
|
+
module.exports = require("@splunk/react-ui/Message");
|
|
2217
|
+
|
|
2218
|
+
/***/ }),
|
|
2219
|
+
/* 124 */
|
|
2220
|
+
/***/ (function(module, exports) {
|
|
2221
|
+
|
|
2222
|
+
module.exports = require("@splunk/react-ui/Heading");
|
|
2223
|
+
|
|
2224
|
+
/***/ }),
|
|
2225
|
+
/* 125 */,
|
|
2226
|
+
/* 126 */,
|
|
2227
|
+
/* 127 */,
|
|
2228
|
+
/* 128 */,
|
|
2229
|
+
/* 129 */,
|
|
2230
|
+
/* 130 */,
|
|
2231
|
+
/* 131 */,
|
|
2232
|
+
/* 132 */,
|
|
2233
|
+
/* 133 */,
|
|
2234
|
+
/* 134 */,
|
|
2235
|
+
/* 135 */,
|
|
2236
|
+
/* 136 */,
|
|
2237
|
+
/* 137 */,
|
|
2238
|
+
/* 138 */,
|
|
2239
|
+
/* 139 */,
|
|
2240
|
+
/* 140 */,
|
|
2241
|
+
/* 141 */,
|
|
2242
|
+
/* 142 */,
|
|
2243
|
+
/* 143 */,
|
|
2244
|
+
/* 144 */,
|
|
2245
|
+
/* 145 */,
|
|
2246
|
+
/* 146 */
|
|
2247
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2248
|
+
|
|
2249
|
+
"use strict";
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2253
|
+
var t = {};
|
|
2254
|
+
|
|
2255
|
+
for (var p in s) {
|
|
2256
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
2257
|
+
}
|
|
1790
2258
|
|
|
1791
2259
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1792
2260
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
@@ -1797,23 +2265,32 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
1797
2265
|
Object.defineProperty(exports, "__esModule", {
|
|
1798
2266
|
value: true
|
|
1799
2267
|
});
|
|
1800
|
-
exports.PureEvents = exports.config = exports.themes = exports.computeVizProps = exports.showPlaceHolderIcon = void 0;
|
|
2268
|
+
exports.replaceTokens = exports.PureEvents = exports.config = exports.themes = exports.computeVizProps = exports.showPlaceHolderIcon = void 0;
|
|
1801
2269
|
|
|
1802
2270
|
var lodash_1 = __webpack_require__(3);
|
|
1803
2271
|
|
|
1804
|
-
var dataSourceUtils_1 = __webpack_require__(
|
|
2272
|
+
var dataSourceUtils_1 = __webpack_require__(91);
|
|
1805
2273
|
|
|
1806
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
2274
|
+
var withDashboardViz_1 = __webpack_require__(36);
|
|
1807
2275
|
|
|
1808
|
-
var constants_1 = __webpack_require__(
|
|
2276
|
+
var constants_1 = __webpack_require__(147);
|
|
1809
2277
|
|
|
1810
|
-
var config_1 = __webpack_require__(
|
|
2278
|
+
var config_1 = __webpack_require__(197);
|
|
1811
2279
|
|
|
1812
2280
|
exports.config = config_1.default;
|
|
1813
2281
|
|
|
1814
|
-
var PureEvents_1 = __webpack_require__(
|
|
2282
|
+
var PureEvents_1 = __webpack_require__(198);
|
|
1815
2283
|
|
|
1816
2284
|
exports.PureEvents = PureEvents_1.default;
|
|
2285
|
+
|
|
2286
|
+
var EventUtils_1 = __webpack_require__(119);
|
|
2287
|
+
|
|
2288
|
+
Object.defineProperty(exports, "replaceTokens", {
|
|
2289
|
+
enumerable: true,
|
|
2290
|
+
get: function get() {
|
|
2291
|
+
return EventUtils_1.replaceTokens;
|
|
2292
|
+
}
|
|
2293
|
+
});
|
|
1817
2294
|
/**
|
|
1818
2295
|
* @method showPlaceHolderIcon
|
|
1819
2296
|
* @param {Object} dataSources
|
|
@@ -1847,6 +2324,7 @@ var Events = withDashboardViz_1.default({
|
|
|
1847
2324
|
ReactViz: PureEvents_1.default,
|
|
1848
2325
|
vizConfig: config_1.default,
|
|
1849
2326
|
computeVizProps: exports.computeVizProps,
|
|
2327
|
+
disableEditModeCover: true,
|
|
1850
2328
|
useIconPlaceholder: function useIconPlaceholder(dataSources) {
|
|
1851
2329
|
return exports.showPlaceHolderIcon(dataSources);
|
|
1852
2330
|
}
|
|
@@ -1856,7 +2334,7 @@ exports.themes = themes;
|
|
|
1856
2334
|
exports.default = Events;
|
|
1857
2335
|
|
|
1858
2336
|
/***/ }),
|
|
1859
|
-
/*
|
|
2337
|
+
/* 147 */
|
|
1860
2338
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1861
2339
|
|
|
1862
2340
|
"use strict";
|
|
@@ -1867,7 +2345,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1867
2345
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY_DATASOURCE", function() { return EMPTY_DATASOURCE; });
|
|
1868
2346
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FIELDSUMMARY_DS_STORYBOOK", function() { return FIELDSUMMARY_DS_STORYBOOK; });
|
|
1869
2347
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FIELDSUMMARY_DS_DOC_HUB", function() { return FIELDSUMMARY_DS_DOC_HUB; });
|
|
1870
|
-
/* harmony import */ var _splunk_datasource_utils_DataSet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2348
|
+
/* harmony import */ var _splunk_datasource_utils_DataSet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(165);
|
|
1871
2349
|
/* harmony import */ var _splunk_datasource_utils_DataSet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_datasource_utils_DataSet__WEBPACK_IMPORTED_MODULE_0__);
|
|
1872
2350
|
// TODO: convert this file to .ts - created as .js as copied from SUI EventsViewer repo
|
|
1873
2351
|
|
|
@@ -2316,35 +2794,16 @@ var FIELDSUMMARY_DS_DOC_HUB = {
|
|
|
2316
2794
|
};
|
|
2317
2795
|
|
|
2318
2796
|
/***/ }),
|
|
2319
|
-
/*
|
|
2797
|
+
/* 148 */
|
|
2320
2798
|
/***/ (function(module, exports) {
|
|
2321
2799
|
|
|
2322
2800
|
module.exports = require("@splunk/visualization-context/EventsContext");
|
|
2323
2801
|
|
|
2324
2802
|
/***/ }),
|
|
2325
|
-
/* 135 */,
|
|
2326
|
-
/* 136 */,
|
|
2327
|
-
/* 137 */,
|
|
2328
|
-
/* 138 */,
|
|
2329
|
-
/* 139 */,
|
|
2330
|
-
/* 140 */,
|
|
2331
|
-
/* 141 */,
|
|
2332
|
-
/* 142 */,
|
|
2333
|
-
/* 143 */,
|
|
2334
|
-
/* 144 */,
|
|
2335
|
-
/* 145 */,
|
|
2336
|
-
/* 146 */,
|
|
2337
|
-
/* 147 */,
|
|
2338
|
-
/* 148 */,
|
|
2339
2803
|
/* 149 */,
|
|
2340
2804
|
/* 150 */,
|
|
2341
2805
|
/* 151 */,
|
|
2342
|
-
/* 152
|
|
2343
|
-
/***/ (function(module, exports) {
|
|
2344
|
-
|
|
2345
|
-
module.exports = require("@splunk/datasource-utils/DataSet");
|
|
2346
|
-
|
|
2347
|
-
/***/ }),
|
|
2806
|
+
/* 152 */,
|
|
2348
2807
|
/* 153 */,
|
|
2349
2808
|
/* 154 */,
|
|
2350
2809
|
/* 155 */,
|
|
@@ -2357,7 +2816,12 @@ module.exports = require("@splunk/datasource-utils/DataSet");
|
|
|
2357
2816
|
/* 162 */,
|
|
2358
2817
|
/* 163 */,
|
|
2359
2818
|
/* 164 */,
|
|
2360
|
-
/* 165
|
|
2819
|
+
/* 165 */
|
|
2820
|
+
/***/ (function(module, exports) {
|
|
2821
|
+
|
|
2822
|
+
module.exports = require("@splunk/datasource-utils/DataSet");
|
|
2823
|
+
|
|
2824
|
+
/***/ }),
|
|
2361
2825
|
/* 166 */,
|
|
2362
2826
|
/* 167 */,
|
|
2363
2827
|
/* 168 */,
|
|
@@ -2375,7 +2839,20 @@ module.exports = require("@splunk/datasource-utils/DataSet");
|
|
|
2375
2839
|
/* 180 */,
|
|
2376
2840
|
/* 181 */,
|
|
2377
2841
|
/* 182 */,
|
|
2378
|
-
/* 183
|
|
2842
|
+
/* 183 */,
|
|
2843
|
+
/* 184 */,
|
|
2844
|
+
/* 185 */,
|
|
2845
|
+
/* 186 */,
|
|
2846
|
+
/* 187 */,
|
|
2847
|
+
/* 188 */,
|
|
2848
|
+
/* 189 */,
|
|
2849
|
+
/* 190 */,
|
|
2850
|
+
/* 191 */,
|
|
2851
|
+
/* 192 */,
|
|
2852
|
+
/* 193 */,
|
|
2853
|
+
/* 194 */,
|
|
2854
|
+
/* 195 */,
|
|
2855
|
+
/* 196 */
|
|
2379
2856
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2380
2857
|
|
|
2381
2858
|
"use strict";
|
|
@@ -2405,9 +2882,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2405
2882
|
});
|
|
2406
2883
|
exports.default = void 0;
|
|
2407
2884
|
|
|
2408
|
-
__exportStar(__webpack_require__(
|
|
2885
|
+
__exportStar(__webpack_require__(146), exports);
|
|
2409
2886
|
|
|
2410
|
-
var Events_1 = __webpack_require__(
|
|
2887
|
+
var Events_1 = __webpack_require__(146);
|
|
2411
2888
|
|
|
2412
2889
|
Object.defineProperty(exports, "default", {
|
|
2413
2890
|
enumerable: true,
|
|
@@ -2417,7 +2894,7 @@ Object.defineProperty(exports, "default", {
|
|
|
2417
2894
|
});
|
|
2418
2895
|
|
|
2419
2896
|
/***/ }),
|
|
2420
|
-
/*
|
|
2897
|
+
/* 197 */
|
|
2421
2898
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2422
2899
|
|
|
2423
2900
|
"use strict";
|
|
@@ -2427,23 +2904,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2427
2904
|
value: true
|
|
2428
2905
|
});
|
|
2429
2906
|
|
|
2430
|
-
var visualization_icons_1 = __webpack_require__(
|
|
2907
|
+
var visualization_icons_1 = __webpack_require__(51);
|
|
2431
2908
|
|
|
2432
|
-
var placeholders_1 = __webpack_require__(
|
|
2909
|
+
var placeholders_1 = __webpack_require__(48);
|
|
2433
2910
|
|
|
2434
2911
|
var schemaUtils_1 = __webpack_require__(16);
|
|
2435
2912
|
|
|
2436
|
-
var themes_1 = __webpack_require__(
|
|
2913
|
+
var themes_1 = __webpack_require__(59);
|
|
2437
2914
|
|
|
2438
2915
|
var i18n_1 = __webpack_require__(2);
|
|
2439
2916
|
|
|
2440
2917
|
var VizBehavior_1 = __webpack_require__(6);
|
|
2441
2918
|
|
|
2442
|
-
var VizCategory_1 = __webpack_require__(
|
|
2919
|
+
var VizCategory_1 = __webpack_require__(35);
|
|
2443
2920
|
|
|
2444
|
-
var configUtils_1 = __webpack_require__(
|
|
2921
|
+
var configUtils_1 = __webpack_require__(19);
|
|
2445
2922
|
|
|
2446
|
-
var BackgroundColor_1 = __webpack_require__(
|
|
2923
|
+
var BackgroundColor_1 = __webpack_require__(53);
|
|
2447
2924
|
|
|
2448
2925
|
var defaultContext = {};
|
|
2449
2926
|
var dataContract = {
|
|
@@ -2479,29 +2956,88 @@ var optionsSchema = {
|
|
|
2479
2956
|
},
|
|
2480
2957
|
eventActions: {
|
|
2481
2958
|
default: [],
|
|
2482
|
-
description: 'Specify the available actions to take for an event. For example, `[{ "eventType": "eventAction.buildEventType.click", "label": "Build Event Type" }]`. Event types should end in `.click` if utilizing event handlers.',
|
|
2959
|
+
description: 'Specify the available actions to take for an event. For example, `[{ "eventType": "eventAction.buildEventType.click", "label": "Build Event Type" }]`. Event types should end in `.click` if utilizing event handlers. Note that both `eventtypeValues` and `fieldFilters` keys support wildcard values.',
|
|
2483
2960
|
type: 'array',
|
|
2484
2961
|
items: {
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2962
|
+
anyOf: [{
|
|
2963
|
+
type: 'object',
|
|
2964
|
+
properties: {
|
|
2965
|
+
eventType: {
|
|
2966
|
+
description: 'The distinct type for the event emitted upon event action click.',
|
|
2967
|
+
type: 'string',
|
|
2968
|
+
pattern: '.click$',
|
|
2969
|
+
default: ''
|
|
2970
|
+
},
|
|
2971
|
+
label: {
|
|
2972
|
+
description: 'The label for the event action.',
|
|
2973
|
+
type: 'string',
|
|
2974
|
+
default: ''
|
|
2975
|
+
},
|
|
2976
|
+
eventtypeValues: {
|
|
2977
|
+
description: 'An array of string values that all need to match against the value(s) of the `eventtype` field if it exists in the event in order to be shown.',
|
|
2978
|
+
items: {
|
|
2979
|
+
type: 'string'
|
|
2980
|
+
},
|
|
2981
|
+
type: 'array',
|
|
2982
|
+
default: []
|
|
2983
|
+
},
|
|
2984
|
+
fieldFilters: {
|
|
2985
|
+
description: 'An array of string values for fields that need to exist in the event in order for the given event action in order to be shown.',
|
|
2986
|
+
items: {
|
|
2987
|
+
type: 'string'
|
|
2988
|
+
},
|
|
2989
|
+
type: 'array',
|
|
2990
|
+
default: []
|
|
2991
|
+
}
|
|
2492
2992
|
},
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
type: 'string',
|
|
2496
|
-
default: ''
|
|
2497
|
-
}
|
|
2498
|
-
},
|
|
2499
|
-
required: ['eventType', 'label']
|
|
2993
|
+
required: ['eventType', 'label']
|
|
2994
|
+
}]
|
|
2500
2995
|
}
|
|
2501
2996
|
},
|
|
2502
2997
|
fieldActions: {
|
|
2503
|
-
description: 'Specify the available actions for this field. For example, `{
|
|
2504
|
-
type: 'object'
|
|
2998
|
+
description: 'Specify the available actions for this field. For example, `{ *: [{ "eventType": "fieldAction.sharedAction1.click", "label": "Shared Action 1", "eventtypeValues": ["*"], "fieldFilters": ["*"] }] }`. Event types should end in `.click` if utilizing event handlers. Actions under the `*` key are shared across all field dropdowns. Note that both `eventtypeValues` and `fieldFilters` keys, as well as the field names, support wildcard values.',
|
|
2999
|
+
type: 'object',
|
|
3000
|
+
patternProperties: {
|
|
3001
|
+
'.*': {
|
|
3002
|
+
description: 'Specify the available actions for this field.',
|
|
3003
|
+
type: 'array',
|
|
3004
|
+
items: {
|
|
3005
|
+
anyOf: [{
|
|
3006
|
+
type: 'object',
|
|
3007
|
+
properties: {
|
|
3008
|
+
eventType: {
|
|
3009
|
+
description: 'The distinct type for the event emitted upon event action click.',
|
|
3010
|
+
type: 'string',
|
|
3011
|
+
pattern: '.click$',
|
|
3012
|
+
default: ''
|
|
3013
|
+
},
|
|
3014
|
+
label: {
|
|
3015
|
+
description: 'The label for the event action.',
|
|
3016
|
+
type: 'string',
|
|
3017
|
+
default: ''
|
|
3018
|
+
},
|
|
3019
|
+
eventtypeValues: {
|
|
3020
|
+
description: 'An array of string values that all need to match against the value(s) of the `eventtype` field if it exists in the event in order to be shown.',
|
|
3021
|
+
items: {
|
|
3022
|
+
type: 'string'
|
|
3023
|
+
},
|
|
3024
|
+
type: 'array',
|
|
3025
|
+
default: []
|
|
3026
|
+
},
|
|
3027
|
+
fieldFilters: {
|
|
3028
|
+
description: 'An array of string values for fields that need to exist in the event in order for the given event action in order to be shown.',
|
|
3029
|
+
items: {
|
|
3030
|
+
type: 'string'
|
|
3031
|
+
},
|
|
3032
|
+
type: 'array',
|
|
3033
|
+
default: []
|
|
3034
|
+
}
|
|
3035
|
+
},
|
|
3036
|
+
required: ['eventType', 'label']
|
|
3037
|
+
}]
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
2505
3041
|
},
|
|
2506
3042
|
footerFields: {
|
|
2507
3043
|
description: 'Specify field(s) that should be displayed in the footer component. Specify one or more fields to display in the footer component. For example, specify ["source", "dest"] to display the source and destination fields.',
|
|
@@ -2587,6 +3123,9 @@ var config = {
|
|
|
2587
3123
|
},
|
|
2588
3124
|
'value.click': {
|
|
2589
3125
|
description: 'Triggered when a user clicks a value in an event.'
|
|
3126
|
+
},
|
|
3127
|
+
'time.click': {
|
|
3128
|
+
description: 'Triggered when a user clicks to drilldown in the time controls popover.'
|
|
2590
3129
|
}
|
|
2591
3130
|
},
|
|
2592
3131
|
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
@@ -2596,57 +3135,59 @@ var config = {
|
|
|
2596
3135
|
exports.default = configUtils_1.enhanceConfig(config);
|
|
2597
3136
|
|
|
2598
3137
|
/***/ }),
|
|
2599
|
-
/*
|
|
3138
|
+
/* 198 */
|
|
2600
3139
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2601
3140
|
|
|
2602
3141
|
"use strict";
|
|
2603
3142
|
|
|
2604
3143
|
|
|
2605
|
-
var _typeof = __webpack_require__(
|
|
3144
|
+
var _typeof = __webpack_require__(88);
|
|
2606
3145
|
|
|
2607
|
-
var _slicedToArray = __webpack_require__(
|
|
3146
|
+
var _slicedToArray = __webpack_require__(17);
|
|
2608
3147
|
|
|
2609
3148
|
Object.defineProperty(exports, "__esModule", {
|
|
2610
3149
|
value: true
|
|
2611
3150
|
});
|
|
2612
3151
|
|
|
2613
|
-
var React = __webpack_require__(
|
|
3152
|
+
var React = __webpack_require__(0);
|
|
2614
3153
|
|
|
2615
|
-
var react_1 = __webpack_require__(
|
|
3154
|
+
var react_1 = __webpack_require__(0);
|
|
2616
3155
|
|
|
2617
|
-
var T = __webpack_require__(
|
|
3156
|
+
var T = __webpack_require__(1);
|
|
2618
3157
|
|
|
2619
|
-
var EventsViewer_1 = __webpack_require__(
|
|
3158
|
+
var EventsViewer_1 = __webpack_require__(199);
|
|
2620
3159
|
|
|
2621
3160
|
var styled_components_1 = __webpack_require__(4);
|
|
2622
3161
|
|
|
2623
|
-
var pick_1 = __webpack_require__(
|
|
3162
|
+
var pick_1 = __webpack_require__(23);
|
|
2624
3163
|
|
|
2625
|
-
var variables_1 = __webpack_require__(
|
|
3164
|
+
var variables_1 = __webpack_require__(10);
|
|
2626
3165
|
|
|
2627
3166
|
var colorUtils_1 = __webpack_require__(12);
|
|
2628
3167
|
|
|
2629
|
-
var style_1 = __webpack_require__(
|
|
3168
|
+
var style_1 = __webpack_require__(14);
|
|
2630
3169
|
|
|
2631
|
-
var EventsContext_1 = __webpack_require__(
|
|
3170
|
+
var EventsContext_1 = __webpack_require__(148);
|
|
2632
3171
|
|
|
2633
3172
|
var lodash_1 = __webpack_require__(3);
|
|
2634
3173
|
|
|
2635
|
-
var Menu_1 = __webpack_require__(
|
|
3174
|
+
var Menu_1 = __webpack_require__(118);
|
|
2636
3175
|
|
|
2637
|
-
var constants_1 = __webpack_require__(
|
|
3176
|
+
var constants_1 = __webpack_require__(147);
|
|
2638
3177
|
|
|
2639
3178
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
2640
3179
|
|
|
2641
|
-
var EventUtils_1 = __webpack_require__(
|
|
3180
|
+
var EventUtils_1 = __webpack_require__(119);
|
|
3181
|
+
|
|
3182
|
+
var FieldSummaryTooltip_1 = __webpack_require__(201);
|
|
2642
3183
|
|
|
2643
|
-
var
|
|
3184
|
+
var TimeControlsPopover_1 = __webpack_require__(203); // Inspired by VizTableContainer in PureTable.tsx
|
|
2644
3185
|
|
|
2645
3186
|
|
|
2646
3187
|
var EventsContainer = styled_components_1.default.div.withConfig({
|
|
2647
3188
|
displayName: "PureEvents__EventsContainer",
|
|
2648
3189
|
componentId: "iniqvm-0"
|
|
2649
|
-
})(["width:", ";height:", ";box-sizing:border-box;padding:", ";display:flex;flex-flow:column nowrap;overflow:hidden;background-color:", ";table[data-test='main-table']{background-color:", ";}"], function (props) {
|
|
3190
|
+
})(["width:", ";height:", ";box-sizing:border-box;padding:", ";display:flex;flex-flow:column nowrap;overflow:hidden;background-color:", ";table[data-test='main-table']{background-color:", ";}table[data-test='main-table']{td:nth-child(3){word-break:break-word;}}"], function (props) {
|
|
2650
3191
|
return lodash_1.isNumber(props.width) ? "".concat(props.width, "px") : props.width;
|
|
2651
3192
|
}, function (props) {
|
|
2652
3193
|
return lodash_1.isNumber(props.height) ? "".concat(props.height, "px") : props.height;
|
|
@@ -2688,9 +3229,12 @@ var PureEvents = function PureEvents(props) {
|
|
|
2688
3229
|
var width = props.width,
|
|
2689
3230
|
height = props.height,
|
|
2690
3231
|
backgroundColor = props.backgroundColor,
|
|
2691
|
-
dataSources = props.dataSources,
|
|
2692
|
-
|
|
2693
|
-
|
|
3232
|
+
_props$dataSources = props.dataSources,
|
|
3233
|
+
dataSources = _props$dataSources === void 0 ? {} : _props$dataSources,
|
|
3234
|
+
_props$eventActions = props.eventActions,
|
|
3235
|
+
eventActionsProps = _props$eventActions === void 0 ? [] : _props$eventActions,
|
|
3236
|
+
_props$fieldActions = props.fieldActions,
|
|
3237
|
+
fieldActionsProps = _props$fieldActions === void 0 ? {} : _props$fieldActions,
|
|
2694
3238
|
showFieldSummary = props.showFieldSummary,
|
|
2695
3239
|
footerFields = props.footerFields,
|
|
2696
3240
|
highlightValuesByField = props.highlightValuesByField,
|
|
@@ -2731,69 +3275,138 @@ var PureEvents = function PureEvents(props) {
|
|
|
2731
3275
|
var _React$useState3 = React.useState(null),
|
|
2732
3276
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
2733
3277
|
fieldSummaryAnchor = _React$useState4[0],
|
|
2734
|
-
setFieldSummaryAnchor = _React$useState4[1];
|
|
3278
|
+
setFieldSummaryAnchor = _React$useState4[1];
|
|
3279
|
+
|
|
3280
|
+
var _React$useState5 = React.useState(null),
|
|
3281
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
3282
|
+
timeValue = _React$useState6[0],
|
|
3283
|
+
setTimeValue = _React$useState6[1];
|
|
3284
|
+
|
|
3285
|
+
var _React$useState7 = React.useState(null),
|
|
3286
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
3287
|
+
timeFieldAnchor = _React$useState8[0],
|
|
3288
|
+
setTimeFieldAnchor = _React$useState8[1]; // An array of objects with eventtypeValues for filtering by eventtype, fieldFilters for filtering by fields,
|
|
3289
|
+
// and eventActionComponent (needs to be Menu.Item and will be rendered inside a Menu component)
|
|
3290
|
+
// to display in the Event Actions dropdown
|
|
2735
3291
|
|
|
2736
3292
|
|
|
2737
3293
|
var renderEventActions = React.useMemo(function () {
|
|
2738
|
-
return !Array.isArray(eventActions)
|
|
3294
|
+
return !Array.isArray(eventActions) ? [] : eventActions.map(function (_ref2) {
|
|
2739
3295
|
var eventType = _ref2.eventType,
|
|
2740
|
-
label = _ref2.label
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
3296
|
+
label = _ref2.label,
|
|
3297
|
+
_ref2$eventtypeValues = _ref2.eventtypeValues,
|
|
3298
|
+
eventtypeValues = _ref2$eventtypeValues === void 0 ? [] : _ref2$eventtypeValues,
|
|
3299
|
+
_ref2$fieldFilters = _ref2.fieldFilters,
|
|
3300
|
+
fieldFilters = _ref2$fieldFilters === void 0 ? [] : _ref2$fieldFilters;
|
|
3301
|
+
|
|
3302
|
+
var onMenuItemClick = function onMenuItemClick(e, eventActionProps, tokenReplacementMap) {
|
|
3303
|
+
var payload = EventUtils_1.convertToPayloadFormat(eventActionProps.event, {
|
|
3304
|
+
tokenReplacementMap: tokenReplacementMap
|
|
3305
|
+
});
|
|
2744
3306
|
onEventTrigger({
|
|
2745
3307
|
originalEvent: e,
|
|
2746
3308
|
type: eventType,
|
|
2747
3309
|
payload: payload
|
|
2748
3310
|
});
|
|
2749
|
-
};
|
|
2750
|
-
|
|
3311
|
+
};
|
|
2751
3312
|
|
|
2752
|
-
|
|
3313
|
+
var eventActionComponent = function eventActionComponent(eventActionProps) {
|
|
3314
|
+
var rowIndex = eventActionProps.rowIndex,
|
|
3315
|
+
pageNumber = eventActionProps.pageNumber,
|
|
3316
|
+
event = eventActionProps.event;
|
|
3317
|
+
var tokenReplacementMap = EventUtils_1.generateTokenReplacementMap({
|
|
3318
|
+
dataSources: dataSources,
|
|
3319
|
+
rowIndex: rowIndex,
|
|
3320
|
+
pageNumber: pageNumber,
|
|
3321
|
+
event: event
|
|
3322
|
+
});
|
|
3323
|
+
var replacedLabel = EventUtils_1.replaceTokens({
|
|
3324
|
+
text: label,
|
|
3325
|
+
tokenReplacementMap: tokenReplacementMap,
|
|
3326
|
+
allowSpecialParametersEscape: false,
|
|
3327
|
+
allowFieldValuesEscape: false
|
|
3328
|
+
});
|
|
3329
|
+
var truncatedLabel = EventUtils_1.truncateString(replacedLabel);
|
|
2753
3330
|
return React.createElement(Menu_1.default.Item, {
|
|
2754
|
-
key: "event-action-".concat(
|
|
2755
|
-
onClick: function onClick() {
|
|
2756
|
-
return onMenuItemClick(
|
|
3331
|
+
key: "event-action-".concat(truncatedLabel),
|
|
3332
|
+
onClick: function onClick(e) {
|
|
3333
|
+
return onMenuItemClick(e, eventActionProps, tokenReplacementMap);
|
|
2757
3334
|
}
|
|
2758
|
-
},
|
|
3335
|
+
}, truncatedLabel);
|
|
3336
|
+
};
|
|
3337
|
+
|
|
3338
|
+
return {
|
|
3339
|
+
eventtypeValues: eventtypeValues,
|
|
3340
|
+
fieldFilters: fieldFilters,
|
|
3341
|
+
eventActionComponent: eventActionComponent
|
|
2759
3342
|
};
|
|
2760
3343
|
});
|
|
2761
|
-
}, [eventActions]); //
|
|
2762
|
-
//
|
|
3344
|
+
}, [eventActions]); // A map of fields, each associated with an array of objects with eventtypeValues for filtering by eventtype,
|
|
3345
|
+
// and fieldActionComponent (needs to be Menu.Item and will be rendered inside a Menu component)
|
|
3346
|
+
// to display in its respective dropdown in the Actions column
|
|
2763
3347
|
|
|
2764
3348
|
var renderFieldActions = React.useMemo(function () {
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
var
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
3349
|
+
if (_typeof(fieldActions) !== 'object') return {};
|
|
3350
|
+
var fieldActionsMap = {};
|
|
3351
|
+
Object.entries(fieldActions).forEach(function (_ref3) {
|
|
3352
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
3353
|
+
currentFieldName = _ref4[0],
|
|
3354
|
+
currentFieldActions = _ref4[1];
|
|
3355
|
+
|
|
3356
|
+
fieldActionsMap[currentFieldName] = currentFieldActions.map(function (_ref5) {
|
|
3357
|
+
var eventType = _ref5.eventType,
|
|
3358
|
+
label = _ref5.label,
|
|
3359
|
+
_ref5$eventtypeValues = _ref5.eventtypeValues,
|
|
3360
|
+
eventtypeValues = _ref5$eventtypeValues === void 0 ? [] : _ref5$eventtypeValues;
|
|
3361
|
+
|
|
3362
|
+
var onMenuItemClick = function onMenuItemClick(e, fieldActionProps, tokenReplacementMap) {
|
|
3363
|
+
var payload = EventUtils_1.convertToPayloadFormat(fieldActionProps.event, {
|
|
3364
|
+
name: fieldActionProps.field,
|
|
3365
|
+
value: fieldActionProps.value,
|
|
3366
|
+
tokenReplacementMap: tokenReplacementMap
|
|
2777
3367
|
});
|
|
2778
3368
|
onEventTrigger({
|
|
2779
3369
|
originalEvent: e,
|
|
2780
3370
|
type: eventType,
|
|
2781
3371
|
payload: payload
|
|
2782
3372
|
});
|
|
2783
|
-
};
|
|
2784
|
-
|
|
3373
|
+
};
|
|
2785
3374
|
|
|
2786
|
-
|
|
3375
|
+
var fieldActionComponent = function fieldActionComponent(fieldActionProps) {
|
|
3376
|
+
var field = fieldActionProps.field,
|
|
3377
|
+
value = fieldActionProps.value,
|
|
3378
|
+
rowIndex = fieldActionProps.rowIndex,
|
|
3379
|
+
pageNumber = fieldActionProps.pageNumber,
|
|
3380
|
+
event = fieldActionProps.event;
|
|
3381
|
+
var tokenReplacementMap = EventUtils_1.generateTokenReplacementMap({
|
|
3382
|
+
dataSources: dataSources,
|
|
3383
|
+
rowIndex: rowIndex,
|
|
3384
|
+
pageNumber: pageNumber,
|
|
3385
|
+
field: field,
|
|
3386
|
+
value: value,
|
|
3387
|
+
event: event
|
|
3388
|
+
});
|
|
3389
|
+
var replacedLabel = EventUtils_1.replaceTokens({
|
|
3390
|
+
text: label,
|
|
3391
|
+
tokenReplacementMap: tokenReplacementMap,
|
|
3392
|
+
allowSpecialParametersEscape: false,
|
|
3393
|
+
allowFieldValuesEscape: false
|
|
3394
|
+
});
|
|
3395
|
+
var truncatedLabel = EventUtils_1.truncateString(replacedLabel);
|
|
2787
3396
|
return React.createElement(Menu_1.default.Item, {
|
|
2788
|
-
key: "".concat(
|
|
2789
|
-
onClick: function onClick() {
|
|
2790
|
-
return onMenuItemClick(
|
|
3397
|
+
key: "".concat(currentFieldName, "-field-action-").concat(truncatedLabel),
|
|
3398
|
+
onClick: function onClick(e) {
|
|
3399
|
+
return onMenuItemClick(e, fieldActionProps, tokenReplacementMap);
|
|
2791
3400
|
}
|
|
2792
|
-
},
|
|
3401
|
+
}, truncatedLabel);
|
|
3402
|
+
};
|
|
3403
|
+
|
|
3404
|
+
return {
|
|
3405
|
+
eventtypeValues: eventtypeValues,
|
|
3406
|
+
fieldActionComponent: fieldActionComponent
|
|
2793
3407
|
};
|
|
2794
3408
|
});
|
|
2795
|
-
|
|
2796
|
-
}, {});
|
|
3409
|
+
});
|
|
2797
3410
|
return fieldActionsMap;
|
|
2798
3411
|
}, [fieldActions]); // formulate the options object required by the SUI EventsViewer component
|
|
2799
3412
|
|
|
@@ -2804,15 +3417,21 @@ var PureEvents = function PureEvents(props) {
|
|
|
2804
3417
|
fieldValueHighlightMap: highlightValuesByField
|
|
2805
3418
|
};
|
|
2806
3419
|
|
|
2807
|
-
var handleFieldClicked = showFieldSummary && function (e,
|
|
2808
|
-
var field =
|
|
3420
|
+
var handleFieldClicked = showFieldSummary && function (e, _ref6) {
|
|
3421
|
+
var field = _ref6.field;
|
|
2809
3422
|
setFieldSummaryField(field);
|
|
2810
3423
|
setFieldSummaryAnchor(e.currentTarget.parentElement);
|
|
2811
3424
|
};
|
|
2812
3425
|
|
|
2813
|
-
var
|
|
2814
|
-
var
|
|
2815
|
-
|
|
3426
|
+
var handleTimeClicked = function handleTimeClicked(e, _ref7) {
|
|
3427
|
+
var time = _ref7.time;
|
|
3428
|
+
setTimeValue(time);
|
|
3429
|
+
setTimeFieldAnchor(e.currentTarget);
|
|
3430
|
+
};
|
|
3431
|
+
|
|
3432
|
+
var handleValueClicked = function handleValueClicked(e, _ref8) {
|
|
3433
|
+
var field = _ref8.field,
|
|
3434
|
+
value = _ref8.value;
|
|
2816
3435
|
onEventTrigger({
|
|
2817
3436
|
originalEvent: e,
|
|
2818
3437
|
type: 'value.click',
|
|
@@ -2823,6 +3442,19 @@ var PureEvents = function PureEvents(props) {
|
|
|
2823
3442
|
});
|
|
2824
3443
|
};
|
|
2825
3444
|
|
|
3445
|
+
var handleTimeDrilldown = function handleTimeDrilldown(e, timeInterval) {
|
|
3446
|
+
onEventTrigger({
|
|
3447
|
+
originalEvent: e,
|
|
3448
|
+
type: 'time.click',
|
|
3449
|
+
payload: {
|
|
3450
|
+
name: '_time',
|
|
3451
|
+
value: timeValue,
|
|
3452
|
+
epochTime: EventUtils_1.getEpochTime(timeValue),
|
|
3453
|
+
window: timeInterval
|
|
3454
|
+
}
|
|
3455
|
+
});
|
|
3456
|
+
};
|
|
3457
|
+
|
|
2826
3458
|
var handleActionClicked = function handleActionClicked(event, data) {
|
|
2827
3459
|
var actionType = data.action,
|
|
2828
3460
|
field = data.field;
|
|
@@ -2848,7 +3480,8 @@ var PureEvents = function PureEvents(props) {
|
|
|
2848
3480
|
dataSources: dataSources,
|
|
2849
3481
|
onRequestParamsChange: onRequestParamsChange,
|
|
2850
3482
|
onFieldClicked: handleFieldClicked,
|
|
2851
|
-
onFieldValueClicked: handleValueClicked
|
|
3483
|
+
onFieldValueClicked: handleValueClicked,
|
|
3484
|
+
onTimeClicked: handleTimeClicked
|
|
2852
3485
|
}), React.createElement(FieldSummaryTooltip_1.default, {
|
|
2853
3486
|
open: !!fieldSummaryAnchor && !!fieldSummaryField,
|
|
2854
3487
|
anchor: fieldSummaryAnchor,
|
|
@@ -2860,6 +3493,15 @@ var PureEvents = function PureEvents(props) {
|
|
|
2860
3493
|
fieldSummaryMap: fieldSummaryMap,
|
|
2861
3494
|
onActionClicked: handleActionClicked,
|
|
2862
3495
|
onFieldValueClicked: handleValueClicked
|
|
3496
|
+
}), React.createElement(TimeControlsPopover_1.default, {
|
|
3497
|
+
open: !!timeFieldAnchor,
|
|
3498
|
+
anchor: timeFieldAnchor,
|
|
3499
|
+
time: timeValue,
|
|
3500
|
+
onTimeDrilldown: handleTimeDrilldown,
|
|
3501
|
+
handleTooltipClose: function handleTooltipClose() {
|
|
3502
|
+
setTimeValue(null);
|
|
3503
|
+
setTimeFieldAnchor(null);
|
|
3504
|
+
}
|
|
2863
3505
|
})));
|
|
2864
3506
|
};
|
|
2865
3507
|
|
|
@@ -2874,13 +3516,16 @@ PureEvents.propTypes = {
|
|
|
2874
3516
|
// key to identify this event
|
|
2875
3517
|
eventType: T.string,
|
|
2876
3518
|
// label for the menu item
|
|
2877
|
-
label: T.string
|
|
3519
|
+
label: T.string,
|
|
3520
|
+
eventtypeValues: T.arrayOf(T.string),
|
|
3521
|
+
fieldFilters: T.arrayOf(T.string)
|
|
2878
3522
|
})),
|
|
2879
3523
|
fieldActions: T.objectOf(T.arrayOf(T.shape({
|
|
2880
3524
|
// key to identify this event
|
|
2881
3525
|
eventType: T.string,
|
|
2882
3526
|
// label for the menu item
|
|
2883
|
-
label: T.string
|
|
3527
|
+
label: T.string,
|
|
3528
|
+
eventtypeValues: T.arrayOf(T.string)
|
|
2884
3529
|
}))),
|
|
2885
3530
|
showFieldSummary: T.bool,
|
|
2886
3531
|
footerFields: T.array,
|
|
@@ -2907,98 +3552,19 @@ PureEvents.defaultProps = {
|
|
|
2907
3552
|
exports.default = FixedSizeContainer_1.default(PureEvents);
|
|
2908
3553
|
|
|
2909
3554
|
/***/ }),
|
|
2910
|
-
/*
|
|
3555
|
+
/* 199 */
|
|
2911
3556
|
/***/ (function(module, exports) {
|
|
2912
3557
|
|
|
2913
3558
|
module.exports = require("@splunk/react-events-viewer/components/EventsViewer");
|
|
2914
3559
|
|
|
2915
3560
|
/***/ }),
|
|
2916
|
-
/*
|
|
2917
|
-
/***/ (function(module, exports
|
|
2918
|
-
|
|
2919
|
-
"use strict";
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
var _defineProperty = __webpack_require__(7);
|
|
2923
|
-
|
|
2924
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2925
|
-
value: true
|
|
2926
|
-
});
|
|
2927
|
-
exports.mergeFieldActions = exports.mergeEventActions = exports.getFieldSummaryMapping = exports.convertToPayloadFormat = void 0;
|
|
2928
|
-
|
|
2929
|
-
var lodash_1 = __webpack_require__(3);
|
|
2930
|
-
|
|
2931
|
-
var dataUtils_1 = __webpack_require__(110); // util to convert a field-value map into an object with row.<fieldname>.value keys for payloads
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
var convertToPayloadFormat = function convertToPayloadFormat(obj) {
|
|
2935
|
-
var initialValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2936
|
-
if (!obj) return {};
|
|
2937
|
-
return Object.keys(obj).reduce(function (acc, curr) {
|
|
2938
|
-
var key = "row.".concat(curr, ".value");
|
|
2939
|
-
return Object.assign(Object.assign({}, acc), _defineProperty({}, key, obj[curr]));
|
|
2940
|
-
}, initialValue);
|
|
2941
|
-
};
|
|
2942
|
-
|
|
2943
|
-
exports.convertToPayloadFormat = convertToPayloadFormat;
|
|
2944
|
-
|
|
2945
|
-
var getFieldSummaryMapping = function getFieldSummaryMapping(columns, fields) {
|
|
2946
|
-
// convert the `fieldsummary` payload to an array of objects
|
|
2947
|
-
var arr = dataUtils_1.convertToArrOfObjects(columns, fields); // forms an array of FieldData elements expected by the @splunk/react-field-summary component
|
|
2948
|
-
|
|
2949
|
-
var fieldSummaryData = arr.map(function (d) {
|
|
2950
|
-
return {
|
|
2951
|
-
name: d.field,
|
|
2952
|
-
count: +d.count,
|
|
2953
|
-
distinctCount: +d.distinct_count,
|
|
2954
|
-
numericCount: +d.numeric_count,
|
|
2955
|
-
max: d.max === null ? null : +d.max,
|
|
2956
|
-
mean: d.mean === null ? null : +d.mean,
|
|
2957
|
-
min: d.min === null ? null : +d.min,
|
|
2958
|
-
stdev: d.stdev === null ? null : +d.stdev,
|
|
2959
|
-
modes: JSON.parse(d.values)
|
|
2960
|
-
};
|
|
2961
|
-
}); // creates a map of field name to its data for O(1) retrieval in the tooltip component
|
|
2962
|
-
|
|
2963
|
-
var fieldSummaryMapping = fieldSummaryData.reduce(function (map, fieldData) {
|
|
2964
|
-
return Object.assign(Object.assign({}, map), _defineProperty({}, fieldData.name, fieldData));
|
|
2965
|
-
}, {});
|
|
2966
|
-
return fieldSummaryMapping;
|
|
2967
|
-
};
|
|
2968
|
-
|
|
2969
|
-
exports.getFieldSummaryMapping = getFieldSummaryMapping;
|
|
2970
|
-
/**
|
|
2971
|
-
* Helper to merge event actions into one array of event actions.
|
|
2972
|
-
* @method mergeEventActions
|
|
2973
|
-
* @param {Action[]} fieldActions1
|
|
2974
|
-
* @param {Action[]} fieldActions2
|
|
2975
|
-
* @returns {Action[]} merged event actions
|
|
2976
|
-
*/
|
|
2977
|
-
|
|
2978
|
-
var mergeEventActions = function mergeEventActions(eventActions1, eventActions2) {
|
|
2979
|
-
return eventActions1.concat(eventActions2);
|
|
2980
|
-
};
|
|
2981
|
-
|
|
2982
|
-
exports.mergeEventActions = mergeEventActions;
|
|
2983
|
-
/**
|
|
2984
|
-
* Helper to merge field actions. If same key exists in both field actions,
|
|
2985
|
-
* combine each array of actions under one key.
|
|
2986
|
-
* @method mergeFieldActions
|
|
2987
|
-
* @param {Record<string, Action[]>} fieldActions1
|
|
2988
|
-
* @param {Record<string, Action[]>} fieldActions2
|
|
2989
|
-
* @returns {Record<string, Action[]>} merged field actions
|
|
2990
|
-
*/
|
|
3561
|
+
/* 200 */
|
|
3562
|
+
/***/ (function(module, exports) {
|
|
2991
3563
|
|
|
2992
|
-
|
|
2993
|
-
return lodash_1.mergeWith(fieldActions1, fieldActions2, function (fieldAction1value, fieldAction2value) {
|
|
2994
|
-
return Array.isArray(fieldAction1value) && Array.isArray(fieldAction2value) ? lodash_1.union(fieldAction1value, fieldAction2value) : undefined;
|
|
2995
|
-
});
|
|
2996
|
-
};
|
|
2997
|
-
|
|
2998
|
-
exports.mergeFieldActions = mergeFieldActions;
|
|
3564
|
+
module.exports = require("@splunk/time-range-utils/time");
|
|
2999
3565
|
|
|
3000
3566
|
/***/ }),
|
|
3001
|
-
/*
|
|
3567
|
+
/* 201 */
|
|
3002
3568
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3003
3569
|
|
|
3004
3570
|
"use strict";
|
|
@@ -3008,15 +3574,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3008
3574
|
value: true
|
|
3009
3575
|
});
|
|
3010
3576
|
|
|
3011
|
-
var React = __webpack_require__(
|
|
3577
|
+
var React = __webpack_require__(0);
|
|
3012
3578
|
|
|
3013
|
-
var react_1 = __webpack_require__(
|
|
3579
|
+
var react_1 = __webpack_require__(0);
|
|
3014
3580
|
|
|
3015
|
-
var Popover_1 = __webpack_require__(
|
|
3581
|
+
var Popover_1 = __webpack_require__(89);
|
|
3016
3582
|
|
|
3017
|
-
var Markdown_1 = __webpack_require__(
|
|
3583
|
+
var Markdown_1 = __webpack_require__(121);
|
|
3018
3584
|
|
|
3019
|
-
var FieldSummary_1 = __webpack_require__(
|
|
3585
|
+
var FieldSummary_1 = __webpack_require__(202);
|
|
3020
3586
|
|
|
3021
3587
|
var lodash_1 = __webpack_require__(3);
|
|
3022
3588
|
|
|
@@ -3024,7 +3590,7 @@ var i18n_1 = __webpack_require__(2);
|
|
|
3024
3590
|
|
|
3025
3591
|
var styled_components_1 = __webpack_require__(4);
|
|
3026
3592
|
|
|
3027
|
-
var EventsContext_1 = __webpack_require__(
|
|
3593
|
+
var EventsContext_1 = __webpack_require__(148);
|
|
3028
3594
|
|
|
3029
3595
|
var popoverContainerStyle = {
|
|
3030
3596
|
padding: '20px',
|
|
@@ -3126,11 +3692,305 @@ FieldSummaryTooltip.defaultProps = {
|
|
|
3126
3692
|
exports.default = FieldSummaryTooltip;
|
|
3127
3693
|
|
|
3128
3694
|
/***/ }),
|
|
3129
|
-
/*
|
|
3695
|
+
/* 202 */
|
|
3130
3696
|
/***/ (function(module, exports) {
|
|
3131
3697
|
|
|
3132
3698
|
module.exports = require("@splunk/react-field-summary/components/FieldSummary");
|
|
3133
3699
|
|
|
3700
|
+
/***/ }),
|
|
3701
|
+
/* 203 */
|
|
3702
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3703
|
+
|
|
3704
|
+
"use strict";
|
|
3705
|
+
|
|
3706
|
+
|
|
3707
|
+
var _slicedToArray = __webpack_require__(17);
|
|
3708
|
+
|
|
3709
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3710
|
+
value: true
|
|
3711
|
+
});
|
|
3712
|
+
|
|
3713
|
+
var React = __webpack_require__(0);
|
|
3714
|
+
|
|
3715
|
+
var Popover_1 = __webpack_require__(89);
|
|
3716
|
+
|
|
3717
|
+
var ControlGroup_1 = __webpack_require__(204);
|
|
3718
|
+
|
|
3719
|
+
var Button_1 = __webpack_require__(122);
|
|
3720
|
+
|
|
3721
|
+
var Text_1 = __webpack_require__(205);
|
|
3722
|
+
|
|
3723
|
+
var Message_1 = __webpack_require__(123);
|
|
3724
|
+
|
|
3725
|
+
var Select_1 = __webpack_require__(206);
|
|
3726
|
+
|
|
3727
|
+
var Link_1 = __webpack_require__(207);
|
|
3728
|
+
|
|
3729
|
+
var Heading_1 = __webpack_require__(124);
|
|
3730
|
+
|
|
3731
|
+
var lodash_1 = __webpack_require__(3);
|
|
3732
|
+
|
|
3733
|
+
var i18n_1 = __webpack_require__(2);
|
|
3734
|
+
|
|
3735
|
+
var styled_components_1 = __webpack_require__(4);
|
|
3736
|
+
|
|
3737
|
+
var numberUtils_1 = __webpack_require__(30);
|
|
3738
|
+
|
|
3739
|
+
var pick_1 = __webpack_require__(23);
|
|
3740
|
+
|
|
3741
|
+
var EventUtils_1 = __webpack_require__(119); // custom popover sizing for Enterprise vs. Prisma themes - additional px for Prisma theme to fit controls
|
|
3742
|
+
|
|
3743
|
+
|
|
3744
|
+
var TimePopoverContainer = styled_components_1.default.div.withConfig({
|
|
3745
|
+
displayName: "TimeControlsPopover__TimePopoverContainer",
|
|
3746
|
+
componentId: "fj32ze-0"
|
|
3747
|
+
})(["padding:20px;width:", ";.time-drilldown-header{margin:0px;}[data-test='nearby-controls']{margin:0px;width:", ";}"], function (props) {
|
|
3748
|
+
return pick_1.default({
|
|
3749
|
+
enterprise: '372px',
|
|
3750
|
+
prisma: '422px'
|
|
3751
|
+
})(props);
|
|
3752
|
+
}, function (props) {
|
|
3753
|
+
return pick_1.default({
|
|
3754
|
+
enterprise: '289.75px',
|
|
3755
|
+
prisma: '329.75px'
|
|
3756
|
+
})(props);
|
|
3757
|
+
});
|
|
3758
|
+
var TimeTable = styled_components_1.default.table.withConfig({
|
|
3759
|
+
displayName: "TimeControlsPopover__TimeTable",
|
|
3760
|
+
componentId: "fj32ze-1"
|
|
3761
|
+
})(["width:100%;display:table;border-collapse:separate;box-sizing:border-box;text-indent:initial;border-spacing:2px;border-color:grey;"]);
|
|
3762
|
+
var NearbyValueRow = styled_components_1.default.div.withConfig({
|
|
3763
|
+
displayName: "TimeControlsPopover__NearbyValueRow",
|
|
3764
|
+
componentId: "fj32ze-2"
|
|
3765
|
+
})(["display:flex;align-items:flex-start;justify-content:center;"]);
|
|
3766
|
+
var SectionHeading = styled_components_1.default(Heading_1.default).withConfig({
|
|
3767
|
+
displayName: "TimeControlsPopover__SectionHeading",
|
|
3768
|
+
componentId: "fj32ze-3"
|
|
3769
|
+
})(["margin-top:20px;"]);
|
|
3770
|
+
var rangeTypeInputStyle = {
|
|
3771
|
+
minWidth: 80
|
|
3772
|
+
};
|
|
3773
|
+
var rangeAmountInputStyle = {
|
|
3774
|
+
width: 54.88,
|
|
3775
|
+
minWidth: 48
|
|
3776
|
+
};
|
|
3777
|
+
var rangeUnitInputStyle = {
|
|
3778
|
+
width: 154.88,
|
|
3779
|
+
textAlign: 'center'
|
|
3780
|
+
};
|
|
3781
|
+
var applyButtonStyle = {
|
|
3782
|
+
marginLeft: 10
|
|
3783
|
+
};
|
|
3784
|
+
|
|
3785
|
+
var TimeControlsPopover = function TimeControlsPopover(props) {
|
|
3786
|
+
var open = props.open,
|
|
3787
|
+
anchor = props.anchor,
|
|
3788
|
+
time = props.time,
|
|
3789
|
+
handleTooltipClose = props.handleTooltipClose,
|
|
3790
|
+
onTimeDrilldown = props.onTimeDrilldown; // nearby events controls default to +/- 5 second(s)
|
|
3791
|
+
|
|
3792
|
+
var _React$useState = React.useState('plusminus'),
|
|
3793
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
3794
|
+
rangeType = _React$useState2[0],
|
|
3795
|
+
setRangeType = _React$useState2[1];
|
|
3796
|
+
|
|
3797
|
+
var _React$useState3 = React.useState('5'),
|
|
3798
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
3799
|
+
rangeAmount = _React$useState4[0],
|
|
3800
|
+
setRangeAmount = _React$useState4[1];
|
|
3801
|
+
|
|
3802
|
+
var _React$useState5 = React.useState('s'),
|
|
3803
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
3804
|
+
rangeUnit = _React$useState6[0],
|
|
3805
|
+
setRangeUnit = _React$useState6[1]; // if validation fails, this triggers the error state on the controls to show
|
|
3806
|
+
|
|
3807
|
+
|
|
3808
|
+
var _React$useState7 = React.useState(false),
|
|
3809
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
3810
|
+
isInvalidInput = _React$useState8[0],
|
|
3811
|
+
setInvalidInput = _React$useState8[1];
|
|
3812
|
+
|
|
3813
|
+
var errorMessage = i18n_1._('Value must be an integer greater than 0');
|
|
3814
|
+
|
|
3815
|
+
var handleRangeTypeChange = function handleRangeTypeChange(e, _ref) {
|
|
3816
|
+
var value = _ref.value;
|
|
3817
|
+
setRangeType(value);
|
|
3818
|
+
};
|
|
3819
|
+
|
|
3820
|
+
var handleRangeAmountChange = function handleRangeAmountChange(e, _ref2) {
|
|
3821
|
+
var value = _ref2.value;
|
|
3822
|
+
setRangeAmount(value);
|
|
3823
|
+
};
|
|
3824
|
+
|
|
3825
|
+
var handleRangeUnitChange = function handleRangeUnitChange(e, _ref3) {
|
|
3826
|
+
var value = _ref3.value;
|
|
3827
|
+
setRangeUnit(value);
|
|
3828
|
+
};
|
|
3829
|
+
|
|
3830
|
+
var handleSubmit = function handleSubmit(e) {
|
|
3831
|
+
// if the entered range amount is not a number, is not greater than 0, or is not an integer, then it is invalid
|
|
3832
|
+
var parsedIntervalAmount = numberUtils_1.parseNumber(rangeAmount);
|
|
3833
|
+
|
|
3834
|
+
if (Number.isNaN(parsedIntervalAmount) || parsedIntervalAmount <= 0 || !Number.isInteger(parsedIntervalAmount)) {
|
|
3835
|
+
setInvalidInput(true);
|
|
3836
|
+
return;
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3839
|
+
setInvalidInput(false);
|
|
3840
|
+
var timeInterval = EventUtils_1.getCustomTimeInterval({
|
|
3841
|
+
time: time,
|
|
3842
|
+
rangeType: rangeType,
|
|
3843
|
+
rangeAmount: rangeAmount,
|
|
3844
|
+
rangeUnit: rangeUnit
|
|
3845
|
+
});
|
|
3846
|
+
onTimeDrilldown(e, timeInterval);
|
|
3847
|
+
};
|
|
3848
|
+
|
|
3849
|
+
var handleEventIntervalClick = function handleEventIntervalClick(e, when) {
|
|
3850
|
+
e.preventDefault();
|
|
3851
|
+
var timeInterval = EventUtils_1.getPredefinedTimeInterval({
|
|
3852
|
+
time: time,
|
|
3853
|
+
when: when
|
|
3854
|
+
});
|
|
3855
|
+
onTimeDrilldown(e, timeInterval);
|
|
3856
|
+
};
|
|
3857
|
+
|
|
3858
|
+
return React.createElement(Popover_1.default, {
|
|
3859
|
+
open: open,
|
|
3860
|
+
defaultPlacement: "below",
|
|
3861
|
+
anchor: anchor,
|
|
3862
|
+
takeFocus: true,
|
|
3863
|
+
onRequestClose: handleTooltipClose
|
|
3864
|
+
}, React.createElement(TimePopoverContainer, {
|
|
3865
|
+
"data-test": "time-controls"
|
|
3866
|
+
}, React.createElement(Heading_1.default, {
|
|
3867
|
+
level: 2,
|
|
3868
|
+
className: "time-drilldown-header"
|
|
3869
|
+
}, "_time"), isInvalidInput && React.createElement(Message_1.default, {
|
|
3870
|
+
type: "error",
|
|
3871
|
+
"data-test": "invalid-time-input-message"
|
|
3872
|
+
}, errorMessage), React.createElement(SectionHeading, {
|
|
3873
|
+
level: 4
|
|
3874
|
+
}, i18n_1._('Events Before or After')), React.createElement(TimeTable, null, React.createElement("tbody", null, React.createElement("tr", {
|
|
3875
|
+
className: "before-after-values"
|
|
3876
|
+
}, React.createElement("td", null, React.createElement(Link_1.default, {
|
|
3877
|
+
"data-test": "before-time",
|
|
3878
|
+
to: "#",
|
|
3879
|
+
onClick: function onClick(e) {
|
|
3880
|
+
handleEventIntervalClick(e, 'before');
|
|
3881
|
+
}
|
|
3882
|
+
}, i18n_1._('Before this time'))), React.createElement("td", null, React.createElement(Link_1.default, {
|
|
3883
|
+
"data-test": "after-time",
|
|
3884
|
+
to: "#",
|
|
3885
|
+
onClick: function onClick(e) {
|
|
3886
|
+
handleEventIntervalClick(e, 'after');
|
|
3887
|
+
}
|
|
3888
|
+
}, i18n_1._('After this time'))), React.createElement("td", null, React.createElement(Link_1.default, {
|
|
3889
|
+
"data-test": "at-time",
|
|
3890
|
+
to: "#",
|
|
3891
|
+
onClick: function onClick(e) {
|
|
3892
|
+
handleEventIntervalClick(e, 'at');
|
|
3893
|
+
}
|
|
3894
|
+
}, i18n_1._('At this time')))))), React.createElement(SectionHeading, {
|
|
3895
|
+
level: 4,
|
|
3896
|
+
className: "nearby-header"
|
|
3897
|
+
}, i18n_1._('Nearby Events')), React.createElement(NearbyValueRow, {
|
|
3898
|
+
className: "nearby-value"
|
|
3899
|
+
}, React.createElement(ControlGroup_1.default, {
|
|
3900
|
+
"data-test": "nearby-controls",
|
|
3901
|
+
controlsLayout: "fillJoin",
|
|
3902
|
+
label: "Time controls",
|
|
3903
|
+
labelPosition: "top",
|
|
3904
|
+
hideLabel: true
|
|
3905
|
+
}, React.createElement(Select_1.default, {
|
|
3906
|
+
inline: true,
|
|
3907
|
+
value: rangeType,
|
|
3908
|
+
onChange: handleRangeTypeChange,
|
|
3909
|
+
error: isInvalidInput,
|
|
3910
|
+
style: rangeTypeInputStyle,
|
|
3911
|
+
"data-test": "type-selection"
|
|
3912
|
+
}, React.createElement(Select_1.default.Option, {
|
|
3913
|
+
label: "+",
|
|
3914
|
+
value: "plus"
|
|
3915
|
+
}), React.createElement(Select_1.default.Option, {
|
|
3916
|
+
label: "-",
|
|
3917
|
+
value: "minus"
|
|
3918
|
+
}), React.createElement(Select_1.default.Option, {
|
|
3919
|
+
label: "+/-",
|
|
3920
|
+
value: "plusminus"
|
|
3921
|
+
})), React.createElement(Text_1.default, {
|
|
3922
|
+
inline: true,
|
|
3923
|
+
value: rangeAmount,
|
|
3924
|
+
onChange: handleRangeAmountChange,
|
|
3925
|
+
error: isInvalidInput,
|
|
3926
|
+
style: rangeAmountInputStyle,
|
|
3927
|
+
"data-test": "amount-input"
|
|
3928
|
+
}), React.createElement(Select_1.default, {
|
|
3929
|
+
"data-test": "unit-selection",
|
|
3930
|
+
inline: true,
|
|
3931
|
+
value: rangeUnit,
|
|
3932
|
+
onChange: handleRangeUnitChange,
|
|
3933
|
+
error: isInvalidInput,
|
|
3934
|
+
style: rangeUnitInputStyle
|
|
3935
|
+
}, React.createElement(Select_1.default.Option, {
|
|
3936
|
+
label: "week(s)",
|
|
3937
|
+
value: "w"
|
|
3938
|
+
}), React.createElement(Select_1.default.Option, {
|
|
3939
|
+
label: "day(s)",
|
|
3940
|
+
value: "d"
|
|
3941
|
+
}), React.createElement(Select_1.default.Option, {
|
|
3942
|
+
label: "hour(s)",
|
|
3943
|
+
value: "h"
|
|
3944
|
+
}), React.createElement(Select_1.default.Option, {
|
|
3945
|
+
label: "minute(s)",
|
|
3946
|
+
value: "m"
|
|
3947
|
+
}), React.createElement(Select_1.default.Option, {
|
|
3948
|
+
label: "second(s)",
|
|
3949
|
+
value: "s"
|
|
3950
|
+
}), React.createElement(Select_1.default.Option, {
|
|
3951
|
+
label: "millisecond(s)",
|
|
3952
|
+
value: "ms"
|
|
3953
|
+
}))), React.createElement(Button_1.default, {
|
|
3954
|
+
label: i18n_1._('Apply'),
|
|
3955
|
+
onClick: handleSubmit,
|
|
3956
|
+
style: applyButtonStyle,
|
|
3957
|
+
"data-test": "apply-custom-time"
|
|
3958
|
+
}))));
|
|
3959
|
+
};
|
|
3960
|
+
|
|
3961
|
+
TimeControlsPopover.defaultProps = {
|
|
3962
|
+
open: false,
|
|
3963
|
+
anchor: null,
|
|
3964
|
+
time: null,
|
|
3965
|
+
handleTooltipClose: lodash_1.noop,
|
|
3966
|
+
onTimeDrilldown: lodash_1.noop
|
|
3967
|
+
};
|
|
3968
|
+
exports.default = TimeControlsPopover;
|
|
3969
|
+
|
|
3970
|
+
/***/ }),
|
|
3971
|
+
/* 204 */
|
|
3972
|
+
/***/ (function(module, exports) {
|
|
3973
|
+
|
|
3974
|
+
module.exports = require("@splunk/react-ui/ControlGroup");
|
|
3975
|
+
|
|
3976
|
+
/***/ }),
|
|
3977
|
+
/* 205 */
|
|
3978
|
+
/***/ (function(module, exports) {
|
|
3979
|
+
|
|
3980
|
+
module.exports = require("@splunk/react-ui/Text");
|
|
3981
|
+
|
|
3982
|
+
/***/ }),
|
|
3983
|
+
/* 206 */
|
|
3984
|
+
/***/ (function(module, exports) {
|
|
3985
|
+
|
|
3986
|
+
module.exports = require("@splunk/react-ui/Select");
|
|
3987
|
+
|
|
3988
|
+
/***/ }),
|
|
3989
|
+
/* 207 */
|
|
3990
|
+
/***/ (function(module, exports) {
|
|
3991
|
+
|
|
3992
|
+
module.exports = require("@splunk/react-ui/Link");
|
|
3993
|
+
|
|
3134
3994
|
/***/ })
|
|
3135
3995
|
/******/ ]);
|
|
3136
3996
|
//# sourceMappingURL=Events.js.map
|