From 149e36921b9246792a5114b3e36b486227c8e439 Mon Sep 17 00:00:00 2001 From: Augustin Husson Date: Tue, 28 Sep 2021 09:19:04 +0200 Subject: [PATCH] assess in readme that codemirror-promql is in prometheus/prometheus (#9388) * assess in readme that codemirror is in prometheus/prometheus Signed-off-by: Augustin Husson * fix wording Signed-off-by: Augustin Husson * remove preview Signed-off-by: Augustin Husson --- web/ui/module/codemirror-promql/README.md | 27 +++++++++-------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/web/ui/module/codemirror-promql/README.md b/web/ui/module/codemirror-promql/README.md index b717b2d14..bbc051893 100644 --- a/web/ui/module/codemirror-promql/README.md +++ b/web/ui/module/codemirror-promql/README.md @@ -1,6 +1,6 @@ CodeMirror-promql ================= -[![CircleCI](https://circleci.com/gh/prometheus-community/codemirror-promql.svg?style=shield)](https://circleci.com/gh/prometheus-community/codemirror-promql) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) +[![CircleCI](https://circleci.com/gh/prometheus-community/codemirror-promql.svg?style=shield)](https://circleci.com/gh/prometheus-community/codemirror-promql) [![GitHub license](https://img.shields.io/badge/license-Apache-blue.svg)](./LICENSE) [![NPM version](https://img.shields.io/npm/v/codemirror-promql.svg)](https://www.npmjs.org/package/codemirror-promql) [![codecov](https://codecov.io/gh/prometheus-community/codemirror-promql/branch/master/graph/badge.svg?token=1OSVPBDKZC)](https://codecov.io/gh/prometheus-community/codemirror-promql) ## Overview @@ -8,6 +8,14 @@ CodeMirror-promql This project provides a mode for [CodeMirror Next](https://codemirror.net/6) that handles syntax highlighting, linting and autocompletion for PromQL ([Prometheus Query Language](https://prometheus.io/docs/introduction/overview/)). +![preview](https://user-images.githubusercontent.com/4548045/95660829-d5e4b680-0b2a-11eb-9ecb-41dca6396273.gif) + +## Where does it come from? + +The authoritative copy of this code lives in `prometheus/prometheus` and is synced to +`prometheus-community/codemirror-promql` on a regular basis by a bot. Please contribute any code changes to the code +in https://github.com/prometheus/prometheus/tree/main/web/ui/module/codemirror-promql. + ### Installation This mode is available as a npm package: @@ -38,15 +46,6 @@ npm install --save @codemirror/autocomplete @codemirror/highlight @codemirror/la npm install --save @codemirror/basic-setup ``` -### Playground - -[Here](https://codemirror-promql.netlify.app/) you have a playground available that is deployed from the latest commit -available on the `master` branch. - -Here is a short preview of it looks like currently: - -![preview](https://user-images.githubusercontent.com/4548045/95660829-d5e4b680-0b2a-11eb-9ecb-41dca6396273.gif) - ## Usage As the setup of the PromQL language can a bit tricky in CMN, this lib provides a class `PromQLExtension` @@ -245,12 +244,6 @@ Note: In case this parameter is provided, then the rest of the configuration is * [ReactJS example](https://github.com/prometheus/prometheus/blob/431ea75a11ca165dad9dd5d629b3cf975f4c186b/web/ui/react-app/src/pages/graph/CMExpressionInput.tsx) * [Angular example](https://github.com/perses/perses/blob/28b3bdac88b0ed7a4602f9c91106442eafcb6c34/internal/api/front/perses/src/app/project/prometheusrule/promql-editor/promql-editor.component.ts) -## Contributions - -Any contribution or suggestion would be really appreciated. Feel free -to [file an issue](https://github.com/prometheus-community/codemirror-promql/issues) -or [send a pull request](https://github.com/prometheus-community/codemirror-promql/pulls). - ## License -[MIT](./LICENSE) +Apache License 2.0, see [LICENSE](https://github.com/prometheus-community/codemirror-promql/blob/master/LICENSE).