Provisioning: Onboarding tweaks (#111233)

* Provisioning: Onboarding tweaks

* Provisioning: Update managed messages
This commit is contained in:
Alex Khomenko 2025-09-17 17:31:02 +03:00 committed by GitHub
parent 61e62a4de0
commit dacd2e27c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 17 deletions

View File

@ -95,13 +95,11 @@ export function JobContent({ jobType, job, isFinishedJob = false, onStatusChange
</Stack>
)}
{state === 'success' ? (
<Stack direction="row" gap={1}>
{pullRequestURL ? (
pullRequestURL ? (
<PullRequestButtons urls={job.status?.url} jobType={jobType} />
) : (
<RepositoryLink name={repoName} jobType={jobType} />
)}
</Stack>
)
) : (
<ControlledCollapse label={t('provisioning.job-status.label-view-details', 'View details')} isOpen={false}>
<pre>{JSON.stringify(job, null, 2)}</pre>

View File

@ -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 (
<>
<Stack>
<LinkButton href={branchURL} icon="external-link-alt" variant="secondary" target="_blank">
<Trans i18nKey="provisioning.repository-link.delete-or-move-job.view-branch">View branch</Trans>
</LinkButton>
@ -26,6 +26,6 @@ export function PullRequestButtons({ urls, jobType }: Props) {
<LinkButton href={pullRequestURL} icon="external-link-alt" variant="secondary" target="_blank">
<Trans i18nKey="provisioning.repository-link.delete-or-move-job.open-pull-request">Open pull request</Trans>
</LinkButton>
</>
</Stack>
);
}

View File

@ -41,12 +41,18 @@ export function RepositoryList({ items }: Props) {
<Alert title={''} severity="info">
<Trans
i18nKey="provisioning.folder-repository-list.partial-managed"
count={resourceCount}
values={{ managedCount }}
values={{ managedCount, resourceCount }}
>
{{ managedCount }}/{{ count: resourceCount }} resources managed. {{ unmanagedCount }} resources
aren&apos;t managed as code yet.
{{ managedCount }}/{{ resourceCount }} resources managed.
</Trans>
{unmanagedCount > 0 && (
<>
{' '}
<Trans i18nKey="provisioning.folder-repository-list.unmanaged-resources" count={unmanagedCount}>
{{ count: unmanagedCount }} resources aren&apos;t managed as code yet.
</Trans>
</>
)}
</Alert>
</Stack>
);

View File

@ -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": {