@if (post) {
{{ t('Edit Prometheus alert rule') }}
{{ t('Available metrics') }}
@for (metricSelected of selectedMetrics; track metricSelected) { }
{{ t('Brackets') }}
{{ t('Arithmetic binary operators') }}
{{ t('Aggregation operators') }}
{{ t('Query result:') }} @if (executeResult) { {{ executeResult }} } @if (!executeResult) { {{ t('no data') }} }
{{ t('Warning') }}
@if (post.Service.prometheus_alert_rule.threshold_type === PrometheusThresholdType.scalar) { } @if (post.Service.prometheus_alert_rule.threshold_type !== PrometheusThresholdType.scalar) { }
@if (post.Service.prometheus_alert_rule.threshold_type !== PrometheusThresholdType.scalar) { }
{{ t('Critical') }}
@if (post.Service.prometheus_alert_rule.threshold_type == PrometheusThresholdType.scalar) { } @if (post.Service.prometheus_alert_rule.threshold_type !== PrometheusThresholdType.scalar) { }
@if (post.Service.prometheus_alert_rule.threshold_type !== PrometheusThresholdType.scalar) { }
{{ t('Unit of the metric.') }}
{{ t('Examples:') }}
  • {{ t('"b" for bytes.') }}
  • {{ t('"KB" for kilobytes.') }}
  • {{ t('"s" for seconds.') }}
  • {{ t('"Mbps" or "Mbit/s"') }}
  • {{ t('"MB/s" for megabytes per second') }}

{{ t('Current values') }}
@for (metric of selectedMetrics; track metric) { @if (typeof ( metrics[metric] ) !== 'undefined') { @for (datum of metrics[metric].metricDetails.data.result; track datum) { } } }
{{ t('Element') }} {{ t('Value') }}
{{ datum.metric.__name__ }} {{ '{' }} @for (a of datum.metric | keyvalue; track a; let last = $last) { @if (a.key !== '__name__') { {{ a.key }}="{{ a.value }}"@if (!last) { , } } } {{ '}' }} {{ datum.value[1] }}
}