lib/promrelabel: use monospace font at textarea for writing relabel configs on /metric-relabel-debug and /target-relabel-debug pages

This simplifies visual inspection of indentation in yaml configs
This commit is contained in:
Aliaksandr Valialkin 2023-05-18 20:48:38 -07:00
parent 2b53ff774b
commit 1f2f74e70e
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
2 changed files with 4 additions and 4 deletions

View file

@ -73,12 +73,12 @@ function submitRelabelDebugForm(e) {
{% func relabelDebugFormInputs(metric, relabelConfigs string) %} {% func relabelDebugFormInputs(metric, relabelConfigs string) %}
<div> <div>
Relabel configs:<br/> Relabel configs:<br/>
<textarea name="relabel_configs" style="width: 100%; height: 15em" class="m-1">{%s relabelConfigs %}</textarea> <textarea name="relabel_configs" style="width: 100%; height: 15em; font-family: monospace" class="m-1">{%s relabelConfigs %}</textarea>
</div> </div>
<div> <div>
Labels:<br/> Labels:<br/>
<textarea name="metric" style="width: 100%; height: 5em" class="m-1">{%s metric %}</textarea> <textarea name="metric" style="width: 100%; height: 5em; font-family: monospace" class="m-1">{%s metric %}</textarea>
</div> </div>
{% endfunc %} {% endfunc %}

View file

@ -181,11 +181,11 @@ func RelabelDebugStepsHTML(targetURL, targetID string, dss []DebugStep, metric,
//line lib/promrelabel/debug.qtpl:73 //line lib/promrelabel/debug.qtpl:73
func streamrelabelDebugFormInputs(qw422016 *qt422016.Writer, metric, relabelConfigs string) { func streamrelabelDebugFormInputs(qw422016 *qt422016.Writer, metric, relabelConfigs string) {
//line lib/promrelabel/debug.qtpl:73 //line lib/promrelabel/debug.qtpl:73
qw422016.N().S(`<div>Relabel configs:<br/><textarea name="relabel_configs" style="width: 100%; height: 15em" class="m-1">`) qw422016.N().S(`<div>Relabel configs:<br/><textarea name="relabel_configs" style="width: 100%; height: 15em; font-family: monospace" class="m-1">`)
//line lib/promrelabel/debug.qtpl:76 //line lib/promrelabel/debug.qtpl:76
qw422016.E().S(relabelConfigs) qw422016.E().S(relabelConfigs)
//line lib/promrelabel/debug.qtpl:76 //line lib/promrelabel/debug.qtpl:76
qw422016.N().S(`</textarea></div><div>Labels:<br/><textarea name="metric" style="width: 100%; height: 5em" class="m-1">`) qw422016.N().S(`</textarea></div><div>Labels:<br/><textarea name="metric" style="width: 100%; height: 5em; font-family: monospace" class="m-1">`)
//line lib/promrelabel/debug.qtpl:81 //line lib/promrelabel/debug.qtpl:81
qw422016.E().S(metric) qw422016.E().S(metric)
//line lib/promrelabel/debug.qtpl:81 //line lib/promrelabel/debug.qtpl:81