@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/SingleValue.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 463);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -95,32 +95,53 @@ module.exports =
|
|
|
95
95
|
/***/ 0:
|
|
96
96
|
/***/ (function(module, exports) {
|
|
97
97
|
|
|
98
|
-
module.exports = require("
|
|
98
|
+
module.exports = require("react");
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
102
|
/***/ 1:
|
|
103
103
|
/***/ (function(module, exports) {
|
|
104
104
|
|
|
105
|
-
module.exports = require("
|
|
105
|
+
module.exports = require("prop-types");
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
108
|
|
|
109
109
|
/***/ 10:
|
|
110
110
|
/***/ (function(module, exports) {
|
|
111
111
|
|
|
112
|
-
module.exports = require("@splunk/
|
|
112
|
+
module.exports = require("@splunk/themes/variables");
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
|
-
/***/
|
|
117
|
-
/***/ (function(module,
|
|
116
|
+
/***/ 100:
|
|
117
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
118
|
+
|
|
119
|
+
"use strict";
|
|
120
|
+
__webpack_require__.r(__webpack_exports__);
|
|
121
|
+
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
122
|
+
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
123
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
|
124
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
118
125
|
|
|
119
|
-
|
|
126
|
+
|
|
127
|
+
var StaticTrendColorEditor = {
|
|
128
|
+
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend value'),
|
|
129
|
+
option: 'trendColor',
|
|
130
|
+
editor: 'editor.color',
|
|
131
|
+
showEditor: function showEditor(_ref) {
|
|
132
|
+
var options = _ref.options;
|
|
133
|
+
return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
|
|
134
|
+
},
|
|
135
|
+
isDisabled: function isDisabled(_ref2) {
|
|
136
|
+
var options = _ref2.options;
|
|
137
|
+
return options.trendDisplay === 'off';
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
/* harmony default export */ __webpack_exports__["default"] = (StaticTrendColorEditor);
|
|
120
141
|
|
|
121
142
|
/***/ }),
|
|
122
143
|
|
|
123
|
-
/***/
|
|
144
|
+
/***/ 101:
|
|
124
145
|
/***/ (function(module, exports, __webpack_require__) {
|
|
125
146
|
|
|
126
147
|
"use strict";
|
|
@@ -129,40 +150,908 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
129
150
|
Object.defineProperty(exports, "__esModule", {
|
|
130
151
|
value: true
|
|
131
152
|
});
|
|
132
|
-
exports.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
exports.TrellisBackgroundColorEditor = exports.TrellisEditorConfig = void 0;
|
|
154
|
+
|
|
155
|
+
var React = __webpack_require__(0);
|
|
156
|
+
|
|
157
|
+
var i18n_1 = __webpack_require__(2);
|
|
158
|
+
|
|
159
|
+
var FeatureFlagContext_1 = __webpack_require__(20);
|
|
160
|
+
|
|
161
|
+
var layoutUtils_1 = __webpack_require__(58);
|
|
162
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
exports.TrellisEditorConfig = [[{
|
|
166
|
+
label: i18n_1._('Trellis Layout'),
|
|
167
|
+
option: 'splitByLayout',
|
|
168
|
+
editor: 'editor.toggle',
|
|
169
|
+
showEditor: function showEditor() {
|
|
170
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
171
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
172
|
+
return isTrellisFeatureFlagOn;
|
|
173
|
+
}
|
|
174
|
+
}], [{
|
|
175
|
+
label: i18n_1._('Split by'),
|
|
176
|
+
option: 'trellisSplitBy',
|
|
177
|
+
editor: 'editor.trellisSplitBy',
|
|
178
|
+
editorProps: {
|
|
179
|
+
dataSourceKey: 'primary'
|
|
180
|
+
},
|
|
181
|
+
showEditor: function showEditor(_ref) {
|
|
182
|
+
var options = _ref.options;
|
|
183
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
184
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
185
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
|
|
186
|
+
}
|
|
187
|
+
}], [{
|
|
188
|
+
label: i18n_1._('Number of columns'),
|
|
189
|
+
option: 'trellisColumns',
|
|
190
|
+
editor: 'editor.number',
|
|
191
|
+
editorProps: {
|
|
192
|
+
min: 1
|
|
193
|
+
},
|
|
194
|
+
placeholder: i18n_1._('Auto'),
|
|
195
|
+
showEditor: function showEditor(_ref2) {
|
|
196
|
+
var options = _ref2.options;
|
|
197
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
198
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
199
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
|
|
200
|
+
}
|
|
201
|
+
}], [{
|
|
202
|
+
label: i18n_1._('Min column width'),
|
|
203
|
+
option: 'trellisMinColumnWidth',
|
|
204
|
+
editor: 'editor.number',
|
|
205
|
+
editorProps: {
|
|
206
|
+
min: 1
|
|
207
|
+
},
|
|
208
|
+
showEditor: function showEditor(_ref3) {
|
|
209
|
+
var options = _ref3.options;
|
|
210
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
211
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
212
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
|
|
213
|
+
}
|
|
214
|
+
}, {
|
|
215
|
+
label: i18n_1._('Row height'),
|
|
216
|
+
option: 'trellisRowHeight',
|
|
217
|
+
editor: 'editor.number',
|
|
218
|
+
editorProps: {
|
|
219
|
+
min: 1
|
|
220
|
+
},
|
|
221
|
+
showEditor: function showEditor(_ref4) {
|
|
222
|
+
var options = _ref4.options;
|
|
223
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
224
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
225
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
|
|
226
|
+
}
|
|
227
|
+
}], [{
|
|
228
|
+
label: i18n_1._('Max number of components per page'),
|
|
229
|
+
option: 'trellisPageCount',
|
|
230
|
+
editor: 'editor.number',
|
|
231
|
+
editorProps: {
|
|
232
|
+
min: 1
|
|
233
|
+
},
|
|
234
|
+
showEditor: function showEditor(_ref5) {
|
|
235
|
+
var options = _ref5.options;
|
|
236
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
237
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
238
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
|
|
239
|
+
}
|
|
240
|
+
}]];
|
|
241
|
+
exports.TrellisBackgroundColorEditor = {
|
|
242
|
+
label: i18n_1._('Trellis background'),
|
|
243
|
+
option: 'trellisBackgroundColor',
|
|
244
|
+
editor: 'editor.color',
|
|
245
|
+
showEditor: function showEditor(_ref6) {
|
|
246
|
+
var options = _ref6.options;
|
|
247
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
248
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
249
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
/***/ }),
|
|
254
|
+
|
|
255
|
+
/***/ 102:
|
|
256
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
257
|
+
|
|
258
|
+
"use strict";
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
var _slicedToArray = __webpack_require__(17);
|
|
262
|
+
|
|
263
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
264
|
+
var t = {};
|
|
265
|
+
|
|
266
|
+
for (var p in s) {
|
|
267
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
271
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
272
|
+
}
|
|
273
|
+
return t;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
Object.defineProperty(exports, "__esModule", {
|
|
277
|
+
value: true
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
var React = __webpack_require__(0);
|
|
281
|
+
|
|
282
|
+
var react_1 = __webpack_require__(0);
|
|
283
|
+
|
|
284
|
+
var lodash_1 = __webpack_require__(3);
|
|
285
|
+
|
|
286
|
+
var styled_components_1 = __webpack_require__(4);
|
|
287
|
+
|
|
288
|
+
var Paginator_1 = __webpack_require__(87);
|
|
289
|
+
|
|
290
|
+
var i18n_1 = __webpack_require__(2);
|
|
291
|
+
|
|
292
|
+
var themes_1 = __webpack_require__(59);
|
|
293
|
+
|
|
294
|
+
var useSplunkTheme_1 = __webpack_require__(57);
|
|
295
|
+
|
|
296
|
+
var FeatureFlagContext_1 = __webpack_require__(20);
|
|
297
|
+
|
|
298
|
+
var SizeAwareWrapper_1 = __webpack_require__(18);
|
|
299
|
+
|
|
300
|
+
var style_1 = __webpack_require__(14);
|
|
301
|
+
|
|
302
|
+
var Message_1 = __webpack_require__(9);
|
|
303
|
+
|
|
304
|
+
var trellisUtils_1 = __webpack_require__(76);
|
|
305
|
+
|
|
306
|
+
var hocUtils_1 = __webpack_require__(26);
|
|
307
|
+
|
|
308
|
+
var JSONSchemaUtils_1 = __webpack_require__(27);
|
|
309
|
+
|
|
310
|
+
var Options_1 = __webpack_require__(29);
|
|
311
|
+
|
|
312
|
+
var trellisUtils_2 = __webpack_require__(103);
|
|
313
|
+
|
|
314
|
+
var layoutUtils_1 = __webpack_require__(58);
|
|
315
|
+
|
|
316
|
+
var TrellisContainer = styled_components_1.default.div.withConfig({
|
|
317
|
+
displayName: "withTrellis__TrellisContainer",
|
|
318
|
+
componentId: "pjmeig-0"
|
|
319
|
+
})(["overflow:hidden;display:flex;flex-direction:column;background-color:", ";", ";> [data-test='paginator']{align-self:flex-end;margin-bottom:10px;}"], function (props) {
|
|
320
|
+
return props.backgroundColor;
|
|
321
|
+
}, function (props) {
|
|
322
|
+
return style_1.toDimension(lodash_1.pick(props, ['width', 'height']));
|
|
323
|
+
});
|
|
324
|
+
var TrellisContainerGrid = styled_components_1.default.div.withConfig({
|
|
325
|
+
displayName: "withTrellis__TrellisContainerGrid",
|
|
326
|
+
componentId: "pjmeig-1"
|
|
327
|
+
})(["display:grid;height:", ";gap:10px 10px;grid-template-columns:", ";overflow:auto;justify-items:stretch;grid-auto-rows:", ";.child{height:", ";}"], function (props) {
|
|
328
|
+
return "".concat(props.height, "px");
|
|
329
|
+
}, function (props) {
|
|
330
|
+
return props.colCount ? "repeat(".concat(props.colCount, ", minmax(").concat(props.colMinWidth, "px, 1fr))") : "repeat(auto-fit, minmax(".concat(props.colMinWidth, "px, 1fr))");
|
|
331
|
+
}, function (props) {
|
|
332
|
+
return "".concat(props.rowHeight, "px");
|
|
333
|
+
}, function (props) {
|
|
334
|
+
return "".concat(props.rowHeight, "px");
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
var showErrorMessage = function showErrorMessage(errorCode, width, height) {
|
|
338
|
+
if (errorCode === 'INVALID_SPLIT_BY_FIELD') {
|
|
339
|
+
return React.createElement(Message_1.default, {
|
|
340
|
+
width: width,
|
|
341
|
+
height: height,
|
|
342
|
+
message: i18n_1._('Select a valid trellis split by field'),
|
|
343
|
+
level: "info"
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (errorCode === 'UNKNOWN_DATA_SPLIT_MODE') {
|
|
348
|
+
return React.createElement(Message_1.default, {
|
|
349
|
+
width: width,
|
|
350
|
+
height: height,
|
|
351
|
+
message: i18n_1._('Unknown data split mode'),
|
|
352
|
+
level: "info"
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
return React.createElement(Message_1.default, {
|
|
357
|
+
width: width,
|
|
358
|
+
height: height,
|
|
359
|
+
message: i18n_1._('Error render in trellis'),
|
|
360
|
+
level: "info"
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
var withTrellis = function withTrellis(Viz) {
|
|
365
|
+
var VizWithTrellis = function VizWithTrellis(opts) {
|
|
366
|
+
var _opts$options = opts.options,
|
|
367
|
+
options = _opts$options === void 0 ? {} : _opts$options,
|
|
368
|
+
height = opts.height,
|
|
369
|
+
width = opts.width,
|
|
370
|
+
otherProps = __rest(opts, ["options", "height", "width"]);
|
|
371
|
+
|
|
372
|
+
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(Viz.config.optionsSchema, 'default');
|
|
373
|
+
var mergedOptions = hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions);
|
|
374
|
+
var trellisColumns = mergedOptions.trellisColumns,
|
|
375
|
+
trellisPageCount = mergedOptions.trellisPageCount,
|
|
376
|
+
trellisMinColumnWidth = mergedOptions.trellisMinColumnWidth,
|
|
377
|
+
trellisRowHeight = mergedOptions.trellisRowHeight,
|
|
378
|
+
splitByLayout = mergedOptions.splitByLayout,
|
|
379
|
+
trellisSplitBy = mergedOptions.trellisSplitBy;
|
|
380
|
+
var colCount = trellisColumns > 0 ? trellisColumns : defaultOptions.trellisColumns;
|
|
381
|
+
var pageCount = +trellisPageCount > 0 ? +trellisPageCount : defaultOptions.trellisPageCount;
|
|
382
|
+
var colMinWidth = trellisMinColumnWidth > 0 ? trellisMinColumnWidth : defaultOptions.trellisMinColumnWidth;
|
|
383
|
+
var rowHeight = trellisRowHeight > 0 ? trellisRowHeight : defaultOptions.trellisRowHeight;
|
|
384
|
+
|
|
385
|
+
var _react_1$useState = react_1.useState(1),
|
|
386
|
+
_react_1$useState2 = _slicedToArray(_react_1$useState, 2),
|
|
387
|
+
pageNum = _react_1$useState2[0],
|
|
388
|
+
setPageNum = _react_1$useState2[1];
|
|
389
|
+
|
|
390
|
+
var _react_1$useState3 = react_1.useState(null),
|
|
391
|
+
_react_1$useState4 = _slicedToArray(_react_1$useState3, 2),
|
|
392
|
+
pagedData = _react_1$useState4[0],
|
|
393
|
+
setPagedData = _react_1$useState4[1];
|
|
394
|
+
|
|
395
|
+
var splitByKeys = [];
|
|
396
|
+
var totalPages = 0;
|
|
397
|
+
var showPaginator = false;
|
|
398
|
+
var dataSources = otherProps.dataSources;
|
|
399
|
+
var theme = {
|
|
400
|
+
splunkThemeV1: useSplunkTheme_1.default()
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
var _themes_1$getSettings = themes_1.getSettingsFromThemedProps({
|
|
404
|
+
theme: theme
|
|
405
|
+
}),
|
|
406
|
+
currentThemeFamily = _themes_1$getSettings.family,
|
|
407
|
+
currentThemeColorScheme = _themes_1$getSettings.colorScheme,
|
|
408
|
+
currentThemeDensity = _themes_1$getSettings.density;
|
|
409
|
+
|
|
410
|
+
var trellisBackgroundColor = react_1.useMemo(function () {
|
|
411
|
+
var themeFunc = function themeFunc(themeVar) {
|
|
412
|
+
var _a, _b;
|
|
413
|
+
|
|
414
|
+
return (_b = (_a = Viz.config.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
415
|
+
trellisBackgroundColor: mergedOptions.trellisBackgroundColor,
|
|
416
|
+
theme: theme
|
|
417
|
+
});
|
|
418
|
+
}; // trellisBackgroundColor option supports only static coloring and DSL option evaluation derived from the themes level only.
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
var evaluated = Options_1.Options.evaluate({
|
|
422
|
+
context: Viz.config.context,
|
|
423
|
+
options: {
|
|
424
|
+
trellisBackgroundColor: mergedOptions.trellisBackgroundColor
|
|
425
|
+
}
|
|
426
|
+
}, {}, themeFunc);
|
|
427
|
+
return evaluated.trellisBackgroundColor;
|
|
428
|
+
}, [mergedOptions.trellisBackgroundColor, currentThemeFamily, currentThemeColorScheme, currentThemeDensity]);
|
|
429
|
+
var columns = lodash_1.get(dataSources, 'primary.data.columns', undefined);
|
|
430
|
+
var fields = lodash_1.get(dataSources, 'primary.data.fields', undefined);
|
|
431
|
+
var noColumns = columns === undefined;
|
|
432
|
+
var noFields = fields === undefined;
|
|
433
|
+
|
|
434
|
+
var updateDataDisplay = function updateDataDisplay(currPage) {
|
|
435
|
+
if (!showPaginator) {
|
|
436
|
+
setPagedData(splitByKeys);
|
|
437
|
+
setPageNum(1);
|
|
438
|
+
} else {
|
|
439
|
+
var startIdx = pageCount * (currPage - 1);
|
|
440
|
+
var paged = splitByKeys.slice(startIdx, startIdx + pageCount);
|
|
441
|
+
setPagedData(paged);
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
react_1.useEffect(function () {
|
|
446
|
+
setPageNum(1);
|
|
447
|
+
updateDataDisplay(1);
|
|
448
|
+
}, [pageCount, trellisSplitBy]);
|
|
449
|
+
react_1.useEffect(function () {
|
|
450
|
+
updateDataDisplay(pageNum);
|
|
451
|
+
}, [columns, fields, trellisSplitBy, pageNum, splitByLayout]);
|
|
452
|
+
var handlePageChange = react_1.useCallback(function (event, _ref) {
|
|
453
|
+
var page = _ref.page;
|
|
454
|
+
setPageNum(page);
|
|
455
|
+
}, [pageNum, pagedData]);
|
|
456
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
457
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
458
|
+
|
|
459
|
+
if (!isTrellisFeatureFlagOn || !splitByLayout || splitByLayout !== layoutUtils_1.LAYOUT_TYPE.Trellis) {
|
|
460
|
+
return React.createElement(Viz, Object.assign({}, opts));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
if (splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis) {
|
|
464
|
+
if (noColumns || noFields) {
|
|
465
|
+
return React.createElement(Message_1.default, {
|
|
466
|
+
width: width,
|
|
467
|
+
height: height,
|
|
468
|
+
message: i18n_1._('Loading'),
|
|
469
|
+
level: "info"
|
|
470
|
+
});
|
|
471
|
+
} // If no trellisSplitBy value is passed in, assign default trellisSplitBy
|
|
472
|
+
// The default value will be the first value in the individual splitBy field list or 'aggregations'
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
var currTrellisSplitBy = trellisSplitBy;
|
|
476
|
+
|
|
477
|
+
if (!trellisSplitBy || trellisSplitBy.length === 0) {
|
|
478
|
+
var splitByPossibleFields = trellisUtils_1.getAllPossibleSplitByFields(fields);
|
|
479
|
+
currTrellisSplitBy = splitByPossibleFields.fields && splitByPossibleFields.fields.length ? splitByPossibleFields.fields[0] : trellisUtils_2.AGGREGATIONS;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
var splitMode = trellisUtils_1.getTrellisDataSplitterMode(fields);
|
|
483
|
+
var dataSplitResult = trellisUtils_2.getTrellisDataSourcesBySplitMode(splitMode, dataSources, currTrellisSplitBy);
|
|
484
|
+
var modifiedDataSourceBySplitBy = dataSplitResult === null || dataSplitResult === void 0 ? void 0 : dataSplitResult.splitDataSources;
|
|
485
|
+
var dataSplitErrorCode = dataSplitResult === null || dataSplitResult === void 0 ? void 0 : dataSplitResult.errorCode;
|
|
486
|
+
|
|
487
|
+
if (!modifiedDataSourceBySplitBy || Object.keys(modifiedDataSourceBySplitBy).length === 0 || dataSplitErrorCode) {
|
|
488
|
+
return showErrorMessage(dataSplitErrorCode, width, height);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
var splitByKeysModified = modifiedDataSourceBySplitBy ? Object.keys(modifiedDataSourceBySplitBy) : [];
|
|
492
|
+
|
|
493
|
+
if (splitByKeysModified) {
|
|
494
|
+
showPaginator = splitByKeysModified.length > pageCount;
|
|
495
|
+
splitByKeys = splitByKeysModified;
|
|
496
|
+
totalPages = splitByKeysModified ? Math.ceil(splitByKeysModified.length / pageCount) : 0;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
return React.createElement(TrellisContainer, {
|
|
500
|
+
height: height,
|
|
501
|
+
width: width,
|
|
502
|
+
backgroundColor: trellisBackgroundColor
|
|
503
|
+
}, React.createElement(TrellisContainerGrid, {
|
|
504
|
+
height: height,
|
|
505
|
+
colCount: colCount,
|
|
506
|
+
colMinWidth: colMinWidth,
|
|
507
|
+
rowHeight: rowHeight
|
|
508
|
+
}, pagedData && pagedData.map(function (splitByKey, idx) {
|
|
509
|
+
return React.createElement("div", {
|
|
510
|
+
className: "child",
|
|
511
|
+
"data-test": "trellis-child",
|
|
512
|
+
key: "div-child-".concat(idx.toString())
|
|
513
|
+
}, React.createElement(SizeAwareWrapper_1.default, null, function (_ref2) {
|
|
514
|
+
var childWidth = _ref2.childWidth,
|
|
515
|
+
_ref2$childHeight = _ref2.childHeight,
|
|
516
|
+
childHeight = _ref2$childHeight === void 0 ? rowHeight : _ref2$childHeight;
|
|
517
|
+
return React.createElement(Viz, Object.assign({}, otherProps, {
|
|
518
|
+
trellisKey: splitByKey,
|
|
519
|
+
trellisSplitBy: currTrellisSplitBy,
|
|
520
|
+
dataSources: modifiedDataSourceBySplitBy[splitByKey],
|
|
521
|
+
options: options,
|
|
522
|
+
key: "viz-".concat(idx.toString()),
|
|
523
|
+
height: childHeight,
|
|
524
|
+
width: childWidth
|
|
525
|
+
}));
|
|
526
|
+
}));
|
|
527
|
+
})), showPaginator && totalPages >= pageNum && React.createElement(Paginator_1.default, {
|
|
528
|
+
onChange: handlePageChange,
|
|
529
|
+
current: pageNum,
|
|
530
|
+
alwaysShowLastPageLink: true,
|
|
531
|
+
totalPages: totalPages
|
|
532
|
+
}));
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
return null;
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
VizWithTrellis.propTypes = Viz.proptypes;
|
|
539
|
+
VizWithTrellis.defaultProps = Viz.defaultProps;
|
|
540
|
+
VizWithTrellis.config = Viz.config;
|
|
541
|
+
return VizWithTrellis;
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
exports.default = withTrellis;
|
|
545
|
+
|
|
546
|
+
/***/ }),
|
|
547
|
+
|
|
548
|
+
/***/ 103:
|
|
549
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
550
|
+
|
|
551
|
+
"use strict";
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
555
|
+
|
|
556
|
+
Object.defineProperty(exports, "__esModule", {
|
|
557
|
+
value: true
|
|
558
|
+
});
|
|
559
|
+
exports.getTrellisDataSourcesBySplitMode = exports.dataSourcesSplitByModeStatsorUnknown = exports.dataSourcesSplitByModeChart = exports.dataSourcesSplitByModeTimechart = exports.dataSourcesSplitByAggregationsStats = exports.dataSourcesSplitByAggregationsTimechartAndChart = exports.dataSourcesSplitByAggregationsUnknown = exports.AGGREGATIONS = void 0;
|
|
560
|
+
|
|
561
|
+
var lodash_1 = __webpack_require__(3);
|
|
562
|
+
|
|
563
|
+
var trellisUtils_1 = __webpack_require__(76);
|
|
564
|
+
|
|
565
|
+
exports.AGGREGATIONS = 'aggregations';
|
|
566
|
+
/**
|
|
567
|
+
* There can be certain SPL cmds that can produce dataSource without a specific field meta info (like group_by_rank, split_by_field etc),
|
|
568
|
+
* to categorize it,
|
|
569
|
+
* Example1:- `index = "_internal" | chart count`
|
|
570
|
+
* Example2:- `index=_internal | chart avg(count), max(count)`
|
|
571
|
+
* Example3:- `index = "_internal" | stats count`
|
|
572
|
+
* Example4:- `index=_internal | stats avg(count), max(count)`
|
|
573
|
+
*/
|
|
574
|
+
|
|
575
|
+
var dataSourcesSplitByAggregationsUnknown = function dataSourcesSplitByAggregationsUnknown(dataSource) {
|
|
576
|
+
var _a, _b, _c, _d;
|
|
577
|
+
|
|
578
|
+
var fields = (_b = (_a = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.fields;
|
|
579
|
+
var columns = (_d = (_c = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.columns;
|
|
580
|
+
var splitDataSources = null;
|
|
581
|
+
var errorCode = null;
|
|
582
|
+
|
|
583
|
+
if (fields && fields.length) {
|
|
584
|
+
splitDataSources = {};
|
|
585
|
+
|
|
586
|
+
for (var i = 0; i < fields.length; i += 1) {
|
|
587
|
+
var fieldName = fields[i].name;
|
|
588
|
+
|
|
589
|
+
if (!(fieldName === null || fieldName === void 0 ? void 0 : fieldName.startsWith('_'))) {
|
|
590
|
+
splitDataSources[fieldName] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
|
|
591
|
+
splitDataSources[fieldName].primary.data.fields = [fields[i]];
|
|
592
|
+
splitDataSources[fieldName].primary.data.columns = [columns[i]];
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
} else {
|
|
596
|
+
errorCode = 'INVALID_SPLIT_BY_FIELD';
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
return {
|
|
600
|
+
splitDataSources: splitDataSources,
|
|
601
|
+
errorCode: errorCode
|
|
602
|
+
};
|
|
164
603
|
};
|
|
165
604
|
|
|
605
|
+
exports.dataSourcesSplitByAggregationsUnknown = dataSourcesSplitByAggregationsUnknown;
|
|
606
|
+
|
|
607
|
+
var dataSourcesSplitByAggregationsTimechartAndChart = function dataSourcesSplitByAggregationsTimechartAndChart(dataSource) {
|
|
608
|
+
var _a, _b, _c, _d;
|
|
609
|
+
|
|
610
|
+
var fields = (_b = (_a = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.fields;
|
|
611
|
+
var columns = (_d = (_c = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.columns;
|
|
612
|
+
var splitDataSources = null;
|
|
613
|
+
var splitByFields = [];
|
|
614
|
+
var errorCode = null;
|
|
615
|
+
|
|
616
|
+
if (typeof fields[0] !== 'string') {
|
|
617
|
+
splitByFields = trellisUtils_1.extractDataSourceAggregationKeysChart(fields);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
if (splitByFields && splitByFields.length > 0) {
|
|
621
|
+
splitDataSources = {};
|
|
622
|
+
splitByFields.forEach(function (splitByField) {
|
|
623
|
+
splitDataSources[splitByField] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
|
|
624
|
+
splitDataSources[splitByField].primary.data.fields = [fields[0]];
|
|
625
|
+
splitDataSources[splitByField].primary.data.columns = [columns[0]];
|
|
626
|
+
fields.forEach(function (field, idx) {
|
|
627
|
+
var fieldName = field === null || field === void 0 ? void 0 : field.name;
|
|
628
|
+
|
|
629
|
+
if (fieldName !== '_time' && !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.startsWith('_')) && field.data_source === splitByField) {
|
|
630
|
+
splitDataSources[splitByField].primary.data.fields.push(field);
|
|
631
|
+
splitDataSources[splitByField].primary.data.columns.push(columns[idx]);
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
});
|
|
635
|
+
} else if ((!splitByFields || !splitByFields.length) && fields.length > 1) {
|
|
636
|
+
// handle where data_source doesnot exist in fields
|
|
637
|
+
// example1 :- index=_internal | timechart count
|
|
638
|
+
// example2 :- index=_internal | timechart max(count) avg(count)
|
|
639
|
+
splitDataSources = {};
|
|
640
|
+
|
|
641
|
+
for (var i = 1; i < fields.length; i += 1) {
|
|
642
|
+
var fieldName = fields[i].name;
|
|
643
|
+
|
|
644
|
+
if (!(fieldName === null || fieldName === void 0 ? void 0 : fieldName.startsWith('_'))) {
|
|
645
|
+
splitDataSources[fieldName] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
|
|
646
|
+
splitDataSources[fieldName].primary.data.fields = [fields[0], fields[i]];
|
|
647
|
+
splitDataSources[fieldName].primary.data.columns = [columns[0], columns[i]];
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
} else {
|
|
651
|
+
errorCode = 'INVALID_SPLIT_BY_FIELD';
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
return {
|
|
655
|
+
splitDataSources: splitDataSources,
|
|
656
|
+
errorCode: errorCode
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
exports.dataSourcesSplitByAggregationsTimechartAndChart = dataSourcesSplitByAggregationsTimechartAndChart;
|
|
661
|
+
|
|
662
|
+
var dataSourcesSplitByAggregationsStats = function dataSourcesSplitByAggregationsStats(dataSource) {
|
|
663
|
+
var _a, _b, _c, _d;
|
|
664
|
+
|
|
665
|
+
var fields = (_b = (_a = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.fields;
|
|
666
|
+
var columns = (_d = (_c = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.columns;
|
|
667
|
+
var splitDataSources = null;
|
|
668
|
+
var splitByFields = [];
|
|
669
|
+
var errorCode = null;
|
|
670
|
+
|
|
671
|
+
if (typeof fields[0] !== 'string') {
|
|
672
|
+
splitByFields = trellisUtils_1.extractDataSourceAggregationKeysStats(fields);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
if (splitByFields && splitByFields.length > 0) {
|
|
676
|
+
splitDataSources = {};
|
|
677
|
+
splitByFields.forEach(function (splitByField) {
|
|
678
|
+
splitDataSources[splitByField] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
|
|
679
|
+
splitDataSources[splitByField].primary.data.fields = [fields[0]];
|
|
680
|
+
splitDataSources[splitByField].primary.data.columns = [columns[0]];
|
|
681
|
+
var idx = fields.findIndex(function (field) {
|
|
682
|
+
return field.name === splitByField;
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
if (idx > 0) {
|
|
686
|
+
splitDataSources[splitByField].primary.data.fields.push(fields[idx]);
|
|
687
|
+
splitDataSources[splitByField].primary.data.columns.push(columns[idx]);
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
} else {
|
|
691
|
+
errorCode = 'INVALID_SPLIT_BY_FIELD';
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
return {
|
|
695
|
+
splitDataSources: splitDataSources,
|
|
696
|
+
errorCode: errorCode
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
exports.dataSourcesSplitByAggregationsStats = dataSourcesSplitByAggregationsStats;
|
|
701
|
+
|
|
702
|
+
var dataSourcesSplitByModeTimechart = function dataSourcesSplitByModeTimechart(dataSource, splitBy) {
|
|
703
|
+
var _a, _b, _c, _d, _e;
|
|
704
|
+
|
|
705
|
+
var fields = (_b = (_a = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.fields;
|
|
706
|
+
var columns = (_d = (_c = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.columns;
|
|
707
|
+
var splitDataSources = null;
|
|
708
|
+
var splitByFields = [];
|
|
709
|
+
var errorCode = null;
|
|
710
|
+
|
|
711
|
+
if (typeof fields[0] !== 'string') {
|
|
712
|
+
splitByFields = trellisUtils_1.extractSplitByFieldsChartFields(fields);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
|
|
716
|
+
splitDataSources = {};
|
|
717
|
+
var dataSourceKeys = trellisUtils_1.extractDataSourceAggregationKeysChart(fields);
|
|
718
|
+
var valueKeys = [];
|
|
719
|
+
|
|
720
|
+
for (var i = 1; i < fields.length; i += 1) {
|
|
721
|
+
// not including internal fields
|
|
722
|
+
if (!((_e = fields[i].name) === null || _e === void 0 ? void 0 : _e.startsWith('_'))) {
|
|
723
|
+
valueKeys.push(fields[i].splitby_value ? fields[i].splitby_value : fields[i].name);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
valueKeys.forEach(function (val) {
|
|
728
|
+
splitDataSources[val] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
|
|
729
|
+
splitDataSources[val].primary.data.fields = [{
|
|
730
|
+
name: fields[0].name
|
|
731
|
+
}].concat(_toConsumableArray(dataSourceKeys.map(function (k) {
|
|
732
|
+
return {
|
|
733
|
+
name: k
|
|
734
|
+
};
|
|
735
|
+
})));
|
|
736
|
+
splitDataSources[val].primary.data.columns = [_toConsumableArray(columns[0])];
|
|
737
|
+
dataSourceKeys.forEach(function (dsKey) {
|
|
738
|
+
fields.forEach(function (field, idx) {
|
|
739
|
+
if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
|
|
740
|
+
splitDataSources[val].primary.data.columns.push(_toConsumableArray(columns[idx]));
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
});
|
|
744
|
+
});
|
|
745
|
+
} else {
|
|
746
|
+
errorCode = 'INVALID_SPLIT_BY_FIELD';
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
return {
|
|
750
|
+
splitDataSources: splitDataSources,
|
|
751
|
+
errorCode: errorCode
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
exports.dataSourcesSplitByModeTimechart = dataSourcesSplitByModeTimechart;
|
|
756
|
+
|
|
757
|
+
var dataSourcesSplitByModeChart = function dataSourcesSplitByModeChart(dataSource, splitBy) {
|
|
758
|
+
var _a, _b, _c, _d;
|
|
759
|
+
|
|
760
|
+
var fields = (_b = (_a = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.fields;
|
|
761
|
+
var columns = (_d = (_c = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.columns;
|
|
762
|
+
var splitDataSources = null;
|
|
763
|
+
var splitByFields = [];
|
|
764
|
+
var errorCode = null;
|
|
765
|
+
|
|
766
|
+
if (typeof fields[0] !== 'string') {
|
|
767
|
+
splitByFields = trellisUtils_1.extractSplitByFieldsChartFields(fields);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
|
|
771
|
+
splitDataSources = {};
|
|
772
|
+
var splitByFieldIdx = splitByFields.findIndex(function (f) {
|
|
773
|
+
return f === splitBy;
|
|
774
|
+
});
|
|
775
|
+
var otherSplitBy = splitByFields.filter(function (f) {
|
|
776
|
+
return f !== splitBy;
|
|
777
|
+
});
|
|
778
|
+
var dataSourceKeys = trellisUtils_1.extractDataSourceAggregationKeysChart(fields);
|
|
779
|
+
var nonDataSourceAggregations = [];
|
|
780
|
+
|
|
781
|
+
if (!dataSourceKeys.length && fields[0].groupby_rank === '0' && fields.length && !fields[1].groupby_rank) {
|
|
782
|
+
/* check for another aggregation scenario where no key 'data_source' will be returned (applies for both chart and stats cmd)
|
|
783
|
+
For example :-
|
|
784
|
+
index=_internal | chart count by status
|
|
785
|
+
index = "_internal" | chart max(count) avg(count) by status
|
|
786
|
+
index = "_internal" | stats max(count) avg(count) by status
|
|
787
|
+
where field meta info is in this format -
|
|
788
|
+
"fields": [
|
|
789
|
+
{
|
|
790
|
+
"name": "status",
|
|
791
|
+
"groupby_rank": "0"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"name": "max(count)"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"name": "avg(count)"
|
|
798
|
+
}
|
|
799
|
+
]
|
|
800
|
+
*/
|
|
801
|
+
for (var i = 1; i < fields.length; i += 1) {
|
|
802
|
+
nonDataSourceAggregations.push(fields[i].name);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
if (splitByFieldIdx === 0) {
|
|
807
|
+
// if splitBy is the first field, split row wise
|
|
808
|
+
var valueKeys = lodash_1.cloneDeep(columns[0]);
|
|
809
|
+
valueKeys.forEach(function (val, idx) {
|
|
810
|
+
splitDataSources[val] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
|
|
811
|
+
splitDataSources[val].primary.data.fields = [];
|
|
812
|
+
|
|
813
|
+
if (otherSplitBy.length) {
|
|
814
|
+
splitDataSources[val].primary.data.fields = [{
|
|
815
|
+
name: otherSplitBy[0]
|
|
816
|
+
}]; // there can only be one otherSplitBy for chart cmd
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
if (dataSourceKeys.length) {
|
|
820
|
+
(function () {
|
|
821
|
+
var columnValues = [[]];
|
|
822
|
+
splitDataSources[val].primary.data.fields = [].concat(_toConsumableArray(splitDataSources[val].primary.data.fields), _toConsumableArray(dataSourceKeys.map(function (k) {
|
|
823
|
+
return {
|
|
824
|
+
name: k
|
|
825
|
+
};
|
|
826
|
+
})));
|
|
827
|
+
dataSourceKeys.forEach(function () {
|
|
828
|
+
columnValues.push([]);
|
|
829
|
+
});
|
|
830
|
+
/**
|
|
831
|
+
* There can be chart SPL cmd where there are multiple data_source keys in the field meta info.
|
|
832
|
+
* For eg - index = "_internal" | chart avg(count) max(count) by status , user) can result in fields and columns as below where "data_source" keys are "avg(count)" and "max(count)"
|
|
833
|
+
* 'fields' : [
|
|
834
|
+
{
|
|
835
|
+
"name": "status",
|
|
836
|
+
"groupby_rank": "0"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"name": "avg(count): userA",
|
|
840
|
+
"data_source": "avg(count)",
|
|
841
|
+
"splitby_field": "user",
|
|
842
|
+
"splitby_value": "userA"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"name": "avg(count): userB",
|
|
846
|
+
"data_source": "avg(count)",
|
|
847
|
+
"splitby_field": "user",
|
|
848
|
+
"splitby_value": "userB"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"name": "avg(count): userC",
|
|
852
|
+
"data_source": "avg(count)",
|
|
853
|
+
"splitby_field": "user",
|
|
854
|
+
"splitby_value": "userC"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"name": "max(count): userA",
|
|
858
|
+
"data_source": "max(count)",
|
|
859
|
+
"splitby_field": "user",
|
|
860
|
+
"splitby_value": "userA"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"name": "max(count): userB",
|
|
864
|
+
"data_source": "max(count)",
|
|
865
|
+
"splitby_field": "user",
|
|
866
|
+
"splitby_value": "userB"
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"name": "max(count): userC",
|
|
870
|
+
"data_source": "max(count)",
|
|
871
|
+
"splitby_field": "user",
|
|
872
|
+
"splitby_value": "userC"
|
|
873
|
+
},
|
|
874
|
+
]
|
|
875
|
+
'columns' : [['200','303','304','400'], ['1','2','3','4'], ['10','20','30','40'], ['100','200','300','400'], ['5','6','7','8'], ['50','60','70','80'],['500','600','700','800']]
|
|
876
|
+
In this case when we split row wise, the data_source keys for userA appears in indices [1, 4, ..], the data_source keys for userB appears in indices [2, 5, ..]
|
|
877
|
+
The resulting dataSplit for status '200', will have the fields => ['user','avg(count)', 'max(count)'] columns => [['userA', 'userB', 'userC'],['1','10','100'], ['5', '50', '500'] ]
|
|
878
|
+
For the example above for..loop below will iterate from i= 1 to 3 (Math.ceil((fields.length - 1) / dataSourceKeys.length)). Exclude i = 0 as first column is the splitBy input.
|
|
879
|
+
Since there are 2 data_source keys 'avg(count)' and 'max(count)', dataSourceKeys.forEach loop will collect individual arrays specific to the columnValues[indx] as below.
|
|
880
|
+
columnValues[0] = ['userA', 'userB', 'userC']
|
|
881
|
+
columnValues[1] = ['1','10','100']
|
|
882
|
+
columnValues[2] = ['5', '50', '500']
|
|
883
|
+
*/
|
|
884
|
+
|
|
885
|
+
var _loop = function _loop(_i) {
|
|
886
|
+
columnValues[0].push(fields[_i].splitby_value ? fields[_i].splitby_value : fields[_i].name);
|
|
887
|
+
dataSourceKeys.forEach(function (dskey, dsIndx) {
|
|
888
|
+
var mul = (fields.length - 1) / dataSourceKeys.length; // This line does the index calculation
|
|
889
|
+
|
|
890
|
+
columnValues[dsIndx + 1].push(columns[_i + dsIndx * mul][idx]);
|
|
891
|
+
});
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
for (var _i = 1; _i <= Math.ceil((fields.length - 1) / dataSourceKeys.length); _i += 1) {
|
|
895
|
+
_loop(_i);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
splitDataSources[val].primary.data.columns = columnValues;
|
|
899
|
+
})();
|
|
900
|
+
} else if (nonDataSourceAggregations.length) {
|
|
901
|
+
// There can be SPL where data_source field metainfo is not available and needs special handling
|
|
902
|
+
// For eg :-
|
|
903
|
+
// index=_internal | chart count by status
|
|
904
|
+
// index = "_internal" | chart max(count) avg(count) by status
|
|
905
|
+
// index = "_internal" | stats max(count) avg(count) by status
|
|
906
|
+
var columnValues = [];
|
|
907
|
+
fields.forEach(function (aggregationField, fieldIdx) {
|
|
908
|
+
if (fieldIdx > 0) {
|
|
909
|
+
splitDataSources[val].primary.data.fields.push(aggregationField);
|
|
910
|
+
columnValues.push([columns[fieldIdx][idx]]);
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
splitDataSources[val].primary.data.columns = columnValues;
|
|
914
|
+
}
|
|
915
|
+
});
|
|
916
|
+
} else {
|
|
917
|
+
// split column wise
|
|
918
|
+
var _valueKeys = [];
|
|
919
|
+
|
|
920
|
+
for (var _i2 = 1; _i2 < fields.length; _i2 += 1) {
|
|
921
|
+
_valueKeys.push(fields[_i2].splitby_value ? fields[_i2].splitby_value : fields[_i2].name);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
_valueKeys.forEach(function (val) {
|
|
925
|
+
splitDataSources[val] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
|
|
926
|
+
splitDataSources[val].primary.data.fields = [{
|
|
927
|
+
name: otherSplitBy[0]
|
|
928
|
+
}].concat(_toConsumableArray(dataSourceKeys.map(function (k) {
|
|
929
|
+
return {
|
|
930
|
+
name: k
|
|
931
|
+
};
|
|
932
|
+
})));
|
|
933
|
+
splitDataSources[val].primary.data.columns = [_toConsumableArray(columns[0])];
|
|
934
|
+
dataSourceKeys.forEach(function (dsKey) {
|
|
935
|
+
fields.forEach(function (field, idx) {
|
|
936
|
+
if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
|
|
937
|
+
splitDataSources[val].primary.data.columns.push(_toConsumableArray(columns[idx]));
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
});
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
} else {
|
|
944
|
+
errorCode = 'INVALID_SPLIT_BY_FIELD';
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
return {
|
|
948
|
+
splitDataSources: splitDataSources,
|
|
949
|
+
errorCode: errorCode
|
|
950
|
+
};
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
exports.dataSourcesSplitByModeChart = dataSourcesSplitByModeChart;
|
|
954
|
+
/**
|
|
955
|
+
* This method does datasplitting for 'stats' and generic cmds('makeresults','table' etc - categoried as 'unknown' splitMode).
|
|
956
|
+
* The main difference is for 'stats' cmd possible splitBy fields have 'group_by_rank' in field meta info, whereas for 'unknown' cmd it can be any fieldnames
|
|
957
|
+
*/
|
|
958
|
+
|
|
959
|
+
var dataSourcesSplitByModeStatsorUnknown = function dataSourcesSplitByModeStatsorUnknown(dataSource, splitBy, splitMode) {
|
|
960
|
+
var _a, _b, _c, _d, _e, _f;
|
|
961
|
+
|
|
962
|
+
var fields = (_b = (_a = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.fields;
|
|
963
|
+
var columns = (_d = (_c = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.columns;
|
|
964
|
+
var splitDataSources = null;
|
|
965
|
+
var splitByFields = [];
|
|
966
|
+
var errorCode = null;
|
|
967
|
+
|
|
968
|
+
if (typeof fields[0] !== 'string') {
|
|
969
|
+
splitByFields = splitMode !== trellisUtils_1.UNKNOWN ? trellisUtils_1.extractSplitByFieldsForStats(fields) : trellisUtils_1.extractSplitByFieldsForUnknown(fields);
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
var splitByIndex = fields === null || fields === void 0 ? void 0 : fields.findIndex(function (field) {
|
|
973
|
+
return field === splitBy || field.name === splitBy;
|
|
974
|
+
});
|
|
975
|
+
|
|
976
|
+
if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
|
|
977
|
+
var splitByColumn = (_f = (_e = dataSource === null || dataSource === void 0 ? void 0 : dataSource.primary) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.columns[splitByIndex];
|
|
978
|
+
splitDataSources = {};
|
|
979
|
+
splitByColumn.forEach(function (val, idx) {
|
|
980
|
+
if (!splitDataSources[val]) {
|
|
981
|
+
splitDataSources[val] = [idx];
|
|
982
|
+
} else {
|
|
983
|
+
splitDataSources[val].push(idx);
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
var cloneFields = lodash_1.cloneDeep(fields);
|
|
987
|
+
cloneFields.splice(splitByIndex, 1);
|
|
988
|
+
var valueKeys = Object.keys(splitDataSources);
|
|
989
|
+
valueKeys.forEach(function (val) {
|
|
990
|
+
var valIndices = lodash_1.cloneDeep(splitDataSources[val]);
|
|
991
|
+
splitDataSources[val] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
|
|
992
|
+
splitDataSources[val].primary.data.fields = cloneFields;
|
|
993
|
+
splitDataSources[val].primary.data.columns = [];
|
|
994
|
+
columns.forEach(function (col, idx) {
|
|
995
|
+
if (idx !== splitByIndex) {
|
|
996
|
+
var newCol = valIndices.map(function (valIdx) {
|
|
997
|
+
return col[valIdx];
|
|
998
|
+
});
|
|
999
|
+
splitDataSources[val].primary.data.columns.push(newCol);
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
} else {
|
|
1004
|
+
errorCode = 'INVALID_SPLIT_BY_FIELD';
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
return {
|
|
1008
|
+
splitDataSources: splitDataSources,
|
|
1009
|
+
errorCode: errorCode
|
|
1010
|
+
};
|
|
1011
|
+
};
|
|
1012
|
+
|
|
1013
|
+
exports.dataSourcesSplitByModeStatsorUnknown = dataSourcesSplitByModeStatsorUnknown;
|
|
1014
|
+
|
|
1015
|
+
var getTrellisDataSourcesBySplitMode = function getTrellisDataSourcesBySplitMode(splitMode, dataSources, trellisSplitBy) {
|
|
1016
|
+
var result = null;
|
|
1017
|
+
|
|
1018
|
+
try {
|
|
1019
|
+
if (splitMode === trellisUtils_1.TIMECHART) {
|
|
1020
|
+
result = trellisSplitBy === exports.AGGREGATIONS ? exports.dataSourcesSplitByAggregationsTimechartAndChart(dataSources) : exports.dataSourcesSplitByModeTimechart(dataSources, trellisSplitBy);
|
|
1021
|
+
} else if (splitMode === trellisUtils_1.STATS) {
|
|
1022
|
+
result = trellisSplitBy === exports.AGGREGATIONS ? exports.dataSourcesSplitByAggregationsStats(dataSources) : exports.dataSourcesSplitByModeStatsorUnknown(dataSources, trellisSplitBy, trellisUtils_1.STATS);
|
|
1023
|
+
} else if (splitMode === trellisUtils_1.CHART) {
|
|
1024
|
+
result = trellisSplitBy === exports.AGGREGATIONS ? exports.dataSourcesSplitByAggregationsTimechartAndChart(dataSources) : exports.dataSourcesSplitByModeChart(dataSources, trellisSplitBy);
|
|
1025
|
+
} else if (splitMode === trellisUtils_1.UNKNOWN) {
|
|
1026
|
+
result = trellisSplitBy === exports.AGGREGATIONS ? exports.dataSourcesSplitByAggregationsUnknown(dataSources) : exports.dataSourcesSplitByModeStatsorUnknown(dataSources, trellisSplitBy, trellisUtils_1.UNKNOWN);
|
|
1027
|
+
}
|
|
1028
|
+
} catch (ex) {
|
|
1029
|
+
console.error('getTrellisDataSourcesBySplitMode ', ex);
|
|
1030
|
+
result = {
|
|
1031
|
+
splitDataSources: null,
|
|
1032
|
+
errorCode: 'UNKNOWN'
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
return result;
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
exports.getTrellisDataSourcesBySplitMode = getTrellisDataSourcesBySplitMode;
|
|
1040
|
+
|
|
1041
|
+
/***/ }),
|
|
1042
|
+
|
|
1043
|
+
/***/ 108:
|
|
1044
|
+
/***/ (function(module, exports) {
|
|
1045
|
+
|
|
1046
|
+
module.exports = require("@splunk/react-sparkline/Line");
|
|
1047
|
+
|
|
1048
|
+
/***/ }),
|
|
1049
|
+
|
|
1050
|
+
/***/ 11:
|
|
1051
|
+
/***/ (function(module, exports) {
|
|
1052
|
+
|
|
1053
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
1054
|
+
|
|
166
1055
|
/***/ }),
|
|
167
1056
|
|
|
168
1057
|
/***/ 12:
|
|
@@ -182,13 +1071,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
182
1071
|
value: true
|
|
183
1072
|
});
|
|
184
1073
|
|
|
185
|
-
var React = __webpack_require__(
|
|
1074
|
+
var React = __webpack_require__(0);
|
|
186
1075
|
|
|
187
1076
|
var styled_components_1 = __webpack_require__(4);
|
|
188
1077
|
|
|
189
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
1078
|
+
var SizeAwareWrapper_1 = __webpack_require__(18);
|
|
190
1079
|
|
|
191
|
-
var style_1 = __webpack_require__(
|
|
1080
|
+
var style_1 = __webpack_require__(14);
|
|
192
1081
|
|
|
193
1082
|
var colorUtils_1 = __webpack_require__(12);
|
|
194
1083
|
|
|
@@ -245,31 +1134,83 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
245
1134
|
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
246
1135
|
}
|
|
247
1136
|
|
|
248
|
-
return React.createElement(FixSizeItem, {
|
|
249
|
-
"data-test": "fix-size-item",
|
|
250
|
-
"data-splunk-visualization-version": "25.
|
|
251
|
-
width: width,
|
|
252
|
-
height: height,
|
|
253
|
-
backgroundColor: backgroundColor
|
|
254
|
-
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
255
|
-
var newWidth = _ref3.width,
|
|
256
|
-
newHeight = _ref3.height;
|
|
257
|
-
return React.createElement(Viz, Object.assign({}, props, {
|
|
258
|
-
width: newWidth,
|
|
259
|
-
height: newHeight
|
|
260
|
-
}));
|
|
261
|
-
})));
|
|
262
|
-
};
|
|
1137
|
+
return React.createElement(FixSizeItem, {
|
|
1138
|
+
"data-test": "fix-size-item",
|
|
1139
|
+
"data-splunk-visualization-version": "25.7.0 - d10a7789b",
|
|
1140
|
+
width: width,
|
|
1141
|
+
height: height,
|
|
1142
|
+
backgroundColor: backgroundColor
|
|
1143
|
+
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
1144
|
+
var newWidth = _ref3.width,
|
|
1145
|
+
newHeight = _ref3.height;
|
|
1146
|
+
return React.createElement(Viz, Object.assign({}, props, {
|
|
1147
|
+
width: newWidth,
|
|
1148
|
+
height: newHeight
|
|
1149
|
+
}));
|
|
1150
|
+
})));
|
|
1151
|
+
};
|
|
1152
|
+
|
|
1153
|
+
FixedSizeContainer.displayName = 'withFixedSizeContainer';
|
|
1154
|
+
return FixedSizeContainer;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
exports.default = withFixedSizeContainer;
|
|
1158
|
+
|
|
1159
|
+
/***/ }),
|
|
1160
|
+
|
|
1161
|
+
/***/ 133:
|
|
1162
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1163
|
+
|
|
1164
|
+
"use strict";
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1168
|
+
value: true
|
|
1169
|
+
});
|
|
1170
|
+
exports.defaultContext = void 0;
|
|
1171
|
+
exports.defaultContext = {
|
|
1172
|
+
trendColorConfig: [{
|
|
1173
|
+
to: 0,
|
|
1174
|
+
value: '#9E2520'
|
|
1175
|
+
}, {
|
|
1176
|
+
from: 0,
|
|
1177
|
+
value: '#1C6B2D'
|
|
1178
|
+
}],
|
|
1179
|
+
majorColorConfig: [{
|
|
1180
|
+
to: 20,
|
|
1181
|
+
value: '#D41F1F'
|
|
1182
|
+
}, {
|
|
1183
|
+
from: 20,
|
|
1184
|
+
to: 40,
|
|
1185
|
+
value: '#D94E17'
|
|
1186
|
+
}, {
|
|
1187
|
+
from: 40,
|
|
1188
|
+
to: 60,
|
|
1189
|
+
value: '#CBA700'
|
|
1190
|
+
}, {
|
|
1191
|
+
from: 60,
|
|
1192
|
+
to: 80,
|
|
1193
|
+
value: '#669922'
|
|
1194
|
+
}, {
|
|
1195
|
+
from: 80,
|
|
1196
|
+
value: '#118832'
|
|
1197
|
+
}],
|
|
1198
|
+
majorColorMatchConfig: [{
|
|
1199
|
+
match: '',
|
|
1200
|
+
value: '#5C33FF'
|
|
1201
|
+
}]
|
|
1202
|
+
};
|
|
1203
|
+
|
|
1204
|
+
/***/ }),
|
|
263
1205
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
};
|
|
1206
|
+
/***/ 14:
|
|
1207
|
+
/***/ (function(module, exports) {
|
|
267
1208
|
|
|
268
|
-
exports
|
|
1209
|
+
module.exports = require("@splunk/visualizations-shared/style");
|
|
269
1210
|
|
|
270
1211
|
/***/ }),
|
|
271
1212
|
|
|
272
|
-
/***/
|
|
1213
|
+
/***/ 15:
|
|
273
1214
|
/***/ (function(module, exports, __webpack_require__) {
|
|
274
1215
|
|
|
275
1216
|
"use strict";
|
|
@@ -302,29 +1243,36 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
|
302
1243
|
|
|
303
1244
|
/***/ }),
|
|
304
1245
|
|
|
305
|
-
/***/
|
|
1246
|
+
/***/ 16:
|
|
306
1247
|
/***/ (function(module, exports) {
|
|
307
1248
|
|
|
308
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
1249
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
309
1250
|
|
|
310
1251
|
/***/ }),
|
|
311
1252
|
|
|
312
|
-
/***/
|
|
1253
|
+
/***/ 17:
|
|
313
1254
|
/***/ (function(module, exports) {
|
|
314
1255
|
|
|
315
|
-
module.exports = require("@
|
|
1256
|
+
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
316
1257
|
|
|
317
1258
|
/***/ }),
|
|
318
1259
|
|
|
319
|
-
/***/
|
|
1260
|
+
/***/ 18:
|
|
1261
|
+
/***/ (function(module, exports) {
|
|
1262
|
+
|
|
1263
|
+
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
1264
|
+
|
|
1265
|
+
/***/ }),
|
|
1266
|
+
|
|
1267
|
+
/***/ 19:
|
|
320
1268
|
/***/ (function(module, exports, __webpack_require__) {
|
|
321
1269
|
|
|
322
1270
|
"use strict";
|
|
323
1271
|
|
|
324
1272
|
|
|
325
|
-
var _toConsumableArray = __webpack_require__(
|
|
1273
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
326
1274
|
|
|
327
|
-
var _defineProperty = __webpack_require__(
|
|
1275
|
+
var _defineProperty = __webpack_require__(8);
|
|
328
1276
|
|
|
329
1277
|
var __rest = this && this.__rest || function (s, e) {
|
|
330
1278
|
var t = {};
|
|
@@ -553,42 +1501,42 @@ exports.insertLayout = insertLayout;
|
|
|
553
1501
|
|
|
554
1502
|
/***/ }),
|
|
555
1503
|
|
|
556
|
-
/***/
|
|
1504
|
+
/***/ 2:
|
|
557
1505
|
/***/ (function(module, exports) {
|
|
558
1506
|
|
|
559
|
-
module.exports = require("@splunk/
|
|
1507
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
560
1508
|
|
|
561
1509
|
/***/ }),
|
|
562
1510
|
|
|
563
|
-
/***/
|
|
1511
|
+
/***/ 20:
|
|
564
1512
|
/***/ (function(module, exports) {
|
|
565
1513
|
|
|
566
|
-
module.exports = require("@
|
|
1514
|
+
module.exports = require("@splunk/visualization-context/FeatureFlagContext");
|
|
567
1515
|
|
|
568
1516
|
/***/ }),
|
|
569
1517
|
|
|
570
|
-
/***/
|
|
1518
|
+
/***/ 21:
|
|
571
1519
|
/***/ (function(module, exports) {
|
|
572
1520
|
|
|
573
|
-
module.exports = require("@splunk/
|
|
1521
|
+
module.exports = require("@splunk/visualizations-shared/configUtils");
|
|
574
1522
|
|
|
575
1523
|
/***/ }),
|
|
576
1524
|
|
|
577
|
-
/***/
|
|
1525
|
+
/***/ 22:
|
|
578
1526
|
/***/ (function(module, exports) {
|
|
579
1527
|
|
|
580
|
-
module.exports = require("@
|
|
1528
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
581
1529
|
|
|
582
1530
|
/***/ }),
|
|
583
1531
|
|
|
584
|
-
/***/
|
|
1532
|
+
/***/ 23:
|
|
585
1533
|
/***/ (function(module, exports) {
|
|
586
1534
|
|
|
587
1535
|
module.exports = require("@splunk/themes/pick");
|
|
588
1536
|
|
|
589
1537
|
/***/ }),
|
|
590
1538
|
|
|
591
|
-
/***/
|
|
1539
|
+
/***/ 24:
|
|
592
1540
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
593
1541
|
|
|
594
1542
|
"use strict";
|
|
@@ -623,17 +1571,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
623
1571
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lighten", function() { return lighten; });
|
|
624
1572
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darken", function() { return darken; });
|
|
625
1573
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "handleValueClickCallback", function() { return handleValueClickCallback; });
|
|
626
|
-
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1574
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
|
627
1575
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
628
1576
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
629
1577
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
|
630
1578
|
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30);
|
|
631
1579
|
/* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_2__);
|
|
632
|
-
/* harmony import */ var _splunk_visualizations_shared_domUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
1580
|
+
/* harmony import */ var _splunk_visualizations_shared_domUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54);
|
|
633
1581
|
/* harmony import */ var _splunk_visualizations_shared_domUtils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_domUtils__WEBPACK_IMPORTED_MODULE_3__);
|
|
634
|
-
/* harmony import */ var _splunk_visualizations_shared_propUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
1582
|
+
/* harmony import */ var _splunk_visualizations_shared_propUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28);
|
|
635
1583
|
/* harmony import */ var _splunk_visualizations_shared_propUtils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_propUtils__WEBPACK_IMPORTED_MODULE_4__);
|
|
636
|
-
/* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
1584
|
+
/* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49);
|
|
637
1585
|
/* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_5__);
|
|
638
1586
|
|
|
639
1587
|
|
|
@@ -1585,11 +2533,22 @@ var darken = function darken(color) {
|
|
|
1585
2533
|
*/
|
|
1586
2534
|
|
|
1587
2535
|
var handleValueClickCallback = function handleValueClickCallback(ev, majorValue, majorValueField, trendValue, onValueClick) {
|
|
2536
|
+
var trellisEnabled = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
2537
|
+
var trellisSplityBy = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '';
|
|
2538
|
+
var trellisKey = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : '';
|
|
1588
2539
|
var payload = {
|
|
1589
2540
|
trendValue: trendValue,
|
|
1590
2541
|
value: majorValue,
|
|
1591
2542
|
name: majorValueField
|
|
1592
2543
|
};
|
|
2544
|
+
|
|
2545
|
+
if (trellisEnabled) {
|
|
2546
|
+
payload = _objectSpread(_objectSpread({}, payload), {}, {
|
|
2547
|
+
'trellis.name': trellisSplityBy,
|
|
2548
|
+
'trellis.value': trellisKey
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
|
|
1593
2552
|
return onValueClick(_objectSpread(_objectSpread({}, ev), {}, {
|
|
1594
2553
|
payload: payload
|
|
1595
2554
|
}));
|
|
@@ -1597,35 +2556,56 @@ var handleValueClickCallback = function handleValueClickCallback(ev, majorValue,
|
|
|
1597
2556
|
|
|
1598
2557
|
/***/ }),
|
|
1599
2558
|
|
|
1600
|
-
/***/
|
|
2559
|
+
/***/ 25:
|
|
1601
2560
|
/***/ (function(module, exports) {
|
|
1602
2561
|
|
|
1603
2562
|
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
1604
2563
|
|
|
1605
2564
|
/***/ }),
|
|
1606
2565
|
|
|
1607
|
-
/***/
|
|
2566
|
+
/***/ 26:
|
|
2567
|
+
/***/ (function(module, exports) {
|
|
2568
|
+
|
|
2569
|
+
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
2570
|
+
|
|
2571
|
+
/***/ }),
|
|
2572
|
+
|
|
2573
|
+
/***/ 27:
|
|
2574
|
+
/***/ (function(module, exports) {
|
|
2575
|
+
|
|
2576
|
+
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
2577
|
+
|
|
2578
|
+
/***/ }),
|
|
2579
|
+
|
|
2580
|
+
/***/ 28:
|
|
1608
2581
|
/***/ (function(module, exports) {
|
|
1609
2582
|
|
|
1610
2583
|
module.exports = require("@splunk/visualizations-shared/propUtils");
|
|
1611
2584
|
|
|
1612
2585
|
/***/ }),
|
|
1613
2586
|
|
|
1614
|
-
/***/
|
|
2587
|
+
/***/ 29:
|
|
1615
2588
|
/***/ (function(module, exports) {
|
|
1616
2589
|
|
|
1617
|
-
module.exports = require("@splunk/
|
|
2590
|
+
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1618
2591
|
|
|
1619
2592
|
/***/ }),
|
|
1620
2593
|
|
|
1621
|
-
/***/
|
|
2594
|
+
/***/ 3:
|
|
1622
2595
|
/***/ (function(module, exports) {
|
|
1623
2596
|
|
|
1624
|
-
module.exports = require("
|
|
2597
|
+
module.exports = require("lodash");
|
|
1625
2598
|
|
|
1626
2599
|
/***/ }),
|
|
1627
2600
|
|
|
1628
|
-
/***/
|
|
2601
|
+
/***/ 30:
|
|
2602
|
+
/***/ (function(module, exports) {
|
|
2603
|
+
|
|
2604
|
+
module.exports = require("@splunk/visualizations-shared/numberUtils");
|
|
2605
|
+
|
|
2606
|
+
/***/ }),
|
|
2607
|
+
|
|
2608
|
+
/***/ 31:
|
|
1629
2609
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1630
2610
|
|
|
1631
2611
|
"use strict";
|
|
@@ -1636,15 +2616,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1636
2616
|
});
|
|
1637
2617
|
exports.shouldShowIconPlaceholder = void 0;
|
|
1638
2618
|
|
|
1639
|
-
var React = __webpack_require__(
|
|
2619
|
+
var React = __webpack_require__(0);
|
|
1640
2620
|
|
|
1641
|
-
var T = __webpack_require__(
|
|
2621
|
+
var T = __webpack_require__(1);
|
|
1642
2622
|
|
|
1643
2623
|
var lodash_1 = __webpack_require__(3);
|
|
1644
2624
|
|
|
1645
2625
|
var i18n_1 = __webpack_require__(2);
|
|
1646
2626
|
|
|
1647
|
-
var Message_1 = __webpack_require__(
|
|
2627
|
+
var Message_1 = __webpack_require__(9);
|
|
1648
2628
|
|
|
1649
2629
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1650
2630
|
/**
|
|
@@ -1717,24 +2697,31 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
|
1717
2697
|
|
|
1718
2698
|
/***/ }),
|
|
1719
2699
|
|
|
1720
|
-
/***/
|
|
2700
|
+
/***/ 32:
|
|
2701
|
+
/***/ (function(module, exports) {
|
|
2702
|
+
|
|
2703
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
2704
|
+
|
|
2705
|
+
/***/ }),
|
|
2706
|
+
|
|
2707
|
+
/***/ 33:
|
|
1721
2708
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1722
2709
|
|
|
1723
2710
|
"use strict";
|
|
1724
2711
|
|
|
1725
2712
|
|
|
1726
|
-
var _defineProperty = __webpack_require__(
|
|
2713
|
+
var _defineProperty = __webpack_require__(8);
|
|
1727
2714
|
|
|
1728
2715
|
Object.defineProperty(exports, "__esModule", {
|
|
1729
2716
|
value: true
|
|
1730
2717
|
});
|
|
1731
2718
|
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
1732
2719
|
|
|
1733
|
-
var T = __webpack_require__(
|
|
2720
|
+
var T = __webpack_require__(1);
|
|
1734
2721
|
|
|
1735
2722
|
var lodash_1 = __webpack_require__(3);
|
|
1736
2723
|
|
|
1737
|
-
var DataSource_1 = __webpack_require__(
|
|
2724
|
+
var DataSource_1 = __webpack_require__(43);
|
|
1738
2725
|
|
|
1739
2726
|
exports.SortParamsPropTypes = T.shape({
|
|
1740
2727
|
currentSortKey: T.string,
|
|
@@ -1754,7 +2741,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
1754
2741
|
};
|
|
1755
2742
|
var onSort;
|
|
1756
2743
|
|
|
1757
|
-
if (
|
|
2744
|
+
if (typeof onRequestParamsChange === 'function') {
|
|
1758
2745
|
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
1759
2746
|
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
1760
2747
|
currentSortDir = requestParams.sort[currentSortKey];
|
|
@@ -1788,7 +2775,7 @@ exports.getSortingParams = getSortingParams;
|
|
|
1788
2775
|
|
|
1789
2776
|
/***/ }),
|
|
1790
2777
|
|
|
1791
|
-
/***/
|
|
2778
|
+
/***/ 34:
|
|
1792
2779
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1793
2780
|
|
|
1794
2781
|
"use strict";
|
|
@@ -1799,7 +2786,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1799
2786
|
});
|
|
1800
2787
|
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
1801
2788
|
|
|
1802
|
-
var T = __webpack_require__(
|
|
2789
|
+
var T = __webpack_require__(1);
|
|
1803
2790
|
|
|
1804
2791
|
var lodash_1 = __webpack_require__(3);
|
|
1805
2792
|
|
|
@@ -1819,7 +2806,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
1819
2806
|
var count = requestParams && requestParams.count;
|
|
1820
2807
|
var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
1821
2808
|
var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
1822
|
-
var isPaging = totalPages > 1 &&
|
|
2809
|
+
var isPaging = totalPages > 1 && typeof onRequestParamsChange === 'function';
|
|
1823
2810
|
|
|
1824
2811
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
1825
2812
|
var page = _ref2.page,
|
|
@@ -1845,7 +2832,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
1845
2832
|
isPaging: isPaging,
|
|
1846
2833
|
current: current,
|
|
1847
2834
|
totalPages: totalPages,
|
|
1848
|
-
onChange:
|
|
2835
|
+
onChange: typeof onRequestParamsChange === 'function' ? onChangeHandler : lodash_1.noop
|
|
1849
2836
|
};
|
|
1850
2837
|
};
|
|
1851
2838
|
|
|
@@ -1853,21 +2840,7 @@ exports.getPaginationParams = getPaginationParams;
|
|
|
1853
2840
|
|
|
1854
2841
|
/***/ }),
|
|
1855
2842
|
|
|
1856
|
-
/***/
|
|
1857
|
-
/***/ (function(module, exports) {
|
|
1858
|
-
|
|
1859
|
-
module.exports = require("lodash");
|
|
1860
|
-
|
|
1861
|
-
/***/ }),
|
|
1862
|
-
|
|
1863
|
-
/***/ 30:
|
|
1864
|
-
/***/ (function(module, exports) {
|
|
1865
|
-
|
|
1866
|
-
module.exports = require("@splunk/visualizations-shared/numberUtils");
|
|
1867
|
-
|
|
1868
|
-
/***/ }),
|
|
1869
|
-
|
|
1870
|
-
/***/ 31:
|
|
2843
|
+
/***/ 35:
|
|
1871
2844
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1872
2845
|
|
|
1873
2846
|
"use strict";
|
|
@@ -1896,58 +2869,67 @@ var VizCategory;
|
|
|
1896
2869
|
|
|
1897
2870
|
/***/ }),
|
|
1898
2871
|
|
|
1899
|
-
/***/
|
|
2872
|
+
/***/ 36:
|
|
1900
2873
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1901
2874
|
|
|
1902
2875
|
"use strict";
|
|
1903
2876
|
|
|
1904
2877
|
|
|
2878
|
+
var _slicedToArray = __webpack_require__(17);
|
|
2879
|
+
|
|
1905
2880
|
Object.defineProperty(exports, "__esModule", {
|
|
1906
2881
|
value: true
|
|
1907
2882
|
});
|
|
1908
2883
|
|
|
1909
|
-
var React = __webpack_require__(
|
|
2884
|
+
var React = __webpack_require__(0);
|
|
1910
2885
|
|
|
1911
2886
|
var lodash_1 = __webpack_require__(3);
|
|
1912
2887
|
|
|
1913
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
2888
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(37);
|
|
2889
|
+
|
|
2890
|
+
var Options_1 = __webpack_require__(29);
|
|
1914
2891
|
|
|
1915
|
-
var
|
|
2892
|
+
var SanitizeProps_1 = __webpack_require__(38);
|
|
1916
2893
|
|
|
1917
|
-
var
|
|
2894
|
+
var TimezoneContext_1 = __webpack_require__(25);
|
|
1918
2895
|
|
|
1919
|
-
var
|
|
2896
|
+
var moment_1 = __webpack_require__(39);
|
|
1920
2897
|
|
|
1921
|
-
var
|
|
2898
|
+
var FeatureFlagContext_1 = __webpack_require__(20);
|
|
1922
2899
|
|
|
1923
2900
|
var styled_components_1 = __webpack_require__(4);
|
|
1924
2901
|
|
|
1925
|
-
var hocUtils_1 = __webpack_require__(
|
|
2902
|
+
var hocUtils_1 = __webpack_require__(26);
|
|
1926
2903
|
|
|
1927
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
2904
|
+
var JSONSchemaUtils_1 = __webpack_require__(27);
|
|
1928
2905
|
|
|
1929
|
-
var
|
|
2906
|
+
var async_dynamic_options_evaluator_1 = __webpack_require__(40);
|
|
2907
|
+
|
|
2908
|
+
var id_1 = __webpack_require__(32);
|
|
2909
|
+
|
|
2910
|
+
var SplunkVisualization_1 = __webpack_require__(41);
|
|
1930
2911
|
|
|
1931
2912
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1932
2913
|
|
|
1933
|
-
var getSorting_1 = __webpack_require__(
|
|
2914
|
+
var getSorting_1 = __webpack_require__(33);
|
|
1934
2915
|
|
|
1935
|
-
var getPagination_1 = __webpack_require__(
|
|
2916
|
+
var getPagination_1 = __webpack_require__(34);
|
|
1936
2917
|
|
|
1937
|
-
var useDeepMemo_1 = __webpack_require__(
|
|
2918
|
+
var useDeepMemo_1 = __webpack_require__(44);
|
|
1938
2919
|
|
|
1939
|
-
var MissingPropsMessage_1 = __webpack_require__(
|
|
2920
|
+
var MissingPropsMessage_1 = __webpack_require__(45);
|
|
1940
2921
|
|
|
1941
|
-
var withEditModeCover_1 = __webpack_require__(
|
|
2922
|
+
var withEditModeCover_1 = __webpack_require__(46);
|
|
1942
2923
|
|
|
1943
|
-
var withPlaceholder_1 = __webpack_require__(
|
|
2924
|
+
var withPlaceholder_1 = __webpack_require__(47);
|
|
2925
|
+
|
|
2926
|
+
var UUID = id_1.createGUID();
|
|
1944
2927
|
/**
|
|
1945
2928
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
1946
2929
|
* @param {DashboardVizOpts} opts
|
|
1947
2930
|
* @returns {HOC}
|
|
1948
2931
|
*/
|
|
1949
2932
|
|
|
1950
|
-
|
|
1951
2933
|
var withDashboardViz = function withDashboardViz(opts) {
|
|
1952
2934
|
var ReactViz = opts.ReactViz,
|
|
1953
2935
|
vizConfig = opts.vizConfig,
|
|
@@ -1960,6 +2942,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1960
2942
|
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
|
|
1961
2943
|
|
|
1962
2944
|
var DashboardViz = function DashboardViz(props) {
|
|
2945
|
+
var _a;
|
|
2946
|
+
|
|
1963
2947
|
var mode = props.mode,
|
|
1964
2948
|
hasEventHandlers = props.hasEventHandlers,
|
|
1965
2949
|
dataSources = props.dataSources,
|
|
@@ -2007,38 +2991,97 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
2007
2991
|
|
|
2008
2992
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
2009
2993
|
|
|
2994
|
+
var _React$useState = React.useState({}),
|
|
2995
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2996
|
+
evaluatedOptionsAsync = _React$useState2[0],
|
|
2997
|
+
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
2998
|
+
|
|
2999
|
+
|
|
3000
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
3001
|
+
|
|
3002
|
+
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(UUID)),
|
|
3003
|
+
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
3004
|
+
visualizationID = _React$useState4[0];
|
|
3005
|
+
|
|
3006
|
+
var _React$useState5 = React.useState(Boolean(featureFlagContext && featureFlagContext.visualizations_useWebWorkersForDSL && typeof Worker !== 'undefined')),
|
|
3007
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
3008
|
+
useAsyncEvaluatedOptions = _React$useState6[0],
|
|
3009
|
+
setUseAsyncEvaluatedOptions = _React$useState6[1];
|
|
3010
|
+
|
|
2010
3011
|
evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
|
|
2011
3012
|
try {
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
3013
|
+
if (useAsyncEvaluatedOptions) {
|
|
3014
|
+
var optionsToEvaluate = {
|
|
3015
|
+
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
3016
|
+
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
3017
|
+
};
|
|
3018
|
+
var asyncDynamicOptionsEvaluatorParams = {
|
|
3019
|
+
visualizationID: visualizationID,
|
|
3020
|
+
props: props,
|
|
3021
|
+
options: optionsToEvaluate,
|
|
3022
|
+
dataSources: dataSources,
|
|
3023
|
+
theme: vizConfig.themes
|
|
3024
|
+
};
|
|
3025
|
+
async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
|
|
3026
|
+
setEvaluatedOptionsAsync(results.results);
|
|
3027
|
+
}).catch(function (e) {
|
|
3028
|
+
// eslint-disable-next-line no-console
|
|
3029
|
+
console.error("unexpected error evaluating options - async: ".concat(e.message));
|
|
3030
|
+
setUseAsyncEvaluatedOptions(false);
|
|
3031
|
+
});
|
|
3032
|
+
} else {
|
|
3033
|
+
return Options_1.Options.evaluate({
|
|
3034
|
+
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
3035
|
+
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
3036
|
+
}, dataSources, themeFunc);
|
|
3037
|
+
}
|
|
2016
3038
|
} catch (e) {
|
|
2017
3039
|
// eslint-disable-next-line no-console
|
|
2018
|
-
console.error("unexpected error evaluating options:
|
|
3040
|
+
console.error("unexpected error evaluating options: ".concat(e.message));
|
|
2019
3041
|
return {};
|
|
2020
3042
|
}
|
|
2021
|
-
|
|
3043
|
+
|
|
3044
|
+
return {};
|
|
3045
|
+
}, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
|
|
3046
|
+
var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // trellis specific backgroundColor update for onComputedProps
|
|
3047
|
+
// 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
|
|
3048
|
+
// onComputedProps api should return back trellisBackgroundColor value for backgroundColor option to support coloring of sibling panels (for eg:- title/ description on UDF side)
|
|
3049
|
+
|
|
3050
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
3051
|
+
var clonedEvaluatedOptions = lodash_1.cloneDeep(evaluatedOptionsToUse);
|
|
3052
|
+
|
|
3053
|
+
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) {
|
|
3054
|
+
clonedEvaluatedOptions.backgroundColor = clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor;
|
|
3055
|
+
} // useEffect hook needs to be initialized before any early returns
|
|
2022
3056
|
// this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
|
|
2023
3057
|
|
|
3058
|
+
|
|
2024
3059
|
React.useEffect(function () {
|
|
2025
|
-
onComputedProps(
|
|
2026
|
-
});
|
|
3060
|
+
onComputedProps(clonedEvaluatedOptions);
|
|
3061
|
+
});
|
|
3062
|
+
React.useEffect(function () {
|
|
3063
|
+
return function () {
|
|
3064
|
+
if (useAsyncEvaluatedOptions) {
|
|
3065
|
+
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
3066
|
+
}
|
|
3067
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3068
|
+
}, []); // present warning message if any required props are missing
|
|
2027
3069
|
|
|
2028
3070
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
2029
3071
|
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
2030
3072
|
supports = vizConfig.supports;
|
|
2031
|
-
var missing = MissingPropsMessage_1.missingKeys(requiredProps,
|
|
2032
|
-
|
|
2033
|
-
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER)
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
3073
|
+
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
3074
|
+
|
|
3075
|
+
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
|
|
3076
|
+
) {
|
|
3077
|
+
return React.createElement(MissingPropsMessage_1.default, {
|
|
3078
|
+
"data-test": "missing-props-message",
|
|
3079
|
+
width: width,
|
|
3080
|
+
height: height,
|
|
3081
|
+
missingProps: missing,
|
|
3082
|
+
backgroundColor: bgColorFromTheme
|
|
3083
|
+
});
|
|
3084
|
+
} // events
|
|
2042
3085
|
|
|
2043
3086
|
|
|
2044
3087
|
var eventCallbackProps = {};
|
|
@@ -2055,7 +3098,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
2055
3098
|
|
|
2056
3099
|
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
2057
3100
|
payloadKeys.forEach(function (p) {
|
|
2058
|
-
payload[p] =
|
|
3101
|
+
payload[p] = evaluatedOptionsToUse[p];
|
|
2059
3102
|
});
|
|
2060
3103
|
}
|
|
2061
3104
|
|
|
@@ -2074,7 +3117,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
2074
3117
|
} // compute pure viz props which are not from options
|
|
2075
3118
|
|
|
2076
3119
|
|
|
2077
|
-
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props),
|
|
3120
|
+
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
2078
3121
|
themeFunc: themeFunc
|
|
2079
3122
|
}));
|
|
2080
3123
|
/**
|
|
@@ -2094,7 +3137,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
2094
3137
|
|
|
2095
3138
|
var dataSourceMetadata = {};
|
|
2096
3139
|
var OptionKey = 'paginateDataSourceKey';
|
|
2097
|
-
var paginateDataSourceKey = lodash_1.has(
|
|
3140
|
+
var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
2098
3141
|
|
|
2099
3142
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
|
|
2100
3143
|
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
@@ -2124,7 +3167,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
2124
3167
|
mode: mode,
|
|
2125
3168
|
width: width,
|
|
2126
3169
|
height: height
|
|
2127
|
-
},
|
|
3170
|
+
}, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
|
|
2128
3171
|
};
|
|
2129
3172
|
|
|
2130
3173
|
DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
|
|
@@ -2142,35 +3185,42 @@ exports.default = withDashboardViz;
|
|
|
2142
3185
|
|
|
2143
3186
|
/***/ }),
|
|
2144
3187
|
|
|
2145
|
-
/***/
|
|
3188
|
+
/***/ 37:
|
|
2146
3189
|
/***/ (function(module, exports) {
|
|
2147
3190
|
|
|
2148
3191
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
2149
3192
|
|
|
2150
3193
|
/***/ }),
|
|
2151
3194
|
|
|
2152
|
-
/***/
|
|
3195
|
+
/***/ 38:
|
|
2153
3196
|
/***/ (function(module, exports) {
|
|
2154
3197
|
|
|
2155
|
-
module.exports = require("@splunk/
|
|
3198
|
+
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
2156
3199
|
|
|
2157
3200
|
/***/ }),
|
|
2158
3201
|
|
|
2159
|
-
/***/
|
|
3202
|
+
/***/ 39:
|
|
2160
3203
|
/***/ (function(module, exports) {
|
|
2161
3204
|
|
|
2162
|
-
module.exports = require("@splunk/
|
|
3205
|
+
module.exports = require("@splunk/moment");
|
|
2163
3206
|
|
|
2164
3207
|
/***/ }),
|
|
2165
3208
|
|
|
2166
|
-
/***/
|
|
3209
|
+
/***/ 4:
|
|
2167
3210
|
/***/ (function(module, exports) {
|
|
2168
3211
|
|
|
2169
|
-
module.exports = require("
|
|
3212
|
+
module.exports = require("styled-components");
|
|
2170
3213
|
|
|
2171
3214
|
/***/ }),
|
|
2172
3215
|
|
|
2173
|
-
/***/
|
|
3216
|
+
/***/ 40:
|
|
3217
|
+
/***/ (function(module, exports) {
|
|
3218
|
+
|
|
3219
|
+
module.exports = require("@splunk/async-dynamic-options-evaluator");
|
|
3220
|
+
|
|
3221
|
+
/***/ }),
|
|
3222
|
+
|
|
3223
|
+
/***/ 41:
|
|
2174
3224
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2175
3225
|
|
|
2176
3226
|
"use strict";
|
|
@@ -2184,11 +3234,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2184
3234
|
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
2185
3235
|
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
2186
3236
|
|
|
2187
|
-
var T = __webpack_require__(
|
|
3237
|
+
var T = __webpack_require__(1);
|
|
2188
3238
|
|
|
2189
3239
|
var lodash_1 = __webpack_require__(3);
|
|
2190
3240
|
|
|
2191
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
3241
|
+
var VizActionHandler_1 = __webpack_require__(42); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
2192
3242
|
|
|
2193
3243
|
|
|
2194
3244
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -2322,7 +3372,7 @@ exports.default = SplunkVisualization;
|
|
|
2322
3372
|
|
|
2323
3373
|
/***/ }),
|
|
2324
3374
|
|
|
2325
|
-
/***/
|
|
3375
|
+
/***/ 42:
|
|
2326
3376
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2327
3377
|
|
|
2328
3378
|
"use strict";
|
|
@@ -2330,7 +3380,7 @@ exports.default = SplunkVisualization;
|
|
|
2330
3380
|
|
|
2331
3381
|
var _classCallCheck = __webpack_require__(11);
|
|
2332
3382
|
|
|
2333
|
-
var _createClass = __webpack_require__(
|
|
3383
|
+
var _createClass = __webpack_require__(22);
|
|
2334
3384
|
|
|
2335
3385
|
Object.defineProperty(exports, "__esModule", {
|
|
2336
3386
|
value: true
|
|
@@ -2360,7 +3410,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
|
2360
3410
|
|
|
2361
3411
|
/***/ }),
|
|
2362
3412
|
|
|
2363
|
-
/***/
|
|
3413
|
+
/***/ 43:
|
|
2364
3414
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2365
3415
|
|
|
2366
3416
|
"use strict";
|
|
@@ -2374,14 +3424,7 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
|
2374
3424
|
|
|
2375
3425
|
/***/ }),
|
|
2376
3426
|
|
|
2377
|
-
/***/
|
|
2378
|
-
/***/ (function(module, exports) {
|
|
2379
|
-
|
|
2380
|
-
module.exports = require("styled-components");
|
|
2381
|
-
|
|
2382
|
-
/***/ }),
|
|
2383
|
-
|
|
2384
|
-
/***/ 40:
|
|
3427
|
+
/***/ 44:
|
|
2385
3428
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2386
3429
|
|
|
2387
3430
|
"use strict";
|
|
@@ -2392,7 +3435,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2392
3435
|
});
|
|
2393
3436
|
exports.useDeepMemo = void 0;
|
|
2394
3437
|
|
|
2395
|
-
var react_1 = __webpack_require__(
|
|
3438
|
+
var react_1 = __webpack_require__(0);
|
|
2396
3439
|
|
|
2397
3440
|
var lodash_1 = __webpack_require__(3);
|
|
2398
3441
|
/**
|
|
@@ -2427,7 +3470,7 @@ exports.useDeepMemo = useDeepMemo;
|
|
|
2427
3470
|
|
|
2428
3471
|
/***/ }),
|
|
2429
3472
|
|
|
2430
|
-
/***/
|
|
3473
|
+
/***/ 45:
|
|
2431
3474
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2432
3475
|
|
|
2433
3476
|
"use strict";
|
|
@@ -2438,13 +3481,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2438
3481
|
});
|
|
2439
3482
|
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
2440
3483
|
|
|
2441
|
-
var React = __webpack_require__(
|
|
3484
|
+
var React = __webpack_require__(0);
|
|
2442
3485
|
|
|
2443
|
-
var T = __webpack_require__(
|
|
3486
|
+
var T = __webpack_require__(1);
|
|
2444
3487
|
|
|
2445
3488
|
var i18n_1 = __webpack_require__(2);
|
|
2446
3489
|
|
|
2447
|
-
var Message_1 = __webpack_require__(
|
|
3490
|
+
var Message_1 = __webpack_require__(9);
|
|
2448
3491
|
|
|
2449
3492
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
2450
3493
|
/**
|
|
@@ -2508,7 +3551,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
|
2508
3551
|
|
|
2509
3552
|
/***/ }),
|
|
2510
3553
|
|
|
2511
|
-
/***/
|
|
3554
|
+
/***/ 46:
|
|
2512
3555
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2513
3556
|
|
|
2514
3557
|
"use strict";
|
|
@@ -2518,18 +3561,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2518
3561
|
value: true
|
|
2519
3562
|
});
|
|
2520
3563
|
|
|
2521
|
-
var React = __webpack_require__(
|
|
3564
|
+
var React = __webpack_require__(0);
|
|
2522
3565
|
|
|
2523
3566
|
var styled_components_1 = __webpack_require__(4);
|
|
2524
3567
|
|
|
2525
|
-
var hocUtils_1 = __webpack_require__(
|
|
3568
|
+
var hocUtils_1 = __webpack_require__(15);
|
|
2526
3569
|
|
|
2527
3570
|
var Cover = styled_components_1.default.div.withConfig({
|
|
2528
3571
|
displayName: "withEditModeCover__Cover",
|
|
2529
3572
|
componentId: "sc-1gsbnxb-0"
|
|
2530
3573
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
2531
3574
|
var Blocker = styled_components_1.default.div.attrs({
|
|
2532
|
-
'data-splunk-visualization-version': "25.
|
|
3575
|
+
'data-splunk-visualization-version': "25.7.0 - d10a7789b"
|
|
2533
3576
|
}).withConfig({
|
|
2534
3577
|
displayName: "withEditModeCover__Blocker",
|
|
2535
3578
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -2543,76 +3586,11 @@ var Blocker = styled_components_1.default.div.attrs({
|
|
|
2543
3586
|
|
|
2544
3587
|
var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
|
|
2545
3588
|
var Wrapper = function Wrapper(props) {
|
|
2546
|
-
var mode = props.mode;
|
|
2547
|
-
var showEditCover = mode === 'edit' && !disableEditModeCover;
|
|
2548
|
-
return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
|
|
2549
|
-
"data-test": "edit-mode-cover"
|
|
2550
|
-
}));
|
|
2551
|
-
};
|
|
2552
|
-
|
|
2553
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
2554
|
-
Wrapper: Wrapper,
|
|
2555
|
-
Visualization: Visualization
|
|
2556
|
-
});
|
|
2557
|
-
return Wrapper;
|
|
2558
|
-
};
|
|
2559
|
-
|
|
2560
|
-
exports.default = withEditModeCover;
|
|
2561
|
-
|
|
2562
|
-
/***/ }),
|
|
2563
|
-
|
|
2564
|
-
/***/ 43:
|
|
2565
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2566
|
-
|
|
2567
|
-
"use strict";
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2571
|
-
value: true
|
|
2572
|
-
});
|
|
2573
|
-
|
|
2574
|
-
var React = __webpack_require__(1);
|
|
2575
|
-
|
|
2576
|
-
var colorUtils_1 = __webpack_require__(12);
|
|
2577
|
-
|
|
2578
|
-
var variables_1 = __webpack_require__(9);
|
|
2579
|
-
|
|
2580
|
-
var IconPlaceholder_1 = __webpack_require__(27);
|
|
2581
|
-
|
|
2582
|
-
var VizBehavior_1 = __webpack_require__(6);
|
|
2583
|
-
|
|
2584
|
-
var hocUtils_1 = __webpack_require__(14);
|
|
2585
|
-
|
|
2586
|
-
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
2587
|
-
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
2588
|
-
var config = Visualization.config;
|
|
2589
|
-
var themes = config.themes;
|
|
2590
|
-
|
|
2591
|
-
var Wrapper = function Wrapper(props) {
|
|
2592
|
-
var _a, _b;
|
|
2593
|
-
|
|
2594
|
-
var dataSources = props.dataSources,
|
|
2595
|
-
loading = props.loading,
|
|
2596
|
-
options = props.options,
|
|
2597
|
-
height = props.height,
|
|
2598
|
-
width = props.width;
|
|
2599
|
-
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
2600
|
-
var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
2601
|
-
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
2602
|
-
var iconColor = variables_1.default.contentColorActive(props);
|
|
2603
|
-
|
|
2604
|
-
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
2605
|
-
return React.createElement(IconPlaceholder_1.default, {
|
|
2606
|
-
"data-test": "icon-placeholder",
|
|
2607
|
-
icon: icon,
|
|
2608
|
-
width: width,
|
|
2609
|
-
height: height,
|
|
2610
|
-
backgroundColor: bgColorFromTheme,
|
|
2611
|
-
iconColor: iconColor
|
|
2612
|
-
});
|
|
2613
|
-
}
|
|
2614
|
-
|
|
2615
|
-
return React.createElement(Visualization, Object.assign({}, props));
|
|
3589
|
+
var mode = props.mode;
|
|
3590
|
+
var showEditCover = mode === 'edit' && !disableEditModeCover;
|
|
3591
|
+
return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
|
|
3592
|
+
"data-test": "edit-mode-cover"
|
|
3593
|
+
}));
|
|
2616
3594
|
};
|
|
2617
3595
|
|
|
2618
3596
|
hocUtils_1.extendStaticWrapperProps({
|
|
@@ -2622,18 +3600,11 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
2622
3600
|
return Wrapper;
|
|
2623
3601
|
};
|
|
2624
3602
|
|
|
2625
|
-
exports.default =
|
|
2626
|
-
|
|
2627
|
-
/***/ }),
|
|
2628
|
-
|
|
2629
|
-
/***/ 44:
|
|
2630
|
-
/***/ (function(module, exports) {
|
|
2631
|
-
|
|
2632
|
-
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
3603
|
+
exports.default = withEditModeCover;
|
|
2633
3604
|
|
|
2634
3605
|
/***/ }),
|
|
2635
3606
|
|
|
2636
|
-
/***/
|
|
3607
|
+
/***/ 463:
|
|
2637
3608
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2638
3609
|
|
|
2639
3610
|
"use strict";
|
|
@@ -2657,13 +3628,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2657
3628
|
});
|
|
2658
3629
|
exports.themes = exports.computeVizProps = exports.PureSingleValue = exports.config = void 0;
|
|
2659
3630
|
|
|
2660
|
-
var SingleValue_1 = __webpack_require__(
|
|
3631
|
+
var SingleValue_1 = __webpack_require__(485);
|
|
2661
3632
|
|
|
2662
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
3633
|
+
var withDashboardViz_1 = __webpack_require__(36);
|
|
2663
3634
|
|
|
2664
|
-
var singleValueUtils_1 = __webpack_require__(
|
|
3635
|
+
var singleValueUtils_1 = __webpack_require__(24);
|
|
2665
3636
|
|
|
2666
|
-
var config_1 = __webpack_require__(
|
|
3637
|
+
var config_1 = __webpack_require__(464);
|
|
3638
|
+
|
|
3639
|
+
var withTrellis_1 = __webpack_require__(102);
|
|
2667
3640
|
|
|
2668
3641
|
exports.config = config_1.default;
|
|
2669
3642
|
exports.PureSingleValue = SingleValue_1.default;
|
|
@@ -2693,26 +3666,26 @@ var computeVizProps = function computeVizProps(_a) {
|
|
|
2693
3666
|
};
|
|
2694
3667
|
|
|
2695
3668
|
exports.computeVizProps = computeVizProps;
|
|
2696
|
-
var viz = withDashboardViz_1.default({
|
|
3669
|
+
var viz = withTrellis_1.default(withDashboardViz_1.default({
|
|
2697
3670
|
ReactViz: SingleValue_1.default,
|
|
2698
3671
|
vizConfig: config_1.default,
|
|
2699
3672
|
computeVizProps: exports.computeVizProps,
|
|
2700
3673
|
useIconPlaceholder: function useIconPlaceholder(dataSources, loading) {
|
|
2701
3674
|
return singleValueUtils_1.isLoadingOrNoColumns(dataSources, loading);
|
|
2702
3675
|
}
|
|
2703
|
-
});
|
|
3676
|
+
}));
|
|
2704
3677
|
exports.themes = config_1.default.themes;
|
|
2705
3678
|
exports.default = viz;
|
|
2706
3679
|
|
|
2707
3680
|
/***/ }),
|
|
2708
3681
|
|
|
2709
|
-
/***/
|
|
3682
|
+
/***/ 464:
|
|
2710
3683
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2711
3684
|
|
|
2712
3685
|
"use strict";
|
|
2713
3686
|
|
|
2714
3687
|
|
|
2715
|
-
var _toConsumableArray = __webpack_require__(
|
|
3688
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
2716
3689
|
|
|
2717
3690
|
Object.defineProperty(exports, "__esModule", {
|
|
2718
3691
|
value: true
|
|
@@ -2722,39 +3695,43 @@ var i18n_1 = __webpack_require__(2);
|
|
|
2722
3695
|
|
|
2723
3696
|
var schemaUtils_1 = __webpack_require__(16);
|
|
2724
3697
|
|
|
2725
|
-
var PresetPalettes_1 = __webpack_require__(
|
|
3698
|
+
var PresetPalettes_1 = __webpack_require__(60);
|
|
2726
3699
|
|
|
2727
|
-
var variables_1 = __webpack_require__(
|
|
3700
|
+
var variables_1 = __webpack_require__(465);
|
|
2728
3701
|
|
|
2729
|
-
var pick_1 = __webpack_require__(
|
|
3702
|
+
var pick_1 = __webpack_require__(23);
|
|
2730
3703
|
|
|
2731
|
-
var variables_2 = __webpack_require__(
|
|
3704
|
+
var variables_2 = __webpack_require__(10);
|
|
2732
3705
|
|
|
2733
|
-
var visualization_icons_1 = __webpack_require__(
|
|
3706
|
+
var visualization_icons_1 = __webpack_require__(51);
|
|
2734
3707
|
|
|
2735
|
-
var placeholders_1 = __webpack_require__(
|
|
3708
|
+
var placeholders_1 = __webpack_require__(48);
|
|
2736
3709
|
|
|
2737
|
-
var singleValueContext_1 = __webpack_require__(
|
|
3710
|
+
var singleValueContext_1 = __webpack_require__(133);
|
|
2738
3711
|
|
|
2739
3712
|
var VizBehavior_1 = __webpack_require__(6);
|
|
2740
3713
|
|
|
2741
|
-
var DynamicMajorColorEditor_1 = __webpack_require__(
|
|
3714
|
+
var DynamicMajorColorEditor_1 = __webpack_require__(95);
|
|
2742
3715
|
|
|
2743
|
-
var DynamicTrendColorEditor_1 = __webpack_require__(
|
|
3716
|
+
var DynamicTrendColorEditor_1 = __webpack_require__(96);
|
|
2744
3717
|
|
|
2745
|
-
var DynamicBackgroundColorEditor_1 = __webpack_require__(
|
|
3718
|
+
var DynamicBackgroundColorEditor_1 = __webpack_require__(97);
|
|
2746
3719
|
|
|
2747
|
-
var StaticMajorAndTrendLayout_1 = __webpack_require__(
|
|
3720
|
+
var StaticMajorAndTrendLayout_1 = __webpack_require__(98);
|
|
2748
3721
|
|
|
2749
|
-
var StaticMajorColorEditor_1 = __webpack_require__(
|
|
3722
|
+
var StaticMajorColorEditor_1 = __webpack_require__(99);
|
|
2750
3723
|
|
|
2751
|
-
var StaticTrendColorEditor_1 = __webpack_require__(
|
|
3724
|
+
var StaticTrendColorEditor_1 = __webpack_require__(100);
|
|
2752
3725
|
|
|
2753
|
-
var StaticBackgroundColorEditor_1 = __webpack_require__(
|
|
3726
|
+
var StaticBackgroundColorEditor_1 = __webpack_require__(84);
|
|
2754
3727
|
|
|
2755
|
-
var configUtils_1 = __webpack_require__(
|
|
3728
|
+
var configUtils_1 = __webpack_require__(19);
|
|
2756
3729
|
|
|
2757
|
-
var
|
|
3730
|
+
var TrellisEditors_1 = __webpack_require__(101);
|
|
3731
|
+
|
|
3732
|
+
var VizCategory_1 = __webpack_require__(35);
|
|
3733
|
+
|
|
3734
|
+
var layoutUtils_1 = __webpack_require__(58);
|
|
2758
3735
|
|
|
2759
3736
|
var dataContract = {
|
|
2760
3737
|
requiredDataSources: [{
|
|
@@ -2832,6 +3809,13 @@ var optionsSchema = {
|
|
|
2832
3809
|
description: 'Show a tooltip to display values on the sparkline.',
|
|
2833
3810
|
type: 'boolean'
|
|
2834
3811
|
},
|
|
3812
|
+
splitByLayout: {
|
|
3813
|
+
default: 'off',
|
|
3814
|
+
description: 'Specify the layout method by which to display the visualization, which splits the data into individual visualizations based on a certain category.',
|
|
3815
|
+
type: 'string',
|
|
3816
|
+
pattern: schemaUtils_1.getPattern([layoutUtils_1.LAYOUT_TYPE.Off, layoutUtils_1.LAYOUT_TYPE.Trellis]),
|
|
3817
|
+
enum: [layoutUtils_1.LAYOUT_TYPE.Off, layoutUtils_1.LAYOUT_TYPE.Trellis]
|
|
3818
|
+
},
|
|
2835
3819
|
sparklineAreaColor: {
|
|
2836
3820
|
default: '> sparklineStrokeColor',
|
|
2837
3821
|
description: 'Specify the color for the sparkline area fill. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”. The graph area will have an opacity of 20% and will blend with the background color.',
|
|
@@ -2889,6 +3873,39 @@ var optionsSchema = {
|
|
|
2889
3873
|
description: 'The trend value to display in the visualization.',
|
|
2890
3874
|
type: 'number'
|
|
2891
3875
|
},
|
|
3876
|
+
trellisBackgroundColor: {
|
|
3877
|
+
default: '> themes.defaultBackgroundColor',
|
|
3878
|
+
description: 'Specify the color used for the trellis container background by using a hexadecimal code. For example, #0000FF.',
|
|
3879
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
|
|
3880
|
+
type: 'string'
|
|
3881
|
+
},
|
|
3882
|
+
trellisColumns: {
|
|
3883
|
+
description: 'Specify the number of visualizations to display in a given row of the trellis container. The remaining visualizations will wrap accordingly. If nothing is specified, it will be auto-set based on the trellisMinColumnWidth.',
|
|
3884
|
+
type: 'number',
|
|
3885
|
+
minimum: 1
|
|
3886
|
+
},
|
|
3887
|
+
trellisMinColumnWidth: {
|
|
3888
|
+
default: 100,
|
|
3889
|
+
minimum: 1,
|
|
3890
|
+
description: 'Specify the minimum width, in pixels, of each visualization in the trellis container. If the window or panel is resized, the remaining visualizations may be viewed by scrolling.',
|
|
3891
|
+
type: 'number'
|
|
3892
|
+
},
|
|
3893
|
+
trellisPageCount: {
|
|
3894
|
+
default: 20,
|
|
3895
|
+
minimum: 1,
|
|
3896
|
+
description: 'Specify the maximum number of visualizations to display in a single page in the trellis container. The remaining visualizations will paginate accordingly.',
|
|
3897
|
+
type: 'number'
|
|
3898
|
+
},
|
|
3899
|
+
trellisRowHeight: {
|
|
3900
|
+
default: 70,
|
|
3901
|
+
minimum: 1,
|
|
3902
|
+
description: 'Specify the height, in pixels, of each visualization in the trellis container. If the window or panel is resized, the remaining visualizations may be viewed by scrolling.',
|
|
3903
|
+
type: 'number'
|
|
3904
|
+
},
|
|
3905
|
+
trellisSplitBy: {
|
|
3906
|
+
description: 'Specify the field name of the column with categories used, or “aggregations”, to split the data into individual visualizations for trellis display, if applicable. If a SPL `timechart` command is used, this may default to the SPL `by` clause field. If a SPL `chart` command is used, this may default to the first string field.',
|
|
3907
|
+
type: 'string'
|
|
3908
|
+
},
|
|
2892
3909
|
underLabel: {
|
|
2893
3910
|
description: 'Specify the text that appears below the major value.',
|
|
2894
3911
|
type: 'string'
|
|
@@ -3126,6 +4143,10 @@ var editorConfig = [{
|
|
|
3126
4143
|
}
|
|
3127
4144
|
};
|
|
3128
4145
|
}
|
|
4146
|
+
},
|
|
4147
|
+
isDisabled: function isDisabled(_ref) {
|
|
4148
|
+
var options = _ref.options;
|
|
4149
|
+
return options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
|
|
3129
4150
|
}
|
|
3130
4151
|
}]]
|
|
3131
4152
|
}, {
|
|
@@ -3146,8 +4167,8 @@ var editorConfig = [{
|
|
|
3146
4167
|
value: 'off'
|
|
3147
4168
|
}]
|
|
3148
4169
|
},
|
|
3149
|
-
showEditor: function showEditor(
|
|
3150
|
-
var options =
|
|
4170
|
+
showEditor: function showEditor(_ref2) {
|
|
4171
|
+
var options = _ref2.options;
|
|
3151
4172
|
return options.showValue || options.showValue === undefined;
|
|
3152
4173
|
}
|
|
3153
4174
|
}, {
|
|
@@ -3169,7 +4190,7 @@ var editorConfig = [{
|
|
|
3169
4190
|
value: 'after'
|
|
3170
4191
|
}]
|
|
3171
4192
|
}
|
|
3172
|
-
}]])
|
|
4193
|
+
}]], _toConsumableArray(TrellisEditors_1.TrellisEditorConfig))
|
|
3173
4194
|
}, {
|
|
3174
4195
|
label: i18n_1._('Color and style'),
|
|
3175
4196
|
layout: [[{
|
|
@@ -3178,16 +4199,15 @@ var editorConfig = [{
|
|
|
3178
4199
|
editor: 'editor.presetSelector',
|
|
3179
4200
|
editorProps: {
|
|
3180
4201
|
presets: presets,
|
|
3181
|
-
value: function value(
|
|
3182
|
-
var context =
|
|
3183
|
-
options =
|
|
4202
|
+
value: function value(_ref3) {
|
|
4203
|
+
var context = _ref3.context,
|
|
4204
|
+
options = _ref3.options;
|
|
3184
4205
|
var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
|
|
3185
4206
|
return initialPreset && initialPreset.label || null;
|
|
3186
4207
|
}
|
|
3187
4208
|
}
|
|
3188
4209
|
}], [Object.assign(Object.assign({}, StaticMajorColorEditor_1.default), {
|
|
3189
4210
|
editorProps: {
|
|
3190
|
-
labelPosition: 'left',
|
|
3191
4211
|
themes: themes
|
|
3192
4212
|
}
|
|
3193
4213
|
})], [DynamicMajorColorEditor_1.getDynamicMajorColorEditor({
|
|
@@ -3195,7 +4215,6 @@ var editorConfig = [{
|
|
|
3195
4215
|
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
3196
4216
|
})], [Object.assign(Object.assign({}, StaticTrendColorEditor_1.default), {
|
|
3197
4217
|
editorProps: {
|
|
3198
|
-
labelPosition: 'left',
|
|
3199
4218
|
themes: themes
|
|
3200
4219
|
}
|
|
3201
4220
|
})], [DynamicTrendColorEditor_1.getDynamicTrendColorEditor({
|
|
@@ -3203,7 +4222,10 @@ var editorConfig = [{
|
|
|
3203
4222
|
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
3204
4223
|
})], [Object.assign(Object.assign({}, StaticBackgroundColorEditor_1.default), {
|
|
3205
4224
|
editorProps: {
|
|
3206
|
-
|
|
4225
|
+
themes: themes
|
|
4226
|
+
}
|
|
4227
|
+
})], [Object.assign(Object.assign({}, TrellisEditors_1.TrellisBackgroundColorEditor), {
|
|
4228
|
+
editorProps: {
|
|
3207
4229
|
themes: themes
|
|
3208
4230
|
}
|
|
3209
4231
|
})], [DynamicBackgroundColorEditor_1.getDynamicBackgroundColorEditor({
|
|
@@ -3217,8 +4239,8 @@ var editorConfig = [{
|
|
|
3217
4239
|
min: 1
|
|
3218
4240
|
},
|
|
3219
4241
|
placeholder: i18n_1._('Auto'),
|
|
3220
|
-
showEditor: function showEditor(
|
|
3221
|
-
var options =
|
|
4242
|
+
showEditor: function showEditor(_ref4) {
|
|
4243
|
+
var options = _ref4.options;
|
|
3222
4244
|
return options.showValue || options.showValue === undefined;
|
|
3223
4245
|
}
|
|
3224
4246
|
}, {
|
|
@@ -3229,12 +4251,12 @@ var editorConfig = [{
|
|
|
3229
4251
|
min: 1
|
|
3230
4252
|
},
|
|
3231
4253
|
placeholder: i18n_1._('Auto'),
|
|
3232
|
-
showEditor: function showEditor(
|
|
3233
|
-
var options =
|
|
4254
|
+
showEditor: function showEditor(_ref5) {
|
|
4255
|
+
var options = _ref5.options;
|
|
3234
4256
|
return options.showValue || options.showValue === undefined;
|
|
3235
4257
|
},
|
|
3236
|
-
isDisabled: function isDisabled(
|
|
3237
|
-
var options =
|
|
4258
|
+
isDisabled: function isDisabled(_ref6) {
|
|
4259
|
+
var options = _ref6.options;
|
|
3238
4260
|
return options.trendDisplay === 'off';
|
|
3239
4261
|
}
|
|
3240
4262
|
}]]
|
|
@@ -3271,7 +4293,7 @@ var config = {
|
|
|
3271
4293
|
payloadKeys: ['majorValue', 'trendValue']
|
|
3272
4294
|
}
|
|
3273
4295
|
},
|
|
3274
|
-
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
4296
|
+
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PLACEHOLDER, VizBehavior_1.VizBehavior.TRELLIS],
|
|
3275
4297
|
themes: themes,
|
|
3276
4298
|
requiredProps: ['majorValue']
|
|
3277
4299
|
};
|
|
@@ -3279,28 +4301,86 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
3279
4301
|
|
|
3280
4302
|
/***/ }),
|
|
3281
4303
|
|
|
3282
|
-
/***/
|
|
4304
|
+
/***/ 465:
|
|
3283
4305
|
/***/ (function(module, exports) {
|
|
3284
4306
|
|
|
3285
|
-
module.exports = require("@splunk/
|
|
4307
|
+
module.exports = require("@splunk/visualization-themes/variables");
|
|
3286
4308
|
|
|
3287
4309
|
/***/ }),
|
|
3288
4310
|
|
|
3289
|
-
/***/
|
|
3290
|
-
/***/ (function(module, exports) {
|
|
4311
|
+
/***/ 47:
|
|
4312
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3291
4313
|
|
|
3292
|
-
|
|
4314
|
+
"use strict";
|
|
4315
|
+
|
|
4316
|
+
|
|
4317
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4318
|
+
value: true
|
|
4319
|
+
});
|
|
4320
|
+
|
|
4321
|
+
var React = __webpack_require__(0);
|
|
4322
|
+
|
|
4323
|
+
var colorUtils_1 = __webpack_require__(12);
|
|
4324
|
+
|
|
4325
|
+
var variables_1 = __webpack_require__(10);
|
|
4326
|
+
|
|
4327
|
+
var IconPlaceholder_1 = __webpack_require__(31);
|
|
4328
|
+
|
|
4329
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
4330
|
+
|
|
4331
|
+
var hocUtils_1 = __webpack_require__(15);
|
|
4332
|
+
|
|
4333
|
+
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
4334
|
+
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
4335
|
+
var config = Visualization.config;
|
|
4336
|
+
var themes = config.themes;
|
|
4337
|
+
|
|
4338
|
+
var Wrapper = function Wrapper(props) {
|
|
4339
|
+
var _a, _b;
|
|
4340
|
+
|
|
4341
|
+
var dataSources = props.dataSources,
|
|
4342
|
+
loading = props.loading,
|
|
4343
|
+
options = props.options,
|
|
4344
|
+
height = props.height,
|
|
4345
|
+
width = props.width;
|
|
4346
|
+
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
4347
|
+
var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
4348
|
+
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
4349
|
+
var iconColor = variables_1.default.contentColorActive(props);
|
|
4350
|
+
|
|
4351
|
+
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
4352
|
+
return React.createElement(IconPlaceholder_1.default, {
|
|
4353
|
+
"data-test": "icon-placeholder",
|
|
4354
|
+
icon: icon,
|
|
4355
|
+
width: width,
|
|
4356
|
+
height: height,
|
|
4357
|
+
backgroundColor: bgColorFromTheme,
|
|
4358
|
+
iconColor: iconColor
|
|
4359
|
+
});
|
|
4360
|
+
}
|
|
4361
|
+
|
|
4362
|
+
return React.createElement(Visualization, Object.assign({}, props));
|
|
4363
|
+
};
|
|
4364
|
+
|
|
4365
|
+
hocUtils_1.extendStaticWrapperProps({
|
|
4366
|
+
Wrapper: Wrapper,
|
|
4367
|
+
Visualization: Visualization
|
|
4368
|
+
});
|
|
4369
|
+
return Wrapper;
|
|
4370
|
+
};
|
|
4371
|
+
|
|
4372
|
+
exports.default = withPlaceholder;
|
|
3293
4373
|
|
|
3294
4374
|
/***/ }),
|
|
3295
4375
|
|
|
3296
|
-
/***/
|
|
4376
|
+
/***/ 48:
|
|
3297
4377
|
/***/ (function(module, exports) {
|
|
3298
4378
|
|
|
3299
|
-
module.exports = require("@splunk/visualization-icons");
|
|
4379
|
+
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
3300
4380
|
|
|
3301
4381
|
/***/ }),
|
|
3302
4382
|
|
|
3303
|
-
/***/
|
|
4383
|
+
/***/ 485:
|
|
3304
4384
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3305
4385
|
|
|
3306
4386
|
"use strict";
|
|
@@ -3312,15 +4392,15 @@ __webpack_require__.d(__webpack_exports__, "CONTENT_OVERFLOW_FADEOUT_AREA_PX", f
|
|
|
3312
4392
|
__webpack_require__.d(__webpack_exports__, "DEFAULT_CONTENT_HEIGHT_ALLOCATION_RATIO", function() { return /* binding */ DEFAULT_CONTENT_HEIGHT_ALLOCATION_RATIO; });
|
|
3313
4393
|
|
|
3314
4394
|
// EXTERNAL MODULE: external "@babel/runtime/helpers/extends"
|
|
3315
|
-
var extends_ = __webpack_require__(
|
|
4395
|
+
var extends_ = __webpack_require__(52);
|
|
3316
4396
|
var extends_default = /*#__PURE__*/__webpack_require__.n(extends_);
|
|
3317
4397
|
|
|
3318
4398
|
// EXTERNAL MODULE: external "react"
|
|
3319
|
-
var external_react_ = __webpack_require__(
|
|
4399
|
+
var external_react_ = __webpack_require__(0);
|
|
3320
4400
|
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
3321
4401
|
|
|
3322
4402
|
// EXTERNAL MODULE: external "prop-types"
|
|
3323
|
-
var external_prop_types_ = __webpack_require__(
|
|
4403
|
+
var external_prop_types_ = __webpack_require__(1);
|
|
3324
4404
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
3325
4405
|
|
|
3326
4406
|
// EXTERNAL MODULE: external "styled-components"
|
|
@@ -3328,36 +4408,46 @@ var external_styled_components_ = __webpack_require__(4);
|
|
|
3328
4408
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
3329
4409
|
|
|
3330
4410
|
// EXTERNAL MODULE: external "lodash/pick"
|
|
3331
|
-
var pick_ = __webpack_require__(
|
|
4411
|
+
var pick_ = __webpack_require__(77);
|
|
3332
4412
|
var pick_default = /*#__PURE__*/__webpack_require__.n(pick_);
|
|
3333
4413
|
|
|
3334
4414
|
// EXTERNAL MODULE: external "lodash/isEmpty"
|
|
3335
|
-
var isEmpty_ = __webpack_require__(
|
|
4415
|
+
var isEmpty_ = __webpack_require__(78);
|
|
3336
4416
|
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_);
|
|
3337
4417
|
|
|
3338
4418
|
// EXTERNAL MODULE: external "@splunk/visualizations-shared/style"
|
|
3339
|
-
var style_ = __webpack_require__(
|
|
4419
|
+
var style_ = __webpack_require__(14);
|
|
3340
4420
|
|
|
3341
4421
|
// EXTERNAL MODULE: external "@splunk/visualizations-shared/SizeAwareWrapper"
|
|
3342
|
-
var SizeAwareWrapper_ = __webpack_require__(
|
|
4422
|
+
var SizeAwareWrapper_ = __webpack_require__(18);
|
|
3343
4423
|
var SizeAwareWrapper_default = /*#__PURE__*/__webpack_require__.n(SizeAwareWrapper_);
|
|
3344
4424
|
|
|
4425
|
+
// EXTERNAL MODULE: external "@splunk/visualization-context/FeatureFlagContext"
|
|
4426
|
+
var FeatureFlagContext_ = __webpack_require__(20);
|
|
4427
|
+
var FeatureFlagContext_default = /*#__PURE__*/__webpack_require__.n(FeatureFlagContext_);
|
|
4428
|
+
|
|
3345
4429
|
// EXTERNAL MODULE: ./src/common/components/VizStyleWrapper.jsx
|
|
3346
|
-
var VizStyleWrapper = __webpack_require__(
|
|
4430
|
+
var VizStyleWrapper = __webpack_require__(68);
|
|
4431
|
+
|
|
4432
|
+
// EXTERNAL MODULE: ./src/common/components/TrellisTitle.tsx
|
|
4433
|
+
var TrellisTitle = __webpack_require__(74);
|
|
4434
|
+
|
|
4435
|
+
// EXTERNAL MODULE: ./src/common/utils/layoutUtils.ts
|
|
4436
|
+
var layoutUtils = __webpack_require__(58);
|
|
3347
4437
|
|
|
3348
4438
|
// EXTERNAL MODULE: external "@babel/runtime/helpers/defineProperty"
|
|
3349
|
-
var defineProperty_ = __webpack_require__(
|
|
4439
|
+
var defineProperty_ = __webpack_require__(8);
|
|
3350
4440
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);
|
|
3351
4441
|
|
|
3352
4442
|
// EXTERNAL MODULE: ./src/SingleValueBasic/SingleValueBasic.jsx + 2 modules
|
|
3353
|
-
var SingleValueBasic = __webpack_require__(
|
|
4443
|
+
var SingleValueBasic = __webpack_require__(75);
|
|
3354
4444
|
|
|
3355
4445
|
// EXTERNAL MODULE: external "@splunk/react-sparkline/Line"
|
|
3356
|
-
var Line_ = __webpack_require__(
|
|
4446
|
+
var Line_ = __webpack_require__(108);
|
|
3357
4447
|
var Line_default = /*#__PURE__*/__webpack_require__.n(Line_);
|
|
3358
4448
|
|
|
3359
4449
|
// EXTERNAL MODULE: external "@splunk/visualizations-shared/propUtils"
|
|
3360
|
-
var propUtils_ = __webpack_require__(
|
|
4450
|
+
var propUtils_ = __webpack_require__(28);
|
|
3361
4451
|
|
|
3362
4452
|
// CONCATENATED MODULE: ./src/SingleValue/PureSingleValue/SingleValueSparkline.jsx
|
|
3363
4453
|
|
|
@@ -3421,13 +4511,13 @@ SingleValueSparkline_SingleValueSparkline.propTypes = {
|
|
|
3421
4511
|
};
|
|
3422
4512
|
/* harmony default export */ var PureSingleValue_SingleValueSparkline = (SingleValueSparkline_SingleValueSparkline);
|
|
3423
4513
|
// EXTERNAL MODULE: external "@splunk/visualizations-shared/colorConstants"
|
|
3424
|
-
var colorConstants_ = __webpack_require__(
|
|
4514
|
+
var colorConstants_ = __webpack_require__(49);
|
|
3425
4515
|
|
|
3426
4516
|
// EXTERNAL MODULE: external "@splunk/visualizations-shared/numberUtils"
|
|
3427
4517
|
var numberUtils_ = __webpack_require__(30);
|
|
3428
4518
|
|
|
3429
4519
|
// EXTERNAL MODULE: ./src/common/utils/singleValueUtils.js
|
|
3430
|
-
var singleValueUtils = __webpack_require__(
|
|
4520
|
+
var singleValueUtils = __webpack_require__(24);
|
|
3431
4521
|
|
|
3432
4522
|
// CONCATENATED MODULE: ./src/SingleValue/PureSingleValue/utils/displayUtils.js
|
|
3433
4523
|
|
|
@@ -3853,6 +4943,9 @@ StandardLayout_SingleValueContent.propTypes = _objectSpread(_objectSpread({}, Si
|
|
|
3853
4943
|
|
|
3854
4944
|
|
|
3855
4945
|
|
|
4946
|
+
|
|
4947
|
+
|
|
4948
|
+
|
|
3856
4949
|
var SingleValue_CONTENT_OVERFLOW_FADEOUT_AREA_PX = 16;
|
|
3857
4950
|
var DEFAULT_CONTENT_HEIGHT_ALLOCATION_RATIO = 0.8;
|
|
3858
4951
|
var DEFAULT_SPARKLINE_SEVERITY_COLORS = {
|
|
@@ -3918,16 +5011,25 @@ var SingleValue_SingleValue = function SingleValue(_ref) {
|
|
|
3918
5011
|
defaultBlockFontColor = props.defaultBlockFontColor,
|
|
3919
5012
|
_props$sparklineSever = props.sparklineSeverityColors,
|
|
3920
5013
|
sparklineSeverityColors = _props$sparklineSever === void 0 ? DEFAULT_SPARKLINE_SEVERITY_COLORS : _props$sparklineSever,
|
|
3921
|
-
sparklineAreaColor = props.sparklineAreaColor
|
|
5014
|
+
sparklineAreaColor = props.sparklineAreaColor,
|
|
5015
|
+
defaultThemeColors = props.defaultThemeColors,
|
|
5016
|
+
splitByLayout = props.splitByLayout,
|
|
5017
|
+
_props$trellisKey = props.trellisKey,
|
|
5018
|
+
trellisKey = _props$trellisKey === void 0 ? '' : _props$trellisKey,
|
|
5019
|
+
_props$trellisSplitBy = props.trellisSplitBy,
|
|
5020
|
+
trellisSplitBy = _props$trellisSplitBy === void 0 ? '' : _props$trellisSplitBy;
|
|
3922
5021
|
var defaultColors = {
|
|
3923
5022
|
defaultFontColor: defaultFontColor,
|
|
3924
5023
|
defaultBackgroundColor: defaultBackgroundColor,
|
|
3925
5024
|
defaultBlockFontColor: defaultBlockFontColor,
|
|
3926
5025
|
sparklineSeverityColors: sparklineSeverityColors
|
|
3927
5026
|
};
|
|
5027
|
+
var featureFlagContext = external_react_default.a.useContext(FeatureFlagContext_default.a);
|
|
5028
|
+
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
5029
|
+
var trellisEnabled = isTrellisFeatureFlagOn && splitByLayout === layoutUtils["LAYOUT_TYPE"].Trellis;
|
|
3928
5030
|
var handleValueClick = Object(external_react_["useCallback"])(function (ev) {
|
|
3929
|
-
return Object(singleValueUtils["handleValueClickCallback"])(ev, majorValue, majorValueField, trendValue, onValueClick);
|
|
3930
|
-
}, [onValueClick, majorValue, majorValueField, trendValue]); // FIXME todo 'compute colors' is not pure, it must be lifted into behavior or DSL
|
|
5031
|
+
return Object(singleValueUtils["handleValueClickCallback"])(ev, majorValue, majorValueField, trendValue, onValueClick, trellisEnabled, trellisSplitBy, trellisKey);
|
|
5032
|
+
}, [onValueClick, majorValue, majorValueField, trendValue, trellisEnabled, trellisSplitBy, trellisKey]); // FIXME todo 'compute colors' is not pure, it must be lifted into behavior or DSL
|
|
3931
5033
|
// compute colors
|
|
3932
5034
|
|
|
3933
5035
|
var _computeColors = Object(singleValueUtils["computeColors"])(props, defaultColors),
|
|
@@ -4089,6 +5191,19 @@ var SingleValue_SingleValue = function SingleValue(_ref) {
|
|
|
4089
5191
|
}));
|
|
4090
5192
|
};
|
|
4091
5193
|
|
|
5194
|
+
if (trellisEnabled) {
|
|
5195
|
+
return /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement(TrellisTitle["TrellisTitle"], {
|
|
5196
|
+
fontColor: defaultThemeColors === null || defaultThemeColors === void 0 ? void 0 : defaultThemeColors.defaultFontColor,
|
|
5197
|
+
backgroundColor: backgroundColor,
|
|
5198
|
+
trellisKey: trellisKey
|
|
5199
|
+
}), /*#__PURE__*/external_react_default.a.createElement(Container, {
|
|
5200
|
+
width: width,
|
|
5201
|
+
height: height - TrellisTitle["TRELLIS_TITLE_HEIGHT"]
|
|
5202
|
+
}, /*#__PURE__*/external_react_default.a.createElement(SizeAwareWrapper_default.a, null, function (containerDimension) {
|
|
5203
|
+
return renderVisualization(containerDimension);
|
|
5204
|
+
})));
|
|
5205
|
+
}
|
|
5206
|
+
|
|
4092
5207
|
return /*#__PURE__*/external_react_default.a.createElement(Container, {
|
|
4093
5208
|
width: width,
|
|
4094
5209
|
height: height
|
|
@@ -4131,7 +5246,11 @@ SingleValue_SingleValue.propTypes = {
|
|
|
4131
5246
|
defaultFontColor: external_prop_types_default.a.string,
|
|
4132
5247
|
defaultBackgroundColor: external_prop_types_default.a.string,
|
|
4133
5248
|
defaultBlockFontColor: external_prop_types_default.a.string,
|
|
4134
|
-
sparklineSeverityColors: external_prop_types_default.a.object
|
|
5249
|
+
sparklineSeverityColors: external_prop_types_default.a.object,
|
|
5250
|
+
defaultThemeColors: external_prop_types_default.a.object,
|
|
5251
|
+
splitByLayout: external_prop_types_default.a.string,
|
|
5252
|
+
trellisKey: external_prop_types_default.a.string,
|
|
5253
|
+
trellisSplitBy: external_prop_types_default.a.string
|
|
4135
5254
|
};
|
|
4136
5255
|
SingleValue_SingleValue.defaultProps = {
|
|
4137
5256
|
width: '100%',
|
|
@@ -4151,7 +5270,9 @@ SingleValue_SingleValue.defaultProps = {
|
|
|
4151
5270
|
sparklineHighlightSegments: 0,
|
|
4152
5271
|
sparklineHighlightDots: 0,
|
|
4153
5272
|
hasEventHandlers: false,
|
|
4154
|
-
onValueClick: function onValueClick() {}
|
|
5273
|
+
onValueClick: function onValueClick() {},
|
|
5274
|
+
trellisKey: '',
|
|
5275
|
+
trellisSplitBy: '' // fixme todo: a pure viz should not be passed a map of severity colors! This should be resolved
|
|
4155
5276
|
// by behaviors or DSL in future. Pure viz does not understand concepts such as severity.
|
|
4156
5277
|
|
|
4157
5278
|
};
|
|
@@ -4159,24 +5280,64 @@ SingleValue_SingleValue.defaultProps = {
|
|
|
4159
5280
|
|
|
4160
5281
|
/***/ }),
|
|
4161
5282
|
|
|
4162
|
-
/***/
|
|
5283
|
+
/***/ 49:
|
|
5284
|
+
/***/ (function(module, exports) {
|
|
5285
|
+
|
|
5286
|
+
module.exports = require("@splunk/visualizations-shared/colorConstants");
|
|
5287
|
+
|
|
5288
|
+
/***/ }),
|
|
5289
|
+
|
|
5290
|
+
/***/ 51:
|
|
5291
|
+
/***/ (function(module, exports) {
|
|
5292
|
+
|
|
5293
|
+
module.exports = require("@splunk/visualization-icons");
|
|
5294
|
+
|
|
5295
|
+
/***/ }),
|
|
5296
|
+
|
|
5297
|
+
/***/ 52:
|
|
4163
5298
|
/***/ (function(module, exports) {
|
|
4164
5299
|
|
|
4165
5300
|
module.exports = require("@babel/runtime/helpers/extends");
|
|
4166
5301
|
|
|
4167
5302
|
/***/ }),
|
|
4168
5303
|
|
|
4169
|
-
/***/
|
|
5304
|
+
/***/ 54:
|
|
4170
5305
|
/***/ (function(module, exports) {
|
|
4171
5306
|
|
|
4172
5307
|
module.exports = require("@splunk/visualizations-shared/domUtils");
|
|
4173
5308
|
|
|
4174
5309
|
/***/ }),
|
|
4175
5310
|
|
|
4176
|
-
/***/
|
|
5311
|
+
/***/ 57:
|
|
4177
5312
|
/***/ (function(module, exports) {
|
|
4178
5313
|
|
|
4179
|
-
module.exports = require("@splunk/
|
|
5314
|
+
module.exports = require("@splunk/themes/useSplunkTheme");
|
|
5315
|
+
|
|
5316
|
+
/***/ }),
|
|
5317
|
+
|
|
5318
|
+
/***/ 58:
|
|
5319
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5320
|
+
|
|
5321
|
+
"use strict";
|
|
5322
|
+
|
|
5323
|
+
|
|
5324
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5325
|
+
value: true
|
|
5326
|
+
});
|
|
5327
|
+
exports.LAYOUT_TYPE = void 0;
|
|
5328
|
+
var LAYOUT_TYPE;
|
|
5329
|
+
|
|
5330
|
+
(function (LAYOUT_TYPE) {
|
|
5331
|
+
LAYOUT_TYPE["Off"] = "off";
|
|
5332
|
+
LAYOUT_TYPE["Trellis"] = "trellis";
|
|
5333
|
+
})(LAYOUT_TYPE = exports.LAYOUT_TYPE || (exports.LAYOUT_TYPE = {}));
|
|
5334
|
+
|
|
5335
|
+
/***/ }),
|
|
5336
|
+
|
|
5337
|
+
/***/ 59:
|
|
5338
|
+
/***/ (function(module, exports) {
|
|
5339
|
+
|
|
5340
|
+
module.exports = require("@splunk/themes");
|
|
4180
5341
|
|
|
4181
5342
|
/***/ }),
|
|
4182
5343
|
|
|
@@ -4214,11 +5375,19 @@ var VizBehavior;
|
|
|
4214
5375
|
|
|
4215
5376
|
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
4216
5377
|
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
5378
|
+
VizBehavior["TRELLIS"] = "trellis";
|
|
4217
5379
|
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
4218
5380
|
|
|
4219
5381
|
/***/ }),
|
|
4220
5382
|
|
|
4221
|
-
/***/
|
|
5383
|
+
/***/ 60:
|
|
5384
|
+
/***/ (function(module, exports) {
|
|
5385
|
+
|
|
5386
|
+
module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
|
|
5387
|
+
|
|
5388
|
+
/***/ }),
|
|
5389
|
+
|
|
5390
|
+
/***/ 68:
|
|
4222
5391
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4223
5392
|
|
|
4224
5393
|
"use strict";
|
|
@@ -4245,11 +5414,54 @@ VizStyleWrapper.displayName = 'VizStyleWrapper';
|
|
|
4245
5414
|
/***/ 7:
|
|
4246
5415
|
/***/ (function(module, exports) {
|
|
4247
5416
|
|
|
4248
|
-
module.exports = require("@babel/runtime/helpers/
|
|
5417
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
5418
|
+
|
|
5419
|
+
/***/ }),
|
|
5420
|
+
|
|
5421
|
+
/***/ 74:
|
|
5422
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5423
|
+
|
|
5424
|
+
"use strict";
|
|
5425
|
+
|
|
5426
|
+
|
|
5427
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5428
|
+
value: true
|
|
5429
|
+
});
|
|
5430
|
+
exports.TrellisTitle = exports.TRELLIS_TITLE_HEIGHT = void 0;
|
|
5431
|
+
|
|
5432
|
+
var React = __webpack_require__(0);
|
|
5433
|
+
|
|
5434
|
+
var styled_components_1 = __webpack_require__(4);
|
|
5435
|
+
|
|
5436
|
+
exports.TRELLIS_TITLE_HEIGHT = 28;
|
|
5437
|
+
var TrellisTitleText = styled_components_1.default.div.withConfig({
|
|
5438
|
+
displayName: "TrellisTitle__TrellisTitleText",
|
|
5439
|
+
componentId: "sc-2cu404-0"
|
|
5440
|
+
})(["margin-left:10px;margin-right:10px;padding-top:8px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;"]);
|
|
5441
|
+
var TrellisTitleDiv = styled_components_1.default.div.withConfig({
|
|
5442
|
+
displayName: "TrellisTitle__TrellisTitleDiv",
|
|
5443
|
+
componentId: "sc-2cu404-1"
|
|
5444
|
+
})(["height:", "px;font-size:14px;font-weight:700;color:", ";background-color:", ";box-shadow:0 1px ", ";"], exports.TRELLIS_TITLE_HEIGHT, function (props) {
|
|
5445
|
+
return props.fontColor;
|
|
5446
|
+
}, function (props) {
|
|
5447
|
+
return props.backgroundColor;
|
|
5448
|
+
}, function (props) {
|
|
5449
|
+
return props.backgroundColor;
|
|
5450
|
+
});
|
|
5451
|
+
|
|
5452
|
+
var TrellisTitle = function TrellisTitle(props) {
|
|
5453
|
+
return React.createElement(TrellisTitleDiv, {
|
|
5454
|
+
fontColor: props.fontColor,
|
|
5455
|
+
backgroundColor: props.backgroundColor,
|
|
5456
|
+
"data-test": "trellis-title"
|
|
5457
|
+
}, React.createElement(TrellisTitleText, null, String(props.trellisKey).toString()));
|
|
5458
|
+
};
|
|
5459
|
+
|
|
5460
|
+
exports.TrellisTitle = TrellisTitle;
|
|
4249
5461
|
|
|
4250
5462
|
/***/ }),
|
|
4251
5463
|
|
|
4252
|
-
/***/
|
|
5464
|
+
/***/ 75:
|
|
4253
5465
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4254
5466
|
|
|
4255
5467
|
"use strict";
|
|
@@ -4260,15 +5472,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4260
5472
|
__webpack_require__.d(__webpack_exports__, "SingleValueTrendValue", function() { return /* binding */ SingleValueTrendValue; });
|
|
4261
5473
|
|
|
4262
5474
|
// EXTERNAL MODULE: external "@babel/runtime/helpers/extends"
|
|
4263
|
-
var extends_ = __webpack_require__(
|
|
5475
|
+
var extends_ = __webpack_require__(52);
|
|
4264
5476
|
var extends_default = /*#__PURE__*/__webpack_require__.n(extends_);
|
|
4265
5477
|
|
|
4266
5478
|
// EXTERNAL MODULE: external "react"
|
|
4267
|
-
var external_react_ = __webpack_require__(
|
|
5479
|
+
var external_react_ = __webpack_require__(0);
|
|
4268
5480
|
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
4269
5481
|
|
|
4270
5482
|
// EXTERNAL MODULE: external "prop-types"
|
|
4271
|
-
var external_prop_types_ = __webpack_require__(
|
|
5483
|
+
var external_prop_types_ = __webpack_require__(1);
|
|
4272
5484
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
4273
5485
|
|
|
4274
5486
|
// EXTERNAL MODULE: external "styled-components"
|
|
@@ -4276,14 +5488,14 @@ var external_styled_components_ = __webpack_require__(4);
|
|
|
4276
5488
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
4277
5489
|
|
|
4278
5490
|
// EXTERNAL MODULE: ./src/common/utils/singleValueUtils.js
|
|
4279
|
-
var singleValueUtils = __webpack_require__(
|
|
5491
|
+
var singleValueUtils = __webpack_require__(24);
|
|
4280
5492
|
|
|
4281
5493
|
// EXTERNAL MODULE: external "@splunk/react-icons/ArrowUp"
|
|
4282
|
-
var ArrowUp_ = __webpack_require__(
|
|
5494
|
+
var ArrowUp_ = __webpack_require__(79);
|
|
4283
5495
|
var ArrowUp_default = /*#__PURE__*/__webpack_require__.n(ArrowUp_);
|
|
4284
5496
|
|
|
4285
5497
|
// EXTERNAL MODULE: external "@splunk/react-icons/ArrowDown"
|
|
4286
|
-
var ArrowDown_ = __webpack_require__(
|
|
5498
|
+
var ArrowDown_ = __webpack_require__(80);
|
|
4287
5499
|
var ArrowDown_default = /*#__PURE__*/__webpack_require__.n(ArrowDown_);
|
|
4288
5500
|
|
|
4289
5501
|
// CONCATENATED MODULE: ./src/SingleValueBasic/TrendValue.jsx
|
|
@@ -4353,7 +5565,7 @@ TrendValue_SingleValueContent.propTypes = {
|
|
|
4353
5565
|
};
|
|
4354
5566
|
/* harmony default export */ var TrendValue = (TrendValue_SingleValueContent);
|
|
4355
5567
|
// EXTERNAL MODULE: external "cssesc"
|
|
4356
|
-
var external_cssesc_ = __webpack_require__(
|
|
5568
|
+
var external_cssesc_ = __webpack_require__(81);
|
|
4357
5569
|
var external_cssesc_default = /*#__PURE__*/__webpack_require__.n(external_cssesc_);
|
|
4358
5570
|
|
|
4359
5571
|
// CONCATENATED MODULE: ./src/SingleValueBasic/MajorValue.jsx
|
|
@@ -4550,49 +5762,63 @@ var SingleValueTrendValue = TrendValue;
|
|
|
4550
5762
|
|
|
4551
5763
|
/***/ }),
|
|
4552
5764
|
|
|
4553
|
-
/***/
|
|
5765
|
+
/***/ 76:
|
|
5766
|
+
/***/ (function(module, exports) {
|
|
5767
|
+
|
|
5768
|
+
module.exports = require("@splunk/visualizations-shared/trellisUtils");
|
|
5769
|
+
|
|
5770
|
+
/***/ }),
|
|
5771
|
+
|
|
5772
|
+
/***/ 77:
|
|
4554
5773
|
/***/ (function(module, exports) {
|
|
4555
5774
|
|
|
4556
5775
|
module.exports = require("lodash/pick");
|
|
4557
5776
|
|
|
4558
5777
|
/***/ }),
|
|
4559
5778
|
|
|
4560
|
-
/***/
|
|
5779
|
+
/***/ 78:
|
|
4561
5780
|
/***/ (function(module, exports) {
|
|
4562
5781
|
|
|
4563
5782
|
module.exports = require("lodash/isEmpty");
|
|
4564
5783
|
|
|
4565
5784
|
/***/ }),
|
|
4566
5785
|
|
|
4567
|
-
/***/
|
|
5786
|
+
/***/ 79:
|
|
4568
5787
|
/***/ (function(module, exports) {
|
|
4569
5788
|
|
|
4570
5789
|
module.exports = require("@splunk/react-icons/ArrowUp");
|
|
4571
5790
|
|
|
4572
5791
|
/***/ }),
|
|
4573
5792
|
|
|
4574
|
-
/***/
|
|
5793
|
+
/***/ 8:
|
|
5794
|
+
/***/ (function(module, exports) {
|
|
5795
|
+
|
|
5796
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
5797
|
+
|
|
5798
|
+
/***/ }),
|
|
5799
|
+
|
|
5800
|
+
/***/ 80:
|
|
4575
5801
|
/***/ (function(module, exports) {
|
|
4576
5802
|
|
|
4577
5803
|
module.exports = require("@splunk/react-icons/ArrowDown");
|
|
4578
5804
|
|
|
4579
5805
|
/***/ }),
|
|
4580
5806
|
|
|
4581
|
-
/***/
|
|
5807
|
+
/***/ 81:
|
|
4582
5808
|
/***/ (function(module, exports) {
|
|
4583
5809
|
|
|
4584
5810
|
module.exports = require("cssesc");
|
|
4585
5811
|
|
|
4586
5812
|
/***/ }),
|
|
4587
5813
|
|
|
4588
|
-
/***/
|
|
5814
|
+
/***/ 84:
|
|
4589
5815
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4590
5816
|
|
|
4591
5817
|
"use strict";
|
|
4592
5818
|
__webpack_require__.r(__webpack_exports__);
|
|
4593
5819
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
4594
5820
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
4595
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5821
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
|
4596
5822
|
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
4597
5823
|
|
|
4598
5824
|
|
|
@@ -4609,14 +5835,21 @@ var StaticBackgroundColorEditor = {
|
|
|
4609
5835
|
|
|
4610
5836
|
/***/ }),
|
|
4611
5837
|
|
|
4612
|
-
/***/
|
|
5838
|
+
/***/ 87:
|
|
4613
5839
|
/***/ (function(module, exports) {
|
|
4614
5840
|
|
|
4615
|
-
module.exports = require("@
|
|
5841
|
+
module.exports = require("@splunk/react-ui/Paginator");
|
|
4616
5842
|
|
|
4617
5843
|
/***/ }),
|
|
4618
5844
|
|
|
4619
|
-
/***/
|
|
5845
|
+
/***/ 9:
|
|
5846
|
+
/***/ (function(module, exports) {
|
|
5847
|
+
|
|
5848
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
5849
|
+
|
|
5850
|
+
/***/ }),
|
|
5851
|
+
|
|
5852
|
+
/***/ 95:
|
|
4620
5853
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4621
5854
|
|
|
4622
5855
|
"use strict";
|
|
@@ -4624,7 +5857,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4624
5857
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicMajorColorEditor", function() { return getDynamicMajorColorEditor; });
|
|
4625
5858
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
4626
5859
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
4627
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5860
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
|
4628
5861
|
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
4629
5862
|
|
|
4630
5863
|
|
|
@@ -4632,7 +5865,7 @@ var getDynamicMajorColorEditor = function getDynamicMajorColorEditor(_ref) {
|
|
|
4632
5865
|
var defaultContext = _ref.defaultContext,
|
|
4633
5866
|
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
4634
5867
|
return {
|
|
4635
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('
|
|
5868
|
+
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value'),
|
|
4636
5869
|
option: 'majorColor',
|
|
4637
5870
|
context: 'majorColorEditorConfig',
|
|
4638
5871
|
editor: 'editor.dynamicColor',
|
|
@@ -4641,7 +5874,7 @@ var getDynamicMajorColorEditor = function getDynamicMajorColorEditor(_ref) {
|
|
|
4641
5874
|
return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
|
|
4642
5875
|
},
|
|
4643
5876
|
editorProps: {
|
|
4644
|
-
labelPosition: '
|
|
5877
|
+
labelPosition: 'top',
|
|
4645
5878
|
flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: major value'),
|
|
4646
5879
|
formatters: [{
|
|
4647
5880
|
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
|
|
@@ -4667,7 +5900,7 @@ var getDynamicMajorColorEditor = function getDynamicMajorColorEditor(_ref) {
|
|
|
4667
5900
|
|
|
4668
5901
|
/***/ }),
|
|
4669
5902
|
|
|
4670
|
-
/***/
|
|
5903
|
+
/***/ 96:
|
|
4671
5904
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4672
5905
|
|
|
4673
5906
|
"use strict";
|
|
@@ -4675,7 +5908,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4675
5908
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicTrendColorEditor", function() { return getDynamicTrendColorEditor; });
|
|
4676
5909
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
4677
5910
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
4678
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5911
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
|
4679
5912
|
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
4680
5913
|
|
|
4681
5914
|
|
|
@@ -4683,7 +5916,7 @@ var getDynamicTrendColorEditor = function getDynamicTrendColorEditor(_ref) {
|
|
|
4683
5916
|
var defaultContext = _ref.defaultContext,
|
|
4684
5917
|
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
4685
5918
|
return {
|
|
4686
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('
|
|
5919
|
+
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend value'),
|
|
4687
5920
|
option: 'trendColor',
|
|
4688
5921
|
context: 'trendColorEditorConfig',
|
|
4689
5922
|
editor: 'editor.dynamicColor',
|
|
@@ -4692,7 +5925,7 @@ var getDynamicTrendColorEditor = function getDynamicTrendColorEditor(_ref) {
|
|
|
4692
5925
|
return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
|
|
4693
5926
|
},
|
|
4694
5927
|
editorProps: {
|
|
4695
|
-
labelPosition: '
|
|
5928
|
+
labelPosition: 'top',
|
|
4696
5929
|
flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: trend value'),
|
|
4697
5930
|
formatters: [{
|
|
4698
5931
|
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
|
|
@@ -4712,14 +5945,7 @@ var getDynamicTrendColorEditor = function getDynamicTrendColorEditor(_ref) {
|
|
|
4712
5945
|
|
|
4713
5946
|
/***/ }),
|
|
4714
5947
|
|
|
4715
|
-
/***/
|
|
4716
|
-
/***/ (function(module, exports) {
|
|
4717
|
-
|
|
4718
|
-
module.exports = require("@splunk/themes/variables");
|
|
4719
|
-
|
|
4720
|
-
/***/ }),
|
|
4721
|
-
|
|
4722
|
-
/***/ 90:
|
|
5948
|
+
/***/ 97:
|
|
4723
5949
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4724
5950
|
|
|
4725
5951
|
"use strict";
|
|
@@ -4727,7 +5953,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4727
5953
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicBackgroundColorEditor", function() { return getDynamicBackgroundColorEditor; });
|
|
4728
5954
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
4729
5955
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
4730
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5956
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
|
4731
5957
|
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
4732
5958
|
|
|
4733
5959
|
|
|
@@ -4735,7 +5961,7 @@ var getDynamicBackgroundColorEditor = function getDynamicBackgroundColorEditor(_
|
|
|
4735
5961
|
var defaultContext = _ref.defaultContext,
|
|
4736
5962
|
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
4737
5963
|
return {
|
|
4738
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('
|
|
5964
|
+
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Background'),
|
|
4739
5965
|
option: 'backgroundColor',
|
|
4740
5966
|
context: 'backgroundColorEditorConfig',
|
|
4741
5967
|
editor: 'editor.dynamicColor',
|
|
@@ -4744,7 +5970,7 @@ var getDynamicBackgroundColorEditor = function getDynamicBackgroundColorEditor(_
|
|
|
4744
5970
|
return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.backgroundColor);
|
|
4745
5971
|
},
|
|
4746
5972
|
editorProps: {
|
|
4747
|
-
labelPosition: '
|
|
5973
|
+
labelPosition: 'top',
|
|
4748
5974
|
flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: background'),
|
|
4749
5975
|
formatters: [{
|
|
4750
5976
|
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
|
|
@@ -4774,7 +6000,7 @@ var getDynamicBackgroundColorEditor = function getDynamicBackgroundColorEditor(_
|
|
|
4774
6000
|
|
|
4775
6001
|
/***/ }),
|
|
4776
6002
|
|
|
4777
|
-
/***/
|
|
6003
|
+
/***/ 98:
|
|
4778
6004
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4779
6005
|
|
|
4780
6006
|
"use strict";
|
|
@@ -4825,14 +6051,14 @@ var StaticMajorAndTrendLayout = [[{
|
|
|
4825
6051
|
|
|
4826
6052
|
/***/ }),
|
|
4827
6053
|
|
|
4828
|
-
/***/
|
|
6054
|
+
/***/ 99:
|
|
4829
6055
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4830
6056
|
|
|
4831
6057
|
"use strict";
|
|
4832
6058
|
__webpack_require__.r(__webpack_exports__);
|
|
4833
6059
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
4834
6060
|
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
4835
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
6061
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
|
4836
6062
|
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
4837
6063
|
|
|
4838
6064
|
|
|
@@ -4847,41 +6073,6 @@ var StaticMajorColorEditor = {
|
|
|
4847
6073
|
};
|
|
4848
6074
|
/* harmony default export */ __webpack_exports__["default"] = (StaticMajorColorEditor);
|
|
4849
6075
|
|
|
4850
|
-
/***/ }),
|
|
4851
|
-
|
|
4852
|
-
/***/ 93:
|
|
4853
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4854
|
-
|
|
4855
|
-
"use strict";
|
|
4856
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4857
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
4858
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
4859
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
|
|
4860
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
var StaticTrendColorEditor = {
|
|
4864
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend value'),
|
|
4865
|
-
option: 'trendColor',
|
|
4866
|
-
editor: 'editor.color',
|
|
4867
|
-
showEditor: function showEditor(_ref) {
|
|
4868
|
-
var options = _ref.options;
|
|
4869
|
-
return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
|
|
4870
|
-
},
|
|
4871
|
-
isDisabled: function isDisabled(_ref2) {
|
|
4872
|
-
var options = _ref2.options;
|
|
4873
|
-
return options.trendDisplay === 'off';
|
|
4874
|
-
}
|
|
4875
|
-
};
|
|
4876
|
-
/* harmony default export */ __webpack_exports__["default"] = (StaticTrendColorEditor);
|
|
4877
|
-
|
|
4878
|
-
/***/ }),
|
|
4879
|
-
|
|
4880
|
-
/***/ 99:
|
|
4881
|
-
/***/ (function(module, exports) {
|
|
4882
|
-
|
|
4883
|
-
module.exports = require("@splunk/react-sparkline/Line");
|
|
4884
|
-
|
|
4885
6076
|
/***/ })
|
|
4886
6077
|
|
|
4887
6078
|
/******/ });
|