Skip to content

Commit

Permalink
Merge pull request #1941 from hstastna/BZ_OpenshiftVirtualization_Deg…
Browse files Browse the repository at this point in the history
…raded_reload

CNV-40445: Prevent reloading page when clicking on Degraded alerts
  • Loading branch information
openshift-merge-bot[bot] committed May 15, 2024
2 parents 105826e + c9621f4 commit 3ebb799
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { FC } from 'react';
import { Link } from 'react-router-dom-v5-compat';

import { AlertType } from '@kubevirt-utils/components/AlertsCard/utils/types';
import LoadingEmptyState from '@kubevirt-utils/components/LoadingEmptyState/LoadingEmptyState';
Expand Down Expand Up @@ -34,17 +35,17 @@ const KubevirtHealthPopup: FC = () => {
<StackItem>
<div className="kv-health-popup__alerts-count">
<RedExclamationCircleIcon className="kv-health-popup__alerts-count--icon" />
<a href={`${ALERTS_BASE_PATH}${HealthImpactLevel.critical}`}>
<Link to={`${ALERTS_BASE_PATH}${HealthImpactLevel.critical}`}>
{`${alerts?.[HealthImpactLevel.critical]?.length} Critical`}
</a>
</Link>
</div>
</StackItem>
<StackItem>
<div className="kv-health-popup__alerts-count">
<YellowExclamationTriangleIcon className="kv-health-popup__alerts-count--icon" />{' '}
<a href={`${ALERTS_BASE_PATH}${HealthImpactLevel.warning}`}>
<Link to={`${ALERTS_BASE_PATH}${HealthImpactLevel.warning}`}>
{`${alerts?.[AlertType.warning]?.length} Warning`}
</a>
</Link>
</div>
</StackItem>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const ALERTS_BASE_PATH =
'monitoring/alerts?rowFilter-alert-state=firing,silenced&rowFilter-alert-source=platform&alerts=kubernetes_operator_part_of%3Dkubevirt%2Coperator_health_impact%3D';
'/monitoring/alerts?rowFilter-alert-state=firing,silenced&rowFilter-alert-source=platform&alerts=kubernetes_operator_part_of%3Dkubevirt%2Coperator_health_impact%3D';

export const alertTypeToColorMap = {
critical: '#C9190B',
Expand Down

0 comments on commit 3ebb799

Please sign in to comment.