Prometheus: Create Prometheus library (#81641)

* Move to the library

* copy from library

* move them in src

* have additional files

* add unmigrated/dulicated code and files

* migrate from brendan's pr
module.ts, query_hints.ts, tracking.ts, and remove plugin.json

* migrate from brendan's pr
metric_find_query.test.ts

* migrate from brendan's pr
language_utils.test.ts

* migrate from brendan's pr
index.ts in root and in configuration

* migrate from brendan's pr
datasource.test.ts

* migrate from brendan's pr
typings folder

* migrate from brendan's pr
querycache folder

* migrate from brendan's pr
monaco-query-field folder

* migrate from brendan's pr
components folder without monaco-query-field folder

* migrate from brendan's pr
configuration/overhaul folder

* migrate from brendan's pr
AlertingSettingsOverhaul.tsx

* Remove azure related code

* migrate from brendan's pr
ConfigEditor.tsx, DataSourceHttpSettingsOverhaul.tsx, ExemplarSetting.tsx, configuration/mocks.ts, PromSettings.test.tsx, PromSettings.tsx

* migrate from brendan's pr
useFlag.ts

* migrate from brendan's pr
metrics-modal folder

* migrate from brendan's pr
files inside components folder

* migrate from brendan's pr
LabelFilters* files because they are now under components folder

* migrate from brendan's pr
files under querybuilder/shared folder

* migrate from brendan's pr
aggregations.ts, QueryPattern.tsx, QueryPatternsModal.tsx, state.ts, testUtils.ts under querybuilder folder

* Apply Ivana's PR https://github.com/grafana/grafana/pull/81656

* Apply jack's suggestions in this PR https://github.com/grafana/grafana/pull/77762

* Apply Ivana's PR https://github.com/grafana/grafana/pull/81656

* Fix type import

* add monaco-promql to transformIgnorePatterns to run prometheus frontend library tests

* remove Loki specific tests because we removed Loki code to decouple Loki

* add prometheus specific references

* We are moving these betterer issues from core Prometheus to the Library and we promise to remove all issues in the future, thank you

* include prometheus library in package.json

* add yarn lock with prometheus frontend library

* decouple final core import from metric_find_query.test.ts

* run prettier

* fix core imports in promqail

* fix lint errors

* run prettier

* add grafana-ui to devdeps to fix lint errors

* update yarn.lock

* grafana-ui fix

* trying to fix grafana-ui type errors with lerna drone check

* trying to fix grafana-ui type errors with lerna drone check

* trying to fix grafana-ui type errors with lerna drone check

* trying to fix grafana-ui type errors with lerna drone check

* try to pass typecheck

---------

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
This commit is contained in:
ismail simsek
2024-02-02 15:30:14 +01:00
committed by GitHub
parent 89271df647
commit 75c2d39f79
183 changed files with 33356 additions and 3 deletions

View File

@ -0,0 +1,99 @@
export const PromFlavorVersions: { [index: string]: Array<{ value?: string; label: string }> } = {
Prometheus: [
{ value: undefined, label: 'Please select' },
{ value: '2.0.0', label: '< 2.14.x' },
{ value: '2.14.0', label: '2.14.x' },
{ value: '2.15.0', label: '2.15.x' },
{ value: '2.16.0', label: '2.16.x' },
{ value: '2.17.0', label: '2.17.x' },
{ value: '2.18.0', label: '2.18.x' },
{ value: '2.19.0', label: '2.19.x' },
{ value: '2.20.0', label: '2.20.x' },
{ value: '2.21.0', label: '2.21.x' },
{ value: '2.22.0', label: '2.22.x' },
{ value: '2.23.0', label: '2.23.x' },
{ value: '2.24.0', label: '2.24.x' },
{ value: '2.25.0', label: '2.25.x' },
{ value: '2.26.0', label: '2.26.x' },
{ value: '2.27.0', label: '2.27.x' },
{ value: '2.28.0', label: '2.28.x' },
{ value: '2.29.0', label: '2.29.x' },
{ value: '2.30.0', label: '2.30.x' },
{ value: '2.31.0', label: '2.31.x' },
{ value: '2.32.0', label: '2.32.x' },
{ value: '2.33.0', label: '2.33.x' },
{ value: '2.34.0', label: '2.34.x' },
{ value: '2.35.0', label: '2.35.x' },
{ value: '2.36.0', label: '2.36.x' },
{ value: '2.37.0', label: '2.37.x' },
{ value: '2.38.0', label: '2.38.x' },
{ value: '2.39.0', label: '2.39.x' },
{ value: '2.40.0', label: '2.40.x' },
{ value: '2.41.0', label: '2.41.x' },
{ value: '2.42.0', label: '2.42.x' },
{ value: '2.43.0', label: '2.43.x' },
{ value: '2.44.0', label: '2.44.x' },
{ value: '2.45.0', label: '2.45.x' },
{ value: '2.46.0', label: '2.46.x' },
{ value: '2.47.0', label: '2.47.x' },
{ value: '2.48.0', label: '2.48.x' },
{ value: '2.49.0', label: '2.49.x' },
{ value: '2.50.0', label: '2.50.x' },
// This value will be returned for future versions of prometheus until we add new entries to this object
{ value: '2.50.1', label: '> 2.50.x' },
],
Mimir: [
{ value: undefined, label: 'Please select' },
{ value: '2.0.0', label: '2.0.x' },
{ value: '2.1.0', label: '2.1.x' },
{ value: '2.2.0', label: '2.2.x' },
{ value: '2.3.0', label: '2.3.x' },
{ value: '2.4.0', label: '2.4.x' },
{ value: '2.5.0', label: '2.5.x' },
{ value: '2.6.0', label: '2.6.x' },
{ value: '2.7.0', label: '2.7.x' },
{ value: '2.8.0', label: '2.8.x' },
{ value: '2.9.0', label: '2.9.x' },
{ value: '2.9.1', label: '> 2.9.x' },
],
Thanos: [
{ value: undefined, label: 'Please select' },
{ value: '0.0.0', label: '< 0.16.x' },
{ value: '0.16.0', label: '0.16.x' },
{ value: '0.17.0', label: '0.17.x' },
{ value: '0.18.0', label: '0.18.x' },
{ value: '0.19.0', label: '0.19.x' },
{ value: '0.20.0', label: '0.20.x' },
{ value: '0.21.0', label: '0.21.x' },
{ value: '0.22.0', label: '0.22.x' },
{ value: '0.23.0', label: '0.23.x' },
{ value: '0.24.0', label: '0.24.x' },
{ value: '0.25.0', label: '0.25.x' },
{ value: '0.26.0', label: '0.26.x' },
{ value: '0.27.0', label: '0.27.x' },
{ value: '0.28.0', label: '0.28.x' },
{ value: '0.29.0', label: '0.29.x' },
{ value: '0.30.0', label: '0.30.x' },
{ value: '0.31.0', label: '0.31.x' },
{ value: '0.31.1', label: '> 0.31.x' },
],
Cortex: [
{ value: undefined, label: 'Please select' },
{ value: '0.0.0', label: '< 1.0.0' },
{ value: '1.0.0', label: '1.0.0' },
{ value: '1.1.0', label: '1.1.x' },
{ value: '1.2.0', label: '1.2.x' },
{ value: '1.3.0', label: '1.3.x' },
{ value: '1.4.0', label: '1.4.x' },
{ value: '1.5.0', label: '1.5.x' },
{ value: '1.6.0', label: '1.6.x' },
{ value: '1.7.0', label: '1.7.x' },
{ value: '1.8.0', label: '1.8.x' },
{ value: '1.9.0', label: '1.9.x' },
{ value: '1.10.0', label: '1.10.x' },
{ value: '1.11.0', label: '1.11.x' },
{ value: '1.13.0', label: '1.13.x' },
{ value: '1.14.0', label: '> 1.13.x' },
],
};