chore(ui): migrate more code to typescript

This commit is contained in:
Łukasz Mierzwa
2020-07-17 11:58:41 +01:00
committed by Łukasz Mierzwa
parent 55170f8812
commit 4d4dd111c1
36 changed files with 392 additions and 205 deletions
+21
View 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 };