PromQL support for the CodeMirror code editor
PrometheusConfig
object was passed to newCompleteStrategy()
.sin
, cos
)dist
folder. When importing codemirror-promql
, it means you
will need to add dist
in the import. For example import { newCompleteStrategy } from 'codemirror-promql/cjs/complete';
becomes import { newCompleteStrategy } from 'codemirror-promql/dist/cjs/complete';
grammar
folderpresent_over_time
MetricName
. Can be used to autocomplete only the metric
name. (#142)NaN
and Inf
(#141)POST
method (#139)Inf
/NaN
like infra (#142)promQLLanguage
has been changed to be a function. It takes a LanguageType
as a
parameter (#142)Note that this requires to change the import path if you are using something not exported by the root index of lib. For
example: import { labelMatchersToString } from 'codemirror-promql/parser/matcher';
becomes import { labelMatchersToString } from 'codemirror-promql/esm/parser/matcher';
or import { labelMatchersToString } from 'codemirror-promql/cjs/parser/matcher';
topk
, bottomk
and count_value
clamp
, last_over_time
, sgn
@
expression.CompleteStrategy.promQL
has been updated to support the type Promise<null>
(v0.18.0)enricher
BinExpr
thanks to the changes provided by lezer-promql (v0.15.0)bool
. (#89)enricher
that can be used to enrich the completion with a custom one.CompleteStrategy
. (#83)labelValues
and series
. (#84)metricName
in the PrometheusClient that supports a prefix of the metric searched. (#84)