Skip to content

Commit

Permalink
Basic mockup of sourceselection page
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Dec 6, 2024
1 parent 4b1fb52 commit 13c4261
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 3 deletions.
80 changes: 80 additions & 0 deletions frontend/app/migration/create/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,91 @@
'use client';
import * as React from 'react';
import Header from '@cloudscape-design/components/header';
import SpaceBetween from '@cloudscape-design/components/space-between';
import {
Button,
Checkbox,
Container,
Form,
RadioGroup
} from '@cloudscape-design/components';
import { CheckboxWrapper } from '@cloudscape-design/components/test-utils/dom';
import Head from 'next/head';

export default function Page() {
const [sourceChoice, setSource] = React.useState("endpoint");
const [authType, setAuthType] = React.useState("none");

return (
<SpaceBetween size="m">
<Header variant="h1">Create a migration</Header>

<Container>
<form onSubmit={(e) => e.preventDefault()}>
<Form
actions={
<SpaceBetween direction="horizontal" size="xs">
<Button formAction="none" variant="link">
Cancel
</Button>
<Button variant="primary">Submit</Button>
</SpaceBetween>
}
header={<Header variant="h1">Select Source</Header>}
>
<SpaceBetween direction="vertical" size="l">
<Container header={<Header variant="h2">Source Type</Header>}>
<RadioGroup
onChange={({ detail }) => setSource(detail.value)}
value={sourceChoice}
items={[
{
value: "endpoint",
label: "Endpoint",
description: "An online source cluster that can receive requests"
},
{
value: "snapshot",
label: "Snapshot",
description: "A snapshot created on a source cluster."
},
{
value: "template",
label: "Template",
description: "Load data from an previous migration session."
}
]}
/>
</Container>
<Container header={<Header variant='h2'>Endpoint Authentication</Header>}>
<RadioGroup
onChange={({ detail }) => setSource(detail.value)}
value={sourceChoice}
items={[
{
value: "none",
label: "No Authentication",
description: "The cluster does not check for authentication."
},
{
value: "username",
label: "Username/Password",
description: "The cluster accepts username and password, also called HTTP Basic Authentication."
},
{
value: "sigv4",
label: "AWS Sigv4",
description: "The cluster accepts requests signed with AWS Sigv4."
}
]}
/>
</Container>
</SpaceBetween>


</Form>
</form>
</Container>
</SpaceBetween>
);
}
3 changes: 0 additions & 3 deletions frontend/pages/home.tsx

This file was deleted.

0 comments on commit 13c4261

Please sign in to comment.