mirror of https://github.com/grafana/grafana.git
Provisioning: Onboarding tweaks (#111233)
* Provisioning: Onboarding tweaks * Provisioning: Update managed messages
This commit is contained in:
parent
61e62a4de0
commit
dacd2e27c0
|
@ -95,13 +95,11 @@ export function JobContent({ jobType, job, isFinishedJob = false, onStatusChange
|
||||||
</Stack>
|
</Stack>
|
||||||
)}
|
)}
|
||||||
{state === 'success' ? (
|
{state === 'success' ? (
|
||||||
<Stack direction="row" gap={1}>
|
pullRequestURL ? (
|
||||||
{pullRequestURL ? (
|
<PullRequestButtons urls={job.status?.url} jobType={jobType} />
|
||||||
<PullRequestButtons urls={job.status?.url} jobType={jobType} />
|
) : (
|
||||||
) : (
|
<RepositoryLink name={repoName} jobType={jobType} />
|
||||||
<RepositoryLink name={repoName} jobType={jobType} />
|
)
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
) : (
|
) : (
|
||||||
<ControlledCollapse label={t('provisioning.job-status.label-view-details', 'View details')} isOpen={false}>
|
<ControlledCollapse label={t('provisioning.job-status.label-view-details', 'View details')} isOpen={false}>
|
||||||
<pre>{JSON.stringify(job, null, 2)}</pre>
|
<pre>{JSON.stringify(job, null, 2)}</pre>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Trans } from '@grafana/i18n';
|
import { Trans } from '@grafana/i18n';
|
||||||
import { LinkButton } from '@grafana/ui';
|
import { LinkButton, Stack } from '@grafana/ui';
|
||||||
import { RepositoryUrLs } from 'app/api/clients/provisioning/v0alpha1';
|
import { RepositoryUrLs } from 'app/api/clients/provisioning/v0alpha1';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -16,7 +16,7 @@ export function PullRequestButtons({ urls, jobType }: Props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Stack>
|
||||||
<LinkButton href={branchURL} icon="external-link-alt" variant="secondary" target="_blank">
|
<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>
|
<Trans i18nKey="provisioning.repository-link.delete-or-move-job.view-branch">View branch</Trans>
|
||||||
</LinkButton>
|
</LinkButton>
|
||||||
|
@ -26,6 +26,6 @@ export function PullRequestButtons({ urls, jobType }: Props) {
|
||||||
<LinkButton href={pullRequestURL} icon="external-link-alt" variant="secondary" target="_blank">
|
<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>
|
<Trans i18nKey="provisioning.repository-link.delete-or-move-job.open-pull-request">Open pull request</Trans>
|
||||||
</LinkButton>
|
</LinkButton>
|
||||||
</>
|
</Stack>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,12 +41,18 @@ export function RepositoryList({ items }: Props) {
|
||||||
<Alert title={''} severity="info">
|
<Alert title={''} severity="info">
|
||||||
<Trans
|
<Trans
|
||||||
i18nKey="provisioning.folder-repository-list.partial-managed"
|
i18nKey="provisioning.folder-repository-list.partial-managed"
|
||||||
count={resourceCount}
|
values={{ managedCount, resourceCount }}
|
||||||
values={{ managedCount }}
|
|
||||||
>
|
>
|
||||||
{{ managedCount }}/{{ count: resourceCount }} resources managed. {{ unmanagedCount }} resources
|
{{ managedCount }}/{{ resourceCount }} resources managed.
|
||||||
aren't managed as code yet.
|
|
||||||
</Trans>
|
</Trans>
|
||||||
|
{unmanagedCount > 0 && (
|
||||||
|
<>
|
||||||
|
{' '}
|
||||||
|
<Trans i18nKey="provisioning.folder-repository-list.unmanaged-resources" count={unmanagedCount}>
|
||||||
|
{{ count: unmanagedCount }} resources aren't managed as code yet.
|
||||||
|
</Trans>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Alert>
|
</Alert>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|
|
@ -11373,9 +11373,10 @@
|
||||||
"all-resources-managed_one": "All {{count}} resource is managed",
|
"all-resources-managed_one": "All {{count}} resource is managed",
|
||||||
"all-resources-managed_other": "All {{count}} resources are managed",
|
"all-resources-managed_other": "All {{count}} resources are managed",
|
||||||
"no-results-matching-your-query": "No results matching your query",
|
"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": "{{managedCount}}/{{resourceCount}} resources managed.",
|
||||||
"partial-managed_other": "{{managedCount}}/{{count}} resources managed. {{unmanagedCount}} resources aren't managed as code yet.",
|
"placeholder-search": "Search",
|
||||||
"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": {
|
"get-default-values": {
|
||||||
"title": {
|
"title": {
|
||||||
|
|
Loading…
Reference in New Issue