grafana/public/app/features/alerting/unified/triage/constants.ts

11 lines
429 B
TypeScript
Raw Normal View History

Alerting: Triage (#110339) * WIP column layout * add columns on top of splitter * small layout fixes * WIP grouped items * WIP * WIP * WIP * small refactoring * some more WIP * WIP * refactoring some functions * use "unknown" state intstead of assuming "normal" state * Add groupBy filter * Add label-based filter * Add basic displaying of grouped data * lint * Fix timeline alertstate selection * Add AlertInstanceScene for displaying instances * Add WorkbenchContext to pass column width and domain deeper into the tree * Update single rule query, merge pending and firing metrics into one instance * use area chart for summary * Add not working rule summary * step interpolation for summary chart * Add rule state chart * Update panel settings for alert rule summary * Reactify SummaryChart component * WIP react version * Reactify AlertRuleDetails component * Reactify AlertRuleSummary component * refactor summary chart a bit * clean up – Reactify * set min y-scale for rule summary * remove macro code * small fixes * remove line width for summary * attempt to make the instances a native chart * native chart for instances part 2 * sync cursor crosshair * extract instance row into separate component * Add minHeight for rows without labels * Add Summary component * Move scrolling to rows container * Add lazy rendering of rows * Use default page size * minor layout tweaks * typescript fixes * simplify the grouping / data frame processing * big cleanup of code * split up rows components * further split row components * moving files around * use text summary stats * link to alert rule * various eslint and typescript fixes * do not compute common labels for single series * small UI updates * add depth support and colored labels * simplify with props type * Reuse Workbenck query to populate alert rule summaries * add custom folder row component and set as default * small UI tweaks * remove unused sticky * Hide triage page behind a feature toggle * Add loading states to workbench and alert rows * Update translations * ✨ * Fix lint errors * Fix EditorColumnHeader rendering, remove unused code * Update translations * Move EditorColumnHeader to shared components directory * add type string for union discrimination of row --------- Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
2025-10-07 19:39:13 +08:00
import { config } from '@grafana/runtime';
export const VARIABLES = {
groupBy: 'groupBy',
filters: 'filters',
};
export const DATASOURCE_UID = config.unifiedAlerting.stateHistory?.prometheusTargetDatasourceUID;
export const METRIC_NAME = config.unifiedAlerting.stateHistory?.prometheusMetricName ?? 'GRAFANA_ALERTS';
export const DEFAULT_FIELDS = ['alertname', 'grafana_folder', 'grafana_rule_uid', 'alertstate'] as const;