@perses-dev/prometheus-plugin 0.41.1 → 0.42.1
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/dist/cjs/model/prometheus-client.js +16 -0
- package/dist/cjs/model/prometheus-selectors.js +1 -1
- package/dist/cjs/plugins/PrometheusDatasourceEditor.js +272 -186
- package/dist/cjs/plugins/prometheus-datasource.js +4 -0
- package/dist/cjs/plugins/prometheus-time-series-query/DashboardPrometheusTimeSeriesQueryEditor.js +88 -0
- package/dist/cjs/plugins/prometheus-time-series-query/ExplorePrometheusTimeSeriesQueryEditor.js +123 -0
- package/dist/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +34 -60
- package/dist/model/prometheus-client.d.ts +4 -0
- package/dist/model/prometheus-client.d.ts.map +1 -1
- package/dist/model/prometheus-client.js +15 -0
- package/dist/model/prometheus-client.js.map +1 -1
- package/dist/model/prometheus-selectors.js +1 -1
- package/dist/model/prometheus-selectors.js.map +1 -1
- package/dist/plugins/PrometheusDatasourceEditor.d.ts.map +1 -1
- package/dist/plugins/PrometheusDatasourceEditor.js +272 -186
- package/dist/plugins/PrometheusDatasourceEditor.js.map +1 -1
- package/dist/plugins/prometheus-datasource.d.ts.map +1 -1
- package/dist/plugins/prometheus-datasource.js +5 -1
- package/dist/plugins/prometheus-datasource.js.map +1 -1
- package/dist/plugins/prometheus-time-series-query/DashboardPrometheusTimeSeriesQueryEditor.d.ts +21 -0
- package/dist/plugins/prometheus-time-series-query/DashboardPrometheusTimeSeriesQueryEditor.d.ts.map +1 -0
- package/dist/plugins/prometheus-time-series-query/DashboardPrometheusTimeSeriesQueryEditor.js +80 -0
- package/dist/plugins/prometheus-time-series-query/DashboardPrometheusTimeSeriesQueryEditor.js.map +1 -0
- package/dist/plugins/prometheus-time-series-query/ExplorePrometheusTimeSeriesQueryEditor.d.ts +21 -0
- package/dist/plugins/prometheus-time-series-query/ExplorePrometheusTimeSeriesQueryEditor.d.ts.map +1 -0
- package/dist/plugins/prometheus-time-series-query/ExplorePrometheusTimeSeriesQueryEditor.js +115 -0
- package/dist/plugins/prometheus-time-series-query/ExplorePrometheusTimeSeriesQueryEditor.js.map +1 -0
- package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.d.ts.map +1 -1
- package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +37 -63
- package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js.map +1 -1
- package/dist/plugins/types.d.ts +1 -15
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/plugins/types.js.map +1 -1
- package/package.json +4 -4
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { jsx as _jsx
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { produce } from 'immer';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { DEFAULT_PROM, isDefaultPromSelector, isPrometheusDatasourceSelector, PROM_DATASOURCE_KIND } from '../../model';
|
|
18
|
-
import { PromQLEditor } from '../../components';
|
|
15
|
+
import { useDatasource, useDatasourceClient } from '@perses-dev/plugin-system';
|
|
16
|
+
import { DEFAULT_PROM, isDefaultPromSelector, isPrometheusDatasourceSelector } from '../../model';
|
|
19
17
|
import { DEFAULT_SCRAPE_INTERVAL } from '../types';
|
|
20
18
|
import { useQueryState, useFormatState, useMinStepState } from './query-editor-model';
|
|
19
|
+
import { DashboardPrometheusTimeSeriesQueryEditor } from './DashboardPrometheusTimeSeriesQueryEditor';
|
|
20
|
+
import { ExplorePrometheusTimeSeriesQueryEditor } from './ExplorePrometheusTimeSeriesQueryEditor';
|
|
21
21
|
/**
|
|
22
22
|
* The options editor component for editing a PrometheusTimeSeriesQuery's spec.
|
|
23
23
|
*/ export function PrometheusTimeSeriesQueryEditor(props) {
|
|
24
|
-
const { onChange , value } = props;
|
|
24
|
+
const { onChange , value , isExplore } = props;
|
|
25
25
|
const { datasource } = value;
|
|
26
26
|
const selectedDatasource = datasource !== null && datasource !== void 0 ? datasource : DEFAULT_PROM;
|
|
27
27
|
const { data: client } = useDatasourceClient(selectedDatasource);
|
|
@@ -43,63 +43,37 @@ import { useQueryState, useFormatState, useMinStepState } from './query-editor-m
|
|
|
43
43
|
}
|
|
44
44
|
throw new Error('Got unexpected non-Prometheus datasource selector');
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
direction: "row",
|
|
78
|
-
spacing: 2,
|
|
79
|
-
children: [
|
|
80
|
-
/*#__PURE__*/ _jsx(TextField, {
|
|
81
|
-
fullWidth: true,
|
|
82
|
-
label: "Legend Name",
|
|
83
|
-
placeholder: "Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.",
|
|
84
|
-
helperText: "Name for each series in the legend and the tooltip.",
|
|
85
|
-
value: format !== null && format !== void 0 ? format : '',
|
|
86
|
-
onChange: (e)=>handleFormatChange(e.target.value),
|
|
87
|
-
onBlur: handleFormatBlur
|
|
88
|
-
}),
|
|
89
|
-
/*#__PURE__*/ _jsx(TextField, {
|
|
90
|
-
label: "Min Step",
|
|
91
|
-
placeholder: minStepPlaceholder,
|
|
92
|
-
helperText: "Step parameter of the query. Used by $__interval and $__rate_interval too.",
|
|
93
|
-
value: minStep,
|
|
94
|
-
onChange: (e)=>handleMinStepChange(e.target.value),
|
|
95
|
-
onBlur: handleMinStepBlur,
|
|
96
|
-
sx: {
|
|
97
|
-
width: '250px'
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
]
|
|
101
|
-
})
|
|
102
|
-
]
|
|
46
|
+
if (isExplore) {
|
|
47
|
+
return /*#__PURE__*/ _jsx(ExplorePrometheusTimeSeriesQueryEditor, {
|
|
48
|
+
selectedDatasource: selectedDatasource,
|
|
49
|
+
handleDatasourceChange: handleDatasourceChange,
|
|
50
|
+
promURL: promURL,
|
|
51
|
+
query: query,
|
|
52
|
+
handleQueryChange: handleQueryChange,
|
|
53
|
+
handleQueryBlur: handleQueryBlur,
|
|
54
|
+
format: format,
|
|
55
|
+
handleFormatChange: handleFormatChange,
|
|
56
|
+
handleFormatBlur: handleFormatBlur,
|
|
57
|
+
minStepPlaceholder: minStepPlaceholder,
|
|
58
|
+
minStep: minStep,
|
|
59
|
+
handleMinStepChange: handleMinStepChange,
|
|
60
|
+
handleMinStepBlur: handleMinStepBlur
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return /*#__PURE__*/ _jsx(DashboardPrometheusTimeSeriesQueryEditor, {
|
|
64
|
+
selectedDatasource: selectedDatasource,
|
|
65
|
+
handleDatasourceChange: handleDatasourceChange,
|
|
66
|
+
promURL: promURL,
|
|
67
|
+
query: query,
|
|
68
|
+
handleQueryChange: handleQueryChange,
|
|
69
|
+
handleQueryBlur: handleQueryBlur,
|
|
70
|
+
format: format,
|
|
71
|
+
handleFormatChange: handleFormatChange,
|
|
72
|
+
handleFormatBlur: handleFormatBlur,
|
|
73
|
+
minStepPlaceholder: minStepPlaceholder,
|
|
74
|
+
minStep: minStep,
|
|
75
|
+
handleMinStepChange: handleMinStepChange,
|
|
76
|
+
handleMinStepBlur: handleMinStepBlur
|
|
103
77
|
});
|
|
104
78
|
}
|
|
105
79
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.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 { produce } from 'immer';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.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 { produce } from 'immer';\nimport { DatasourceSelectProps, useDatasource, useDatasourceClient } from '@perses-dev/plugin-system';\nimport { DEFAULT_PROM, isDefaultPromSelector, isPrometheusDatasourceSelector, PrometheusClient } from '../../model';\nimport { DEFAULT_SCRAPE_INTERVAL, PrometheusDatasourceSpec } from '../types';\nimport {\n PrometheusTimeSeriesQueryEditorProps,\n useQueryState,\n useFormatState,\n useMinStepState,\n} from './query-editor-model';\nimport { DashboardPrometheusTimeSeriesQueryEditor } from './DashboardPrometheusTimeSeriesQueryEditor';\nimport { ExplorePrometheusTimeSeriesQueryEditor } from './ExplorePrometheusTimeSeriesQueryEditor';\n\n/**\n * The options editor component for editing a PrometheusTimeSeriesQuery's spec.\n */\nexport function PrometheusTimeSeriesQueryEditor(props: PrometheusTimeSeriesQueryEditorProps) {\n const { onChange, value, isExplore } = props;\n const { datasource } = value;\n const selectedDatasource = datasource ?? DEFAULT_PROM;\n\n const { data: client } = useDatasourceClient<PrometheusClient>(selectedDatasource);\n const promURL = client?.options.datasourceUrl;\n const { data: datasourceResource } = useDatasource(selectedDatasource);\n\n const { query, handleQueryChange, handleQueryBlur } = useQueryState(props);\n const { format, handleFormatChange, handleFormatBlur } = useFormatState(props);\n const { minStep, handleMinStepChange, handleMinStepBlur } = useMinStepState(props);\n const minStepPlaceholder =\n minStep ??\n (datasourceResource && (datasourceResource?.plugin.spec as PrometheusDatasourceSpec).scrapeInterval) ??\n DEFAULT_SCRAPE_INTERVAL;\n\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = (next) => {\n if (isPrometheusDatasourceSelector(next)) {\n onChange(\n produce(value, (draft) => {\n // If they're using the default, just omit the datasource prop (i.e. set to undefined)\n const nextDatasource = isDefaultPromSelector(next) ? undefined : next;\n draft.datasource = nextDatasource;\n })\n );\n return;\n }\n\n throw new Error('Got unexpected non-Prometheus datasource selector');\n };\n\n if (isExplore) {\n return (\n <ExplorePrometheusTimeSeriesQueryEditor\n selectedDatasource={selectedDatasource}\n handleDatasourceChange={handleDatasourceChange}\n promURL={promURL}\n query={query}\n handleQueryChange={handleQueryChange}\n handleQueryBlur={handleQueryBlur}\n format={format}\n handleFormatChange={handleFormatChange}\n handleFormatBlur={handleFormatBlur}\n minStepPlaceholder={minStepPlaceholder}\n minStep={minStep}\n handleMinStepChange={handleMinStepChange}\n handleMinStepBlur={handleMinStepBlur}\n />\n );\n }\n\n return (\n <DashboardPrometheusTimeSeriesQueryEditor\n selectedDatasource={selectedDatasource}\n handleDatasourceChange={handleDatasourceChange}\n promURL={promURL}\n query={query}\n handleQueryChange={handleQueryChange}\n handleQueryBlur={handleQueryBlur}\n format={format}\n handleFormatChange={handleFormatChange}\n handleFormatBlur={handleFormatBlur}\n minStepPlaceholder={minStepPlaceholder}\n minStep={minStep}\n handleMinStepChange={handleMinStepChange}\n handleMinStepBlur={handleMinStepBlur}\n />\n );\n}\n"],"names":["produce","useDatasource","useDatasourceClient","DEFAULT_PROM","isDefaultPromSelector","isPrometheusDatasourceSelector","DEFAULT_SCRAPE_INTERVAL","useQueryState","useFormatState","useMinStepState","DashboardPrometheusTimeSeriesQueryEditor","ExplorePrometheusTimeSeriesQueryEditor","PrometheusTimeSeriesQueryEditor","props","onChange","value","isExplore","datasource","selectedDatasource","data","client","promURL","options","datasourceUrl","datasourceResource","query","handleQueryChange","handleQueryBlur","format","handleFormatChange","handleFormatBlur","minStep","handleMinStepChange","handleMinStepBlur","minStepPlaceholder","plugin","spec","scrapeInterval","handleDatasourceChange","next","draft","nextDatasource","undefined","Error"],"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,OAAO,QAAQ,QAAQ;AAChC,SAAgCC,aAAa,EAAEC,mBAAmB,QAAQ,4BAA4B;AACtG,SAASC,YAAY,EAAEC,qBAAqB,EAAEC,8BAA8B,QAA0B,cAAc;AACpH,SAASC,uBAAuB,QAAkC,WAAW;AAC7E,SAEEC,aAAa,EACbC,cAAc,EACdC,eAAe,QACV,uBAAuB;AAC9B,SAASC,wCAAwC,QAAQ,6CAA6C;AACtG,SAASC,sCAAsC,QAAQ,2CAA2C;AAElG;;CAEC,GACD,OAAO,SAASC,gCAAgCC,KAA2C;IACzF,MAAM,EAAEC,SAAQ,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGH;IACvC,MAAM,EAAEI,WAAU,EAAE,GAAGF;IACvB,MAAMG,qBAAqBD,uBAAAA,wBAAAA,aAAcd;IAEzC,MAAM,EAAEgB,MAAMC,OAAM,EAAE,GAAGlB,oBAAsCgB;IAC/D,MAAMG,UAAUD,mBAAAA,oBAAAA,KAAAA,IAAAA,OAAQE,QAAQC;IAChC,MAAM,EAAEJ,MAAMK,mBAAkB,EAAE,GAAGvB,cAAciB;IAEnD,MAAM,EAAEO,MAAK,EAAEC,kBAAiB,EAAEC,gBAAe,EAAE,GAAGpB,cAAcM;IACpE,MAAM,EAAEe,OAAM,EAAEC,mBAAkB,EAAEC,iBAAgB,EAAE,GAAGtB,eAAeK;IACxE,MAAM,EAAEkB,QAAO,EAAEC,oBAAmB,EAAEC,kBAAiB,EAAE,GAAGxB,gBAAgBI;QAE1EkB;IADF,MAAMG,qBACJH,CAAAA,OAAAA,oBAAAA,qBAAAA,UACCP,sBAAsB,CAACA,+BAAAA,gCAAAA,KAAAA,IAAAA,mBAAoBW,OAAOC,IAAgC,EAAEC,4BADrFN,kBAAAA,OAEAzB;IAEF,MAAMgC,yBAA4D,CAACC;QACjE,IAAIlC,+BAA+BkC,OAAO;YACxCzB,SACEd,QAAQe,OAAO,CAACyB;gBACd,sFAAsF;gBACtF,MAAMC,iBAAiBrC,sBAAsBmC,QAAQG,YAAYH;gBACjEC,MAAMvB,aAAawB;YACrB;YAEF;QACF;QAEA,MAAM,IAAIE,MAAM;IAClB;IAEA,IAAI3B,WAAW;QACb,qBACE,KAACL;YACCO,oBAAoBA;YACpBoB,wBAAwBA;YACxBjB,SAASA;YACTI,OAAOA;YACPC,mBAAmBA;YACnBC,iBAAiBA;YACjBC,QAAQA;YACRC,oBAAoBA;YACpBC,kBAAkBA;YAClBI,oBAAoBA;YACpBH,SAASA;YACTC,qBAAqBA;YACrBC,mBAAmBA;;IAGzB;IAEA,qBACE,KAACvB;QACCQ,oBAAoBA;QACpBoB,wBAAwBA;QACxBjB,SAASA;QACTI,OAAOA;QACPC,mBAAmBA;QACnBC,iBAAiBA;QACjBC,QAAQA;QACRC,oBAAoBA;QACpBC,kBAAkBA;QAClBI,oBAAoBA;QACpBH,SAASA;QACTC,qBAAqBA;QACrBC,mBAAmBA;;AAGzB"}
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DurationString,
|
|
1
|
+
import { DurationString, HTTPProxy } from '@perses-dev/core';
|
|
2
2
|
import { PrometheusDatasourceSelector } from '../model';
|
|
3
3
|
export declare const DEFAULT_SCRAPE_INTERVAL: DurationString;
|
|
4
4
|
export interface PrometheusDatasourceSpec {
|
|
@@ -6,20 +6,6 @@ export interface PrometheusDatasourceSpec {
|
|
|
6
6
|
proxy?: HTTPProxy;
|
|
7
7
|
scrapeInterval?: DurationString;
|
|
8
8
|
}
|
|
9
|
-
export interface HTTPProxy {
|
|
10
|
-
kind: 'HTTPProxy';
|
|
11
|
-
spec: HTTPProxySpec;
|
|
12
|
-
}
|
|
13
|
-
export interface HTTPProxySpec {
|
|
14
|
-
url: string;
|
|
15
|
-
allowedEndpoints?: HTTPAllowedEndpoint[];
|
|
16
|
-
headers?: RequestHeaders;
|
|
17
|
-
secret?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface HTTPAllowedEndpoint {
|
|
20
|
-
endpointPattern: string;
|
|
21
|
-
method: string;
|
|
22
|
-
}
|
|
23
9
|
export interface PrometheusVariableOptionsBase {
|
|
24
10
|
datasource?: PrometheusDatasourceSelector;
|
|
25
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,uBAAuB,EAAE,cAAqB,CAAC;AAE5D,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,6BAA6B;IAC5C,UAAU,CAAC,EAAE,4BAA4B,CAAC;CAC3C;AAED,oBAAY,mCAAmC,GAAG,6BAA6B,GAAG;IAChF,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,oBAAY,oCAAoC,GAAG,6BAA6B,GAAG;IACjF,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,oBAAY,+BAA+B,GAAG,6BAA6B,GAAG;IAE5E,IAAI,EAAE,MAAM,CAAC;IAGb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/plugins/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,
|
|
1
|
+
{"version":3,"sources":["../../src/plugins/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, HTTPProxy } from '@perses-dev/core';\nimport { PrometheusDatasourceSelector } from '../model';\n\nexport const DEFAULT_SCRAPE_INTERVAL: DurationString = '1m';\n\nexport interface PrometheusDatasourceSpec {\n directUrl?: string;\n proxy?: HTTPProxy;\n scrapeInterval?: DurationString; // default to 1m\n}\n\nexport interface PrometheusVariableOptionsBase {\n datasource?: PrometheusDatasourceSelector;\n}\n\nexport type PrometheusLabelNamesVariableOptions = PrometheusVariableOptionsBase & {\n matchers?: string[];\n};\n\nexport type PrometheusLabelValuesVariableOptions = PrometheusVariableOptionsBase & {\n labelName: string;\n matchers?: string[];\n};\n\nexport type PrometheusPromQLVariableOptions = PrometheusVariableOptionsBase & {\n // expr is the PromQL expression.\n expr: string;\n // labelName is the name of the label that will be used after the PromQL query is performed to select the label value.\n // Note: This field is not part of the Prometheus API.\n labelName: string;\n};\n"],"names":["DEFAULT_SCRAPE_INTERVAL"],"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;AAKjC,OAAO,MAAMA,0BAA0C,KAAK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/prometheus-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.1",
|
|
4
4
|
"description": "Prometheus plugin for Perses",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@lezer/highlight": "^1.0.0",
|
|
33
33
|
"@lezer/lr": "^1.2.0",
|
|
34
|
-
"@perses-dev/components": "0.
|
|
35
|
-
"@perses-dev/core": "0.
|
|
36
|
-
"@perses-dev/plugin-system": "0.
|
|
34
|
+
"@perses-dev/components": "0.42.1",
|
|
35
|
+
"@perses-dev/core": "0.42.1",
|
|
36
|
+
"@perses-dev/plugin-system": "0.42.1",
|
|
37
37
|
"@prometheus-io/codemirror-promql": "^0.43.0",
|
|
38
38
|
"@uiw/react-codemirror": "^4.19.1",
|
|
39
39
|
"date-fns": "^2.28.0",
|