Skip to content

Commit

Permalink
chore: add experimental warnings to multihttp
Browse files Browse the repository at this point in the history
  • Loading branch information
rdubrock committed Nov 2, 2023
1 parent a4443f1 commit bdeeca2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/ChooseCheckType.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { GrafanaTheme2, PageLayoutType } from '@grafana/data';
import { Card, useStyles2 } from '@grafana/ui';
import { Badge, Card, useStyles2 } from '@grafana/ui';
import { css } from '@emotion/css';

import { CheckType, FeatureName, ROUTES } from 'types';
Expand Down Expand Up @@ -34,7 +34,12 @@ export function ChooseCheckType() {
navigate(`${ROUTES.NewCheck}/${check.value}`);
}}
>
<Card.Heading className={styles.cardsHeader}>{check.label}</Card.Heading>
<Card.Heading className={styles.cardsHeader}>
{check.label}
{check.value === CheckType.MULTI_HTTP ? (
<Badge text="Experimental" color="orange" className={styles.experimentalBadge} />
) : null}
</Card.Heading>
<Card.Description>{check.description}</Card.Description>
</Card>
);
Expand All @@ -61,4 +66,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
justify-content: center;
align-items: flex-start;
`,
experimentalBadge: css`
margin-left: ${theme.spacing(1)};
`,
});
3 changes: 3 additions & 0 deletions src/components/MultiHttp/MultiHttpSettingsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ export const MultiHttpSettingsForm = ({ checks, onReturn }: Props) => {
}}
>
{!config.featureToggles.topnav && <Legend>{check?.id ? 'Edit Check' : 'Add MULTIHTTP Check'}</Legend>}
<Alert severity="info" title="MultiHTTP checks are experimental">
If you experience any issues, please contact support.
</Alert>
<VerticalGroup>
<FormProvider {...formMethods}>
<form onSubmit={handleSubmit(onSubmit, onError)} className={styles.form}>
Expand Down

0 comments on commit bdeeca2

Please sign in to comment.