E2C: Add a 'supported types' disclosure to the bottom of the resources table (#91475)

This commit is contained in:
Josh Hunt 2024-08-02 14:17:14 +01:00 committed by GitHub
parent 5376a2eb93
commit c070b39dae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 34 additions and 8 deletions

View File

@ -23,6 +23,7 @@ import { EmptyState } from './EmptyState/EmptyState';
import { MigrationSummary } from './MigrationSummary';
import { ResourcesTable } from './ResourcesTable';
import { BuildSnapshotCTA, CreatingSnapshotCTA } from './SnapshotCTAs';
import { SupportedTypesDisclosure } from './SupportedTypesDisclosure';
/**
* Here's how migrations work:
@ -231,12 +232,15 @@ export const Page = () => {
)}
{snapshot.data?.results && snapshot.data.results.length > 0 && (
<ResourcesTable
resources={snapshot.data.results}
onChangePage={setPage}
numberOfPages={Math.ceil((snapshot?.data?.stats?.total || 0) / PAGE_SIZE)}
page={page}
/>
<Stack gap={4} direction="column">
<ResourcesTable
resources={snapshot.data.results}
onChangePage={setPage}
numberOfPages={Math.ceil((snapshot?.data?.stats?.total || 0) / PAGE_SIZE)}
page={page}
/>
<SupportedTypesDisclosure />
</Stack>
)}
</Stack>

View File

@ -36,8 +36,9 @@ export function ResourcesTable({ resources, numberOfPages = 0, onChangePage, pag
return (
<>
<InteractiveTable columns={columns} data={data} getRowId={(r) => r.refId} />
<Stack justifyContent={'flex-end'}>
<Stack alignItems="flex-end" direction="column">
<InteractiveTable columns={columns} data={data} getRowId={(r) => r.refId} />
<Pagination numberOfPages={numberOfPages} currentPage={page} onNavigate={onChangePage} />
</Stack>

View File

@ -0,0 +1,15 @@
import { Text, TextLink } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
export function SupportedTypesDisclosure() {
return (
<Text color="secondary" textAlignment="center">
<Trans i18nKey="migrate-to-cloud.support-types-disclosure.text">
Dashboards, Folders, and built-in core data sources are migrated to your Grafana Cloud stack.{' '}
<TextLink external href="https://grafana.com/docs/grafana-cloud/account-management/migration-guide">
Learn about migrating other settings.
</TextLink>
</Trans>
</Text>
);
}

View File

@ -1175,6 +1175,9 @@
"total-resource-count": "Total resources",
"upload-migration": "Upload snapshot"
},
"support-types-disclosure": {
"text": "Dashboards, Folders, and built-in core data sources are migrated to your Grafana Cloud stack. <2>Learn about migrating other settings.</2>"
},
"token-status": {
"active": "Token created and active",
"no-active": "No active token",

View File

@ -1175,6 +1175,9 @@
"total-resource-count": "Ŧőŧäľ řęşőūřčęş",
"upload-migration": "Ůpľőäđ şʼnäpşĥőŧ"
},
"support-types-disclosure": {
"text": "Đäşĥþőäřđş, Főľđęřş, äʼnđ þūįľŧ-įʼn čőřę đäŧä şőūřčęş äřę mįģřäŧęđ ŧő yőūř Ğřäƒäʼnä Cľőūđ şŧäčĸ. <2>Ŀęäřʼn äþőūŧ mįģřäŧįʼnģ őŧĥęř şęŧŧįʼnģş.</2>"
},
"token-status": {
"active": "Ŧőĸęʼn čřęäŧęđ äʼnđ äčŧįvę",
"no-active": "Ńő äčŧįvę ŧőĸęʼn",