@perses-dev/prometheus-plugin 0.0.0-snapshot-panel-extra-content-3-17f9c42 → 0.0.0-snapshot-scatterplot-fix-imports-95e1b59

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.
Files changed (111) hide show
  1. package/dist/cjs/components/PromQL.js +10 -8
  2. package/dist/cjs/components/index.js +10 -8
  3. package/dist/cjs/index.js +33 -19
  4. package/dist/cjs/model/index.js +14 -13
  5. package/dist/cjs/model/parse-sample-values.js +6 -2
  6. package/dist/cjs/model/prometheus-client.js +43 -8
  7. package/dist/cjs/model/prometheus-selectors.js +12 -4
  8. package/dist/cjs/model/time.js +15 -9
  9. package/dist/cjs/plugins/MatcherEditor.js +14 -12
  10. package/dist/cjs/plugins/PrometheusDatasourceEditor.js +610 -0
  11. package/dist/cjs/plugins/prometheus-datasource.js +59 -8
  12. package/dist/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js +10 -8
  13. package/dist/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +49 -24
  14. package/dist/cjs/plugins/prometheus-time-series-query/get-time-series-data.js +44 -24
  15. package/dist/cjs/plugins/prometheus-time-series-query/index.js +10 -8
  16. package/dist/cjs/plugins/prometheus-time-series-query/query-editor-model.js +44 -11
  17. package/dist/cjs/plugins/prometheus-variables.js +69 -63
  18. package/dist/cjs/plugins/types.js +7 -0
  19. package/dist/cjs/plugins/variable.js +9 -7
  20. package/dist/cjs/utils/index.js +10 -8
  21. package/dist/cjs/utils/utils.js +13 -7
  22. package/dist/components/PromQL.d.ts +2 -3
  23. package/dist/components/PromQL.d.ts.map +1 -1
  24. package/dist/components/PromQL.js +1 -1
  25. package/dist/components/PromQL.js.map +1 -1
  26. package/dist/components/index.js.map +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/model/api-types.d.ts +11 -11
  29. package/dist/model/api-types.d.ts.map +1 -1
  30. package/dist/model/api-types.js.map +1 -1
  31. package/dist/model/index.d.ts +0 -1
  32. package/dist/model/index.d.ts.map +1 -1
  33. package/dist/model/index.js +0 -1
  34. package/dist/model/index.js.map +1 -1
  35. package/dist/model/parse-sample-values.d.ts +1 -1
  36. package/dist/model/parse-sample-values.d.ts.map +1 -1
  37. package/dist/model/parse-sample-values.js.map +1 -1
  38. package/dist/model/prometheus-client.d.ts +4 -0
  39. package/dist/model/prometheus-client.d.ts.map +1 -1
  40. package/dist/model/prometheus-client.js +27 -3
  41. package/dist/model/prometheus-client.js.map +1 -1
  42. package/dist/model/prometheus-selectors.js.map +1 -1
  43. package/dist/model/time.js +2 -2
  44. package/dist/model/time.js.map +1 -1
  45. package/dist/plugins/MatcherEditor.d.ts +2 -3
  46. package/dist/plugins/MatcherEditor.d.ts.map +1 -1
  47. package/dist/plugins/MatcherEditor.js +1 -1
  48. package/dist/plugins/MatcherEditor.js.map +1 -1
  49. package/dist/plugins/{PrometheusDatasourceEditor/PrometheusDatasourceEditor.d.ts → PrometheusDatasourceEditor.d.ts} +1 -2
  50. package/dist/plugins/PrometheusDatasourceEditor.d.ts.map +1 -0
  51. package/dist/plugins/PrometheusDatasourceEditor.js +556 -0
  52. package/dist/plugins/PrometheusDatasourceEditor.js.map +1 -0
  53. package/dist/plugins/prometheus-datasource.d.ts +2 -7
  54. package/dist/plugins/prometheus-datasource.d.ts.map +1 -1
  55. package/dist/plugins/prometheus-datasource.js +55 -6
  56. package/dist/plugins/prometheus-datasource.js.map +1 -1
  57. package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js +1 -1
  58. package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js.map +1 -1
  59. package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.d.ts +1 -2
  60. package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.d.ts.map +1 -1
  61. package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +41 -18
  62. package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js.map +1 -1
  63. package/dist/plugins/prometheus-time-series-query/get-time-series-data.d.ts.map +1 -1
  64. package/dist/plugins/prometheus-time-series-query/get-time-series-data.js +37 -19
  65. package/dist/plugins/prometheus-time-series-query/get-time-series-data.js.map +1 -1
  66. package/dist/plugins/prometheus-time-series-query/index.js.map +1 -1
  67. package/dist/plugins/prometheus-time-series-query/query-editor-model.d.ts +11 -2
  68. package/dist/plugins/prometheus-time-series-query/query-editor-model.d.ts.map +1 -1
  69. package/dist/plugins/prometheus-time-series-query/query-editor-model.js +38 -10
  70. package/dist/plugins/prometheus-time-series-query/query-editor-model.js.map +1 -1
  71. package/dist/plugins/prometheus-time-series-query/time-series-query-model.d.ts +4 -4
  72. package/dist/plugins/prometheus-time-series-query/time-series-query-model.d.ts.map +1 -1
  73. package/dist/plugins/prometheus-time-series-query/time-series-query-model.js +3 -1
  74. package/dist/plugins/prometheus-time-series-query/time-series-query-model.js.map +1 -1
  75. package/dist/plugins/prometheus-variables.d.ts.map +1 -1
  76. package/dist/plugins/prometheus-variables.js +37 -37
  77. package/dist/plugins/prometheus-variables.js.map +1 -1
  78. package/dist/plugins/types.d.ts +12 -5
  79. package/dist/plugins/types.d.ts.map +1 -1
  80. package/dist/plugins/types.js +1 -1
  81. package/dist/plugins/types.js.map +1 -1
  82. package/dist/plugins/variable.d.ts +2 -2
  83. package/dist/plugins/variable.d.ts.map +1 -1
  84. package/dist/plugins/variable.js +2 -2
  85. package/dist/plugins/variable.js.map +1 -1
  86. package/dist/test/setup-tests.js.map +1 -1
  87. package/dist/utils/index.js.map +1 -1
  88. package/dist/utils/utils.d.ts +2 -2
  89. package/dist/utils/utils.d.ts.map +1 -1
  90. package/dist/utils/utils.js +4 -4
  91. package/dist/utils/utils.js.map +1 -1
  92. package/package.json +6 -6
  93. package/dist/cjs/model/templating.js +0 -26
  94. package/dist/cjs/plugins/PrometheusDatasourceEditor/PrometheusDatasourceEditor.js +0 -392
  95. package/dist/cjs/plugins/PrometheusDatasourceEditor/index.js +0 -29
  96. package/dist/cjs/plugins/PrometheusDatasourceEditor/types.js +0 -16
  97. package/dist/model/templating.d.ts +0 -6
  98. package/dist/model/templating.d.ts.map +0 -1
  99. package/dist/model/templating.js +0 -20
  100. package/dist/model/templating.js.map +0 -1
  101. package/dist/plugins/PrometheusDatasourceEditor/PrometheusDatasourceEditor.d.ts.map +0 -1
  102. package/dist/plugins/PrometheusDatasourceEditor/PrometheusDatasourceEditor.js +0 -342
  103. package/dist/plugins/PrometheusDatasourceEditor/PrometheusDatasourceEditor.js.map +0 -1
  104. package/dist/plugins/PrometheusDatasourceEditor/index.d.ts +0 -3
  105. package/dist/plugins/PrometheusDatasourceEditor/index.d.ts.map +0 -1
  106. package/dist/plugins/PrometheusDatasourceEditor/index.js +0 -16
  107. package/dist/plugins/PrometheusDatasourceEditor/index.js.map +0 -1
  108. package/dist/plugins/PrometheusDatasourceEditor/types.d.ts +0 -20
  109. package/dist/plugins/PrometheusDatasourceEditor/types.d.ts.map +0 -1
  110. package/dist/plugins/PrometheusDatasourceEditor/types.js +0 -15
  111. package/dist/plugins/PrometheusDatasourceEditor/types.js.map +0 -1
@@ -21,20 +21,26 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- PrometheusLabelNamesVariable: ()=>PrometheusLabelNamesVariable,
25
- PrometheusLabelValuesVariable: ()=>PrometheusLabelValuesVariable,
26
- PrometheusPromQLVariable: ()=>PrometheusPromQLVariable
24
+ PrometheusLabelNamesVariable: function() {
25
+ return PrometheusLabelNamesVariable;
26
+ },
27
+ PrometheusLabelValuesVariable: function() {
28
+ return PrometheusLabelValuesVariable;
29
+ },
30
+ PrometheusPromQLVariable: function() {
31
+ return PrometheusPromQLVariable;
32
+ }
27
33
  });
28
- const _jsxRuntime = require("react/jsx-runtime");
29
- const _pluginSystem = require("@perses-dev/plugin-system");
34
+ const _jsxruntime = require("react/jsx-runtime");
35
+ const _pluginsystem = require("@perses-dev/plugin-system");
30
36
  const _material = require("@mui/material");
31
37
  const _immer = require("immer");
32
38
  const _model = require("../model");
33
39
  const _components = require("../components");
34
- const _matcherEditor = require("./MatcherEditor");
40
+ const _MatcherEditor = require("./MatcherEditor");
35
41
  function PrometheusLabelValuesVariableEditor(props) {
36
- const { onChange , value } = props;
37
- const { datasource } = value;
42
+ const { onChange, value } = props;
43
+ const { datasource } = value;
38
44
  const selectedDatasource = datasource !== null && datasource !== void 0 ? datasource : _model.DEFAULT_PROM;
39
45
  const handleDatasourceChange = (next)=>{
40
46
  if ((0, _model.isPrometheusDatasourceSelector)(next)) {
@@ -46,18 +52,18 @@ function PrometheusLabelValuesVariableEditor(props) {
46
52
  }
47
53
  throw new Error('Got unexpected non-Prometheus datasource selector');
48
54
  };
49
- var _matchers;
50
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
55
+ var _props_value_matchers;
56
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
51
57
  spacing: 2,
52
58
  children: [
53
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.FormControl, {
59
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
54
60
  margin: "dense",
55
61
  children: [
56
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.InputLabel, {
62
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
57
63
  id: "prom-datasource-label",
58
64
  children: "Prometheus Datasource"
59
65
  }),
60
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pluginSystem.DatasourceSelect, {
66
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
61
67
  datasourcePluginKind: "PrometheusDatasource",
62
68
  value: selectedDatasource,
63
69
  onChange: handleDatasourceChange,
@@ -67,22 +73,22 @@ function PrometheusLabelValuesVariableEditor(props) {
67
73
  })
68
74
  ]
69
75
  }),
70
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TextField, {
76
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
71
77
  label: "Label Name",
72
78
  required: true,
73
- value: props.value.label_name,
79
+ value: props.value.labelName,
74
80
  onChange: (e)=>{
75
81
  props.onChange({
76
82
  ...props.value,
77
- label_name: e.target.value
83
+ labelName: e.target.value
78
84
  });
79
85
  },
80
86
  InputProps: {
81
87
  readOnly: props.isReadonly
82
88
  }
83
89
  }),
84
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_matcherEditor.MatcherEditor, {
85
- matchers: (_matchers = props.value.matchers) !== null && _matchers !== void 0 ? _matchers : [],
90
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_MatcherEditor.MatcherEditor, {
91
+ matchers: (_props_value_matchers = props.value.matchers) !== null && _props_value_matchers !== void 0 ? _props_value_matchers : [],
86
92
  onChange: (e)=>{
87
93
  props.onChange({
88
94
  ...props.value,
@@ -95,8 +101,8 @@ function PrometheusLabelValuesVariableEditor(props) {
95
101
  });
96
102
  }
97
103
  function PrometheusLabelNamesVariableEditor(props) {
98
- const { onChange , value } = props;
99
- const { datasource } = value;
104
+ const { onChange, value } = props;
105
+ const { datasource } = value;
100
106
  const selectedDatasource = datasource !== null && datasource !== void 0 ? datasource : _model.DEFAULT_PROM;
101
107
  const handleDatasourceChange = (next)=>{
102
108
  if ((0, _model.isPrometheusDatasourceSelector)(next)) {
@@ -108,18 +114,18 @@ function PrometheusLabelNamesVariableEditor(props) {
108
114
  }
109
115
  throw new Error('Got unexpected non-Prometheus datasource selector');
110
116
  };
111
- var _matchers;
112
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
117
+ var _props_value_matchers;
118
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
113
119
  spacing: 2,
114
120
  children: [
115
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.FormControl, {
121
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
116
122
  margin: "dense",
117
123
  children: [
118
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.InputLabel, {
124
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
119
125
  id: "prom-datasource-label",
120
126
  children: "Prometheus Datasource"
121
127
  }),
122
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pluginSystem.DatasourceSelect, {
128
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
123
129
  datasourcePluginKind: "PrometheusDatasource",
124
130
  value: selectedDatasource,
125
131
  onChange: handleDatasourceChange,
@@ -129,8 +135,8 @@ function PrometheusLabelNamesVariableEditor(props) {
129
135
  })
130
136
  ]
131
137
  }),
132
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_matcherEditor.MatcherEditor, {
133
- matchers: (_matchers = props.value.matchers) !== null && _matchers !== void 0 ? _matchers : [],
138
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_MatcherEditor.MatcherEditor, {
139
+ matchers: (_props_value_matchers = props.value.matchers) !== null && _props_value_matchers !== void 0 ? _props_value_matchers : [],
134
140
  isReadonly: props.isReadonly,
135
141
  onChange: (e)=>{
136
142
  props.onChange({
@@ -143,10 +149,10 @@ function PrometheusLabelNamesVariableEditor(props) {
143
149
  });
144
150
  }
145
151
  function PrometheusPromQLVariableEditor(props) {
146
- const { onChange , value } = props;
147
- const { datasource } = value;
152
+ const { onChange, value } = props;
153
+ const { datasource } = value;
148
154
  const selectedDatasource = datasource !== null && datasource !== void 0 ? datasource : _model.DEFAULT_PROM;
149
- const { data: client } = (0, _pluginSystem.useDatasourceClient)(selectedDatasource);
155
+ const { data: client } = (0, _pluginsystem.useDatasourceClient)(selectedDatasource);
150
156
  const promURL = client === null || client === void 0 ? void 0 : client.options.datasourceUrl;
151
157
  const handleDatasourceChange = (next)=>{
152
158
  if ((0, _model.isPrometheusDatasourceSelector)(next)) {
@@ -158,17 +164,17 @@ function PrometheusPromQLVariableEditor(props) {
158
164
  }
159
165
  throw new Error('Got unexpected non-Prometheus datasource selector');
160
166
  };
161
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
167
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
162
168
  spacing: 2,
163
169
  children: [
164
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.FormControl, {
170
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
165
171
  margin: "dense",
166
172
  children: [
167
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.InputLabel, {
173
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
168
174
  id: "prom-datasource-label",
169
175
  children: "Prometheus Datasource"
170
176
  }),
171
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pluginSystem.DatasourceSelect, {
177
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
172
178
  datasourcePluginKind: _model.PROM_DATASOURCE_KIND,
173
179
  value: selectedDatasource,
174
180
  onChange: handleDatasourceChange,
@@ -178,7 +184,7 @@ function PrometheusPromQLVariableEditor(props) {
178
184
  })
179
185
  ]
180
186
  }),
181
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.PromQLEditor, {
187
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.PromQLEditor, {
182
188
  completeConfig: {
183
189
  remote: {
184
190
  url: promURL
@@ -194,36 +200,36 @@ function PrometheusPromQLVariableEditor(props) {
194
200
  readOnly: props.isReadonly,
195
201
  width: "100%"
196
202
  }),
197
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TextField, {
203
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
198
204
  label: "Label Name",
199
- value: props.value.label_name,
205
+ value: props.value.labelName,
200
206
  InputProps: {
201
207
  readOnly: props.isReadonly
202
208
  },
203
209
  onChange: (e)=>{
204
210
  props.onChange({
205
211
  ...props.value,
206
- label_name: e.target.value
212
+ labelName: e.target.value
207
213
  });
208
214
  }
209
215
  })
210
216
  ]
211
217
  });
212
218
  }
213
- function capturingMatrix(matrix, label_name) {
219
+ function capturingMatrix(matrix, labelName) {
214
220
  const captured = new Set();
215
221
  for (const sample of matrix.result){
216
- const value = sample.metric[label_name];
222
+ const value = sample.metric[labelName];
217
223
  if (value !== undefined) {
218
224
  captured.add(value);
219
225
  }
220
226
  }
221
227
  return Array.from(captured.values());
222
228
  }
223
- function capturingVector(vector, label_name) {
229
+ function capturingVector(vector, labelName) {
224
230
  const captured = new Set();
225
231
  for (const sample of vector.result){
226
- const value = sample.metric[label_name];
232
+ const value = sample.metric[labelName];
227
233
  if (value !== undefined) {
228
234
  captured.add(value);
229
235
  }
@@ -241,11 +247,11 @@ function capturingVector(vector, label_name) {
241
247
  };
242
248
  const PrometheusLabelNamesVariable = {
243
249
  getVariableOptions: async (spec, ctx)=>{
244
- var _datasource;
245
- const client = await ctx.datasourceStore.getDatasourceClient((_datasource = spec.datasource) !== null && _datasource !== void 0 ? _datasource : _model.DEFAULT_PROM);
246
- const match = spec.matchers ? spec.matchers.map((m)=>(0, _pluginSystem.replaceTemplateVariables)(m, ctx.variables)) : undefined;
250
+ var _spec_datasource;
251
+ const client = await ctx.datasourceStore.getDatasourceClient((_spec_datasource = spec.datasource) !== null && _spec_datasource !== void 0 ? _spec_datasource : _model.DEFAULT_PROM);
252
+ const match = spec.matchers ? spec.matchers.map((m)=>(0, _pluginsystem.replaceTemplateVariables)(m, ctx.variables)) : undefined;
247
253
  const timeRange = (0, _model.getPrometheusTimeRange)(ctx.timeRange);
248
- const { data: options } = await client.labelNames({
254
+ const { data: options } = await client.labelNames({
249
255
  'match[]': match,
250
256
  ...timeRange
251
257
  });
@@ -254,9 +260,9 @@ const PrometheusLabelNamesVariable = {
254
260
  };
255
261
  },
256
262
  dependsOn: (spec)=>{
257
- var ref;
263
+ var _spec_matchers;
258
264
  return {
259
- variables: ((ref = spec.matchers) === null || ref === void 0 ? void 0 : ref.map((m)=>(0, _pluginSystem.parseTemplateVariables)(m)).flat()) || []
265
+ variables: ((_spec_matchers = spec.matchers) === null || _spec_matchers === void 0 ? void 0 : _spec_matchers.map((m)=>(0, _pluginsystem.parseTemplateVariables)(m)).flat()) || []
260
266
  };
261
267
  },
262
268
  OptionsEditorComponent: PrometheusLabelNamesVariableEditor,
@@ -265,12 +271,12 @@ const PrometheusLabelNamesVariable = {
265
271
  const PrometheusLabelValuesVariable = {
266
272
  getVariableOptions: async (spec, ctx)=>{
267
273
  const pluginDef = spec;
268
- var _datasource;
269
- const client = await ctx.datasourceStore.getDatasourceClient((_datasource = spec.datasource) !== null && _datasource !== void 0 ? _datasource : _model.DEFAULT_PROM);
270
- const match = pluginDef.matchers ? pluginDef.matchers.map((m)=>(0, _pluginSystem.replaceTemplateVariables)(m, ctx.variables)) : undefined;
274
+ var _spec_datasource;
275
+ const client = await ctx.datasourceStore.getDatasourceClient((_spec_datasource = spec.datasource) !== null && _spec_datasource !== void 0 ? _spec_datasource : _model.DEFAULT_PROM);
276
+ const match = pluginDef.matchers ? pluginDef.matchers.map((m)=>(0, _pluginsystem.replaceTemplateVariables)(m, ctx.variables)) : undefined;
271
277
  const timeRange = (0, _model.getPrometheusTimeRange)(ctx.timeRange);
272
- const { data: options } = await client.labelValues({
273
- labelName: (0, _pluginSystem.replaceTemplateVariables)(pluginDef.label_name, ctx.variables),
278
+ const { data: options } = await client.labelValues({
279
+ labelName: (0, _pluginsystem.replaceTemplateVariables)(pluginDef.labelName, ctx.variables),
274
280
  'match[]': match,
275
281
  ...timeRange
276
282
  });
@@ -279,25 +285,25 @@ const PrometheusLabelValuesVariable = {
279
285
  };
280
286
  },
281
287
  dependsOn: (spec)=>{
282
- var ref;
288
+ var _spec_matchers;
283
289
  return {
284
- variables: ((ref = spec.matchers) === null || ref === void 0 ? void 0 : ref.map((m)=>(0, _pluginSystem.parseTemplateVariables)(m)).flat().concat((0, _pluginSystem.parseTemplateVariables)(spec.label_name))) || []
290
+ variables: ((_spec_matchers = spec.matchers) === null || _spec_matchers === void 0 ? void 0 : _spec_matchers.map((m)=>(0, _pluginsystem.parseTemplateVariables)(m)).flat().concat((0, _pluginsystem.parseTemplateVariables)(spec.labelName))) || []
285
291
  };
286
292
  },
287
293
  OptionsEditorComponent: PrometheusLabelValuesVariableEditor,
288
294
  createInitialOptions: ()=>({
289
- label_name: ''
295
+ labelName: ''
290
296
  })
291
297
  };
292
298
  const PrometheusPromQLVariable = {
293
299
  getVariableOptions: async (spec, ctx)=>{
294
- var _datasource;
295
- const client = await ctx.datasourceStore.getDatasourceClient((_datasource = spec.datasource) !== null && _datasource !== void 0 ? _datasource : _model.DEFAULT_PROM);
300
+ var _spec_datasource;
301
+ const client = await ctx.datasourceStore.getDatasourceClient((_spec_datasource = spec.datasource) !== null && _spec_datasource !== void 0 ? _spec_datasource : _model.DEFAULT_PROM);
296
302
  // TODO we may want to manage a range query as well.
297
- const { data: options } = await client.instantQuery({
298
- query: (0, _pluginSystem.replaceTemplateVariables)(spec.expr, ctx.variables)
303
+ const { data: options } = await client.instantQuery({
304
+ query: (0, _pluginsystem.replaceTemplateVariables)(spec.expr, ctx.variables)
299
305
  });
300
- const labelName = (0, _pluginSystem.replaceTemplateVariables)(spec.label_name, ctx.variables);
306
+ const labelName = (0, _pluginsystem.replaceTemplateVariables)(spec.labelName, ctx.variables);
301
307
  let values = [];
302
308
  if ((options === null || options === void 0 ? void 0 : options.resultType) === 'matrix') {
303
309
  values = capturingMatrix(options, labelName);
@@ -310,12 +316,12 @@ const PrometheusPromQLVariable = {
310
316
  },
311
317
  dependsOn: (spec)=>{
312
318
  return {
313
- variables: (0, _pluginSystem.parseTemplateVariables)(spec.expr).concat((0, _pluginSystem.parseTemplateVariables)(spec.label_name))
319
+ variables: (0, _pluginsystem.parseTemplateVariables)(spec.expr).concat((0, _pluginsystem.parseTemplateVariables)(spec.labelName))
314
320
  };
315
321
  },
316
322
  OptionsEditorComponent: PrometheusPromQLVariableEditor,
317
323
  createInitialOptions: ()=>({
318
324
  expr: '',
319
- label_name: ''
325
+ labelName: ''
320
326
  })
321
327
  };
@@ -14,3 +14,10 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
+ Object.defineProperty(exports, "DEFAULT_SCRAPE_INTERVAL", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return DEFAULT_SCRAPE_INTERVAL;
21
+ }
22
+ });
23
+ const DEFAULT_SCRAPE_INTERVAL = '1m';
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "StaticListVariable", {
18
18
  enumerable: true,
19
- get: ()=>StaticListVariable
19
+ get: function() {
20
+ return StaticListVariable;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
25
  function StaticListVariableOptionEditor(props) {
24
26
  const value = props.value.values.map((v)=>{
@@ -38,8 +40,8 @@ function StaticListVariableOptionEditor(props) {
38
40
  })
39
41
  });
40
42
  };
41
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)("div", {
42
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Autocomplete, {
43
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
44
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Autocomplete, {
43
45
  onPaste: (e)=>{
44
46
  // Append new values on paste
45
47
  const v = e.clipboardData.getData('text/plain');
@@ -56,7 +58,7 @@ function StaticListVariableOptionEditor(props) {
56
58
  freeSolo: true,
57
59
  clearOnBlur: true,
58
60
  readOnly: props.isReadonly,
59
- renderInput: (params)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TextField, {
61
+ renderInput: (params)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
60
62
  ...params,
61
63
  label: "Values",
62
64
  placeholder: "Values",
@@ -67,8 +69,8 @@ function StaticListVariableOptionEditor(props) {
67
69
  }
68
70
  const StaticListVariable = {
69
71
  getVariableOptions: async (spec)=>{
70
- var ref;
71
- const values = (ref = spec.values) === null || ref === void 0 ? void 0 : ref.map((v)=>{
72
+ var _spec_values;
73
+ const values = (_spec_values = spec.values) === null || _spec_values === void 0 ? void 0 : _spec_values.map((v)=>{
72
74
  if (typeof v === 'string') {
73
75
  return {
74
76
  label: v,
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./utils"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./utils"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -21,16 +21,22 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- formatSeriesName: ()=>formatSeriesName,
25
- getUniqueKeyForPrometheusResult: ()=>getUniqueKeyForPrometheusResult,
26
- getFormattedPrometheusSeriesName: ()=>getFormattedPrometheusSeriesName
24
+ formatSeriesName: function() {
25
+ return formatSeriesName;
26
+ },
27
+ getFormattedPrometheusSeriesName: function() {
28
+ return getFormattedPrometheusSeriesName;
29
+ },
30
+ getUniqueKeyForPrometheusResult: function() {
31
+ return getUniqueKeyForPrometheusResult;
32
+ }
27
33
  });
28
34
  const _core = require("@perses-dev/core");
29
35
  function formatSeriesName(inputFormat, seriesLabels) {
30
36
  const resolveLabelsRegex = /\{\{\s*(.+?)\s*\}\}/g;
31
37
  return inputFormat.replace(resolveLabelsRegex, (_match, token)=>{
32
- var _token;
33
- const resolvedValue = (_token = seriesLabels[token]) !== null && _token !== void 0 ? _token : '';
38
+ var _seriesLabels_token;
39
+ const resolvedValue = (_seriesLabels_token = seriesLabels[token]) !== null && _seriesLabels_token !== void 0 ? _seriesLabels_token : '';
34
40
  return resolvedValue;
35
41
  });
36
42
  }
@@ -50,7 +56,7 @@ function formatSeriesName(inputFormat, seriesLabels) {
50
56
  });
51
57
  return `{${labelStrings.join(',')}}`;
52
58
  }
53
- function getUniqueKeyForPrometheusResult(metricLabels, { removeExprWrap } = {}) {
59
+ function getUniqueKeyForPrometheusResult(metricLabels, { removeExprWrap } = {}) {
54
60
  const metricNameKey = '__name__';
55
61
  if (metricLabels) {
56
62
  if (Object.prototype.hasOwnProperty.call(metricLabels, metricNameKey)) {
@@ -75,7 +81,7 @@ function getFormattedPrometheusSeriesName(query, metric, formatter) {
75
81
  if (name === '' || (0, _core.isEmptyObject)(metric)) {
76
82
  name = query;
77
83
  }
78
- // Query editor allows you to define an optional series_name_format property.
84
+ // Query editor allows you to define an optional seriesNameFormat property.
79
85
  // This controls the regex used to customize legend and tooltip display.
80
86
  const formattedName = formatter ? formatSeriesName(formatter, metric) : name;
81
87
  return {
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { ReactCodeMirrorProps } from '@uiw/react-codemirror';
3
2
  import { CompleteConfiguration } from '@prometheus-io/codemirror-promql';
4
- export declare type PromQLEditorProps = {
3
+ export type PromQLEditorProps = {
5
4
  completeConfig: CompleteConfiguration;
6
5
  } & Omit<ReactCodeMirrorProps, 'theme' | 'extensions'>;
7
- export declare function PromQLEditor({ completeConfig, ...rest }: PromQLEditorProps): JSX.Element;
6
+ export declare function PromQLEditor({ completeConfig, ...rest }: PromQLEditorProps): import("react/jsx-runtime").JSX.Element;
8
7
  //# sourceMappingURL=PromQL.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PromQL.d.ts","sourceRoot":"","sources":["../../src/components/PromQL.tsx"],"names":[],"mappings":";AAaA,OAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAmB,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAK1F,oBAAY,iBAAiB,GAAG;IAAE,cAAc,EAAE,qBAAqB,CAAA;CAAE,GAAG,IAAI,CAC9E,oBAAoB,EACpB,OAAO,GAAG,YAAY,CACvB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,eAqB1E"}
1
+ {"version":3,"file":"PromQL.d.ts","sourceRoot":"","sources":["../../src/components/PromQL.tsx"],"names":[],"mappings":"AAaA,OAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAmB,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAK1F,MAAM,MAAM,iBAAiB,GAAG;IAAE,cAAc,EAAE,qBAAqB,CAAA;CAAE,GAAG,IAAI,CAC9E,oBAAoB,EACpB,OAAO,GAAG,YAAY,CACvB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,2CAqB1E"}
@@ -16,7 +16,7 @@ import { PromQLExtension } from '@prometheus-io/codemirror-promql';
16
16
  import { EditorView } from '@codemirror/view';
17
17
  import { useTheme } from '@mui/material';
18
18
  import { useMemo } from 'react';
19
- export function PromQLEditor({ completeConfig , ...rest }) {
19
+ export function PromQLEditor({ completeConfig, ...rest }) {
20
20
  const theme = useTheme();
21
21
  const isDarkMode = theme.palette.mode === 'dark';
22
22
  const promQLExtension = useMemo(()=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/PromQL.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport { PromQLExtension, CompleteConfiguration } from '@prometheus-io/codemirror-promql';\nimport { EditorView } from '@codemirror/view';\nimport { useTheme } from '@mui/material';\nimport { useMemo } from 'react';\n\nexport type PromQLEditorProps = { completeConfig: CompleteConfiguration } & Omit<\n ReactCodeMirrorProps,\n 'theme' | 'extensions'\n>;\n\nexport function PromQLEditor({ completeConfig, ...rest }: PromQLEditorProps) {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n const promQLExtension = useMemo(() => {\n return new PromQLExtension().activateLinter(false).setComplete(completeConfig).asExtension();\n }, [completeConfig]);\n\n return (\n <CodeMirror\n {...rest}\n style={{ border: `1px solid ${theme.palette.divider}` }}\n theme={isDarkMode ? 'dark' : 'light'}\n basicSetup={{\n highlightActiveLine: false,\n highlightActiveLineGutter: false,\n foldGutter: false,\n }}\n extensions={[EditorView.lineWrapping, promQLExtension]}\n />\n );\n}\n"],"names":["CodeMirror","PromQLExtension","EditorView","useTheme","useMemo","PromQLEditor","completeConfig","rest","theme","isDarkMode","palette","mode","promQLExtension","activateLinter","setComplete","asExtension","style","border","divider","basicSetup","highlightActiveLine","highlightActiveLineGutter","foldGutter","extensions","lineWrapping"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,OAAOA,UAAU,MAAgC,uBAAuB,CAAC;AACzE,SAASC,eAAe,QAA+B,kCAAkC,CAAC;AAC1F,SAASC,UAAU,QAAQ,kBAAkB,CAAC;AAC9C,SAASC,QAAQ,QAAQ,eAAe,CAAC;AACzC,SAASC,OAAO,QAAQ,OAAO,CAAC;AAOhC,OAAO,SAASC,YAAY,CAAC,EAAEC,cAAc,CAAA,EAAE,GAAGC,IAAI,EAAqB,EAAE;IAC3E,MAAMC,KAAK,GAAGL,QAAQ,EAAE,AAAC;IACzB,MAAMM,UAAU,GAAGD,KAAK,CAACE,OAAO,CAACC,IAAI,KAAK,MAAM,AAAC;IAEjD,MAAMC,eAAe,GAAGR,OAAO,CAAC,IAAM;QACpC,OAAO,IAAIH,eAAe,EAAE,CAACY,cAAc,CAAC,KAAK,CAAC,CAACC,WAAW,CAACR,cAAc,CAAC,CAACS,WAAW,EAAE,CAAC;IAC/F,CAAC,EAAE;QAACT,cAAc;KAAC,CAAC,AAAC;IAErB,qBACE,KAACN,UAAU;QACR,GAAGO,IAAI;QACRS,KAAK,EAAE;YAAEC,MAAM,EAAE,CAAC,UAAU,EAAET,KAAK,CAACE,OAAO,CAACQ,OAAO,CAAC,CAAC;SAAE;QACvDV,KAAK,EAAEC,UAAU,GAAG,MAAM,GAAG,OAAO;QACpCU,UAAU,EAAE;YACVC,mBAAmB,EAAE,KAAK;YAC1BC,yBAAyB,EAAE,KAAK;YAChCC,UAAU,EAAE,KAAK;SAClB;QACDC,UAAU,EAAE;YAACrB,UAAU,CAACsB,YAAY;YAAEZ,eAAe;SAAC;MACtD,CACF;AACJ,CAAC"}
1
+ {"version":3,"sources":["../../src/components/PromQL.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport { PromQLExtension, CompleteConfiguration } from '@prometheus-io/codemirror-promql';\nimport { EditorView } from '@codemirror/view';\nimport { useTheme } from '@mui/material';\nimport { useMemo } from 'react';\n\nexport type PromQLEditorProps = { completeConfig: CompleteConfiguration } & Omit<\n ReactCodeMirrorProps,\n 'theme' | 'extensions'\n>;\n\nexport function PromQLEditor({ completeConfig, ...rest }: PromQLEditorProps) {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n const promQLExtension = useMemo(() => {\n return new PromQLExtension().activateLinter(false).setComplete(completeConfig).asExtension();\n }, [completeConfig]);\n\n return (\n <CodeMirror\n {...rest}\n style={{ border: `1px solid ${theme.palette.divider}` }}\n theme={isDarkMode ? 'dark' : 'light'}\n basicSetup={{\n highlightActiveLine: false,\n highlightActiveLineGutter: false,\n foldGutter: false,\n }}\n extensions={[EditorView.lineWrapping, promQLExtension]}\n />\n );\n}\n"],"names":["CodeMirror","PromQLExtension","EditorView","useTheme","useMemo","PromQLEditor","completeConfig","rest","theme","isDarkMode","palette","mode","promQLExtension","activateLinter","setComplete","asExtension","style","border","divider","basicSetup","highlightActiveLine","highlightActiveLineGutter","foldGutter","extensions","lineWrapping"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,gBAA0C,wBAAwB;AACzE,SAASC,eAAe,QAA+B,mCAAmC;AAC1F,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,OAAO,QAAQ,QAAQ;AAOhC,OAAO,SAASC,aAAa,EAAEC,cAAc,EAAE,GAAGC,MAAyB;IACzE,MAAMC,QAAQL;IACd,MAAMM,aAAaD,MAAME,OAAO,CAACC,IAAI,KAAK;IAE1C,MAAMC,kBAAkBR,QAAQ;QAC9B,OAAO,IAAIH,kBAAkBY,cAAc,CAAC,OAAOC,WAAW,CAACR,gBAAgBS,WAAW;IAC5F,GAAG;QAACT;KAAe;IAEnB,qBACE,KAACN;QACE,GAAGO,IAAI;QACRS,OAAO;YAAEC,QAAQ,CAAC,UAAU,EAAET,MAAME,OAAO,CAACQ,OAAO,CAAC,CAAC;QAAC;QACtDV,OAAOC,aAAa,SAAS;QAC7BU,YAAY;YACVC,qBAAqB;YACrBC,2BAA2B;YAC3BC,YAAY;QACd;QACAC,YAAY;YAACrB,WAAWsB,YAAY;YAAEZ;SAAgB;;AAG5D"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './PromQL';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,UAAU,CAAC"}
1
+ {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './PromQL';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,WAAW"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PrometheusTimeSeriesQuery } from './plugins/prometheus-time-series-query';\n// @TODO: Move this to a more generic location;\nimport { StaticListVariable } from './plugins/variable';\nimport {\n PrometheusLabelNamesVariable,\n PrometheusLabelValuesVariable,\n PrometheusPromQLVariable,\n} from './plugins/prometheus-variables';\nimport { PrometheusDatasource } from './plugins/prometheus-datasource';\n\n// Export plugins under the same name as the kinds they handle from the plugin.json\nexport {\n PrometheusTimeSeriesQuery,\n StaticListVariable,\n PrometheusLabelNamesVariable,\n PrometheusLabelValuesVariable,\n PrometheusPromQLVariable,\n PrometheusDatasource,\n};\n\n// For consumers to leverage in DatasourceStoreProvider onCreate\nexport * from './model/prometheus-client';\nexport * from './model/api-types';\n\nexport * from './plugins/types';\n"],"names":["PrometheusTimeSeriesQuery","StaticListVariable","PrometheusLabelNamesVariable","PrometheusLabelValuesVariable","PrometheusPromQLVariable","PrometheusDatasource"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,yBAAyB,QAAQ,wCAAwC,CAAC;AACnF,+CAA+C;AAC/C,SAASC,kBAAkB,QAAQ,oBAAoB,CAAC;AACxD,SACEC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,wBAAwB,QACnB,gCAAgC,CAAC;AACxC,SAASC,oBAAoB,QAAQ,iCAAiC,CAAC;AAEvE,mFAAmF;AACnF,SACEL,yBAAyB,EACzBC,kBAAkB,EAClBC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,wBAAwB,EACxBC,oBAAoB,GACpB;AAEF,gEAAgE;AAChE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAElC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PrometheusTimeSeriesQuery } from './plugins/prometheus-time-series-query';\n// @TODO: Move this to a more generic location;\nimport { StaticListVariable } from './plugins/variable';\nimport {\n PrometheusLabelNamesVariable,\n PrometheusLabelValuesVariable,\n PrometheusPromQLVariable,\n} from './plugins/prometheus-variables';\nimport { PrometheusDatasource } from './plugins/prometheus-datasource';\n\n// Export plugins under the same name as the kinds they handle from the plugin.json\nexport {\n PrometheusTimeSeriesQuery,\n StaticListVariable,\n PrometheusLabelNamesVariable,\n PrometheusLabelValuesVariable,\n PrometheusPromQLVariable,\n PrometheusDatasource,\n};\n\n// For consumers to leverage in DatasourceStoreProvider onCreate\nexport * from './model/prometheus-client';\nexport * from './model/api-types';\n\nexport * from './plugins/types';\n"],"names":["PrometheusTimeSeriesQuery","StaticListVariable","PrometheusLabelNamesVariable","PrometheusLabelValuesVariable","PrometheusPromQLVariable","PrometheusDatasource"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,yBAAyB,QAAQ,yCAAyC;AACnF,+CAA+C;AAC/C,SAASC,kBAAkB,QAAQ,qBAAqB;AACxD,SACEC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,wBAAwB,QACnB,iCAAiC;AACxC,SAASC,oBAAoB,QAAQ,kCAAkC;AAEvE,mFAAmF;AACnF,SACEL,yBAAyB,EACzBC,kBAAkB,EAClBC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,wBAAwB,EACxBC,oBAAoB,GACpB;AAEF,gEAAgE;AAChE,cAAc,4BAA4B;AAC1C,cAAc,oBAAoB;AAElC,cAAc,kBAAkB"}
@@ -12,11 +12,11 @@ export interface ErrorResponse<T> {
12
12
  errorType: string;
13
13
  error: string;
14
14
  }
15
- export declare type ApiResponse<T> = SuccessResponse<T> | ErrorResponse<T>;
16
- export declare type DurationSeconds = number;
17
- export declare type UnixTimestampSeconds = number;
18
- export declare type ValueTuple = [unixTimeSeconds: UnixTimestampSeconds, sampleValue: string];
19
- export declare type Metric = Record<string, string>;
15
+ export type ApiResponse<T> = SuccessResponse<T> | ErrorResponse<T>;
16
+ export type DurationSeconds = number;
17
+ export type UnixTimestampSeconds = number;
18
+ export type ValueTuple = [unixTimeSeconds: UnixTimestampSeconds, sampleValue: string];
19
+ export type Metric = Record<string, string>;
20
20
  export interface VectorData {
21
21
  resultType: 'vector';
22
22
  result: Array<{
@@ -40,7 +40,7 @@ export interface InstantQueryRequestParameters {
40
40
  time?: UnixTimestampSeconds;
41
41
  timeout?: DurationString;
42
42
  }
43
- export declare type InstantQueryResponse = ApiResponse<MatrixData | VectorData | ScalarData>;
43
+ export type InstantQueryResponse = ApiResponse<MatrixData | VectorData | ScalarData>;
44
44
  export interface RangeQueryRequestParameters {
45
45
  query: string;
46
46
  start: UnixTimestampSeconds;
@@ -48,26 +48,26 @@ export interface RangeQueryRequestParameters {
48
48
  step: DurationSeconds;
49
49
  timeout?: DurationString;
50
50
  }
51
- export declare type RangeQueryResponse = ApiResponse<MatrixData>;
51
+ export type RangeQueryResponse = ApiResponse<MatrixData>;
52
52
  export interface SeriesRequestParameters {
53
53
  'match[]': string[];
54
54
  start: UnixTimestampSeconds;
55
55
  end: UnixTimestampSeconds;
56
56
  }
57
- export declare type SeriesResponse = ApiResponse<Metric[]>;
57
+ export type SeriesResponse = ApiResponse<Metric[]>;
58
58
  export interface LabelNamesRequestParameters {
59
59
  start?: UnixTimestampSeconds;
60
60
  end?: UnixTimestampSeconds;
61
61
  'match[]'?: string[];
62
62
  }
63
- export declare type LabelNamesResponse = ApiResponse<string[]>;
63
+ export type LabelNamesResponse = ApiResponse<string[]>;
64
64
  export interface LabelValuesRequestParameters {
65
65
  labelName: string;
66
66
  start?: UnixTimestampSeconds;
67
67
  end?: UnixTimestampSeconds;
68
68
  'match[]'?: string[];
69
69
  }
70
- export declare type LabelValuesResponse = ApiResponse<string[]>;
70
+ export type LabelValuesResponse = ApiResponse<string[]>;
71
71
  export interface MetricMetadata {
72
72
  type: string;
73
73
  help: string;
@@ -77,5 +77,5 @@ export interface MetricMetadataRequestParameters {
77
77
  limit?: number;
78
78
  metric?: string;
79
79
  }
80
- export declare type MetricMetadataResponse = ApiResponse<Record<string, MetricMetadata[]>>;
80
+ export type MetricMetadataResponse = ApiResponse<Record<string, MetricMetadata[]>>;
81
81
  //# sourceMappingURL=api-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-types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D,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,GAAG,CAAC,EAAE,oBAAoB,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,+BAA+B;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/api-types.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { DurationString } from '@perses-dev/core';\n\n// Just reuse dashboard model's type and re-export\nexport type { DurationString };\n\nexport interface SuccessResponse<T> {\n status: 'success';\n data: T;\n rawResponse?: Response;\n warnings?: string[];\n}\n\nexport interface ErrorResponse<T> {\n status: 'error';\n data?: T;\n errorType: string;\n error: string;\n}\n\nexport type ApiResponse<T> = SuccessResponse<T> | ErrorResponse<T>;\n\nexport type DurationSeconds = number;\n\nexport type UnixTimestampSeconds = number;\n\nexport type ValueTuple = [unixTimeSeconds: UnixTimestampSeconds, sampleValue: string];\n\nexport type Metric = Record<string, string>;\n\nexport interface VectorData {\n resultType: 'vector';\n result: Array<{\n metric: Metric;\n value: ValueTuple;\n }>;\n}\n\nexport interface MatrixData {\n resultType: 'matrix';\n result: Array<{\n metric: Metric;\n values: ValueTuple[];\n }>;\n}\n\nexport interface ScalarData {\n resultType: 'scalar';\n result: ValueTuple;\n}\n\nexport interface InstantQueryRequestParameters {\n query: string;\n time?: UnixTimestampSeconds;\n timeout?: DurationString;\n}\n\nexport type InstantQueryResponse = ApiResponse<MatrixData | VectorData | ScalarData>;\n\nexport interface RangeQueryRequestParameters {\n query: string;\n start: UnixTimestampSeconds;\n end: UnixTimestampSeconds;\n step: DurationSeconds;\n timeout?: DurationString;\n}\n\nexport type RangeQueryResponse = ApiResponse<MatrixData>;\n\nexport interface SeriesRequestParameters {\n 'match[]': string[];\n start: UnixTimestampSeconds;\n end: UnixTimestampSeconds;\n}\n\nexport type SeriesResponse = ApiResponse<Metric[]>;\n\nexport interface LabelNamesRequestParameters {\n start?: UnixTimestampSeconds;\n end?: UnixTimestampSeconds;\n 'match[]'?: string[];\n}\n\nexport type LabelNamesResponse = ApiResponse<string[]>;\n\nexport interface LabelValuesRequestParameters {\n labelName: string;\n start?: UnixTimestampSeconds;\n end?: UnixTimestampSeconds;\n 'match[]'?: string[];\n}\n\nexport type LabelValuesResponse = ApiResponse<string[]>;\n\nexport interface MetricMetadata {\n type: string;\n help: string;\n unit?: string;\n}\n\nexport interface MetricMetadataRequestParameters {\n limit?: number;\n metric?: string;\n}\n\nexport type MetricMetadataResponse = ApiResponse<Record<string, MetricMetadata[]>>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WAwGmF"}
1
+ {"version":3,"sources":["../../src/model/api-types.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { DurationString } from '@perses-dev/core';\n\n// Just reuse dashboard model's type and re-export\nexport type { DurationString };\n\nexport interface SuccessResponse<T> {\n status: 'success';\n data: T;\n rawResponse?: Response;\n warnings?: string[];\n}\n\nexport interface ErrorResponse<T> {\n status: 'error';\n data?: T;\n errorType: string;\n error: string;\n}\n\nexport type ApiResponse<T> = SuccessResponse<T> | ErrorResponse<T>;\n\nexport type DurationSeconds = number;\n\nexport type UnixTimestampSeconds = number;\n\nexport type ValueTuple = [unixTimeSeconds: UnixTimestampSeconds, sampleValue: string];\n\nexport type Metric = Record<string, string>;\n\nexport interface VectorData {\n resultType: 'vector';\n result: Array<{\n metric: Metric;\n value: ValueTuple;\n }>;\n}\n\nexport interface MatrixData {\n resultType: 'matrix';\n result: Array<{\n metric: Metric;\n values: ValueTuple[];\n }>;\n}\n\nexport interface ScalarData {\n resultType: 'scalar';\n result: ValueTuple;\n}\n\nexport interface InstantQueryRequestParameters {\n query: string;\n time?: UnixTimestampSeconds;\n timeout?: DurationString;\n}\n\nexport type InstantQueryResponse = ApiResponse<MatrixData | VectorData | ScalarData>;\n\nexport interface RangeQueryRequestParameters {\n query: string;\n start: UnixTimestampSeconds;\n end: UnixTimestampSeconds;\n step: DurationSeconds;\n timeout?: DurationString;\n}\n\nexport type RangeQueryResponse = ApiResponse<MatrixData>;\n\nexport interface SeriesRequestParameters {\n 'match[]': string[];\n start: UnixTimestampSeconds;\n end: UnixTimestampSeconds;\n}\n\nexport type SeriesResponse = ApiResponse<Metric[]>;\n\nexport interface LabelNamesRequestParameters {\n start?: UnixTimestampSeconds;\n end?: UnixTimestampSeconds;\n 'match[]'?: string[];\n}\n\nexport type LabelNamesResponse = ApiResponse<string[]>;\n\nexport interface LabelValuesRequestParameters {\n labelName: string;\n start?: UnixTimestampSeconds;\n end?: UnixTimestampSeconds;\n 'match[]'?: string[];\n}\n\nexport type LabelValuesResponse = ApiResponse<string[]>;\n\nexport interface MetricMetadata {\n type: string;\n help: string;\n unit?: string;\n}\n\nexport interface MetricMetadataRequestParameters {\n limit?: number;\n metric?: string;\n}\n\nexport type MetricMetadataResponse = ApiResponse<Record<string, MetricMetadata[]>>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA0GjC,WAAmF"}
@@ -2,6 +2,5 @@ export * from './api-types';
2
2
  export * from './parse-sample-values';
3
3
  export * from './prometheus-client';
4
4
  export * from './prometheus-selectors';
5
- export * from './templating';
6
5
  export * from './time';
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC"}