mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
When user clicks on a label we apply a foo=bar filter, this change allows to add a foo!=bar filter by holding Alt key when clicking. Fixes #485
20 lines
404 B
JavaScript
20 lines
404 B
JavaScript
const QueryOperators = Object.freeze({
|
|
Equal: "=",
|
|
NotEqual: "!=",
|
|
Regex: "=~"
|
|
});
|
|
|
|
const StaticLabels = Object.freeze({
|
|
AlertName: "alertname",
|
|
AlertManager: "@alertmanager",
|
|
Receiver: "@receiver",
|
|
State: "@state",
|
|
SilenceID: "@silence_id"
|
|
});
|
|
|
|
function FormatQuery(name, operator, value) {
|
|
return `${name}${operator}${value}`;
|
|
}
|
|
|
|
export { QueryOperators, StaticLabels, FormatQuery };
|