prometheus / prometheus/alertmanager

UI: Multiple label=value pairs cannot be copied easily in webbrowser

Open
#2,803 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component/ui stale
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

What did you do?

Open active Alerts tab, or open a specific active Silence, with active Alerts.

If you select (using mouse) text of multiple Matchers in a silence, or select multiple label=value pairs in the affected alerts, and then copy it, and paste it into other place (i.e. form in a browser, text editor - tried Pluma, gedit, mcedit, vim, cat, Slack)

What did you expect to see?

After copying labels like location=abs hostname=foorbar (in HTML they are all inside a single div, with each label=value pair using a span:

<div>
<span class="btn btn-sm bg-faded btn-secondary mr-2 mb-2" style="user-select: text;">location=abc</span>
<span class="btn btn-sm bg-faded btn-secondary mr-2 mb-2" style="user-select: text;">hostname=foobar</span>
</div>

After selecting and copying (Either via implicit drag-copy behavior in Linux X11, or using Ctrl-C, or context menu) in Firefox or Chrome, then pasting it in other place you get:

location=abshostname=foorbar

What did you see instead? Under which circumstances?

After copy, pasing there is a space between each label=value pair:

location=abs hostname=foorbar

Environment

Firefox 95.0 on X11
Google Chrome 96.0.4664.110 on X11

  • Alertmanager version: 0.23.0, amd64

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue from the active Alerts tab or a specific active Silence with active Alerts in Firefox or Chrome, selecting multiple label=value pairs and copying them. Inspect the rendered matcher and alert markup, then verify that pasted text preserves a separator between each pair in the affected views.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.