mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 17:07:24 +08:00
16 lines
648 B
JavaScript
16 lines
648 B
JavaScript
$(function () {
|
|
var clipboardRules = new ClipboardJS('.clipboard-single', {
|
|
text: function (trigger) {
|
|
const id = trigger.getAttribute('data-clipboard-target-id');
|
|
const html = $("#" + id + " .highlight");
|
|
return html.text() + '\n';
|
|
},
|
|
});
|
|
var clipboardCategories = new ClipboardJS('.clipboard-multiple', {
|
|
text: function (trigger) {
|
|
const id = trigger.getAttribute('data-clipboard-target-id');
|
|
const html = $("[id^=" + id + "] .highlight");
|
|
return Array.from(html.map((i, target) => $(target).text())).join('\n\n');
|
|
},
|
|
});
|
|
});
|