From 80acff2bd8b3094e84b38a422e1e47cf4838ea2e Mon Sep 17 00:00:00 2001 From: Clarity-89 Date: Mon, 3 Mar 2025 13:09:30 +0200 Subject: [PATCH] Fix typos and imports --- .../features/provisioning/Setup/FeatureList.tsx | 16 +++++++++------- .../features/provisioning/Setup/SetupPage.tsx | 5 +++-- .../features/provisioning/Setup/StatusAlerts.tsx | 3 ++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/public/app/features/provisioning/Setup/FeatureList.tsx b/public/app/features/provisioning/Setup/FeatureList.tsx index a283d5ecf64..bc60ccfd0d6 100644 --- a/public/app/features/provisioning/Setup/FeatureList.tsx +++ b/public/app/features/provisioning/Setup/FeatureList.tsx @@ -1,8 +1,10 @@ import { useState, useEffect } from 'react'; + import { Text, Stack } from '@grafana/ui'; -import { Feature, feature_ini, ngrok_example, root_url_ini } from './types'; -import { SetupModal } from './SetupModal'; + import { FeatureCard } from './FeatureCard'; +import { SetupModal } from './SetupModal'; +import { Feature, feature_ini, ngrok_example, root_url_ini } from './types'; import { getConfigurationStatus } from './utils'; export const FeatureList = () => { @@ -24,7 +26,7 @@ export const FeatureList = () => { { title: 'Provision As-Code', description: - 'Manage your dashboards as code and deploy them automatically from your Github repository or local storage', + 'Manage your dashboards as code and deploy them automatically from your GitHub repository or local storage', additional: false, setupSteps: enableFeatureSteps, isConfigured: hasRequiredFeatures, @@ -34,7 +36,7 @@ export const FeatureList = () => { { title: 'Pull Requests', description: - 'Review, discuss, and approve dashboard changes with your team before they go live using Github pull requests', + 'Review, discuss, and approve dashboard changes with your team before they go live using GitHub pull requests', additional: false, setupSteps: enableFeatureSteps, icon: 'code-branch', @@ -52,9 +54,9 @@ export const FeatureList = () => { docsLink: 'https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles', }, { - title: 'Github Webhooks', + title: 'GitHub Webhooks', description: - 'Automatically provision and update your dashboards as soon as changes are pushed to your Github repository', + 'Automatically provision and update your dashboards as soon as changes are pushed to your GitHub repository', additional: true, icon: 'github', isConfigured: hasPublicAccess && hasRequiredFeatures, @@ -90,7 +92,7 @@ export const FeatureList = () => { ]; setFeatures(featuresList); - }, []); + }, [hasImageRenderer, hasPublicAccess, hasRequiredFeatures]); // Add a state variable to store the basic setup const [basicSetup] = useState({ diff --git a/public/app/features/provisioning/Setup/SetupPage.tsx b/public/app/features/provisioning/Setup/SetupPage.tsx index e5adb704596..4df1883ba72 100644 --- a/public/app/features/provisioning/Setup/SetupPage.tsx +++ b/public/app/features/provisioning/Setup/SetupPage.tsx @@ -1,12 +1,13 @@ import { Page } from 'app/core/components/Page/Page'; -import { StatusAlerts } from './StatusAlerts'; + import { FeatureList } from './FeatureList'; +import { StatusAlerts } from './StatusAlerts'; export default function SetupPage() { return ( diff --git a/public/app/features/provisioning/Setup/StatusAlerts.tsx b/public/app/features/provisioning/Setup/StatusAlerts.tsx index ac83f730bf9..8384d015b9d 100644 --- a/public/app/features/provisioning/Setup/StatusAlerts.tsx +++ b/public/app/features/provisioning/Setup/StatusAlerts.tsx @@ -1,5 +1,6 @@ import { locationService } from '@grafana/runtime'; import { Alert } from '@grafana/ui'; + import { getConfigurationStatus } from './utils'; interface Props { @@ -57,7 +58,7 @@ export function StatusAlerts({ showSetupButton = true, showSuccessBanner = false // Only optional features missing - show info alert return ( - Some additional features like Github webhook integration or Previews are not configured. These features can + Some additional features like GitHub webhook integration or Previews are not configured. These features can enhance your experience. );