mirror of
https://github.com/prymitive/karma
synced 2026-05-11 03:46:48 +00:00
chore(ui): migrate more code to typescript
This commit is contained in:
committed by
Łukasz Mierzwa
parent
55170f8812
commit
4d4dd111c1
21
ui/src/Common/Query.ts
Normal file
21
ui/src/Common/Query.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
const QueryOperators = Object.freeze({
|
||||
Equal: "=",
|
||||
NotEqual: "!=",
|
||||
Regex: "=~",
|
||||
});
|
||||
|
||||
const StaticLabels = Object.freeze({
|
||||
AlertName: "alertname",
|
||||
AlertManager: "@alertmanager",
|
||||
AlertmanagerCluster: "@cluster",
|
||||
Fingerprint: "@fingerprint",
|
||||
Receiver: "@receiver",
|
||||
State: "@state",
|
||||
SilenceID: "@silence_id",
|
||||
});
|
||||
|
||||
function FormatQuery(name: string, operator: string, value: string) {
|
||||
return `${name}${operator}${value}`;
|
||||
}
|
||||
|
||||
export { QueryOperators, StaticLabels, FormatQuery };
|
||||
Reference in New Issue
Block a user