prometheus/web
Luis Filipe Pessoa 9591103bb9
Allow copying label-value pair to buffer on click (#11229)
* Allow copying label-value pair to buffer on click

Kept similar DOM structure to keep test compatibility.
Using `navigator.clipboard` API since it is used by the current standard browsers.
React hot toast is used to notify that the text was successfully copied into clipboard.

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>

* Using reactstrap for toast notification

Using the bootstrap toast notification provided by reactstrap.
Clipboard handling is managed using React.Context via a shared callback.

Updated css according to CR suggestions.

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>

* Changes from CR comments

Cleaning up renderFormatted method.
Renamed Clipboard to ToastContext.
Updated tests.

Signed-off-by: Luis Pessoa <luisalmeida@yape.com.pe>

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>
Signed-off-by: Luis Pessoa <luisalmeida@yape.com.pe>
2022-09-20 14:30:24 +02:00
..
api/v1 GetSeries should Select sorted results only if more than one matcher is requested (#11313) 2022-09-16 09:40:41 +02:00
ui Allow copying label-value pair to buffer on click (#11229) 2022-09-20 14:30:24 +02:00
federate.go storage: Consolidate iterator method names (Values -> At) (#9888) 2021-11-29 11:16:40 +01:00
federate_test.go unit tests: make all Labels sorted alphabetically (#10532) 2022-05-04 23:41:36 +02:00
web.go delete redundant alias (#11180) 2022-08-31 15:50:38 +02:00
web_test.go /-/{healthy,ready}/ respond to HEAD (#11160) 2022-08-16 21:06:26 +02:00