From dacd2e27c01e8e8ac9287cbb4f7e4f21a64084f6 Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Wed, 17 Sep 2025 17:31:02 +0300 Subject: [PATCH] Provisioning: Onboarding tweaks (#111233) * Provisioning: Onboarding tweaks * Provisioning: Update managed messages --- .../app/features/provisioning/Job/JobContent.tsx | 12 +++++------- .../provisioning/Repository/PullRequestButtons.tsx | 6 +++--- .../provisioning/Shared/RepositoryList.tsx | 14 ++++++++++---- public/locales/en-US/grafana.json | 7 ++++--- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/public/app/features/provisioning/Job/JobContent.tsx b/public/app/features/provisioning/Job/JobContent.tsx index 3e3a05f80f5..b1911c95908 100644 --- a/public/app/features/provisioning/Job/JobContent.tsx +++ b/public/app/features/provisioning/Job/JobContent.tsx @@ -95,13 +95,11 @@ export function JobContent({ jobType, job, isFinishedJob = false, onStatusChange )} {state === 'success' ? ( - - {pullRequestURL ? ( - - ) : ( - - )} - + pullRequestURL ? ( + + ) : ( + + ) ) : (
{JSON.stringify(job, null, 2)}
diff --git a/public/app/features/provisioning/Repository/PullRequestButtons.tsx b/public/app/features/provisioning/Repository/PullRequestButtons.tsx index c7c3101161e..2e61d879b36 100644 --- a/public/app/features/provisioning/Repository/PullRequestButtons.tsx +++ b/public/app/features/provisioning/Repository/PullRequestButtons.tsx @@ -1,5 +1,5 @@ import { Trans } from '@grafana/i18n'; -import { LinkButton } from '@grafana/ui'; +import { LinkButton, Stack } from '@grafana/ui'; import { RepositoryUrLs } from 'app/api/clients/provisioning/v0alpha1'; interface Props { @@ -16,7 +16,7 @@ export function PullRequestButtons({ urls, jobType }: Props) { } return ( - <> + View branch @@ -26,6 +26,6 @@ export function PullRequestButtons({ urls, jobType }: Props) { Open pull request - + ); } diff --git a/public/app/features/provisioning/Shared/RepositoryList.tsx b/public/app/features/provisioning/Shared/RepositoryList.tsx index c129564a9bd..be7ff34c074 100644 --- a/public/app/features/provisioning/Shared/RepositoryList.tsx +++ b/public/app/features/provisioning/Shared/RepositoryList.tsx @@ -41,12 +41,18 @@ export function RepositoryList({ items }: Props) { - {{ managedCount }}/{{ count: resourceCount }} resources managed. {{ unmanagedCount }} resources - aren't managed as code yet. + {{ managedCount }}/{{ resourceCount }} resources managed. + {unmanagedCount > 0 && ( + <> + {' '} + + {{ count: unmanagedCount }} resources aren't managed as code yet. + + + )} ); diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index dd9a430f824..e15a1ee7150 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -11373,9 +11373,10 @@ "all-resources-managed_one": "All {{count}} resource is managed", "all-resources-managed_other": "All {{count}} resources are managed", "no-results-matching-your-query": "No results matching your query", - "partial-managed_one": "{{managedCount}}/{{count}} resources managed. {{unmanagedCount}} resources aren't managed as code yet.", - "partial-managed_other": "{{managedCount}}/{{count}} resources managed. {{unmanagedCount}} resources aren't managed as code yet.", - "placeholder-search": "Search" + "partial-managed": "{{managedCount}}/{{resourceCount}} resources managed.", + "placeholder-search": "Search", + "unmanaged-resources_one": "{{count}} resource isn't managed as code yet.", + "unmanaged-resources_other": "{{count}} resources aren't managed as code yet." }, "get-default-values": { "title": {