@perses-dev/prometheus-plugin 0.44.0 → 0.45.0-rc1

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.
@@ -23,15 +23,16 @@ Object.defineProperty(exports, "PrometheusTimeSeriesQueryEditor", {
23
23
  const _jsxruntime = require("react/jsx-runtime");
24
24
  const _immer = require("immer");
25
25
  const _pluginsystem = require("@perses-dev/plugin-system");
26
+ const _material = require("@mui/material");
26
27
  const _model = require("../../model");
27
28
  const _types = require("../types");
29
+ const _components = require("../../components");
28
30
  const _queryeditormodel = require("./query-editor-model");
29
- const _DashboardPrometheusTimeSeriesQueryEditor = require("./DashboardPrometheusTimeSeriesQueryEditor");
30
- const _ExplorePrometheusTimeSeriesQueryEditor = require("./ExplorePrometheusTimeSeriesQueryEditor");
31
31
  function PrometheusTimeSeriesQueryEditor(props) {
32
- const { onChange, value, isExplore } = props;
32
+ const { onChange, value } = props;
33
33
  const { datasource } = value;
34
34
  const selectedDatasource = datasource !== null && datasource !== void 0 ? datasource : _model.DEFAULT_PROM;
35
+ const datasourceSelectLabelID = `prom-datasource-label-${selectedDatasource.name || 'default'}`;
35
36
  const { data: client } = (0, _pluginsystem.useDatasourceClient)(selectedDatasource);
36
37
  const promURL = client === null || client === void 0 ? void 0 : client.options.datasourceUrl;
37
38
  const { data: datasourceResource } = (0, _pluginsystem.useDatasource)(selectedDatasource);
@@ -51,36 +52,62 @@ function PrometheusTimeSeriesQueryEditor(props) {
51
52
  }
52
53
  throw new Error('Got unexpected non-Prometheus datasource selector');
53
54
  };
54
- if (isExplore) {
55
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_ExplorePrometheusTimeSeriesQueryEditor.ExplorePrometheusTimeSeriesQueryEditor, {
56
- selectedDatasource: selectedDatasource,
57
- handleDatasourceChange: handleDatasourceChange,
58
- promURL: promURL,
59
- query: query,
60
- handleQueryChange: handleQueryChange,
61
- handleQueryBlur: handleQueryBlur,
62
- format: format,
63
- handleFormatChange: handleFormatChange,
64
- handleFormatBlur: handleFormatBlur,
65
- minStepPlaceholder: minStepPlaceholder,
66
- minStep: minStep,
67
- handleMinStepChange: handleMinStepChange,
68
- handleMinStepBlur: handleMinStepBlur
69
- });
70
- }
71
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_DashboardPrometheusTimeSeriesQueryEditor.DashboardPrometheusTimeSeriesQueryEditor, {
72
- selectedDatasource: selectedDatasource,
73
- handleDatasourceChange: handleDatasourceChange,
74
- promURL: promURL,
75
- query: query,
76
- handleQueryChange: handleQueryChange,
77
- handleQueryBlur: handleQueryBlur,
78
- format: format,
79
- handleFormatChange: handleFormatChange,
80
- handleFormatBlur: handleFormatBlur,
81
- minStepPlaceholder: minStepPlaceholder,
82
- minStep: minStep,
83
- handleMinStepChange: handleMinStepChange,
84
- handleMinStepBlur: handleMinStepBlur
55
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
56
+ spacing: 2,
57
+ children: [
58
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
59
+ margin: "dense",
60
+ fullWidth: false,
61
+ children: [
62
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
63
+ id: datasourceSelectLabelID,
64
+ children: "Prometheus Datasource"
65
+ }),
66
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
67
+ datasourcePluginKind: _model.PROM_DATASOURCE_KIND,
68
+ value: selectedDatasource,
69
+ onChange: handleDatasourceChange,
70
+ labelId: datasourceSelectLabelID,
71
+ label: "Prometheus Datasource"
72
+ })
73
+ ]
74
+ }),
75
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.PromQLEditor, {
76
+ completeConfig: {
77
+ remote: {
78
+ url: promURL
79
+ }
80
+ },
81
+ value: query,
82
+ onChange: handleQueryChange,
83
+ onBlur: handleQueryBlur
84
+ }),
85
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
86
+ direction: "row",
87
+ spacing: 2,
88
+ children: [
89
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
90
+ fullWidth: true,
91
+ label: "Legend Name",
92
+ placeholder: "Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.",
93
+ helperText: "Name for each series in the legend and the tooltip.",
94
+ value: format !== null && format !== void 0 ? format : '',
95
+ onChange: (e)=>handleFormatChange(e.target.value),
96
+ onBlur: handleFormatBlur
97
+ }),
98
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
99
+ label: "Min Step",
100
+ placeholder: minStepPlaceholder,
101
+ helperText: "Step parameter of the query. Used by $__interval and $__rate_interval too.",
102
+ value: minStep,
103
+ onChange: (e)=>handleMinStepChange(e.target.value),
104
+ onBlur: handleMinStepBlur,
105
+ sx: {
106
+ width: '250px'
107
+ }
108
+ })
109
+ ]
110
+ })
111
+ ]
85
112
  });
86
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PrometheusTimeSeriesQueryEditor.d.ts","sourceRoot":"","sources":["../../../src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACL,oCAAoC,EAIrC,MAAM,sBAAsB,CAAC;AAI9B;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,oCAAoC,2CAqE1F"}
1
+ {"version":3,"file":"PrometheusTimeSeriesQueryEditor.d.ts","sourceRoot":"","sources":["../../../src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx"],"names":[],"mappings":"AA0BA,OAAO,EACL,oCAAoC,EAIrC,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,oCAAoC,2CAyE1F"}
@@ -10,20 +10,21 @@
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 } from "react/jsx-runtime";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import { produce } from 'immer';
15
- import { useDatasource, useDatasourceClient } from '@perses-dev/plugin-system';
16
- import { DEFAULT_PROM, isDefaultPromSelector, isPrometheusDatasourceSelector } from '../../model';
15
+ import { DatasourceSelect, useDatasource, useDatasourceClient } from '@perses-dev/plugin-system';
16
+ import { FormControl, InputLabel, Stack, TextField } from '@mui/material';
17
+ import { DEFAULT_PROM, isDefaultPromSelector, isPrometheusDatasourceSelector, PROM_DATASOURCE_KIND } from '../../model';
17
18
  import { DEFAULT_SCRAPE_INTERVAL } from '../types';
19
+ import { PromQLEditor } from '../../components';
18
20
  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, isExplore } = props;
24
+ const { onChange, value } = props;
25
25
  const { datasource } = value;
26
26
  const selectedDatasource = datasource !== null && datasource !== void 0 ? datasource : DEFAULT_PROM;
27
+ const datasourceSelectLabelID = `prom-datasource-label-${selectedDatasource.name || 'default'}`;
27
28
  const { data: client } = useDatasourceClient(selectedDatasource);
28
29
  const promURL = client === null || client === void 0 ? void 0 : client.options.datasourceUrl;
29
30
  const { data: datasourceResource } = useDatasource(selectedDatasource);
@@ -43,37 +44,63 @@ import { ExplorePrometheusTimeSeriesQueryEditor } from './ExplorePrometheusTimeS
43
44
  }
44
45
  throw new Error('Got unexpected non-Prometheus datasource selector');
45
46
  };
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
47
+ return /*#__PURE__*/ _jsxs(Stack, {
48
+ spacing: 2,
49
+ children: [
50
+ /*#__PURE__*/ _jsxs(FormControl, {
51
+ margin: "dense",
52
+ fullWidth: false,
53
+ children: [
54
+ /*#__PURE__*/ _jsx(InputLabel, {
55
+ id: datasourceSelectLabelID,
56
+ children: "Prometheus Datasource"
57
+ }),
58
+ /*#__PURE__*/ _jsx(DatasourceSelect, {
59
+ datasourcePluginKind: PROM_DATASOURCE_KIND,
60
+ value: selectedDatasource,
61
+ onChange: handleDatasourceChange,
62
+ labelId: datasourceSelectLabelID,
63
+ label: "Prometheus Datasource"
64
+ })
65
+ ]
66
+ }),
67
+ /*#__PURE__*/ _jsx(PromQLEditor, {
68
+ completeConfig: {
69
+ remote: {
70
+ url: promURL
71
+ }
72
+ },
73
+ value: query,
74
+ onChange: handleQueryChange,
75
+ onBlur: handleQueryBlur
76
+ }),
77
+ /*#__PURE__*/ _jsxs(Stack, {
78
+ direction: "row",
79
+ spacing: 2,
80
+ children: [
81
+ /*#__PURE__*/ _jsx(TextField, {
82
+ fullWidth: true,
83
+ label: "Legend Name",
84
+ placeholder: "Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.",
85
+ helperText: "Name for each series in the legend and the tooltip.",
86
+ value: format !== null && format !== void 0 ? format : '',
87
+ onChange: (e)=>handleFormatChange(e.target.value),
88
+ onBlur: handleFormatBlur
89
+ }),
90
+ /*#__PURE__*/ _jsx(TextField, {
91
+ label: "Min Step",
92
+ placeholder: minStepPlaceholder,
93
+ helperText: "Step parameter of the query. Used by $__interval and $__rate_interval too.",
94
+ value: minStep,
95
+ onChange: (e)=>handleMinStepChange(e.target.value),
96
+ onBlur: handleMinStepBlur,
97
+ sx: {
98
+ width: '250px'
99
+ }
100
+ })
101
+ ]
102
+ })
103
+ ]
77
104
  });
78
105
  }
79
106
 
@@ -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 { 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,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAE,GAAGH;IACvC,MA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ACPC,mBAAmBA;QACnBC,iBAAiBA;QACjBC,QAAQA;QACRC,oBAAoBA;QACpBC,kBAAkBA;QAClBI,oBAAoBA;QACpBH,SAASA;QACTC,qBAAqBA;QACrBC,mBAAmBA;;AAGzB"}
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 { DatasourceSelect, DatasourceSelectProps, useDatasource, useDatasourceClient } from '@perses-dev/plugin-system';\nimport { FormControl, InputLabel, Stack, TextField } from '@mui/material';\nimport {\n DEFAULT_PROM,\n DurationString,\n isDefaultPromSelector,\n isPrometheusDatasourceSelector,\n PROM_DATASOURCE_KIND,\n PrometheusClient,\n} from '../../model';\nimport { DEFAULT_SCRAPE_INTERVAL, PrometheusDatasourceSpec } from '../types';\nimport { PromQLEditor } from '../../components';\nimport {\n PrometheusTimeSeriesQueryEditorProps,\n useQueryState,\n useFormatState,\n useMinStepState,\n} from './query-editor-model';\n\n/**\n * The options editor component for editing a PrometheusTimeSeriesQuery's spec.\n */\nexport function PrometheusTimeSeriesQueryEditor(props: PrometheusTimeSeriesQueryEditorProps) {\n const { onChange, value } = props;\n const { datasource } = value;\n const selectedDatasource = datasource ?? DEFAULT_PROM;\n const datasourceSelectLabelID = `prom-datasource-label-${selectedDatasource.name || 'default'}`;\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 return (\n <Stack spacing={2}>\n <FormControl margin=\"dense\" fullWidth={false}>\n <InputLabel id={datasourceSelectLabelID}>Prometheus Datasource</InputLabel>\n <DatasourceSelect\n datasourcePluginKind={PROM_DATASOURCE_KIND}\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n labelId={datasourceSelectLabelID}\n label=\"Prometheus Datasource\"\n />\n </FormControl>\n <PromQLEditor\n completeConfig={{ remote: { url: promURL } }}\n value={query}\n onChange={handleQueryChange}\n onBlur={handleQueryBlur}\n />\n <Stack direction=\"row\" spacing={2}>\n <TextField\n fullWidth\n label=\"Legend Name\"\n placeholder=\"Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.\"\n helperText=\"Name for each series in the legend and the tooltip.\"\n value={format ?? ''}\n onChange={(e) => handleFormatChange(e.target.value)}\n onBlur={handleFormatBlur}\n />\n <TextField\n label=\"Min Step\"\n placeholder={minStepPlaceholder}\n helperText=\"Step parameter of the query. Used by $__interval and $__rate_interval too.\"\n value={minStep}\n onChange={(e) => handleMinStepChange(e.target.value as DurationString)}\n onBlur={handleMinStepBlur}\n sx={{ width: '250px' }}\n />\n </Stack>\n </Stack>\n );\n}\n"],"names":["produce","DatasourceSelect","useDatasource","useDatasourceClient","FormControl","InputLabel","Stack","TextField","DEFAULT_PROM","isDefaultPromSelector","isPrometheusDatasourceSelector","PROM_DATASOURCE_KIND","DEFAULT_SCRAPE_INTERVAL","PromQLEditor","useQueryState","useFormatState","useMinStepState","PrometheusTimeSeriesQueryEditor","props","onChange","value","datasource","selectedDatasource","datasourceSelectLabelID","name","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","spacing","margin","fullWidth","id","datasourcePluginKind","labelId","label","completeConfig","remote","url","onBlur","direction","placeholder","helperText","e","target","sx","width"],"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,SAASC,gBAAgB,EAAyBC,aAAa,EAAEC,mBAAmB,QAAQ,4BAA4B;AACxH,SAASC,WAAW,EAAEC,UAAU,EAAEC,KAAK,EAAEC,SAAS,QAAQ,gBAAgB;AAC1E,SACEC,YAAY,EAEZC,qBAAqB,EACrBC,8BAA8B,EAC9BC,oBAAoB,QAEf,cAAc;AACrB,SAASC,uBAAuB,QAAkC,WAAW;AAC7E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAEEC,aAAa,EACbC,cAAc,EACdC,eAAe,QACV,uBAAuB;AAE9B;;CAEC,GACD,OAAO,SAASC,gCAAgCC,KAA2C;IACzF,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAC5B,MAAM,EAAEG,UAAU,EAAE,GAAGD;IACvB,MAAME,qBAAqBD,uBAAAA,wBAAAA,aAAcb;IACzC,MAAM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B,QAAQ3B;;0BAEV,MAAC3B;gBAAMuD,WAAU;gBAAMX,SAAS;;kCAC9B,KAAC3C;wBACC6C,SAAS;wBACTI,OAAM;wBACNM,aAAY;wBACZC,YAAW;wBACX3C,OAAOc,mBAAAA,oBAAAA,SAAU;wBACjBf,UAAU,CAAC6C,IAAM7B,mBAAmB6B,EAAEC,MAAM,CAAC7C,KAAK;wBAClDwC,QAAQxB;;kCAEV,KAAC7B;wBACCiD,OAAM;wBACNM,aAAatB;wBACbuB,YAAW;wBACX3C,OAAOiB;wBACPlB,UAAU,CAAC6C,IAAM1B,oBAAoB0B,EAAEC,MAAM,CAAC7C,KAAK;wBACnDwC,QAAQrB;wBACR2B,IAAI;4BAAEC,OAAO;wBAAQ;;;;;;AAK/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/prometheus-plugin",
3
- "version": "0.44.0",
3
+ "version": "0.45.0-rc1",
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.44.0",
35
- "@perses-dev/core": "0.44.0",
36
- "@perses-dev/plugin-system": "0.44.0",
34
+ "@perses-dev/components": "0.45.0-rc1",
35
+ "@perses-dev/core": "0.45.0-rc1",
36
+ "@perses-dev/plugin-system": "0.45.0-rc1",
37
37
  "@prometheus-io/codemirror-promql": "^0.43.0",
38
38
  "@uiw/react-codemirror": "^4.19.1",
39
39
  "date-fns": "^2.28.0",
@@ -1,88 +0,0 @@
1
- // Copyright 2023 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, "DashboardPrometheusTimeSeriesQueryEditor", {
18
- enumerable: true,
19
- get: function() {
20
- return DashboardPrometheusTimeSeriesQueryEditor;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _material = require("@mui/material");
25
- const _pluginsystem = require("@perses-dev/plugin-system");
26
- const _model = require("../../model");
27
- const _components = require("../../components");
28
- function DashboardPrometheusTimeSeriesQueryEditor(props) {
29
- const { selectedDatasource, handleDatasourceChange, promURL, query, handleQueryChange, handleQueryBlur, format, handleFormatBlur, handleMinStepChange, handleFormatChange, handleMinStepBlur, minStepPlaceholder, minStep } = props;
30
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
31
- spacing: 2,
32
- children: [
33
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
34
- margin: "dense",
35
- fullWidth: false,
36
- children: [
37
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
38
- id: "prom-datasource-label",
39
- children: "Prometheus Datasource"
40
- }),
41
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
42
- datasourcePluginKind: _model.PROM_DATASOURCE_KIND,
43
- value: selectedDatasource,
44
- onChange: handleDatasourceChange,
45
- labelId: "prom-datasource-label",
46
- label: "Prometheus Datasource"
47
- })
48
- ]
49
- }),
50
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.PromQLEditor, {
51
- completeConfig: {
52
- remote: {
53
- url: promURL
54
- }
55
- },
56
- value: query,
57
- onChange: handleQueryChange,
58
- onBlur: handleQueryBlur
59
- }),
60
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
61
- direction: "row",
62
- spacing: 2,
63
- children: [
64
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
65
- fullWidth: true,
66
- label: "Legend Name",
67
- placeholder: "Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.",
68
- helperText: "Name for each series in the legend and the tooltip.",
69
- value: format !== null && format !== void 0 ? format : '',
70
- onChange: (e)=>handleFormatChange(e.target.value),
71
- onBlur: handleFormatBlur
72
- }),
73
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
74
- label: "Min Step",
75
- placeholder: minStepPlaceholder,
76
- helperText: "Step parameter of the query. Used by $__interval and $__rate_interval too.",
77
- value: minStep,
78
- onChange: (e)=>handleMinStepChange(e.target.value),
79
- onBlur: handleMinStepBlur,
80
- sx: {
81
- width: '250px'
82
- }
83
- })
84
- ]
85
- })
86
- ]
87
- });
88
- }
@@ -1,123 +0,0 @@
1
- // Copyright 2023 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, "ExplorePrometheusTimeSeriesQueryEditor", {
18
- enumerable: true,
19
- get: function() {
20
- return ExplorePrometheusTimeSeriesQueryEditor;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _material = require("@mui/material");
25
- const _pluginsystem = require("@perses-dev/plugin-system");
26
- const _model = require("../../model");
27
- const _components = require("../../components");
28
- function ExplorePrometheusTimeSeriesQueryEditor(props) {
29
- const { selectedDatasource, handleDatasourceChange, promURL, query, handleQueryChange, handleQueryBlur, format, handleFormatBlur, handleMinStepChange, handleFormatChange, handleMinStepBlur, minStepPlaceholder, minStep } = props;
30
- const { project, setProject } = (0, _pluginsystem.useProjectStore)();
31
- const handleProjectChange = (next)=>{
32
- handleDatasourceChange(_model.DEFAULT_PROM);
33
- return setProject(next);
34
- };
35
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
36
- spacing: 2,
37
- children: [
38
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Grid, {
39
- container: true,
40
- spacing: 2,
41
- children: [
42
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid, {
43
- item: true,
44
- xs: 2,
45
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
46
- margin: "dense",
47
- fullWidth: true,
48
- children: [
49
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
50
- id: "project-label",
51
- children: "Projects"
52
- }),
53
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.ProjectSelect, {
54
- labelId: "project-label",
55
- label: "Projects",
56
- value: project,
57
- onChange: handleProjectChange
58
- })
59
- ]
60
- })
61
- }),
62
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid, {
63
- item: true,
64
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
65
- margin: "dense",
66
- fullWidth: true,
67
- children: [
68
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
69
- id: "prom-datasource-label",
70
- children: "Prometheus Datasource"
71
- }),
72
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceSelect, {
73
- datasourcePluginKind: _model.PROM_DATASOURCE_KIND,
74
- value: selectedDatasource,
75
- project: project.metadata.name,
76
- onChange: handleDatasourceChange,
77
- labelId: "prom-datasource-label",
78
- label: "Prometheus Datasource"
79
- })
80
- ]
81
- })
82
- })
83
- ]
84
- }),
85
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.PromQLEditor, {
86
- completeConfig: {
87
- remote: {
88
- url: promURL
89
- }
90
- },
91
- value: query,
92
- onChange: handleQueryChange,
93
- onBlur: handleQueryBlur
94
- }),
95
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
96
- direction: "row",
97
- spacing: 2,
98
- children: [
99
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
100
- fullWidth: true,
101
- label: "Legend Name",
102
- placeholder: "Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.",
103
- helperText: "Name for each series in the legend and the tooltip.",
104
- value: format !== null && format !== void 0 ? format : '',
105
- onChange: (e)=>handleFormatChange(e.target.value),
106
- onBlur: handleFormatBlur
107
- }),
108
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
109
- label: "Min Step",
110
- placeholder: minStepPlaceholder,
111
- helperText: "Step parameter of the query. Used by $__interval and $__rate_interval too.",
112
- value: minStep,
113
- onChange: (e)=>handleMinStepChange(e.target.value),
114
- onBlur: handleMinStepBlur,
115
- sx: {
116
- width: '250px'
117
- }
118
- })
119
- ]
120
- })
121
- ]
122
- });
123
- }
@@ -1,20 +0,0 @@
1
- import { DatasourceSelector } from '@perses-dev/core/dist/model';
2
- import { DurationString, PrometheusDatasourceSelector } from '../../model';
3
- interface DashboardPrometheusTimeSeriesQueryEditorProps {
4
- selectedDatasource: PrometheusDatasourceSelector;
5
- handleDatasourceChange: (next: DatasourceSelector) => void;
6
- promURL: string | undefined;
7
- query: string;
8
- handleQueryChange: (e: string) => void;
9
- handleQueryBlur: () => void;
10
- format: string | undefined;
11
- handleFormatChange: (e: string) => void;
12
- handleFormatBlur: () => void;
13
- minStepPlaceholder: string;
14
- minStep: string | undefined;
15
- handleMinStepChange: (e: DurationString) => void;
16
- handleMinStepBlur: () => void;
17
- }
18
- export declare function DashboardPrometheusTimeSeriesQueryEditor(props: DashboardPrometheusTimeSeriesQueryEditorProps): import("react/jsx-runtime").JSX.Element;
19
- export {};
20
- //# sourceMappingURL=DashboardPrometheusTimeSeriesQueryEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DashboardPrometheusTimeSeriesQueryEditor.d.ts","sourceRoot":"","sources":["../../../src/plugins/prometheus-time-series-query/DashboardPrometheusTimeSeriesQueryEditor.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAwB,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAGjG,UAAU,6CAA6C;IACrD,kBAAkB,EAAE,4BAA4B,CAAC;IACjD,sBAAsB,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC3D,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,kBAAkB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,mBAAmB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wBAAgB,wCAAwC,CAAC,KAAK,EAAE,6CAA6C,2CA2D5G"}
@@ -1,80 +0,0 @@
1
- // Copyright 2023 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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import { Stack, TextField, FormControl, InputLabel } from '@mui/material';
15
- import { DatasourceSelect } from '@perses-dev/plugin-system';
16
- import { PROM_DATASOURCE_KIND } from '../../model';
17
- import { PromQLEditor } from '../../components';
18
- export function DashboardPrometheusTimeSeriesQueryEditor(props) {
19
- const { selectedDatasource, handleDatasourceChange, promURL, query, handleQueryChange, handleQueryBlur, format, handleFormatBlur, handleMinStepChange, handleFormatChange, handleMinStepBlur, minStepPlaceholder, minStep } = props;
20
- return /*#__PURE__*/ _jsxs(Stack, {
21
- spacing: 2,
22
- children: [
23
- /*#__PURE__*/ _jsxs(FormControl, {
24
- margin: "dense",
25
- fullWidth: false,
26
- children: [
27
- /*#__PURE__*/ _jsx(InputLabel, {
28
- id: "prom-datasource-label",
29
- children: "Prometheus Datasource"
30
- }),
31
- /*#__PURE__*/ _jsx(DatasourceSelect, {
32
- datasourcePluginKind: PROM_DATASOURCE_KIND,
33
- value: selectedDatasource,
34
- onChange: handleDatasourceChange,
35
- labelId: "prom-datasource-label",
36
- label: "Prometheus Datasource"
37
- })
38
- ]
39
- }),
40
- /*#__PURE__*/ _jsx(PromQLEditor, {
41
- completeConfig: {
42
- remote: {
43
- url: promURL
44
- }
45
- },
46
- value: query,
47
- onChange: handleQueryChange,
48
- onBlur: handleQueryBlur
49
- }),
50
- /*#__PURE__*/ _jsxs(Stack, {
51
- direction: "row",
52
- spacing: 2,
53
- children: [
54
- /*#__PURE__*/ _jsx(TextField, {
55
- fullWidth: true,
56
- label: "Legend Name",
57
- placeholder: "Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.",
58
- helperText: "Name for each series in the legend and the tooltip.",
59
- value: format !== null && format !== void 0 ? format : '',
60
- onChange: (e)=>handleFormatChange(e.target.value),
61
- onBlur: handleFormatBlur
62
- }),
63
- /*#__PURE__*/ _jsx(TextField, {
64
- label: "Min Step",
65
- placeholder: minStepPlaceholder,
66
- helperText: "Step parameter of the query. Used by $__interval and $__rate_interval too.",
67
- value: minStep,
68
- onChange: (e)=>handleMinStepChange(e.target.value),
69
- onBlur: handleMinStepBlur,
70
- sx: {
71
- width: '250px'
72
- }
73
- })
74
- ]
75
- })
76
- ]
77
- });
78
- }
79
-
80
- //# sourceMappingURL=DashboardPrometheusTimeSeriesQueryEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/plugins/prometheus-time-series-query/DashboardPrometheusTimeSeriesQueryEditor.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 { Stack, TextField, FormControl, InputLabel } from '@mui/material';\nimport { DatasourceSelect } from '@perses-dev/plugin-system';\nimport { DatasourceSelector } from '@perses-dev/core/dist/model';\nimport { DurationString, PROM_DATASOURCE_KIND, PrometheusDatasourceSelector } from '../../model';\nimport { PromQLEditor } from '../../components';\n\ninterface DashboardPrometheusTimeSeriesQueryEditorProps {\n selectedDatasource: PrometheusDatasourceSelector;\n handleDatasourceChange: (next: DatasourceSelector) => void;\n promURL: string | undefined;\n query: string;\n handleQueryChange: (e: string) => void;\n handleQueryBlur: () => void;\n format: string | undefined;\n handleFormatChange: (e: string) => void;\n handleFormatBlur: () => void;\n minStepPlaceholder: string;\n minStep: string | undefined;\n handleMinStepChange: (e: DurationString) => void;\n handleMinStepBlur: () => void;\n}\n\nexport function DashboardPrometheusTimeSeriesQueryEditor(props: DashboardPrometheusTimeSeriesQueryEditorProps) {\n const {\n selectedDatasource,\n handleDatasourceChange,\n promURL,\n query,\n handleQueryChange,\n handleQueryBlur,\n format,\n handleFormatBlur,\n handleMinStepChange,\n handleFormatChange,\n handleMinStepBlur,\n minStepPlaceholder,\n minStep,\n } = props;\n\n return (\n <Stack spacing={2}>\n <FormControl margin=\"dense\" fullWidth={false}>\n {/* TODO: How do we ensure unique ID values if there are multiple of these? Can we use React 18 useId and\n maintain 17 compatibility somehow with a polyfill/shim? */}\n <InputLabel id=\"prom-datasource-label\">Prometheus Datasource</InputLabel>\n <DatasourceSelect\n datasourcePluginKind={PROM_DATASOURCE_KIND}\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n labelId=\"prom-datasource-label\"\n label=\"Prometheus Datasource\"\n />\n </FormControl>\n <PromQLEditor\n completeConfig={{ remote: { url: promURL } }}\n value={query}\n onChange={handleQueryChange}\n onBlur={handleQueryBlur}\n />\n <Stack direction=\"row\" spacing={2}>\n <TextField\n fullWidth\n label=\"Legend Name\"\n placeholder=\"Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.\"\n helperText=\"Name for each series in the legend and the tooltip.\"\n value={format ?? ''}\n onChange={(e) => handleFormatChange(e.target.value)}\n onBlur={handleFormatBlur}\n />\n <TextField\n label=\"Min Step\"\n placeholder={minStepPlaceholder}\n helperText=\"Step parameter of the query. Used by $__interval and $__rate_interval too.\"\n value={minStep}\n onChange={(e) => handleMinStepChange(e.target.value as DurationString)}\n onBlur={handleMinStepBlur}\n sx={{ width: '250px' }}\n />\n </Stack>\n </Stack>\n );\n}\n"],"names":["Stack","TextField","FormControl","InputLabel","DatasourceSelect","PROM_DATASOURCE_KIND","PromQLEditor","DashboardPrometheusTimeSeriesQueryEditor","props","selectedDatasource","handleDatasourceChange","promURL","query","handleQueryChange","handleQueryBlur","format","handleFormatBlur","handleMinStepChange","handleFormatChange","handleMinStepBlur","minStepPlaceholder","minStep","spacing","margin","fullWidth","id","datasourcePluginKind","value","onChange","labelId","label","completeConfig","remote","url","onBlur","direction","placeholder","helperText","e","target","sx","width"],"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,KAAK,EAAEC,SAAS,EAAEC,WAAW,EAAEC,UAAU,QAAQ,gBAAgB;AAC1E,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAAyBC,oBAAoB,QAAsC,cAAc;AACjG,SAASC,YAAY,QAAQ,mBAAmB;AAkBhD,OAAO,SAASC,yCAAyCC,KAAoD;IAC3G,MAAM,EACJC,kBAAkB,EAClBC,sBAAsB,EACtBC,OAAO,EACPC,KAAK,EACLC,iBAAiB,EACjBC,eAAe,EACfC,MAAM,EACNC,gBAAgB,EAChBC,mBAAmB,EACnBC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,OAAO,EACR,GAAGb;IAEJ,qBACE,MAACR;QAAMsB,SAAS;;0BACd,MAACpB;gBAAYqB,QAAO;gBAAQC,WAAW;;kCAGrC,KAACrB;wBAAWsB,IAAG;kCAAwB;;kCACvC,KAACrB;wBACCsB,sBAAsBrB;wBACtBsB,OAAOlB;wBACPmB,UAAUlB;wBACVmB,SAAQ;wBACRC,OAAM;;;;0BAGV,KAACxB;gBACCyB,gBAAgB;oBAAEC,QAAQ;wBAAEC,KAAKtB;oBAAQ;gBAAE;gBAC3CgB,OAAOf;gBACPgB,UAAUf;gBACVqB,QAAQpB;;0BAEV,MAACd;gBAAMmC,WAAU;gBAAMb,SAAS;;kCAC9B,KAACrB;wBACCuB,SAAS;wBACTM,OAAM;wBACNM,aAAY;wBACZC,YAAW;wBACXV,OAAOZ,mBAAAA,oBAAAA,SAAU;wBACjBa,UAAU,CAACU,IAAMpB,mBAAmBoB,EAAEC,MAAM,CAACZ,KAAK;wBAClDO,QAAQlB;;kCAEV,KAACf;wBACC6B,OAAM;wBACNM,aAAahB;wBACbiB,YAAW;wBACXV,OAAON;wBACPO,UAAU,CAACU,IAAMrB,oBAAoBqB,EAAEC,MAAM,CAACZ,KAAK;wBACnDO,QAAQf;wBACRqB,IAAI;4BAAEC,OAAO;wBAAQ;;;;;;AAK/B"}
@@ -1,20 +0,0 @@
1
- import { DatasourceSelector } from '@perses-dev/core/dist/model';
2
- import { DurationString, PrometheusDatasourceSelector } from '../../model';
3
- interface ExplorePrometheusTimeSeriesQueryEditorProps {
4
- selectedDatasource: PrometheusDatasourceSelector;
5
- handleDatasourceChange: (next: DatasourceSelector) => void;
6
- promURL: string | undefined;
7
- query: string;
8
- handleQueryChange: (e: string) => void;
9
- handleQueryBlur: () => void;
10
- format: string | undefined;
11
- handleFormatChange: (e: string) => void;
12
- handleFormatBlur: () => void;
13
- minStepPlaceholder: string;
14
- minStep: string | undefined;
15
- handleMinStepChange: (e: DurationString) => void;
16
- handleMinStepBlur: () => void;
17
- }
18
- export declare function ExplorePrometheusTimeSeriesQueryEditor(props: ExplorePrometheusTimeSeriesQueryEditorProps): import("react/jsx-runtime").JSX.Element;
19
- export {};
20
- //# sourceMappingURL=ExplorePrometheusTimeSeriesQueryEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExplorePrometheusTimeSeriesQueryEditor.d.ts","sourceRoot":"","sources":["../../../src/plugins/prometheus-time-series-query/ExplorePrometheusTimeSeriesQueryEditor.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,kBAAkB,EAAmB,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAgB,cAAc,EAAwB,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAG/G,UAAU,2CAA2C;IACnD,kBAAkB,EAAE,4BAA4B,CAAC;IACjD,sBAAsB,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC3D,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,kBAAkB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,mBAAmB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,2CAA2C,2CA+ExG"}
@@ -1,115 +0,0 @@
1
- // Copyright 2023 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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import { Stack, TextField, FormControl, InputLabel, Grid } from '@mui/material';
15
- import { DatasourceSelect, ProjectSelect, useProjectStore } from '@perses-dev/plugin-system';
16
- import { DEFAULT_PROM, PROM_DATASOURCE_KIND } from '../../model';
17
- import { PromQLEditor } from '../../components';
18
- export function ExplorePrometheusTimeSeriesQueryEditor(props) {
19
- const { selectedDatasource, handleDatasourceChange, promURL, query, handleQueryChange, handleQueryBlur, format, handleFormatBlur, handleMinStepChange, handleFormatChange, handleMinStepBlur, minStepPlaceholder, minStep } = props;
20
- const { project, setProject } = useProjectStore();
21
- const handleProjectChange = (next)=>{
22
- handleDatasourceChange(DEFAULT_PROM);
23
- return setProject(next);
24
- };
25
- return /*#__PURE__*/ _jsxs(Stack, {
26
- spacing: 2,
27
- children: [
28
- /*#__PURE__*/ _jsxs(Grid, {
29
- container: true,
30
- spacing: 2,
31
- children: [
32
- /*#__PURE__*/ _jsx(Grid, {
33
- item: true,
34
- xs: 2,
35
- children: /*#__PURE__*/ _jsxs(FormControl, {
36
- margin: "dense",
37
- fullWidth: true,
38
- children: [
39
- /*#__PURE__*/ _jsx(InputLabel, {
40
- id: "project-label",
41
- children: "Projects"
42
- }),
43
- /*#__PURE__*/ _jsx(ProjectSelect, {
44
- labelId: "project-label",
45
- label: "Projects",
46
- value: project,
47
- onChange: handleProjectChange
48
- })
49
- ]
50
- })
51
- }),
52
- /*#__PURE__*/ _jsx(Grid, {
53
- item: true,
54
- children: /*#__PURE__*/ _jsxs(FormControl, {
55
- margin: "dense",
56
- fullWidth: true,
57
- children: [
58
- /*#__PURE__*/ _jsx(InputLabel, {
59
- id: "prom-datasource-label",
60
- children: "Prometheus Datasource"
61
- }),
62
- /*#__PURE__*/ _jsx(DatasourceSelect, {
63
- datasourcePluginKind: PROM_DATASOURCE_KIND,
64
- value: selectedDatasource,
65
- project: project.metadata.name,
66
- onChange: handleDatasourceChange,
67
- labelId: "prom-datasource-label",
68
- label: "Prometheus Datasource"
69
- })
70
- ]
71
- })
72
- })
73
- ]
74
- }),
75
- /*#__PURE__*/ _jsx(PromQLEditor, {
76
- completeConfig: {
77
- remote: {
78
- url: promURL
79
- }
80
- },
81
- value: query,
82
- onChange: handleQueryChange,
83
- onBlur: handleQueryBlur
84
- }),
85
- /*#__PURE__*/ _jsxs(Stack, {
86
- direction: "row",
87
- spacing: 2,
88
- children: [
89
- /*#__PURE__*/ _jsx(TextField, {
90
- fullWidth: true,
91
- label: "Legend Name",
92
- placeholder: "Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.",
93
- helperText: "Name for each series in the legend and the tooltip.",
94
- value: format !== null && format !== void 0 ? format : '',
95
- onChange: (e)=>handleFormatChange(e.target.value),
96
- onBlur: handleFormatBlur
97
- }),
98
- /*#__PURE__*/ _jsx(TextField, {
99
- label: "Min Step",
100
- placeholder: minStepPlaceholder,
101
- helperText: "Step parameter of the query. Used by $__interval and $__rate_interval too.",
102
- value: minStep,
103
- onChange: (e)=>handleMinStepChange(e.target.value),
104
- onBlur: handleMinStepBlur,
105
- sx: {
106
- width: '250px'
107
- }
108
- })
109
- ]
110
- })
111
- ]
112
- });
113
- }
114
-
115
- //# sourceMappingURL=ExplorePrometheusTimeSeriesQueryEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/plugins/prometheus-time-series-query/ExplorePrometheusTimeSeriesQueryEditor.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 { Stack, TextField, FormControl, InputLabel, Grid } from '@mui/material';\nimport { DatasourceSelect, ProjectSelect, useProjectStore } from '@perses-dev/plugin-system';\nimport { DatasourceSelector, ProjectResource } from '@perses-dev/core/dist/model';\nimport { DEFAULT_PROM, DurationString, PROM_DATASOURCE_KIND, PrometheusDatasourceSelector } from '../../model';\nimport { PromQLEditor } from '../../components';\n\ninterface ExplorePrometheusTimeSeriesQueryEditorProps {\n selectedDatasource: PrometheusDatasourceSelector;\n handleDatasourceChange: (next: DatasourceSelector) => void;\n promURL: string | undefined;\n query: string;\n handleQueryChange: (e: string) => void;\n handleQueryBlur: () => void;\n format: string | undefined;\n handleFormatChange: (e: string) => void;\n handleFormatBlur: () => void;\n minStepPlaceholder: string;\n minStep: string | undefined;\n handleMinStepChange: (e: DurationString) => void;\n handleMinStepBlur: () => void;\n}\n\nexport function ExplorePrometheusTimeSeriesQueryEditor(props: ExplorePrometheusTimeSeriesQueryEditorProps) {\n const {\n selectedDatasource,\n handleDatasourceChange,\n promURL,\n query,\n handleQueryChange,\n handleQueryBlur,\n format,\n handleFormatBlur,\n handleMinStepChange,\n handleFormatChange,\n handleMinStepBlur,\n minStepPlaceholder,\n minStep,\n } = props;\n\n const { project, setProject } = useProjectStore();\n\n const handleProjectChange = (next: ProjectResource) => {\n handleDatasourceChange(DEFAULT_PROM);\n return setProject(next);\n };\n\n return (\n <Stack spacing={2}>\n <Grid container spacing={2}>\n <Grid item xs={2}>\n <FormControl margin=\"dense\" fullWidth={true}>\n {/* TODO: How do we ensure unique ID values if there are multiple of these? Can we use React 18 useId and\n maintain 17 compatibility somehow with a polyfill/shim? */}\n <InputLabel id=\"project-label\">Projects</InputLabel>\n <ProjectSelect labelId=\"project-label\" label=\"Projects\" value={project} onChange={handleProjectChange} />\n </FormControl>\n </Grid>\n <Grid item>\n <FormControl margin=\"dense\" fullWidth={true}>\n {/* TODO: How do we ensure unique ID values if there are multiple of these? Can we use React 18 useId and\n maintain 17 compatibility somehow with a polyfill/shim? */}\n <InputLabel id=\"prom-datasource-label\">Prometheus Datasource</InputLabel>\n <DatasourceSelect\n datasourcePluginKind={PROM_DATASOURCE_KIND}\n value={selectedDatasource}\n project={project.metadata.name}\n onChange={handleDatasourceChange}\n labelId=\"prom-datasource-label\"\n label=\"Prometheus Datasource\"\n />\n </FormControl>\n </Grid>\n </Grid>\n <PromQLEditor\n completeConfig={{ remote: { url: promURL } }}\n value={query}\n onChange={handleQueryChange}\n onBlur={handleQueryBlur}\n />\n <Stack direction=\"row\" spacing={2}>\n <TextField\n fullWidth\n label=\"Legend Name\"\n placeholder=\"Tip: Use {{label_name}}. Example: {{instance}} will be replaced with values such as 'webserver-123' and 'webserver-456'.\"\n helperText=\"Name for each series in the legend and the tooltip.\"\n value={format ?? ''}\n onChange={(e) => handleFormatChange(e.target.value)}\n onBlur={handleFormatBlur}\n />\n <TextField\n label=\"Min Step\"\n placeholder={minStepPlaceholder}\n helperText=\"Step parameter of the query. Used by $__interval and $__rate_interval too.\"\n value={minStep}\n onChange={(e) => handleMinStepChange(e.target.value as DurationString)}\n onBlur={handleMinStepBlur}\n sx={{ width: '250px' }}\n />\n </Stack>\n </Stack>\n );\n}\n"],"names":["Stack","TextField","FormControl","InputLabel","Grid","DatasourceSelect","ProjectSelect","useProjectStore","DEFAULT_PROM","PROM_DATASOURCE_KIND","PromQLEditor","ExplorePrometheusTimeSeriesQueryEditor","props","selectedDatasource","handleDatasourceChange","promURL","query","handleQueryChange","handleQueryBlur","format","handleFormatBlur","handleMinStepChange","handleFormatChange","handleMinStepBlur","minStepPlaceholder","minStep","project","setProject","handleProjectChange","next","spacing","container","item","xs","margin","fullWidth","id","labelId","label","value","onChange","datasourcePluginKind","metadata","name","completeConfig","remote","url","onBlur","direction","placeholder","helperText","e","target","sx","width"],"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,KAAK,EAAEC,SAAS,EAAEC,WAAW,EAAEC,UAAU,EAAEC,IAAI,QAAQ,gBAAgB;AAChF,SAASC,gBAAgB,EAAEC,aAAa,EAAEC,eAAe,QAAQ,4BAA4B;AAE7F,SAASC,YAAY,EAAkBC,oBAAoB,QAAsC,cAAc;AAC/G,SAASC,YAAY,QAAQ,mBAAmB;AAkBhD,OAAO,SAASC,uCAAuCC,KAAkD;IACvG,MAAM,EACJC,kBAAkB,EAClBC,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