mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 00:53:12 +00:00
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 <husson.augustin@gmail.com> * fix wording Signed-off-by: Augustin Husson <husson.augustin@gmail.com> * remove preview Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
parent
0dc43b97d7
commit
149e36921b
@ -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).
|
||||
|
Loading…
Reference in New Issue
Block a user