Skip to content

Commit

Permalink
Add docs popover for SSH Keys (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliepark authored Aug 14, 2024
1 parent af6c1f4 commit b6ed375
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/pages/settings/SSHKeysPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Link, Outlet, useNavigate } from 'react-router-dom'
import { apiQueryClient, useApiMutation, useApiQueryClient, type SshKey } from '@oxide/api'
import { Key16Icon, Key24Icon } from '@oxide/design-system/icons/react'

import { DocsPopover } from '~/components/DocsPopover'
import { confirmDelete } from '~/stores/confirm-delete'
import { addToast } from '~/stores/toast'
import { useColsWithActions, type MenuAction } from '~/table/columns/action-col'
Expand All @@ -21,6 +22,7 @@ import { buttonStyle } from '~/ui/lib/Button'
import { EmptyMessage } from '~/ui/lib/EmptyMessage'
import { PageHeader, PageTitle } from '~/ui/lib/PageHeader'
import { TableActions } from '~/ui/lib/Table'
import { docLinks } from '~/util/links'
import { pb } from '~/util/path-builder'

SSHKeysPage.loader = async () => {
Expand Down Expand Up @@ -79,6 +81,12 @@ export function SSHKeysPage() {
<>
<PageHeader>
<PageTitle icon={<Key24Icon />}>SSH Keys</PageTitle>
<DocsPopover
heading="SSH keys"
icon={<Key16Icon />}
summary="SSH keys are used to securely access VM instances."
links={[docLinks.sshKeys]}
/>
</PageHeader>
<TableActions>
<Link className={buttonStyle({ size: 'sm' })} to={pb.sshKeysNew()}>
Expand Down
5 changes: 5 additions & 0 deletions app/util/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const links = {
'https://docs.oxide.computer/guides/architecture/service-processors#_server_sled',
snapshotsDocs:
'https://docs.oxide.computer/guides/managing-disks-and-snapshots#_snapshots',
sshKeysDocs: 'https://docs.oxide.computer/guides/user-settings#_ssh_keys',
storageDocs:
'https://docs.oxide.computer/guides/architecture/os-hypervisor-storage#_storage',
systemIpPoolsDocs: 'https://docs.oxide.computer/guides/operator/ip-pool-management',
Expand Down Expand Up @@ -86,6 +87,10 @@ export const docLinks = {
href: links.snapshotsDocs,
linkText: 'Disks and Snapshots',
},
sshKeys: {
href: links.sshKeysDocs,
linkText: 'SSH Keys',
},
storage: {
href: links.storageDocs,
linkText: 'Storage',
Expand Down

0 comments on commit b6ed375

Please sign in to comment.