Provisioning: Add private preview badge (#111524)
* Provisioning: Add private preview badge * Add docs link
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
|
|
||||||
import { GrafanaTheme2 } from '@grafana/data';
|
import { FeatureState, GrafanaTheme2 } from '@grafana/data';
|
||||||
|
import { GrafanaEdition } from '@grafana/data/internal';
|
||||||
import { Trans } from '@grafana/i18n';
|
import { Trans } from '@grafana/i18n';
|
||||||
import { Box, LinkButton, Stack, Text, useStyles2 } from '@grafana/ui';
|
import { config } from '@grafana/runtime';
|
||||||
|
import { Box, FeatureBadge, LinkButton, Stack, Text, TextLink, useStyles2 } from '@grafana/ui';
|
||||||
|
|
||||||
import { RepositoryTypeCards } from '../Shared/RepositoryTypeCards';
|
import { RepositoryTypeCards } from '../Shared/RepositoryTypeCards';
|
||||||
|
|
||||||
@@ -13,13 +15,15 @@ interface FeaturesListProps {
|
|||||||
|
|
||||||
export const FeaturesList = ({ hasRequiredFeatures, onSetupFeatures }: FeaturesListProps) => {
|
export const FeaturesList = ({ hasRequiredFeatures, onSetupFeatures }: FeaturesListProps) => {
|
||||||
const styles = useStyles2(getStyles);
|
const styles = useStyles2(getStyles);
|
||||||
|
const isOnPrem = [GrafanaEdition.OpenSource, GrafanaEdition.Enterprise].includes(config.buildInfo.edition);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack direction="column" gap={3}>
|
<Stack direction="column" gap={3}>
|
||||||
<Text variant="h2">
|
<Text variant="h2">
|
||||||
<Trans i18nKey="provisioning.features-list.manage-your-dashboards-with-remote-provisioning">
|
<Trans i18nKey="provisioning.features-list.manage-your-dashboards-with-remote-provisioning">
|
||||||
Get started with Git Sync
|
Get started with Git Sync
|
||||||
</Trans>
|
</Trans>{' '}
|
||||||
|
{!isOnPrem && <FeatureBadge featureState={FeatureState.privatePreview} />}
|
||||||
</Text>
|
</Text>
|
||||||
<ul className={styles.featuresList}>
|
<ul className={styles.featuresList}>
|
||||||
<li>
|
<li>
|
||||||
@@ -33,6 +37,20 @@ export const FeaturesList = ({ hasRequiredFeatures, onSetupFeatures }: FeaturesL
|
|||||||
</Trans>
|
</Trans>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<Text>
|
||||||
|
<Trans i18nKey="provisioning.features-list.learn-more-documentation">
|
||||||
|
Want to learn more? See our{' '}
|
||||||
|
<TextLink
|
||||||
|
external
|
||||||
|
href={
|
||||||
|
'https://grafana.com/docs/grafana-cloud/developer-resources/observability-as-code/provision-resources'
|
||||||
|
}
|
||||||
|
>
|
||||||
|
documentation
|
||||||
|
</TextLink>
|
||||||
|
.
|
||||||
|
</Trans>
|
||||||
|
</Text>
|
||||||
{!hasRequiredFeatures ? (
|
{!hasRequiredFeatures ? (
|
||||||
<Box>
|
<Box>
|
||||||
<LinkButton fill="outline" onClick={onSetupFeatures}>
|
<LinkButton fill="outline" onClick={onSetupFeatures}>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
import { GrafanaEdition } from '@grafana/data/internal';
|
||||||
import { Trans, t } from '@grafana/i18n';
|
import { Trans, t } from '@grafana/i18n';
|
||||||
|
import { config } from '@grafana/runtime';
|
||||||
import { Box, Text, TextLink } from '@grafana/ui';
|
import { Box, Text, TextLink } from '@grafana/ui';
|
||||||
import { Repository } from 'app/api/clients/provisioning/v0alpha1';
|
import { Repository } from 'app/api/clients/provisioning/v0alpha1';
|
||||||
import { Page } from 'app/core/components/Page/Page';
|
import { Page } from 'app/core/components/Page/Page';
|
||||||
@@ -30,6 +32,12 @@ export default function GettingStartedPage({ items }: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Banner() {
|
function Banner() {
|
||||||
|
const isOnPrem = [GrafanaEdition.OpenSource, GrafanaEdition.Enterprise].includes(config.buildInfo.edition);
|
||||||
|
|
||||||
|
if (!isOnPrem) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
display="flex"
|
display="flex"
|
||||||
|
|||||||
@@ -11327,6 +11327,7 @@
|
|||||||
"actions": {
|
"actions": {
|
||||||
"set-up-required-feature-toggles": "Set up required feature toggles"
|
"set-up-required-feature-toggles": "Set up required feature toggles"
|
||||||
},
|
},
|
||||||
|
"learn-more-documentation": "Want to learn more? See our <2>documentation</2>.",
|
||||||
"manage-dashboards-provision-updates-automatically": "Manage dashboards as code in Git and provision updates automatically",
|
"manage-dashboards-provision-updates-automatically": "Manage dashboards as code in Git and provision updates automatically",
|
||||||
"manage-your-dashboards-with-remote-provisioning": "Get started with Git Sync",
|
"manage-your-dashboards-with-remote-provisioning": "Get started with Git Sync",
|
||||||
"store-dashboards-in-version-controlled-storage": "Store dashboards in version-controlled storage for better organization and history tracking"
|
"store-dashboards-in-version-controlled-storage": "Store dashboards in version-controlled storage for better organization and history tracking"
|
||||||
|
|||||||
Reference in New Issue
Block a user