Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs popover for SSH Keys #2370

Merged
merged 5 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading