@perses-dev/prometheus-plugin 0.58.0-beta.2 → 0.58.0-beta.4
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/__mf/js/Prometheus.b529e8d3.js +7 -0
- package/__mf/js/async/1432.e29db35e.js +1 -0
- package/__mf/js/async/{1605.7c7a0998.js → 1605.a204b95c.js} +2 -2
- package/__mf/js/async/1616.3041c72f.js +1 -0
- package/__mf/js/async/1728.ed039ac8.js +1 -0
- package/__mf/js/async/1969.6563f651.js +1 -0
- package/__mf/js/async/2043.d03e35cf.js +2 -0
- package/__mf/js/async/{2177.adb95f75.js → 2177.1bd9b5dd.js} +5 -5
- package/__mf/js/async/{2186.9a98bd8f.js → 2186.a78343d7.js} +1 -1
- package/__mf/js/async/2506.a5e3fa9e.js +1 -0
- package/__mf/js/async/2979.bb987a1e.js +1 -0
- package/__mf/js/async/3075.10dd1cd7.js +1 -0
- package/__mf/js/async/3499.24f1fd45.js +1 -0
- package/__mf/js/async/392.7bf830d9.js +2 -0
- package/__mf/js/async/3963.d41ea897.js +1 -0
- package/__mf/js/async/4121.c001d061.js +2 -0
- package/__mf/js/async/425.e5eb361a.js +1 -0
- package/__mf/js/async/4626.f0edb327.js +1 -0
- package/__mf/js/async/4635.1d829282.js +2 -0
- package/__mf/js/async/4987.fc4d4c7c.js +1 -0
- package/__mf/js/async/5002.95d78deb.js +1 -0
- package/__mf/js/async/5061.758604ba.js +1 -0
- package/__mf/js/async/5071.96533845.js +1 -0
- package/__mf/js/async/5440.62626c57.js +2 -0
- package/__mf/js/async/5587.da62b369.js +1 -0
- package/__mf/js/async/5763.32764827.js +1 -0
- package/__mf/js/async/6274.404a3115.js +2 -0
- package/__mf/js/async/6293.3d4c6e7f.js +1 -0
- package/__mf/js/async/6438.6cf5bc56.js +1 -0
- package/__mf/js/async/6507.6eff5f62.js +1 -0
- package/__mf/js/async/6593.3cb2cfba.js +3 -0
- package/__mf/js/async/7177.a7b44f03.js +1 -0
- package/__mf/js/async/7192.4de9c6ee.js +1 -0
- package/__mf/js/async/7647.56445ecd.js +1 -0
- package/__mf/js/async/7862.9d9007af.js +2 -0
- package/__mf/js/async/7894.3f4153b0.js +1 -0
- package/__mf/js/async/7968.e2c70459.js +1 -0
- package/__mf/js/async/7978.ddabf18e.js +1 -0
- package/__mf/js/async/7984.e80ae184.js +22 -0
- package/__mf/js/async/8356.e01ee829.js +1 -0
- package/__mf/js/async/8470.b11a8957.js +2 -0
- package/__mf/js/async/851.c5db9756.js +1 -0
- package/__mf/js/async/873.5877e102.js +1 -0
- package/__mf/js/async/8888.8d48a6ee.js +1 -0
- package/__mf/js/async/899.253567a6.js +1 -0
- package/__mf/js/async/9020.3de2dac7.js +1 -0
- package/__mf/js/async/9184.e1e86d58.js +1 -0
- package/__mf/js/async/9235.a8bf4fd8.js +1 -0
- package/__mf/js/async/941.3020e9b0.js +2 -0
- package/__mf/js/async/9537.d74b4d52.js +1 -0
- package/__mf/js/async/9588.a934a42d.js +1 -0
- package/__mf/js/async/9745.8a112555.js +1 -0
- package/__mf/js/async/9836.5d033753.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusDatasource.3e365ba8.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusExplorer.54b7bd6d.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.39d61ff7.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.625e0810.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusPromQLAnnotation.0ada2816.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusPromQLVariable.1f09a9bc.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.63010995.js +1 -0
- package/__mf/js/main.50a64eeb.js +7 -0
- package/lib/annotations/PrometheusPromQLAnnotation.d.ts +4 -0
- package/lib/annotations/PrometheusPromQLAnnotation.d.ts.map +1 -0
- package/lib/annotations/PrometheusPromQLAnnotation.js +32 -0
- package/lib/annotations/PrometheusPromQLAnnotation.js.map +1 -0
- package/lib/annotations/PrometheusPromQLAnnotationOptionEditor.d.ts +13 -0
- package/lib/annotations/PrometheusPromQLAnnotationOptionEditor.d.ts.map +1 -0
- package/lib/annotations/PrometheusPromQLAnnotationOptionEditor.js +139 -0
- package/lib/annotations/PrometheusPromQLAnnotationOptionEditor.js.map +1 -0
- package/lib/annotations/get-annotation-data.d.ts +5 -0
- package/lib/annotations/get-annotation-data.d.ts.map +1 -0
- package/lib/annotations/get-annotation-data.js +79 -0
- package/lib/annotations/get-annotation-data.js.map +1 -0
- package/lib/annotations/index.d.ts +2 -0
- package/lib/annotations/index.d.ts.map +1 -0
- package/lib/annotations/index.js +15 -0
- package/lib/annotations/index.js.map +1 -0
- package/lib/cjs/annotations/PrometheusPromQLAnnotation.js +40 -0
- package/lib/cjs/annotations/PrometheusPromQLAnnotationOptionEditor.js +147 -0
- package/lib/cjs/annotations/get-annotation-data.js +87 -0
- package/lib/cjs/annotations/index.js +30 -0
- package/lib/cjs/explore/PrometheusExplorer.js +2 -16
- package/lib/cjs/explore/PrometheusMetricsFinder/overview/MetricOverview.js +3 -13
- package/lib/cjs/index.js +1 -0
- package/lib/explore/PrometheusExplorer.d.ts.map +1 -1
- package/lib/explore/PrometheusExplorer.js +2 -16
- package/lib/explore/PrometheusExplorer.js.map +1 -1
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.d.ts.map +1 -1
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.js +3 -13
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/plugins/PrometheusLabelValuesVariable.d.ts.map +1 -1
- package/lib/plugins/PrometheusLabelValuesVariable.js.map +1 -1
- package/lib/plugins/types.d.ts +7 -0
- package/lib/plugins/types.d.ts.map +1 -1
- package/lib/plugins/types.js.map +1 -1
- package/mf-manifest.json +341 -267
- package/mf-stats.json +355 -285
- package/package.json +16 -7
- package/__mf/js/Prometheus.e5d7ce90.js +0 -7
- package/__mf/js/async/1432.0bb0ef6b.js +0 -1
- package/__mf/js/async/1616.ed429c53.js +0 -1
- package/__mf/js/async/1728.bbe08f31.js +0 -1
- package/__mf/js/async/1969.a1e1979e.js +0 -1
- package/__mf/js/async/2043.c2948add.js +0 -2
- package/__mf/js/async/2228.53db17f4.js +0 -2
- package/__mf/js/async/2506.baf20a10.js +0 -1
- package/__mf/js/async/2814.fbf52858.js +0 -1
- package/__mf/js/async/2979.1d711dae.js +0 -1
- package/__mf/js/async/3075.08023434.js +0 -1
- package/__mf/js/async/3499.19c4bfa6.js +0 -1
- package/__mf/js/async/3613.8ccc0992.js +0 -22
- package/__mf/js/async/392.233c0945.js +0 -2
- package/__mf/js/async/3963.81c8be7e.js +0 -1
- package/__mf/js/async/4121.9ed83f2a.js +0 -2
- package/__mf/js/async/425.b9d2dc6f.js +0 -1
- package/__mf/js/async/4626.90ae092f.js +0 -1
- package/__mf/js/async/4987.f7360bdf.js +0 -1
- package/__mf/js/async/5002.bd952313.js +0 -1
- package/__mf/js/async/5071.5fcfd9a8.js +0 -1
- package/__mf/js/async/5440.9f33f7a9.js +0 -2
- package/__mf/js/async/5587.e4d331db.js +0 -1
- package/__mf/js/async/5763.ccf403b7.js +0 -1
- package/__mf/js/async/5922.ba33c996.js +0 -1
- package/__mf/js/async/6274.f04c9ecd.js +0 -2
- package/__mf/js/async/6438.b86a2aba.js +0 -1
- package/__mf/js/async/6507.71182781.js +0 -1
- package/__mf/js/async/7177.0ab860e0.js +0 -1
- package/__mf/js/async/7192.bbf62500.js +0 -1
- package/__mf/js/async/7647.82297501.js +0 -1
- package/__mf/js/async/7729.2e55d1c3.js +0 -3
- package/__mf/js/async/7862.e13fbb9d.js +0 -2
- package/__mf/js/async/7894.9fe90396.js +0 -1
- package/__mf/js/async/7968.253f5f1d.js +0 -1
- package/__mf/js/async/7978.be30c741.js +0 -1
- package/__mf/js/async/8356.6a2bfd53.js +0 -1
- package/__mf/js/async/8470.84935087.js +0 -2
- package/__mf/js/async/873.6aafbb7b.js +0 -1
- package/__mf/js/async/8888.3a188176.js +0 -1
- package/__mf/js/async/9020.058fd99c.js +0 -1
- package/__mf/js/async/9184.e6de21be.js +0 -1
- package/__mf/js/async/9235.85fb6b63.js +0 -1
- package/__mf/js/async/941.075ed563.js +0 -2
- package/__mf/js/async/9537.d1466e1b.js +0 -1
- package/__mf/js/async/9588.dfdaeff2.js +0 -1
- package/__mf/js/async/9594.d1a3d0d9.js +0 -1
- package/__mf/js/async/9745.0a6c90a2.js +0 -1
- package/__mf/js/async/9836.888f4ed2.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusDatasource.ef5f1df2.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusExplorer.e3461057.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.31fc9961.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.c3dbff14.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusPromQLVariable.cfc93e6f.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.0e2db857.js +0 -1
- package/__mf/js/main.0a0f0efb.js +0 -7
- /package/__mf/js/async/{1605.7c7a0998.js.LICENSE.txt → 1605.a204b95c.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2043.c2948add.js.LICENSE.txt → 2043.d03e35cf.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2177.adb95f75.js.LICENSE.txt → 2177.1bd9b5dd.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.233c0945.js.LICENSE.txt → 392.7bf830d9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{4121.9ed83f2a.js.LICENSE.txt → 4121.c001d061.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2228.53db17f4.js.LICENSE.txt → 4635.1d829282.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5440.9f33f7a9.js.LICENSE.txt → 5440.62626c57.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6274.f04c9ecd.js.LICENSE.txt → 6274.404a3115.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{7862.e13fbb9d.js.LICENSE.txt → 7862.9d9007af.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{3613.8ccc0992.js.LICENSE.txt → 7984.e80ae184.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8470.84935087.js.LICENSE.txt → 8470.b11a8957.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.075ed563.js.LICENSE.txt → 941.3020e9b0.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the \"License\");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an \"AS IS\" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { parseDurationString } from '@perses-dev/spec';
|
|
14
|
+
import { datasourceSelectValueToSelector, replaceVariables } from '@perses-dev/plugin-system';
|
|
15
|
+
import { milliseconds } from 'date-fns';
|
|
16
|
+
import { DEFAULT_SCRAPE_INTERVAL } from '../plugins';
|
|
17
|
+
import { DEFAULT_PROM, getPrometheusTimeRange, getRangeStep, PROM_DATASOURCE_KIND } from '../model';
|
|
18
|
+
import { formatSeriesName } from '../utils';
|
|
19
|
+
import { interpolateDatasourceProxyParams } from '../plugins/interpolation';
|
|
20
|
+
export const getAnnotationData = async (spec, context, abortSignal)=>{
|
|
21
|
+
if (!spec.expr) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const listDatasourceSelectItems = await context.datasourceStore.listDatasourceSelectItems(PROM_DATASOURCE_KIND);
|
|
25
|
+
const datasourceSelector = datasourceSelectValueToSelector(spec.datasource ?? DEFAULT_PROM, context.variableState, listDatasourceSelectItems) ?? DEFAULT_PROM;
|
|
26
|
+
const client = await context.datasourceStore.getDatasourceClient(datasourceSelector);
|
|
27
|
+
const datasource = await context.datasourceStore.getDatasource(datasourceSelector);
|
|
28
|
+
const interpolatedOptions = interpolateDatasourceProxyParams(datasource, context.variableState);
|
|
29
|
+
const datasourceScrapeInterval = Math.trunc(milliseconds(parseDurationString(datasource.plugin.spec.scrapeInterval ?? DEFAULT_SCRAPE_INTERVAL)) / 1000);
|
|
30
|
+
const timeRange = getPrometheusTimeRange(context.absoluteTimeRange);
|
|
31
|
+
const step = getRangeStep(timeRange, datasourceScrapeInterval);
|
|
32
|
+
const utcOffsetSec = new Date().getTimezoneOffset() * 60;
|
|
33
|
+
const alignedStart = Math.floor((timeRange.start + utcOffsetSec) / step) * step - utcOffsetSec;
|
|
34
|
+
let alignedEnd = Math.floor((timeRange.end + utcOffsetSec) / step) * step - utcOffsetSec;
|
|
35
|
+
/* Ensure end is always greater than start:
|
|
36
|
+
If the step is greater than equal to the diff of end and start,
|
|
37
|
+
both start, and end will eventually be rounded to the same value,
|
|
38
|
+
Consequently, the time range will be zero, which does not return any valid value
|
|
39
|
+
*/ if (alignedStart === alignedEnd) {
|
|
40
|
+
alignedEnd = alignedStart + step;
|
|
41
|
+
console.warn(`Step (${step}) was larger than the time range! end of time range was set accordingly.`);
|
|
42
|
+
}
|
|
43
|
+
const { data } = await client.rangeQuery({
|
|
44
|
+
query: replaceVariables(spec.expr, context.variableState),
|
|
45
|
+
start: alignedStart,
|
|
46
|
+
end: alignedEnd,
|
|
47
|
+
step: step
|
|
48
|
+
}, {
|
|
49
|
+
...interpolatedOptions,
|
|
50
|
+
signal: abortSignal
|
|
51
|
+
});
|
|
52
|
+
const result = [];
|
|
53
|
+
for (const series of data?.result ?? []){
|
|
54
|
+
const start = series.values[0]?.[0];
|
|
55
|
+
const end = series.values[series.values.length - 1]?.[0];
|
|
56
|
+
if (start !== undefined && end !== undefined) {
|
|
57
|
+
const labels = series.metric ?? {};
|
|
58
|
+
const title = spec.title ? formatSeriesName(spec.title, labels) : undefined;
|
|
59
|
+
const legend = spec.legend ? formatSeriesName(spec.legend, labels) : undefined;
|
|
60
|
+
// If spec.tags is provided, only expose the selected label names as tags.
|
|
61
|
+
// Otherwise, expose all labels.
|
|
62
|
+
const tags = spec.tags && spec.tags.length > 0 ? spec.tags.reduce((acc, name)=>{
|
|
63
|
+
const v = labels[name];
|
|
64
|
+
if (v !== undefined) acc[name] = v;
|
|
65
|
+
return acc;
|
|
66
|
+
}, {}) : labels;
|
|
67
|
+
result.push({
|
|
68
|
+
start: start * 1000,
|
|
69
|
+
end: end * 1000,
|
|
70
|
+
title: title,
|
|
71
|
+
legend: legend,
|
|
72
|
+
tags: tags
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=get-annotation-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/annotations/get-annotation-data.ts"],"sourcesContent":["// Copyright 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 { AnnotationData, DatasourceSpec, parseDurationString } from '@perses-dev/spec';\nimport { AnnotationContext, datasourceSelectValueToSelector, replaceVariables } from '@perses-dev/plugin-system';\nimport { milliseconds } from 'date-fns';\nimport { DEFAULT_SCRAPE_INTERVAL, PrometheusDatasourceSpec, PrometheusPromQLAnnotationOptions } from '../plugins';\nimport { DEFAULT_PROM, getPrometheusTimeRange, getRangeStep, PROM_DATASOURCE_KIND, PrometheusClient } from '../model';\nimport { formatSeriesName } from '../utils';\nimport { interpolateDatasourceProxyParams } from '../plugins/interpolation';\n\nexport const getAnnotationData = async (\n spec: PrometheusPromQLAnnotationOptions,\n context: AnnotationContext,\n abortSignal?: AbortSignal\n): Promise<AnnotationData[]> => {\n if (!spec.expr) {\n return [];\n }\n\n const listDatasourceSelectItems = await context.datasourceStore.listDatasourceSelectItems(PROM_DATASOURCE_KIND);\n\n const datasourceSelector =\n datasourceSelectValueToSelector(\n spec.datasource ?? DEFAULT_PROM,\n context.variableState,\n listDatasourceSelectItems\n ) ?? DEFAULT_PROM;\n\n const client: PrometheusClient = await context.datasourceStore.getDatasourceClient(datasourceSelector);\n\n const datasource = (await context.datasourceStore.getDatasource(\n datasourceSelector\n )) as DatasourceSpec<PrometheusDatasourceSpec>;\n const interpolatedOptions = interpolateDatasourceProxyParams(datasource, context.variableState);\n\n const datasourceScrapeInterval = Math.trunc(\n milliseconds(parseDurationString(datasource.plugin.spec.scrapeInterval ?? DEFAULT_SCRAPE_INTERVAL)) / 1000\n );\n\n const timeRange = getPrometheusTimeRange(context.absoluteTimeRange);\n\n const step = getRangeStep(timeRange, datasourceScrapeInterval);\n\n const utcOffsetSec = new Date().getTimezoneOffset() * 60;\n\n const alignedStart = Math.floor((timeRange.start + utcOffsetSec) / step) * step - utcOffsetSec;\n let alignedEnd = Math.floor((timeRange.end + utcOffsetSec) / step) * step - utcOffsetSec;\n\n /* Ensure end is always greater than start:\n If the step is greater than equal to the diff of end and start,\n both start, and end will eventually be rounded to the same value,\n Consequently, the time range will be zero, which does not return any valid value\n */\n if (alignedStart === alignedEnd) {\n alignedEnd = alignedStart + step;\n console.warn(`Step (${step}) was larger than the time range! end of time range was set accordingly.`);\n }\n\n const { data } = await client.rangeQuery(\n {\n query: replaceVariables(spec.expr, context.variableState),\n start: alignedStart,\n end: alignedEnd,\n step: step,\n },\n { ...interpolatedOptions, signal: abortSignal }\n );\n\n const result: AnnotationData[] = [];\n for (const series of data?.result ?? []) {\n const start = series.values[0]?.[0];\n const end = series.values[series.values.length - 1]?.[0];\n\n if (start !== undefined && end !== undefined) {\n const labels = series.metric ?? {};\n const title = spec.title ? formatSeriesName(spec.title, labels) : undefined;\n const legend = spec.legend ? formatSeriesName(spec.legend, labels) : undefined;\n // If spec.tags is provided, only expose the selected label names as tags.\n // Otherwise, expose all labels.\n const tags =\n spec.tags && spec.tags.length > 0\n ? spec.tags.reduce<Record<string, string>>((acc, name) => {\n const v = labels[name];\n if (v !== undefined) acc[name] = v;\n return acc;\n }, {})\n : labels;\n result.push({\n start: start * 1000,\n end: end * 1000,\n title: title,\n legend: legend,\n tags: tags,\n });\n }\n }\n\n return result;\n};\n"],"names":["parseDurationString","datasourceSelectValueToSelector","replaceVariables","milliseconds","DEFAULT_SCRAPE_INTERVAL","DEFAULT_PROM","getPrometheusTimeRange","getRangeStep","PROM_DATASOURCE_KIND","formatSeriesName","interpolateDatasourceProxyParams","getAnnotationData","spec","context","abortSignal","expr","listDatasourceSelectItems","datasourceStore","datasourceSelector","datasource","variableState","client","getDatasourceClient","getDatasource","interpolatedOptions","datasourceScrapeInterval","Math","trunc","plugin","scrapeInterval","timeRange","absoluteTimeRange","step","utcOffsetSec","Date","getTimezoneOffset","alignedStart","floor","start","alignedEnd","end","console","warn","data","rangeQuery","query","signal","result","series","values","length","undefined","labels","metric","title","legend","tags","reduce","acc","name","v","push"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotations/index.ts"],"names":[],"mappings":"AAaA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the \"License\");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an \"AS IS\" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './PrometheusPromQLAnnotation';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/annotations/index.ts"],"sourcesContent":["// Copyright 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 './PrometheusPromQLAnnotation';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,+BAA+B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the \"License\");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an \"AS IS\" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "PrometheusPromQLAnnotation", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return PrometheusPromQLAnnotation;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
24
|
+
const _PrometheusPromQLAnnotationOptionEditor = require("./PrometheusPromQLAnnotationOptionEditor");
|
|
25
|
+
const _getannotationdata = require("./get-annotation-data");
|
|
26
|
+
const PrometheusPromQLAnnotation = {
|
|
27
|
+
getAnnotationData: _getannotationdata.getAnnotationData,
|
|
28
|
+
dependsOn: (spec)=>{
|
|
29
|
+
const queryVariables = (0, _pluginsystem.parseVariables)(spec.expr);
|
|
30
|
+
return {
|
|
31
|
+
variables: [
|
|
32
|
+
...queryVariables
|
|
33
|
+
]
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
OptionsEditorComponent: _PrometheusPromQLAnnotationOptionEditor.PrometheusPromQLAnnotationOptionEditor,
|
|
37
|
+
createInitialOptions: ()=>({
|
|
38
|
+
expr: ''
|
|
39
|
+
})
|
|
40
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the \"License\");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an \"AS IS\" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "PrometheusPromQLAnnotationOptionEditor", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return PrometheusPromQLAnnotationOptionEditor;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _components = require("@perses-dev/components");
|
|
25
|
+
const _immer = require("immer");
|
|
26
|
+
const _material = require("@mui/material");
|
|
27
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
28
|
+
const _model = require("../model");
|
|
29
|
+
const _components1 = require("../components");
|
|
30
|
+
function PrometheusPromQLAnnotationOptionEditor(props) {
|
|
31
|
+
const { onChange, value, value: { expr, datasource, title, legend, tags }, isReadonly } = props;
|
|
32
|
+
const datasourceSelectValue = datasource ?? _model.DEFAULT_PROM;
|
|
33
|
+
const datasourceSelectLabelID = (0, _components.useId)('prom-datasource-label'); // for panels with multiple queries, this component is rendered multiple times on the same page
|
|
34
|
+
const selectedDatasource = (0, _pluginsystem.useDatasourceSelectValueToSelector)(datasourceSelectValue, _model.PROM_DATASOURCE_KIND);
|
|
35
|
+
const { data: client } = (0, _pluginsystem.useDatasourceClient)(selectedDatasource);
|
|
36
|
+
const promURL = client?.options.datasourceUrl;
|
|
37
|
+
const handleDatasourceChange = (next)=>{
|
|
38
|
+
if ((0, _model.isPrometheusDatasourceSelector)(next)) {
|
|
39
|
+
/* Good to know: The usage of onchange here causes an immediate spec update which eventually updates the panel
|
|
40
|
+
This was probably intentional to allow for quick switching between datasources.
|
|
41
|
+
Could have been triggered only with Run Query button as well.
|
|
42
|
+
*/ onChange((0, _immer.produce)(value, (draft)=>{
|
|
43
|
+
// If they're using the default, just omit the datasource prop (i.e. set to undefined)
|
|
44
|
+
const nextDatasource = (0, _model.isDefaultPromSelector)(next) ? undefined : next;
|
|
45
|
+
draft.datasource = nextDatasource;
|
|
46
|
+
}));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
throw new Error('Got unexpected non-Prometheus datasource selector');
|
|
50
|
+
};
|
|
51
|
+
const handleExprChange = (next)=>{
|
|
52
|
+
onChange((0, _immer.produce)(value, (draft)=>{
|
|
53
|
+
draft.expr = next;
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
const handleTitleChange = (next)=>{
|
|
57
|
+
onChange((0, _immer.produce)(value, (draft)=>{
|
|
58
|
+
draft.title = next || undefined;
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
const handleLegendChange = (next)=>{
|
|
62
|
+
onChange((0, _immer.produce)(value, (draft)=>{
|
|
63
|
+
draft.legend = next || undefined;
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
66
|
+
const handleTagsChange = (next)=>{
|
|
67
|
+
onChange((0, _immer.produce)(value, (draft)=>{
|
|
68
|
+
draft.tags = next.length > 0 ? next : undefined;
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
72
|
+
spacing: 2,
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormControl, {
|
|
75
|
+
margin: "dense",
|
|
76
|
+
fullWidth: false,
|
|
77
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
|
|
78
|
+
datasourcePluginKind: _model.PROM_DATASOURCE_KIND,
|
|
79
|
+
value: datasourceSelectValue,
|
|
80
|
+
onChange: handleDatasourceChange,
|
|
81
|
+
labelId: datasourceSelectLabelID,
|
|
82
|
+
label: "Prometheus Datasource",
|
|
83
|
+
notched: true,
|
|
84
|
+
readOnly: isReadonly
|
|
85
|
+
})
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.PromQLEditor, {
|
|
88
|
+
completeConfig: {
|
|
89
|
+
remote: {
|
|
90
|
+
url: promURL
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
value: expr,
|
|
94
|
+
datasource: selectedDatasource,
|
|
95
|
+
onChange: handleExprChange,
|
|
96
|
+
isReadOnly: isReadonly,
|
|
97
|
+
treeViewMetadata: undefined
|
|
98
|
+
}),
|
|
99
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
100
|
+
fullWidth: true,
|
|
101
|
+
label: "Title",
|
|
102
|
+
placeholder: "Example: 'Deployment {{service}}'",
|
|
103
|
+
helperText: "Title displayed in the annotation tooltip. Use {{label_name}} to interpolate label values.",
|
|
104
|
+
value: title ?? '',
|
|
105
|
+
onChange: (e)=>handleTitleChange(e.target.value),
|
|
106
|
+
slotProps: {
|
|
107
|
+
inputLabel: {
|
|
108
|
+
shrink: isReadonly ? true : undefined
|
|
109
|
+
},
|
|
110
|
+
input: {
|
|
111
|
+
readOnly: isReadonly
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}),
|
|
115
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
116
|
+
fullWidth: true,
|
|
117
|
+
label: "Legend",
|
|
118
|
+
placeholder: "Example: '{{instance}}' will generate annotation legends like 'webserver-123'...",
|
|
119
|
+
helperText: "Text displayed below the title in the annotation tooltip. Use {{label_name}} to interpolate label values.",
|
|
120
|
+
value: legend ?? '',
|
|
121
|
+
onChange: (e)=>handleLegendChange(e.target.value),
|
|
122
|
+
slotProps: {
|
|
123
|
+
inputLabel: {
|
|
124
|
+
shrink: isReadonly ? true : undefined
|
|
125
|
+
},
|
|
126
|
+
input: {
|
|
127
|
+
readOnly: isReadonly
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}),
|
|
131
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Autocomplete, {
|
|
132
|
+
multiple: true,
|
|
133
|
+
freeSolo: true,
|
|
134
|
+
options: [],
|
|
135
|
+
value: tags ?? [],
|
|
136
|
+
onChange: (_, next)=>handleTagsChange(next),
|
|
137
|
+
readOnly: isReadonly,
|
|
138
|
+
renderInput: (params)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
139
|
+
...params,
|
|
140
|
+
label: "Tags",
|
|
141
|
+
placeholder: "Add label names...",
|
|
142
|
+
helperText: "Label names to display as tags in the annotation tooltip. Leave empty to show all labels. Press Enter to add."
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
});
|
|
147
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the \"License\");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an \"AS IS\" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "getAnnotationData", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return getAnnotationData;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _spec = require("@perses-dev/spec");
|
|
24
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
25
|
+
const _datefns = require("date-fns");
|
|
26
|
+
const _plugins = require("../plugins");
|
|
27
|
+
const _model = require("../model");
|
|
28
|
+
const _utils = require("../utils");
|
|
29
|
+
const _interpolation = require("../plugins/interpolation");
|
|
30
|
+
const getAnnotationData = async (spec, context, abortSignal)=>{
|
|
31
|
+
if (!spec.expr) {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
const listDatasourceSelectItems = await context.datasourceStore.listDatasourceSelectItems(_model.PROM_DATASOURCE_KIND);
|
|
35
|
+
const datasourceSelector = (0, _pluginsystem.datasourceSelectValueToSelector)(spec.datasource ?? _model.DEFAULT_PROM, context.variableState, listDatasourceSelectItems) ?? _model.DEFAULT_PROM;
|
|
36
|
+
const client = await context.datasourceStore.getDatasourceClient(datasourceSelector);
|
|
37
|
+
const datasource = await context.datasourceStore.getDatasource(datasourceSelector);
|
|
38
|
+
const interpolatedOptions = (0, _interpolation.interpolateDatasourceProxyParams)(datasource, context.variableState);
|
|
39
|
+
const datasourceScrapeInterval = Math.trunc((0, _datefns.milliseconds)((0, _spec.parseDurationString)(datasource.plugin.spec.scrapeInterval ?? _plugins.DEFAULT_SCRAPE_INTERVAL)) / 1000);
|
|
40
|
+
const timeRange = (0, _model.getPrometheusTimeRange)(context.absoluteTimeRange);
|
|
41
|
+
const step = (0, _model.getRangeStep)(timeRange, datasourceScrapeInterval);
|
|
42
|
+
const utcOffsetSec = new Date().getTimezoneOffset() * 60;
|
|
43
|
+
const alignedStart = Math.floor((timeRange.start + utcOffsetSec) / step) * step - utcOffsetSec;
|
|
44
|
+
let alignedEnd = Math.floor((timeRange.end + utcOffsetSec) / step) * step - utcOffsetSec;
|
|
45
|
+
/* Ensure end is always greater than start:
|
|
46
|
+
If the step is greater than equal to the diff of end and start,
|
|
47
|
+
both start, and end will eventually be rounded to the same value,
|
|
48
|
+
Consequently, the time range will be zero, which does not return any valid value
|
|
49
|
+
*/ if (alignedStart === alignedEnd) {
|
|
50
|
+
alignedEnd = alignedStart + step;
|
|
51
|
+
console.warn(`Step (${step}) was larger than the time range! end of time range was set accordingly.`);
|
|
52
|
+
}
|
|
53
|
+
const { data } = await client.rangeQuery({
|
|
54
|
+
query: (0, _pluginsystem.replaceVariables)(spec.expr, context.variableState),
|
|
55
|
+
start: alignedStart,
|
|
56
|
+
end: alignedEnd,
|
|
57
|
+
step: step
|
|
58
|
+
}, {
|
|
59
|
+
...interpolatedOptions,
|
|
60
|
+
signal: abortSignal
|
|
61
|
+
});
|
|
62
|
+
const result = [];
|
|
63
|
+
for (const series of data?.result ?? []){
|
|
64
|
+
const start = series.values[0]?.[0];
|
|
65
|
+
const end = series.values[series.values.length - 1]?.[0];
|
|
66
|
+
if (start !== undefined && end !== undefined) {
|
|
67
|
+
const labels = series.metric ?? {};
|
|
68
|
+
const title = spec.title ? (0, _utils.formatSeriesName)(spec.title, labels) : undefined;
|
|
69
|
+
const legend = spec.legend ? (0, _utils.formatSeriesName)(spec.legend, labels) : undefined;
|
|
70
|
+
// If spec.tags is provided, only expose the selected label names as tags.
|
|
71
|
+
// Otherwise, expose all labels.
|
|
72
|
+
const tags = spec.tags && spec.tags.length > 0 ? spec.tags.reduce((acc, name)=>{
|
|
73
|
+
const v = labels[name];
|
|
74
|
+
if (v !== undefined) acc[name] = v;
|
|
75
|
+
return acc;
|
|
76
|
+
}, {}) : labels;
|
|
77
|
+
result.push({
|
|
78
|
+
start: start * 1000,
|
|
79
|
+
end: end * 1000,
|
|
80
|
+
title: title,
|
|
81
|
+
legend: legend,
|
|
82
|
+
tags: tags
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the \"License\");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an \"AS IS\" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
_export_star(require("./PrometheusPromQLAnnotation"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
|
+
Object.keys(from).forEach(function(k) {
|
|
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
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return from;
|
|
30
|
+
}
|
|
@@ -42,18 +42,11 @@ function TimeSeriesPanel({ queries }) {
|
|
|
42
42
|
const { width, ref: boxRef } = (0, _useresizeobserver.default)();
|
|
43
43
|
const height = PANEL_PREVIEW_HEIGHT;
|
|
44
44
|
const suggestedStepMs = (0, _pluginsystem.useSuggestedStepMs)(width);
|
|
45
|
-
// map TimeSeriesQueryDefinition to Definition<UnknownSpec>
|
|
46
|
-
const definitions = queries.length ? queries.map((query)=>{
|
|
47
|
-
return {
|
|
48
|
-
kind: query.spec.plugin.kind,
|
|
49
|
-
spec: query.spec.plugin.spec
|
|
50
|
-
};
|
|
51
|
-
}) : [];
|
|
52
45
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
53
46
|
ref: boxRef,
|
|
54
47
|
height: height,
|
|
55
48
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DataQueriesProvider, {
|
|
56
|
-
definitions:
|
|
49
|
+
definitions: queries,
|
|
57
50
|
options: {
|
|
58
51
|
suggestedStepMs,
|
|
59
52
|
mode: 'range'
|
|
@@ -81,17 +74,10 @@ function TimeSeriesPanel({ queries }) {
|
|
|
81
74
|
}
|
|
82
75
|
function MetricDataTable({ queries }) {
|
|
83
76
|
const height = PANEL_PREVIEW_HEIGHT;
|
|
84
|
-
// map TimeSeriesQueryDefinition to Definition<UnknownSpec>
|
|
85
|
-
const definitions = queries.map((query)=>{
|
|
86
|
-
return {
|
|
87
|
-
kind: query.spec.plugin.kind,
|
|
88
|
-
spec: query.spec.plugin.spec
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
77
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
92
78
|
height: height,
|
|
93
79
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DataQueriesProvider, {
|
|
94
|
-
definitions:
|
|
80
|
+
definitions: queries,
|
|
95
81
|
options: {
|
|
96
82
|
mode: 'instant'
|
|
97
83
|
},
|
|
@@ -49,9 +49,9 @@ function OverviewPanel({ metricName, datasource, filters, type, isLoading, ...pr
|
|
|
49
49
|
const { width, ref: panelRef } = (0, _useresizeobserver.default)();
|
|
50
50
|
const suggestedStepMs = (0, _pluginsystem.useSuggestedStepMs)(width);
|
|
51
51
|
const [rateEnabled, setRateEnabled] = (0, _react.useState)(true);
|
|
52
|
-
const
|
|
52
|
+
const queries = (0, _react.useMemo)(()=>{
|
|
53
53
|
const expr = type === 'counter' || rateEnabled && (type === undefined || type === 'summary' || type === 'histogram') ? `rate({__name__="${metricName}", ${(0, _types.computeFilterExpr)(filters)}}[5m])` : `{__name__="${metricName}", ${(0, _types.computeFilterExpr)(filters)}}`;
|
|
54
|
-
|
|
54
|
+
return [
|
|
55
55
|
{
|
|
56
56
|
kind: 'TimeSeriesQuery',
|
|
57
57
|
spec: {
|
|
@@ -65,16 +65,6 @@ function OverviewPanel({ metricName, datasource, filters, type, isLoading, ...pr
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
];
|
|
68
|
-
const definitions = queries.map((query)=>{
|
|
69
|
-
return {
|
|
70
|
-
kind: query.spec.plugin.kind,
|
|
71
|
-
spec: query.spec.plugin.spec
|
|
72
|
-
};
|
|
73
|
-
});
|
|
74
|
-
return {
|
|
75
|
-
queries,
|
|
76
|
-
definitions
|
|
77
|
-
};
|
|
78
68
|
}, [
|
|
79
69
|
datasource,
|
|
80
70
|
filters,
|
|
@@ -105,7 +95,7 @@ function OverviewPanel({ metricName, datasource, filters, type, isLoading, ...pr
|
|
|
105
95
|
onChange: (_, checked)=>setRateEnabled(checked)
|
|
106
96
|
}),
|
|
107
97
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DataQueriesProvider, {
|
|
108
|
-
definitions:
|
|
98
|
+
definitions: queries,
|
|
109
99
|
options: {
|
|
110
100
|
suggestedStepMs,
|
|
111
101
|
mode: 'range'
|
package/lib/cjs/index.js
CHANGED
|
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "getPluginModule", {
|
|
|
20
20
|
return _getPluginModule.getPluginModule;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
+
_export_star(require("./annotations"), exports);
|
|
23
24
|
_export_star(require("./components"), exports);
|
|
24
25
|
_export_star(require("./explore"), exports);
|
|
25
26
|
const _getPluginModule = require("./getPluginModule");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrometheusExplorer.d.ts","sourceRoot":"","sources":["../../../src/explore/PrometheusExplorer.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,YAAY,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PrometheusExplorer.d.ts","sourceRoot":"","sources":["../../../src/explore/PrometheusExplorer.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,YAAY,EAAY,MAAM,OAAO,CAAC;AAyD/C,wBAAgB,kBAAkB,IAAI,YAAY,CAwDjD"}
|
|
@@ -27,18 +27,11 @@ function TimeSeriesPanel({ queries }) {
|
|
|
27
27
|
const { width, ref: boxRef } = useResizeObserver();
|
|
28
28
|
const height = PANEL_PREVIEW_HEIGHT;
|
|
29
29
|
const suggestedStepMs = useSuggestedStepMs(width);
|
|
30
|
-
// map TimeSeriesQueryDefinition to Definition<UnknownSpec>
|
|
31
|
-
const definitions = queries.length ? queries.map((query)=>{
|
|
32
|
-
return {
|
|
33
|
-
kind: query.spec.plugin.kind,
|
|
34
|
-
spec: query.spec.plugin.spec
|
|
35
|
-
};
|
|
36
|
-
}) : [];
|
|
37
30
|
return /*#__PURE__*/ _jsx(Box, {
|
|
38
31
|
ref: boxRef,
|
|
39
32
|
height: height,
|
|
40
33
|
children: /*#__PURE__*/ _jsx(DataQueriesProvider, {
|
|
41
|
-
definitions:
|
|
34
|
+
definitions: queries,
|
|
42
35
|
options: {
|
|
43
36
|
suggestedStepMs,
|
|
44
37
|
mode: 'range'
|
|
@@ -66,17 +59,10 @@ function TimeSeriesPanel({ queries }) {
|
|
|
66
59
|
}
|
|
67
60
|
function MetricDataTable({ queries }) {
|
|
68
61
|
const height = PANEL_PREVIEW_HEIGHT;
|
|
69
|
-
// map TimeSeriesQueryDefinition to Definition<UnknownSpec>
|
|
70
|
-
const definitions = queries.map((query)=>{
|
|
71
|
-
return {
|
|
72
|
-
kind: query.spec.plugin.kind,
|
|
73
|
-
spec: query.spec.plugin.spec
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
62
|
return /*#__PURE__*/ _jsx(Box, {
|
|
77
63
|
height: height,
|
|
78
64
|
children: /*#__PURE__*/ _jsx(DataQueriesProvider, {
|
|
79
|
-
definitions:
|
|
65
|
+
definitions: queries,
|
|
80
66
|
options: {
|
|
81
67
|
mode: 'instant'
|
|
82
68
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/explore/PrometheusExplorer.tsx"],"sourcesContent":["// Copyright 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 { Box, Stack, Tab, Tabs } from '@mui/material';\nimport { DataQueriesProvider, MultiQueryEditor, useSuggestedStepMs } from '@perses-dev/plugin-system';\nimport { useExplorerManagerContext } from '@perses-dev/explore';\nimport useResizeObserver from 'use-resize-observer';\nimport { Panel } from '@perses-dev/dashboards';\nimport { ReactElement, useState } from 'react';\nimport { QueryDefinition } from '@perses-dev/spec';\nimport { DEFAULT_PROM } from '../model/prometheus-selectors';\nimport { FinderQueryParams } from './PrometheusMetricsFinder/types';\nimport { PrometheusMetricsFinder } from './PrometheusMetricsFinder';\n\ninterface MetricsExplorerQueryParams extends FinderQueryParams {\n tab?: string;\n queries?: QueryDefinition[];\n}\n\nconst PANEL_PREVIEW_HEIGHT = 700;\nconst FILTERED_QUERY_PLUGINS = ['PrometheusTimeSeriesQuery'];\n\nfunction TimeSeriesPanel({ queries }: { queries: QueryDefinition[] }): ReactElement {\n const { width, ref: boxRef } = useResizeObserver();\n const height = PANEL_PREVIEW_HEIGHT;\n\n const suggestedStepMs = useSuggestedStepMs(width);\n\n
|
|
1
|
+
{"version":3,"sources":["../../../src/explore/PrometheusExplorer.tsx"],"sourcesContent":["// Copyright 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 { Box, Stack, Tab, Tabs } from '@mui/material';\nimport { DataQueriesProvider, MultiQueryEditor, useSuggestedStepMs } from '@perses-dev/plugin-system';\nimport { useExplorerManagerContext } from '@perses-dev/explore';\nimport useResizeObserver from 'use-resize-observer';\nimport { Panel } from '@perses-dev/dashboards';\nimport { ReactElement, useState } from 'react';\nimport { QueryDefinition } from '@perses-dev/spec';\nimport { DEFAULT_PROM } from '../model/prometheus-selectors';\nimport { FinderQueryParams } from './PrometheusMetricsFinder/types';\nimport { PrometheusMetricsFinder } from './PrometheusMetricsFinder';\n\ninterface MetricsExplorerQueryParams extends FinderQueryParams {\n tab?: string;\n queries?: QueryDefinition[];\n}\n\nconst PANEL_PREVIEW_HEIGHT = 700;\nconst FILTERED_QUERY_PLUGINS = ['PrometheusTimeSeriesQuery'];\n\nfunction TimeSeriesPanel({ queries }: { queries: QueryDefinition[] }): ReactElement {\n const { width, ref: boxRef } = useResizeObserver();\n const height = PANEL_PREVIEW_HEIGHT;\n\n const suggestedStepMs = useSuggestedStepMs(width);\n\n return (\n <Box ref={boxRef} height={height}>\n <DataQueriesProvider definitions={queries} options={{ suggestedStepMs, mode: 'range' }}>\n <Panel\n panelOptions={{\n hideHeader: true,\n }}\n definition={{\n kind: 'Panel',\n spec: { queries: queries, display: { name: '' }, plugin: { kind: 'TimeSeriesChart', spec: {} } },\n }}\n />\n </DataQueriesProvider>\n </Box>\n );\n}\n\nfunction MetricDataTable({ queries }: { queries: QueryDefinition[] }): ReactElement {\n const height = PANEL_PREVIEW_HEIGHT;\n\n return (\n <Box height={height}>\n <DataQueriesProvider definitions={queries} options={{ mode: 'instant' }}>\n <Panel\n panelOptions={{\n hideHeader: true,\n }}\n definition={{\n kind: 'Panel',\n spec: { queries: queries, display: { name: '' }, plugin: { kind: 'TimeSeriesTable', spec: {} } },\n }}\n />\n </DataQueriesProvider>\n </Box>\n );\n}\n\nexport function PrometheusExplorer(): ReactElement {\n const {\n data: { tab = 'table', queries = [], datasource = DEFAULT_PROM, filters = [], exploredMetric = undefined },\n setData,\n } = useExplorerManagerContext<MetricsExplorerQueryParams>();\n\n const [queryDefinitions, setQueryDefinitions] = useState<QueryDefinition[]>(queries);\n\n return (\n <Stack gap={2} sx={{ width: '100%' }}>\n <Tabs\n value={tab}\n onChange={(_, state) => setData({ tab: state, queries })}\n variant=\"scrollable\"\n sx={{ borderBottom: 1, borderColor: 'divider' }}\n >\n <Tab value=\"table\" label=\"Table\" />\n <Tab value=\"graph\" label=\"Graph\" />\n <Tab value=\"finder\" label=\"Finder\" />\n </Tabs>\n <Stack gap={1}>\n {tab === 'table' && (\n <Stack>\n <MultiQueryEditor\n queryTypes={['TimeSeriesQuery']}\n onChange={(state) => setQueryDefinitions(state)}\n queries={queryDefinitions}\n onQueryRun={() => setData({ tab, queries: queryDefinitions })}\n filteredQueryPlugins={FILTERED_QUERY_PLUGINS}\n />\n <MetricDataTable queries={queries} />\n </Stack>\n )}\n {tab === 'graph' && (\n <Stack>\n <MultiQueryEditor\n queryTypes={['TimeSeriesQuery']}\n onChange={(state) => setQueryDefinitions(state)}\n queries={queryDefinitions}\n onQueryRun={() => setData({ tab, queries: queryDefinitions })}\n filteredQueryPlugins={FILTERED_QUERY_PLUGINS}\n />\n <TimeSeriesPanel queries={queries} />\n </Stack>\n )}\n {tab === 'finder' && (\n <Stack>\n <PrometheusMetricsFinder\n onChange={(state) => setData({ tab, ...state })}\n value={{ datasource, filters, exploredMetric }}\n />\n </Stack>\n )}\n </Stack>\n </Stack>\n );\n}\n"],"names":["Box","Stack","Tab","Tabs","DataQueriesProvider","MultiQueryEditor","useSuggestedStepMs","useExplorerManagerContext","useResizeObserver","Panel","useState","DEFAULT_PROM","PrometheusMetricsFinder","PANEL_PREVIEW_HEIGHT","FILTERED_QUERY_PLUGINS","TimeSeriesPanel","queries","width","ref","boxRef","height","suggestedStepMs","definitions","options","mode","panelOptions","hideHeader","definition","kind","spec","display","name","plugin","MetricDataTable","PrometheusExplorer","data","tab","datasource","filters","exploredMetric","undefined","setData","queryDefinitions","setQueryDefinitions","gap","sx","value","onChange","_","state","variant","borderBottom","borderColor","label","queryTypes","onQueryRun","filteredQueryPlugins"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricOverview.d.ts","sourceRoot":"","sources":["../../../../../src/explore/PrometheusMetricsFinder/overview/MetricOverview.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA+C,UAAU,EAAsB,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,YAAY,EAAqB,MAAM,OAAO,CAAC;AAMxD,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"MetricOverview.d.ts","sourceRoot":"","sources":["../../../../../src/explore/PrometheusMetricsFinder/overview/MetricOverview.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA+C,UAAU,EAAsB,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,YAAY,EAAqB,MAAM,OAAO,CAAC;AAMxD,OAAO,EAAE,kBAAkB,EAAmB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAqB,WAAW,EAAE,MAAM,UAAU,CAAC;AAM1D,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,UAAU,EACV,OAAO,EACP,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,GAAG,YAAY,CA+DnC;AAED,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,YAAY,CAyFpC"}
|