Skip to content

Commit

Permalink
Add docs link to silo create form, "SAML JIT" -> "SAML" (#2314)
Browse files Browse the repository at this point in the history
add docs link to silo create form, SAML JIT -> SAML
  • Loading branch information
david-crespo authored Jul 3, 2024
1 parent 01d6158 commit e8bf056
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
22 changes: 21 additions & 1 deletion app/forms/silo-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { SideModalForm } from '~/components/form/SideModalForm'
import { useForm } from '~/hooks'
import { addToast } from '~/stores/toast'
import { FormDivider } from '~/ui/lib/Divider'
import { Message } from '~/ui/lib/Message'
import { pb } from '~/util/path-builder'
import { GiB } from '~/util/units'

Expand Down Expand Up @@ -102,6 +103,7 @@ export function CreateSiloSideModalForm() {
loading={createSilo.isPending}
submitError={createSilo.error}
>
<Message variant="info" content={<HelpMessage />} />
<NameField name="name" control={form.control} />
<DescriptionField name="description" control={form.control} />
<CheckboxField name="discoverable" control={form.control}>
Expand Down Expand Up @@ -139,7 +141,7 @@ export function CreateSiloSideModalForm() {
column
control={form.control}
items={[
{ value: 'saml_jit', label: 'SAML JIT' },
{ value: 'saml_jit', label: 'SAML' },
{ value: 'local_only', label: 'Local only' },
]}
/>
Expand All @@ -164,3 +166,21 @@ export function CreateSiloSideModalForm() {
</SideModalForm>
)
}

function HelpMessage() {
return (
<>
Read the{' '}
<a
href="https://docs.oxide.computer/guides/operator/silo-management"
// don't need color and hover color because message text is already color-info anyway
className="underline"
target="_blank"
rel="noreferrer"
>
Silo Management
</a>{' '}
guide to learn more.
</>
)
}
1 change: 1 addition & 0 deletions app/ui/lib/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const linkColor: Record<Variant, string> = {

export const Message = ({
title,
// TODO: convert content to a children prop
content,
className,
variant = 'success',
Expand Down

0 comments on commit e8bf056

Please sign in to comment.