@splunk/visualizations 26.4.1 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +1262 -1600
- package/Area.config.js.map +7 -1
- package/Area.js +3002 -4930
- package/Area.js.map +7 -1
- package/Bar.config.js +1247 -1574
- package/Bar.config.js.map +7 -1
- package/Bar.js +2921 -4843
- package/Bar.js.map +7 -1
- package/Bubble.config.js +896 -1213
- package/Bubble.config.js.map +7 -1
- package/Bubble.js +2517 -4483
- package/Bubble.js.map +7 -1
- package/ChoroplethSvg.config.js +282 -582
- package/ChoroplethSvg.config.js.map +7 -1
- package/ChoroplethSvg.js +2004 -3810
- package/ChoroplethSvg.js.map +7 -1
- package/Column.config.js +1208 -1541
- package/Column.config.js.map +7 -1
- package/Column.js +2930 -4886
- package/Column.js.map +7 -1
- package/Ellipse.config.js +443 -774
- package/Ellipse.config.js.map +7 -1
- package/Ellipse.js +1651 -3341
- package/Ellipse.js.map +7 -1
- package/Events.config.js +207 -492
- package/Events.config.js.map +7 -1
- package/Events.js +2615 -4649
- package/Events.js.map +7 -1
- package/FillerGauge.config.js +420 -775
- package/FillerGauge.config.js.map +7 -1
- package/FillerGauge.js +2137 -4578
- package/FillerGauge.js.map +7 -1
- package/Image.config.js +144 -411
- package/Image.config.js.map +7 -1
- package/Image.js +1395 -3048
- package/Image.js.map +7 -1
- package/Line.config.js +1278 -1625
- package/Line.config.js.map +7 -1
- package/Line.js +2954 -4926
- package/Line.js.map +7 -1
- package/LinkGraph.config.js +390 -632
- package/LinkGraph.config.js.map +7 -1
- package/LinkGraph.js +5243 -6190
- package/LinkGraph.js.map +7 -1
- package/MIGRATION.md +6 -0
- package/Map.config.js +501 -801
- package/Map.config.js.map +7 -1
- package/Map.js +3369 -5676
- package/Map.js.map +7 -1
- package/Markdown.config.js +232 -528
- package/Markdown.config.js.map +7 -1
- package/Markdown.js +1645 -3216
- package/Markdown.js.map +7 -1
- package/MarkerGauge.config.js +308 -613
- package/MarkerGauge.config.js.map +7 -1
- package/MarkerGauge.js +2189 -4535
- package/MarkerGauge.js.map +7 -1
- package/ParallelCoordinates.config.js +282 -581
- package/ParallelCoordinates.config.js.map +7 -1
- package/ParallelCoordinates.js +2023 -4720
- package/ParallelCoordinates.js.map +7 -1
- package/Pie.config.js +278 -547
- package/Pie.config.js.map +7 -1
- package/Pie.js +1996 -3990
- package/Pie.js.map +7 -1
- package/Punchcard.config.js +291 -578
- package/Punchcard.config.js.map +7 -1
- package/Punchcard.js +2709 -5042
- package/Punchcard.js.map +7 -1
- package/Rectangle.config.js +455 -770
- package/Rectangle.config.js.map +7 -1
- package/Rectangle.js +1638 -3262
- package/Rectangle.js.map +7 -1
- package/Sankey.config.js +291 -626
- package/Sankey.config.js.map +7 -1
- package/Sankey.js +2737 -4909
- package/Sankey.js.map +7 -1
- package/Scatter.config.js +876 -1194
- package/Scatter.config.js.map +7 -1
- package/Scatter.js +2529 -4477
- package/Scatter.js.map +7 -1
- package/SingleValue.config.js +819 -1251
- package/SingleValue.config.js.map +7 -1
- package/SingleValue.js +4203 -7413
- package/SingleValue.js.map +7 -1
- package/SingleValueBasic.js +382 -1527
- package/SingleValueBasic.js.map +7 -1
- package/SingleValueIcon.config.js +781 -1207
- package/SingleValueIcon.config.js.map +7 -1
- package/SingleValueIcon.js +3350 -6285
- package/SingleValueIcon.js.map +7 -1
- package/SingleValueRadial.config.js +708 -1119
- package/SingleValueRadial.config.js.map +7 -1
- package/SingleValueRadial.js +3808 -6965
- package/SingleValueRadial.js.map +7 -1
- package/SparkLine.js +439 -746
- package/SparkLine.js.map +7 -1
- package/Table.config.js +565 -879
- package/Table.config.js.map +7 -1
- package/Table.js +3277 -5381
- package/Table.js.map +7 -1
- package/common/Charting.js +481 -1468
- package/common/Charting.js.map +7 -1
- package/common/ChartingApi.js +46 -170
- package/common/ChartingApi.js.map +7 -1
- package/common/DocExampleWithVizSandbox.js +270 -473
- package/common/DocExampleWithVizSandbox.js.map +7 -1
- package/common/EventsDoc.js +172 -464
- package/common/EventsDoc.js.map +7 -1
- package/common/GaugeMajorTicks.js +249 -347
- package/common/GaugeMajorTicks.js.map +7 -1
- package/common/GaugeValueMarker.js +201 -311
- package/common/GaugeValueMarker.js.map +7 -1
- package/common/OptionsDoc.js +347 -912
- package/common/OptionsDoc.js.map +7 -1
- package/common/OverviewDoc.js +435 -769
- package/common/OverviewDoc.js.map +7 -1
- package/common/SplunkVisualization.js +116 -259
- package/common/SplunkVisualization.js.map +7 -1
- package/common/SplunkVisualizationApi.js +40 -156
- package/common/SplunkVisualizationApi.js.map +7 -1
- package/common/ThemesDoc.js +271 -420
- package/common/ThemesDoc.js.map +7 -1
- package/common/chartingUtils.js +140 -312
- package/common/chartingUtils.js.map +7 -1
- package/common/docUtils.js +148 -266
- package/common/docUtils.js.map +7 -1
- package/common/gaugeUtils.js +280 -808
- package/common/gaugeUtils.js.map +7 -1
- package/common/shapeUtils.js +106 -211
- package/common/shapeUtils.js.map +7 -1
- package/common/utils/configUtils.js +126 -252
- package/common/utils/configUtils.js.map +7 -1
- package/common/utils/dataUtils.js +217 -812
- package/common/utils/dataUtils.js.map +7 -1
- package/common/utils/featureFlagUtils.js +53 -133
- package/common/utils/featureFlagUtils.js.map +7 -1
- package/common/utils/hocUtils.js +32 -122
- package/common/utils/hocUtils.js.map +7 -1
- package/common/utils/mapUtils.js +502 -1337
- package/common/utils/mapUtils.js.map +7 -1
- package/common/utils/singleValueUtils.js +462 -1010
- package/common/utils/singleValueUtils.js.map +7 -1
- package/common/utils/testHelper.js +92 -146
- package/common/utils/testHelper.js.map +7 -1
- package/common/utils/trellisUtils.js +237 -489
- package/common/utils/trellisUtils.js.map +7 -1
- package/common/utils/urlUtils.js +28 -112
- package/common/utils/urlUtils.js.map +7 -1
- package/common/withDashboardViz.js +1168 -2438
- package/common/withDashboardViz.js.map +7 -1
- package/package.json +52 -43
package/FillerGauge.config.js
CHANGED
|
@@ -1,550 +1,298 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
55
|
-
/******/ };
|
|
56
|
-
/******/
|
|
57
|
-
/******/ // create a fake namespace object
|
|
58
|
-
/******/ // mode & 1: value is a module id, require it
|
|
59
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
60
|
-
/******/ // mode & 4: return value when already ns object
|
|
61
|
-
/******/ // mode & 8|1: behave like require
|
|
62
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
63
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
64
|
-
/******/ if(mode & 8) return value;
|
|
65
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
66
|
-
/******/ var ns = Object.create(null);
|
|
67
|
-
/******/ __webpack_require__.r(ns);
|
|
68
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
69
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
70
|
-
/******/ return ns;
|
|
71
|
-
/******/ };
|
|
72
|
-
/******/
|
|
73
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
74
|
-
/******/ __webpack_require__.n = function(module) {
|
|
75
|
-
/******/ var getter = module && module.__esModule ?
|
|
76
|
-
/******/ function getDefault() { return module['default']; } :
|
|
77
|
-
/******/ function getModuleExports() { return module; };
|
|
78
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
79
|
-
/******/ return getter;
|
|
80
|
-
/******/ };
|
|
81
|
-
/******/
|
|
82
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
83
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
84
|
-
/******/
|
|
85
|
-
/******/ // __webpack_public_path__
|
|
86
|
-
/******/ __webpack_require__.p = "";
|
|
87
|
-
/******/
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s = 46);
|
|
91
|
-
/******/ })
|
|
92
|
-
/************************************************************************/
|
|
93
|
-
/******/ ([
|
|
94
|
-
/* 0 */
|
|
95
|
-
/***/ (function(module, exports) {
|
|
96
|
-
|
|
97
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
98
|
-
|
|
99
|
-
/***/ }),
|
|
100
|
-
/* 1 */
|
|
101
|
-
/***/ (function(module, exports) {
|
|
102
|
-
|
|
103
|
-
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
104
|
-
|
|
105
|
-
/***/ }),
|
|
106
|
-
/* 2 */
|
|
107
|
-
/***/ (function(module, exports) {
|
|
108
|
-
|
|
109
|
-
module.exports = require("@splunk/visualization-schemas");
|
|
110
|
-
|
|
111
|
-
/***/ }),
|
|
112
|
-
/* 3 */
|
|
113
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
114
|
-
|
|
115
|
-
"use strict";
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var _toConsumableArray = __webpack_require__(1);
|
|
119
|
-
|
|
120
|
-
Object.defineProperty(exports, "__esModule", {
|
|
121
|
-
value: true
|
|
1
|
+
/* Copyright © 2020 Splunk Inc.
|
|
2
|
+
SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
|
|
3
|
+
in part without a valid written license from Splunk Inc. is PROHIBITED. */
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
+
var __spreadValues = (a, b) => {
|
|
16
|
+
for (var prop in b || (b = {}))
|
|
17
|
+
if (__hasOwnProp.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
if (__getOwnPropSymbols)
|
|
20
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
+
if (__propIsEnum.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
}
|
|
24
|
+
return a;
|
|
25
|
+
};
|
|
26
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
+
var __export = (target, all) => {
|
|
28
|
+
for (var name in all)
|
|
29
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
30
|
+
};
|
|
31
|
+
var __copyProps = (to, from, except, desc) => {
|
|
32
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
33
|
+
for (let key of __getOwnPropNames(from))
|
|
34
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
35
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
36
|
+
}
|
|
37
|
+
return to;
|
|
38
|
+
};
|
|
39
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
40
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
41
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
42
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
43
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
44
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
45
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
46
|
+
mod
|
|
47
|
+
));
|
|
48
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
49
|
+
|
|
50
|
+
// src/FillerGauge/config.ts
|
|
51
|
+
var config_exports = {};
|
|
52
|
+
__export(config_exports, {
|
|
53
|
+
default: () => config_default
|
|
122
54
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
var lodash_1 = __webpack_require__(5); // included for backwards compatibility
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
var visualization_schemas_1 = __webpack_require__(2);
|
|
55
|
+
module.exports = __toCommonJS(config_exports);
|
|
129
56
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
57
|
+
// esm-externals:@splunk/ui-utils/i18n
|
|
58
|
+
var i18n_exports = {};
|
|
59
|
+
__export(i18n_exports, {
|
|
60
|
+
default: () => i18n_default
|
|
61
|
+
});
|
|
62
|
+
var defaultImport = __toESM(require("@splunk/ui-utils/i18n"));
|
|
63
|
+
__reExport(i18n_exports, require("@splunk/ui-utils/i18n"));
|
|
64
|
+
var i18n_default = "default" in defaultImport ? defaultImport.default : defaultImport;
|
|
65
|
+
|
|
66
|
+
// esm-externals:@splunk/visualization-schemas
|
|
67
|
+
var visualization_schemas_exports = {};
|
|
68
|
+
__export(visualization_schemas_exports, {
|
|
69
|
+
default: () => visualization_schemas_default
|
|
70
|
+
});
|
|
71
|
+
var defaultImport2 = __toESM(require("@splunk/visualization-schemas"));
|
|
72
|
+
__reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
|
|
73
|
+
var visualization_schemas_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
|
|
74
|
+
|
|
75
|
+
// esm-externals:@splunk/themes/pick
|
|
76
|
+
var pick_exports = {};
|
|
77
|
+
__export(pick_exports, {
|
|
78
|
+
default: () => pick_default
|
|
79
|
+
});
|
|
80
|
+
var defaultImport3 = __toESM(require("@splunk/themes/pick"));
|
|
81
|
+
__reExport(pick_exports, require("@splunk/themes/pick"));
|
|
82
|
+
var pick_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
|
|
83
|
+
|
|
84
|
+
// esm-externals:@splunk/themes/variables
|
|
85
|
+
var variables_exports = {};
|
|
86
|
+
__export(variables_exports, {
|
|
87
|
+
default: () => variables_default
|
|
88
|
+
});
|
|
89
|
+
var defaultImport4 = __toESM(require("@splunk/themes/variables"));
|
|
90
|
+
__reExport(variables_exports, require("@splunk/themes/variables"));
|
|
91
|
+
var variables_default = "default" in defaultImport4 ? defaultImport4.default : defaultImport4;
|
|
92
|
+
|
|
93
|
+
// esm-externals:@splunk/visualization-color-palettes
|
|
94
|
+
var visualization_color_palettes_exports = {};
|
|
95
|
+
__export(visualization_color_palettes_exports, {
|
|
96
|
+
default: () => visualization_color_palettes_default
|
|
97
|
+
});
|
|
98
|
+
var defaultImport5 = __toESM(require("@splunk/visualization-color-palettes"));
|
|
99
|
+
__reExport(visualization_color_palettes_exports, require("@splunk/visualization-color-palettes"));
|
|
100
|
+
var visualization_color_palettes_default = "default" in defaultImport5 ? defaultImport5.default : defaultImport5;
|
|
101
|
+
|
|
102
|
+
// esm-externals:@splunk/visualization-color-palettes/editors/PresetPalettes
|
|
103
|
+
var PresetPalettes_exports = {};
|
|
104
|
+
__export(PresetPalettes_exports, {
|
|
105
|
+
default: () => PresetPalettes_default
|
|
106
|
+
});
|
|
107
|
+
var defaultImport6 = __toESM(require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
|
|
108
|
+
__reExport(PresetPalettes_exports, require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
|
|
109
|
+
var PresetPalettes_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
|
|
110
|
+
|
|
111
|
+
// esm-externals:@splunk/visualization-icons
|
|
112
|
+
var visualization_icons_exports = {};
|
|
113
|
+
__export(visualization_icons_exports, {
|
|
114
|
+
default: () => visualization_icons_default
|
|
115
|
+
});
|
|
116
|
+
var defaultImport7 = __toESM(require("@splunk/visualization-icons"));
|
|
117
|
+
__reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
|
|
118
|
+
var visualization_icons_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
|
|
119
|
+
|
|
120
|
+
// esm-externals:@splunk/visualization-icons/placeholders
|
|
121
|
+
var placeholders_exports = {};
|
|
122
|
+
__export(placeholders_exports, {
|
|
123
|
+
default: () => placeholders_default
|
|
124
|
+
});
|
|
125
|
+
var defaultImport8 = __toESM(require("@splunk/visualization-icons/placeholders"));
|
|
126
|
+
__reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
|
|
127
|
+
var placeholders_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
|
|
128
|
+
|
|
129
|
+
// esm-externals:lodash
|
|
130
|
+
var lodash_exports = {};
|
|
131
|
+
__export(lodash_exports, {
|
|
132
|
+
default: () => lodash_default
|
|
133
|
+
});
|
|
134
|
+
var defaultImport9 = __toESM(require("lodash"));
|
|
135
|
+
__reExport(lodash_exports, require("lodash"));
|
|
136
|
+
var lodash_default = "default" in defaultImport9 ? defaultImport9.default : defaultImport9;
|
|
137
|
+
|
|
138
|
+
// esm-externals:@splunk/visualizations-shared/configUtils
|
|
139
|
+
var configUtils_exports = {};
|
|
140
|
+
__export(configUtils_exports, {
|
|
141
|
+
default: () => configUtils_default
|
|
135
142
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
* @param vizConfig a Visualization Config
|
|
140
|
-
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
141
|
-
* and containing `open: false` for all editor panels in editorConfig
|
|
142
|
-
*/
|
|
143
|
+
var defaultImport10 = __toESM(require("@splunk/visualizations-shared/configUtils"));
|
|
144
|
+
__reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
|
|
145
|
+
var configUtils_default = "default" in defaultImport10 ? defaultImport10.default : defaultImport10;
|
|
143
146
|
|
|
147
|
+
// src/common/utils/configUtils.ts
|
|
144
148
|
function enhanceConfig(vizConfig) {
|
|
145
|
-
|
|
146
|
-
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
147
|
-
|
|
148
|
-
open:
|
|
149
|
-
}
|
|
150
|
-
|
|
149
|
+
const enhancedConfig = __spreadValues({}, vizConfig);
|
|
150
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
151
|
+
(config2) => {
|
|
152
|
+
return __spreadProps(__spreadValues({}, config2), { open: config2.open || false });
|
|
153
|
+
}
|
|
154
|
+
);
|
|
151
155
|
return enhancedConfig;
|
|
152
156
|
}
|
|
153
|
-
|
|
154
|
-
exports.enhanceConfig = enhanceConfig;
|
|
155
|
-
/**
|
|
156
|
-
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
157
|
-
* Created for editor unit tests
|
|
158
|
-
* @param vizConfig a Visualization Config
|
|
159
|
-
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
function uncollapseEditorConfig(vizConfig) {
|
|
163
|
-
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
164
|
-
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
165
|
-
return Object.assign(Object.assign({}, config), {
|
|
166
|
-
open: true
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
return editorPanelUncollapsedConfig;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
173
|
-
|
|
174
|
-
function isDynamicOption(option) {
|
|
175
|
-
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
179
|
-
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
183
|
-
* if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset
|
|
184
|
-
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
185
|
-
* the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up
|
|
186
|
-
*
|
|
187
|
-
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
157
|
function hasCompatibleContexts(vizContext, presetContext) {
|
|
191
|
-
|
|
192
|
-
return presetContextKeys.every(
|
|
193
|
-
|
|
194
|
-
|
|
158
|
+
const presetContextKeys = Object.keys(presetContext);
|
|
159
|
+
return presetContextKeys.every(
|
|
160
|
+
(contextKey) => presetContext[contextKey] === void 0 && vizContext[contextKey] === void 0 || presetContext[contextKey] !== void 0 && vizContext[contextKey] !== void 0
|
|
161
|
+
);
|
|
195
162
|
}
|
|
196
|
-
/**
|
|
197
|
-
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
198
|
-
*/
|
|
199
|
-
|
|
200
|
-
|
|
201
163
|
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
202
|
-
|
|
203
|
-
return presetOptionKeys.every(
|
|
204
|
-
|
|
205
|
-
|
|
164
|
+
const presetOptionKeys = Object.keys(presetOptions);
|
|
165
|
+
return presetOptionKeys.every(
|
|
166
|
+
(optionKey) => (0, configUtils_exports.isDynamicOption)(presetOptions[optionKey]) === (0, configUtils_exports.isDynamicOption)(vizOptions[optionKey])
|
|
167
|
+
);
|
|
206
168
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
214
|
-
*/
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
218
|
-
return presets.find(function (preset) {
|
|
219
|
-
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
220
|
-
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
221
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
222
|
-
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
223
|
-
// if not, then the preset is invalid in config.ts
|
|
224
|
-
|
|
169
|
+
function getInitialPreset(vizContext, vizOptions, presets2) {
|
|
170
|
+
return presets2.find((preset) => {
|
|
171
|
+
const presetContext = (0, lodash_exports.get)(preset, ["value", "context"], {});
|
|
172
|
+
const presetOptions = (0, lodash_exports.get)(preset, ["value", "options"], {});
|
|
173
|
+
const presetContextKeys = Object.keys(presetContext);
|
|
174
|
+
const presetOptionKeys = Object.keys(presetOptions);
|
|
225
175
|
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
226
176
|
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
227
177
|
});
|
|
228
178
|
}
|
|
229
179
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
180
|
+
// src/common/editorConfig/Gauge.ts
|
|
181
|
+
var gauge = {
|
|
182
|
+
label: (0, i18n_exports._)("Data display"),
|
|
183
|
+
layout: [
|
|
184
|
+
[
|
|
185
|
+
{
|
|
186
|
+
label: (0, i18n_exports._)("Value display"),
|
|
187
|
+
option: "valueDisplay",
|
|
188
|
+
editor: "editor.radioBar",
|
|
189
|
+
editorProps: {
|
|
190
|
+
values: [
|
|
191
|
+
{ label: (0, i18n_exports._)("Number"), value: "number" },
|
|
192
|
+
{ label: (0, i18n_exports._)("Percentage"), value: "percentage" },
|
|
193
|
+
{ label: (0, i18n_exports._)("Off"), value: "off" }
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
[
|
|
199
|
+
{
|
|
200
|
+
label: (0, i18n_exports._)("Label display"),
|
|
201
|
+
option: "labelDisplay",
|
|
202
|
+
editor: "editor.radioBar",
|
|
203
|
+
editorProps: {
|
|
204
|
+
values: [
|
|
205
|
+
{ label: (0, i18n_exports._)("Numbers"), value: "number" },
|
|
206
|
+
{ label: (0, i18n_exports._)("Percentages"), value: "percentage" },
|
|
207
|
+
{ label: (0, i18n_exports._)("Off"), value: "off" }
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
[
|
|
213
|
+
{
|
|
214
|
+
label: (0, i18n_exports._)("Orientation"),
|
|
215
|
+
option: "orientation",
|
|
216
|
+
editor: "editor.radioBar",
|
|
217
|
+
editorProps: {
|
|
218
|
+
values: [
|
|
219
|
+
{ label: (0, i18n_exports._)("Vertical"), value: "vertical" },
|
|
220
|
+
{ label: (0, i18n_exports._)("Horizontal"), value: "horizontal" }
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
]
|
|
263
226
|
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
module.exports = require("lodash");
|
|
278
|
-
|
|
279
|
-
/***/ }),
|
|
280
|
-
/* 6 */
|
|
281
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
282
|
-
|
|
283
|
-
"use strict";
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
Object.defineProperty(exports, "__esModule", {
|
|
287
|
-
value: true
|
|
288
|
-
});
|
|
289
|
-
exports.VizBehavior = void 0;
|
|
290
|
-
var VizBehavior;
|
|
291
|
-
|
|
292
|
-
(function (VizBehavior) {
|
|
293
|
-
/**
|
|
294
|
-
* Dynamic Options Behavior.
|
|
295
|
-
* This allows visualization options to be powered by data
|
|
296
|
-
*
|
|
297
|
-
* **Example**
|
|
298
|
-
*
|
|
299
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
300
|
-
* would configure sparklineValues with an array of data points
|
|
301
|
-
* coming from the first series in the primary datasource
|
|
302
|
-
*
|
|
303
|
-
*/
|
|
304
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
305
|
-
VizBehavior["EVENTS"] = "events";
|
|
306
|
-
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
307
|
-
/**
|
|
308
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
309
|
-
* missing.
|
|
310
|
-
* @type {string}
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
|
-
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
314
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
315
|
-
VizBehavior["TRELLIS"] = "trellis";
|
|
316
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
317
|
-
|
|
318
|
-
/***/ }),
|
|
319
|
-
/* 7 */
|
|
320
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
321
|
-
|
|
322
|
-
"use strict";
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
Object.defineProperty(exports, "__esModule", {
|
|
326
|
-
value: true
|
|
327
|
-
});
|
|
328
|
-
exports.VizCategory = void 0;
|
|
329
|
-
var VizCategory;
|
|
330
|
-
|
|
331
|
-
(function (VizCategory) {
|
|
332
|
-
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
333
|
-
VizCategory["TRENDS"] = "Trends";
|
|
334
|
-
VizCategory["COMPARISONS"] = "Comparisons";
|
|
335
|
-
VizCategory["TABLE"] = "Table";
|
|
336
|
-
VizCategory["GAUGE"] = "Gauge";
|
|
337
|
-
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
338
|
-
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
339
|
-
VizCategory["SHAPES"] = "Shapes";
|
|
340
|
-
VizCategory["MISC"] = "misc";
|
|
341
|
-
VizCategory["FLOW"] = "Flow";
|
|
342
|
-
VizCategory["CORRELATION"] = "Correlation";
|
|
343
|
-
VizCategory["SPATIAL"] = "Spatial";
|
|
344
|
-
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
345
|
-
|
|
346
|
-
/***/ }),
|
|
347
|
-
/* 8 */
|
|
348
|
-
/***/ (function(module, exports) {
|
|
349
|
-
|
|
350
|
-
module.exports = require("@splunk/themes/pick");
|
|
351
|
-
|
|
352
|
-
/***/ }),
|
|
353
|
-
/* 9 */
|
|
354
|
-
/***/ (function(module, exports) {
|
|
355
|
-
|
|
356
|
-
module.exports = require("@splunk/themes/variables");
|
|
357
|
-
|
|
358
|
-
/***/ }),
|
|
359
|
-
/* 10 */
|
|
360
|
-
/***/ (function(module, exports) {
|
|
361
|
-
|
|
362
|
-
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
363
|
-
|
|
364
|
-
/***/ }),
|
|
365
|
-
/* 11 */,
|
|
366
|
-
/* 12 */
|
|
367
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
368
|
-
|
|
369
|
-
"use strict";
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
Object.defineProperty(exports, "__esModule", {
|
|
373
|
-
value: true
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
var i18n_1 = __webpack_require__(0);
|
|
377
|
-
|
|
378
|
-
var background = function background(_ref) {
|
|
379
|
-
var label = _ref.label,
|
|
380
|
-
themes = _ref.themes,
|
|
381
|
-
labelPosition = _ref.labelPosition;
|
|
382
|
-
return [{
|
|
383
|
-
label: (0, i18n_1._)(label || 'Background color'),
|
|
384
|
-
option: 'backgroundColor',
|
|
385
|
-
editor: 'editor.color',
|
|
227
|
+
var Gauge_default = gauge;
|
|
228
|
+
|
|
229
|
+
// src/common/editorConfig/BackgroundColor.ts
|
|
230
|
+
var background = ({
|
|
231
|
+
label,
|
|
232
|
+
themes: themes2,
|
|
233
|
+
labelPosition
|
|
234
|
+
}) => [
|
|
235
|
+
{
|
|
236
|
+
label: (0, i18n_exports._)(label || "Background color"),
|
|
237
|
+
option: "backgroundColor",
|
|
238
|
+
editor: "editor.color",
|
|
386
239
|
editorProps: {
|
|
387
|
-
labelPosition: labelPosition ||
|
|
388
|
-
themes:
|
|
240
|
+
labelPosition: labelPosition || "top",
|
|
241
|
+
themes: themes2
|
|
389
242
|
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
/* 33 */,
|
|
422
|
-
/* 34 */,
|
|
423
|
-
/* 35 */,
|
|
424
|
-
/* 36 */
|
|
425
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
426
|
-
|
|
427
|
-
"use strict";
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
Object.defineProperty(exports, "__esModule", {
|
|
431
|
-
value: true
|
|
243
|
+
}
|
|
244
|
+
];
|
|
245
|
+
var BackgroundColor_default = background;
|
|
246
|
+
|
|
247
|
+
// src/common/editorConfig/DynamicGaugeColorEditor.ts
|
|
248
|
+
var getDynamicGaugeColorEditor = ({ defaultContext: defaultContext2, defaultPalettesConfig: defaultPalettesConfig2 }) => ({
|
|
249
|
+
label: (0, i18n_exports._)("Gauge"),
|
|
250
|
+
option: "gaugeColor",
|
|
251
|
+
context: "gaugeColorConfig",
|
|
252
|
+
editor: "editor.dynamicColor",
|
|
253
|
+
showEditor: ({ options }) => (0, configUtils_exports.isDynamicOption)(options.gaugeColor),
|
|
254
|
+
editorProps: {
|
|
255
|
+
labelPosition: "top",
|
|
256
|
+
flyoutTitle: (0, i18n_exports._)("Dynamic coloring: gauge"),
|
|
257
|
+
formatters: [
|
|
258
|
+
{
|
|
259
|
+
label: (0, i18n_exports._)("Ranges"),
|
|
260
|
+
value: "rangeValue",
|
|
261
|
+
defaults: {
|
|
262
|
+
value: defaultContext2.gaugeColorConfig
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
dataSelectors: [
|
|
267
|
+
{
|
|
268
|
+
label: (0, i18n_exports._)("Value"),
|
|
269
|
+
value: "value"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
defaultPalettesConfig: defaultPalettesConfig2
|
|
273
|
+
}
|
|
432
274
|
});
|
|
433
275
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
option: 'valueDisplay',
|
|
441
|
-
editor: 'editor.radioBar',
|
|
442
|
-
editorProps: {
|
|
443
|
-
values: [{
|
|
444
|
-
label: (0, i18n_1._)('Number'),
|
|
445
|
-
value: 'number'
|
|
446
|
-
}, {
|
|
447
|
-
label: (0, i18n_1._)('Percentage'),
|
|
448
|
-
value: 'percentage'
|
|
449
|
-
}, {
|
|
450
|
-
label: (0, i18n_1._)('Off'),
|
|
451
|
-
value: 'off'
|
|
452
|
-
}]
|
|
453
|
-
}
|
|
454
|
-
}], [{
|
|
455
|
-
label: (0, i18n_1._)('Label display'),
|
|
456
|
-
option: 'labelDisplay',
|
|
457
|
-
editor: 'editor.radioBar',
|
|
458
|
-
editorProps: {
|
|
459
|
-
values: [{
|
|
460
|
-
label: (0, i18n_1._)('Numbers'),
|
|
461
|
-
value: 'number'
|
|
462
|
-
}, {
|
|
463
|
-
label: (0, i18n_1._)('Percentages'),
|
|
464
|
-
value: 'percentage'
|
|
465
|
-
}, {
|
|
466
|
-
label: (0, i18n_1._)('Off'),
|
|
467
|
-
value: 'off'
|
|
468
|
-
}]
|
|
469
|
-
}
|
|
470
|
-
}], [{
|
|
471
|
-
label: (0, i18n_1._)('Orientation'),
|
|
472
|
-
option: 'orientation',
|
|
473
|
-
editor: 'editor.radioBar',
|
|
474
|
-
editorProps: {
|
|
475
|
-
values: [{
|
|
476
|
-
label: (0, i18n_1._)('Vertical'),
|
|
477
|
-
value: 'vertical'
|
|
478
|
-
}, {
|
|
479
|
-
label: (0, i18n_1._)('Horizontal'),
|
|
480
|
-
value: 'horizontal'
|
|
481
|
-
}]
|
|
482
|
-
}
|
|
483
|
-
}]]
|
|
276
|
+
// src/common/editorConfig/StaticGaugeColorEditor.ts
|
|
277
|
+
var StaticGaugeColorEditor = {
|
|
278
|
+
label: (0, i18n_exports._)("Gauge"),
|
|
279
|
+
option: "gaugeColor",
|
|
280
|
+
editor: "editor.color",
|
|
281
|
+
showEditor: ({ options }) => !(0, configUtils_exports.isDynamicOption)(options.gaugeColor)
|
|
484
282
|
};
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
/***/ }),
|
|
488
|
-
/* 37 */,
|
|
489
|
-
/* 38 */,
|
|
490
|
-
/* 39 */,
|
|
491
|
-
/* 40 */,
|
|
492
|
-
/* 41 */,
|
|
493
|
-
/* 42 */,
|
|
494
|
-
/* 43 */,
|
|
495
|
-
/* 44 */,
|
|
496
|
-
/* 45 */,
|
|
497
|
-
/* 46 */
|
|
498
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
499
|
-
|
|
500
|
-
"use strict";
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
Object.defineProperty(exports, "__esModule", {
|
|
504
|
-
value: true
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
var i18n_1 = __webpack_require__(0);
|
|
508
|
-
|
|
509
|
-
var visualization_schemas_1 = __webpack_require__(2);
|
|
510
|
-
|
|
511
|
-
var pick_1 = __webpack_require__(8);
|
|
512
|
-
|
|
513
|
-
var variables_1 = __webpack_require__(9);
|
|
514
|
-
|
|
515
|
-
var visualization_color_palettes_1 = __webpack_require__(47);
|
|
516
|
-
|
|
517
|
-
var PresetPalettes_1 = __webpack_require__(13);
|
|
518
|
-
|
|
519
|
-
var GaugeFiller_1 = __webpack_require__(48);
|
|
520
|
-
|
|
521
|
-
var placeholders_1 = __webpack_require__(10);
|
|
522
|
-
|
|
523
|
-
var VizBehavior_1 = __webpack_require__(6);
|
|
524
|
-
|
|
525
|
-
var VizCategory_1 = __webpack_require__(7);
|
|
526
|
-
|
|
527
|
-
var configUtils_1 = __webpack_require__(3);
|
|
528
|
-
|
|
529
|
-
var Gauge_1 = __webpack_require__(36);
|
|
530
|
-
|
|
531
|
-
var BackgroundColor_1 = __webpack_require__(12);
|
|
532
|
-
|
|
533
|
-
var DynamicGaugeColorEditor_1 = __webpack_require__(49);
|
|
534
|
-
|
|
535
|
-
var StaticGaugeColorEditor_1 = __webpack_require__(50);
|
|
283
|
+
var StaticGaugeColorEditor_default = StaticGaugeColorEditor;
|
|
536
284
|
|
|
285
|
+
// src/FillerGauge/config.ts
|
|
537
286
|
var dataContract = {
|
|
538
|
-
requiredDataSources: [
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
287
|
+
requiredDataSources: [
|
|
288
|
+
{
|
|
289
|
+
name: "primary",
|
|
290
|
+
description: "DataSource that powers the visualization"
|
|
291
|
+
}
|
|
292
|
+
],
|
|
542
293
|
optionalDataSources: [],
|
|
543
294
|
initialRequestParams: {
|
|
544
|
-
primary: {
|
|
545
|
-
offset: 0,
|
|
546
|
-
count: 10000
|
|
547
|
-
}
|
|
295
|
+
primary: { offset: 0, count: 1e4 }
|
|
548
296
|
}
|
|
549
297
|
};
|
|
550
298
|
var size = {
|
|
@@ -552,278 +300,175 @@ var size = {
|
|
|
552
300
|
initialHeight: 300
|
|
553
301
|
};
|
|
554
302
|
var defaultContext = {
|
|
555
|
-
gaugeColorConfig: [
|
|
556
|
-
to: 9,
|
|
557
|
-
value:
|
|
558
|
-
|
|
559
|
-
from:
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
}, {
|
|
563
|
-
from: 30,
|
|
564
|
-
to: 49,
|
|
565
|
-
value: '#CBA700'
|
|
566
|
-
}, {
|
|
567
|
-
from: 50,
|
|
568
|
-
to: 69,
|
|
569
|
-
value: '#D94E17'
|
|
570
|
-
}, {
|
|
571
|
-
from: 70,
|
|
572
|
-
value: '#D41F1F'
|
|
573
|
-
}]
|
|
303
|
+
gaugeColorConfig: [
|
|
304
|
+
{ to: 9, value: "#118832" },
|
|
305
|
+
{ from: 10, to: 29, value: "#669922" },
|
|
306
|
+
{ from: 30, to: 49, value: "#CBA700" },
|
|
307
|
+
{ from: 50, to: 69, value: "#D94E17" },
|
|
308
|
+
{ from: 70, value: "#D41F1F" }
|
|
309
|
+
]
|
|
574
310
|
};
|
|
575
311
|
var themes = {
|
|
576
|
-
defaultBackgroundColor:
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
},
|
|
627
|
-
valueMarkerLabelFillColor: function valueMarkerLabelFillColor(props) {
|
|
628
|
-
return (0, pick_1.default)({
|
|
629
|
-
enterprise: {
|
|
630
|
-
light: variables_1.default.gray96(props),
|
|
631
|
-
dark: variables_1.default.black(props)
|
|
632
|
-
},
|
|
633
|
-
prisma: variables_1.default.black(props)
|
|
634
|
-
})(props);
|
|
635
|
-
}
|
|
312
|
+
defaultBackgroundColor: (props) => pick_default({
|
|
313
|
+
enterprise: {
|
|
314
|
+
dark: variables_default.black(props),
|
|
315
|
+
light: variables_default.backgroundColor(props)
|
|
316
|
+
},
|
|
317
|
+
prisma: variables_default.backgroundColorSidebar(props)
|
|
318
|
+
})(props),
|
|
319
|
+
defaultBackgroundBarFillColor: (props) => pick_default({
|
|
320
|
+
enterprise: variables_default.backgroundColorHover(props),
|
|
321
|
+
prisma: {
|
|
322
|
+
light: variables_default.contentColorActive(props),
|
|
323
|
+
dark: variables_default.neutral100(props)
|
|
324
|
+
}
|
|
325
|
+
})(props),
|
|
326
|
+
majorTickFillColor: (props) => pick_default({
|
|
327
|
+
enterprise: {
|
|
328
|
+
light: variables_default.gray30(props),
|
|
329
|
+
// was '#33343B'
|
|
330
|
+
dark: variables_default.textGray(props)
|
|
331
|
+
// was #D7DAE0
|
|
332
|
+
},
|
|
333
|
+
prisma: {
|
|
334
|
+
// TODO: missed colors :(
|
|
335
|
+
light: variables_default.neutral100(props),
|
|
336
|
+
// TBD
|
|
337
|
+
dark: variables_default.contentColorMuted(props)
|
|
338
|
+
// was #D7DAE0; contentColor
|
|
339
|
+
}
|
|
340
|
+
})(props),
|
|
341
|
+
majorTickStrokeColor: (props) => pick_default({
|
|
342
|
+
enterprise: {
|
|
343
|
+
light: variables_default.textGray(props),
|
|
344
|
+
dark: variables_default.contentColorMuted(props)
|
|
345
|
+
},
|
|
346
|
+
prisma: variables_default.contentColorMuted(props)
|
|
347
|
+
})(props),
|
|
348
|
+
valueMarkerFillColor: (props) => pick_default({
|
|
349
|
+
enterprise: variables_default.textColor(props),
|
|
350
|
+
prisma: {
|
|
351
|
+
dark: variables_default.white(props),
|
|
352
|
+
light: variables_default.black(props)
|
|
353
|
+
}
|
|
354
|
+
})(props),
|
|
355
|
+
valueMarkerLabelFillColor: (props) => pick_default({
|
|
356
|
+
enterprise: {
|
|
357
|
+
light: variables_default.gray96(props),
|
|
358
|
+
dark: variables_default.black(props)
|
|
359
|
+
},
|
|
360
|
+
prisma: variables_default.black(props)
|
|
361
|
+
})(props)
|
|
636
362
|
};
|
|
637
363
|
var basePresetContext = {
|
|
638
|
-
gaugeColorEditorConfig:
|
|
364
|
+
gaugeColorEditorConfig: void 0
|
|
639
365
|
};
|
|
640
366
|
var basePresetOptions = {
|
|
641
|
-
gaugeColor:
|
|
367
|
+
gaugeColor: visualization_color_palettes_exports.CATEGORICAL[0]
|
|
642
368
|
};
|
|
643
|
-
var presets = [
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
}, {
|
|
652
|
-
label: (0, i18n_1._)('Gauge'),
|
|
653
|
-
name: 'fillerGauge.gauge',
|
|
654
|
-
value: {
|
|
655
|
-
context: {
|
|
656
|
-
gaugeColorEditorConfig: defaultContext.gaugeColorConfig
|
|
657
|
-
},
|
|
658
|
-
options: {
|
|
659
|
-
gaugeColor: '> value | rangeValue(gaugeColorEditorConfig)'
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
}];
|
|
663
|
-
var editorConfig = [{
|
|
664
|
-
label: (0, i18n_1._)('Data configurations'),
|
|
665
|
-
layout: [[{
|
|
666
|
-
label: (0, i18n_1._)('Value'),
|
|
667
|
-
editor: 'editor.columnSelector',
|
|
668
|
-
option: 'value',
|
|
669
|
-
context: 'defaultContext',
|
|
670
|
-
editorProps: {
|
|
671
|
-
dataSourceKey: 'primary',
|
|
672
|
-
prepareValue: function prepareValue(definition) {
|
|
673
|
-
var value = definition.options.value;
|
|
674
|
-
return {
|
|
675
|
-
context: {},
|
|
676
|
-
options: {
|
|
677
|
-
value: "".concat(value, " | lastPoint()")
|
|
678
|
-
}
|
|
679
|
-
};
|
|
680
|
-
}
|
|
369
|
+
var presets = [
|
|
370
|
+
{
|
|
371
|
+
// dummy context variables to allow for resetting of unused context states
|
|
372
|
+
label: (0, i18n_exports._)("None"),
|
|
373
|
+
name: "fillerGauge.none",
|
|
374
|
+
value: {
|
|
375
|
+
context: __spreadValues({}, basePresetContext),
|
|
376
|
+
options: __spreadValues({}, basePresetOptions)
|
|
681
377
|
}
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
var context = _ref.context,
|
|
693
|
-
options = _ref.options;
|
|
694
|
-
var initialPreset = (0, configUtils_1.getInitialPreset)(context, options, presets);
|
|
695
|
-
return initialPreset && initialPreset.label || null;
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
label: (0, i18n_exports._)("Gauge"),
|
|
381
|
+
name: "fillerGauge.gauge",
|
|
382
|
+
value: {
|
|
383
|
+
context: {
|
|
384
|
+
gaugeColorEditorConfig: defaultContext.gaugeColorConfig
|
|
385
|
+
},
|
|
386
|
+
options: {
|
|
387
|
+
gaugeColor: "> value | rangeValue(gaugeColorEditorConfig)"
|
|
696
388
|
}
|
|
697
389
|
}
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
390
|
+
}
|
|
391
|
+
];
|
|
392
|
+
var editorConfig = [
|
|
393
|
+
{
|
|
394
|
+
label: (0, i18n_exports._)("Data configurations"),
|
|
395
|
+
layout: [
|
|
396
|
+
[
|
|
397
|
+
{
|
|
398
|
+
label: (0, i18n_exports._)("Value"),
|
|
399
|
+
editor: "editor.columnSelector",
|
|
400
|
+
option: "value",
|
|
401
|
+
context: "defaultContext",
|
|
402
|
+
editorProps: {
|
|
403
|
+
dataSourceKey: "primary",
|
|
404
|
+
prepareValue: (definition) => {
|
|
405
|
+
const {
|
|
406
|
+
options: { value }
|
|
407
|
+
} = definition;
|
|
408
|
+
return {
|
|
409
|
+
context: {},
|
|
410
|
+
options: {
|
|
411
|
+
value: `${value} | lastPoint()`
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
Gauge_default,
|
|
421
|
+
{
|
|
422
|
+
label: (0, i18n_exports._)("Color and style"),
|
|
423
|
+
layout: [
|
|
424
|
+
[
|
|
425
|
+
{
|
|
426
|
+
label: (0, i18n_exports._)("Dynamic elements"),
|
|
427
|
+
key: "presetSelector",
|
|
428
|
+
editor: "editor.presetSelector",
|
|
429
|
+
editorProps: {
|
|
430
|
+
presets,
|
|
431
|
+
value: ({ context, options }) => {
|
|
432
|
+
const initialPreset = getInitialPreset(context, options, presets);
|
|
433
|
+
return initialPreset && initialPreset.label || null;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
[getDynamicGaugeColorEditor({ defaultContext, defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig })],
|
|
439
|
+
[
|
|
440
|
+
__spreadProps(__spreadValues({}, StaticGaugeColorEditor_default), {
|
|
441
|
+
editorProps: {
|
|
442
|
+
themes
|
|
443
|
+
}
|
|
444
|
+
})
|
|
445
|
+
],
|
|
446
|
+
BackgroundColor_default({ themes })
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
];
|
|
713
450
|
var config = {
|
|
714
451
|
/**
|
|
715
452
|
* unique viz key
|
|
716
453
|
*/
|
|
717
|
-
key:
|
|
718
|
-
|
|
454
|
+
key: "splunk.fillergauge",
|
|
719
455
|
/**
|
|
720
456
|
* viz name
|
|
721
457
|
*/
|
|
722
|
-
name: (0,
|
|
723
|
-
category:
|
|
724
|
-
|
|
458
|
+
name: (0, i18n_exports._)("Filler gauge"),
|
|
459
|
+
category: "Gauge" /* GAUGE */,
|
|
725
460
|
/**
|
|
726
461
|
* viz icon
|
|
727
462
|
*/
|
|
728
|
-
icon:
|
|
729
|
-
placeholderIcon:
|
|
730
|
-
dataContract
|
|
731
|
-
size
|
|
732
|
-
defaultContext
|
|
733
|
-
optionsSchema:
|
|
734
|
-
editorConfig
|
|
735
|
-
supports: [
|
|
736
|
-
themes
|
|
737
|
-
};
|
|
738
|
-
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
739
|
-
|
|
740
|
-
/***/ }),
|
|
741
|
-
/* 47 */
|
|
742
|
-
/***/ (function(module, exports) {
|
|
743
|
-
|
|
744
|
-
module.exports = require("@splunk/visualization-color-palettes");
|
|
745
|
-
|
|
746
|
-
/***/ }),
|
|
747
|
-
/* 48 */
|
|
748
|
-
/***/ (function(module, exports) {
|
|
749
|
-
|
|
750
|
-
module.exports = require("@splunk/react-icons/enterprise/GaugeFiller");
|
|
751
|
-
|
|
752
|
-
/***/ }),
|
|
753
|
-
/* 49 */
|
|
754
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
755
|
-
|
|
756
|
-
"use strict";
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
Object.defineProperty(exports, "__esModule", {
|
|
760
|
-
value: true
|
|
761
|
-
});
|
|
762
|
-
exports.getDynamicGaugeColorEditor = void 0;
|
|
763
|
-
|
|
764
|
-
var i18n_1 = __webpack_require__(0);
|
|
765
|
-
|
|
766
|
-
var configUtils_1 = __webpack_require__(4);
|
|
767
|
-
|
|
768
|
-
var getDynamicGaugeColorEditor = function getDynamicGaugeColorEditor(_ref) {
|
|
769
|
-
var defaultContext = _ref.defaultContext,
|
|
770
|
-
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
771
|
-
return {
|
|
772
|
-
label: (0, i18n_1._)('Gauge'),
|
|
773
|
-
option: 'gaugeColor',
|
|
774
|
-
context: 'gaugeColorConfig',
|
|
775
|
-
editor: 'editor.dynamicColor',
|
|
776
|
-
showEditor: function showEditor(_ref2) {
|
|
777
|
-
var options = _ref2.options;
|
|
778
|
-
return (0, configUtils_1.isDynamicOption)(options.gaugeColor);
|
|
779
|
-
},
|
|
780
|
-
editorProps: {
|
|
781
|
-
labelPosition: 'top',
|
|
782
|
-
flyoutTitle: (0, i18n_1._)('Dynamic coloring: gauge'),
|
|
783
|
-
formatters: [{
|
|
784
|
-
label: (0, i18n_1._)('Ranges'),
|
|
785
|
-
value: 'rangeValue',
|
|
786
|
-
defaults: {
|
|
787
|
-
value: defaultContext.gaugeColorConfig
|
|
788
|
-
}
|
|
789
|
-
}],
|
|
790
|
-
dataSelectors: [{
|
|
791
|
-
label: (0, i18n_1._)('Value'),
|
|
792
|
-
value: 'value'
|
|
793
|
-
}],
|
|
794
|
-
defaultPalettesConfig: defaultPalettesConfig
|
|
795
|
-
}
|
|
796
|
-
};
|
|
463
|
+
icon: visualization_icons_exports.FillerGauge,
|
|
464
|
+
placeholderIcon: placeholders_exports.FillerGauge,
|
|
465
|
+
dataContract,
|
|
466
|
+
size,
|
|
467
|
+
defaultContext,
|
|
468
|
+
optionsSchema: visualization_schemas_exports.fillerGaugeOptionsSchema,
|
|
469
|
+
editorConfig,
|
|
470
|
+
supports: ["dynamic-options" /* DYNAMIC_OPTIONS */, "placeholder" /* PLACEHOLDER */],
|
|
471
|
+
themes
|
|
797
472
|
};
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
/***/ }),
|
|
802
|
-
/* 50 */
|
|
803
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
804
|
-
|
|
805
|
-
"use strict";
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
Object.defineProperty(exports, "__esModule", {
|
|
809
|
-
value: true
|
|
810
|
-
});
|
|
811
|
-
|
|
812
|
-
var i18n_1 = __webpack_require__(0);
|
|
813
|
-
|
|
814
|
-
var configUtils_1 = __webpack_require__(4);
|
|
815
|
-
|
|
816
|
-
var StaticGaugeColorEditor = {
|
|
817
|
-
label: (0, i18n_1._)('Gauge'),
|
|
818
|
-
option: 'gaugeColor',
|
|
819
|
-
editor: 'editor.color',
|
|
820
|
-
showEditor: function showEditor(_ref) {
|
|
821
|
-
var options = _ref.options;
|
|
822
|
-
return !(0, configUtils_1.isDynamicOption)(options.gaugeColor);
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
exports.default = StaticGaugeColorEditor;
|
|
826
|
-
|
|
827
|
-
/***/ })
|
|
828
|
-
/******/ ]);
|
|
829
|
-
//# sourceMappingURL=FillerGauge.config.js.map
|
|
473
|
+
var config_default = enhanceConfig(config);
|
|
474
|
+
//# sourceMappingURL=FillerGauge.config.js.map
|