fix(ui): don't hardcode matchers

This commit is contained in:
Łukasz Mierzwa
2018-09-01 10:17:38 +01:00
parent 879276e017
commit 1550025336

View File

@@ -14,7 +14,7 @@ import { faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons/faExternalL
import { faChevronUp } from "@fortawesome/free-solid-svg-icons/faChevronUp";
import { faChevronDown } from "@fortawesome/free-solid-svg-icons/faChevronDown";
import { StaticLabels } from "Common/Query";
import { StaticLabels, QueryOperators } from "Common/Query";
import { FilteringLabel } from "Components/Labels/FilteringLabel";
import "./index.css";
@@ -114,7 +114,7 @@ const SilenceDetails = ({ alertmanager, silence }) => {
className="badge badge-success text-nowrap text-truncate px-1 mr-1"
>
{matcher.name}
{matcher.isRegex ? "=~" : "="}
{matcher.isRegex ? QueryOperators.Regex : QueryOperators.Equal}
{matcher.value}
</span>
))}