Skip to content
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
1 change: 1 addition & 0 deletions app/pages/ProjectsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default function ProjectsPage() {
onActivate: confirmDelete({
doDelete: () => deleteProject({ path: { project: project.name } }),
label: project.name,
resourceKind: 'project',
}),
},
],
Expand Down
1 change: 1 addition & 0 deletions app/pages/SiloAccessPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export default function SiloAccessPage() {
the <HL>{row.siloRole}</HL> role for <HL>{row.name}</HL>
</span>
),
resourceKind: 'role assignment',
extraContent:
row.id === me.id ? 'This will remove your own silo access.' : undefined,
}),
Expand Down
1 change: 1 addition & 0 deletions app/pages/SiloImagesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default function SiloImagesPage() {
onActivate: confirmDelete({
doDelete: () => deleteImage({ path: { image: image.name } }),
label: image.name,
resourceKind: 'image',
}),
},
],
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/access/ProjectAccessPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export default function ProjectAccessPage() {
the <HL>{row.projectRole}</HL> role for <HL>{row.name}</HL>
</span>
),
resourceKind: 'role assignment',
}),
disabled: !row.projectRole && "You don't have permission to delete this user",
},
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/disks/DisksPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export default function DisksPage() {
onActivate: confirmDelete({
doDelete: () => deleteDisk({ path: { disk: disk.name }, query: { project } }),
label: disk.name,
resourceKind: 'disk',
}),
disabled:
!diskCan.delete(disk) &&
Expand Down
3 changes: 2 additions & 1 deletion app/pages/project/external-subnets/ExternalSubnetsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function ExternalSubnetsPage() {
path: { externalSubnet: subnet.name },
query: { project },
}),
modalTitle: 'Detach External Subnet',
modalTitle: 'Detach external subnet',
modalContent: (
<p>
Are you sure you want to detach external subnet <HL>{subnet.name}</HL>
Expand Down Expand Up @@ -181,6 +181,7 @@ export default function ExternalSubnetsPage() {
query: { project },
}),
label: subnet.name,
resourceKind: 'external subnet',
}),
},
]
Expand Down
3 changes: 2 additions & 1 deletion app/pages/project/floating-ips/FloatingIpsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default function FloatingIpsPage() {
path: { floatingIp: floatingIp.name },
query: { project },
}),
modalTitle: 'Detach Floating IP',
modalTitle: 'Detach floating IP',
// instanceName! non-null because we only see this if there is an instance
modalContent: (
<p>
Expand Down Expand Up @@ -196,6 +196,7 @@ export default function FloatingIpsPage() {
query: { project },
}),
label: floatingIp.name,
resourceKind: 'floating IP',
}),
},
]
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/images/ImagesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default function ImagesPage() {
query: { project },
}),
label: image.name,
resourceKind: 'image',
}),
},
],
Expand Down
5 changes: 3 additions & 2 deletions app/pages/project/instances/NetworkingTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ export default function NetworkingTab() {
query: instanceSelector,
}),
label: nic.name,
resourceKind: 'network interface',
}),
disabled: deleteDisabledReason(),
},
Expand Down Expand Up @@ -511,7 +512,7 @@ export default function NetworkingTab() {
path: { externalSubnet: subnet.name },
query: { project },
}),
modalTitle: 'Detach External Subnet',
modalTitle: 'Detach external subnet',
modalContent: (
<p>
Are you sure you want to detach external subnet <HL>{subnet.name}</HL> from{' '}
Expand Down Expand Up @@ -586,7 +587,7 @@ export default function NetworkingTab() {
confirmAction({
actionType: 'danger',
doAction: doDetach,
modalTitle: `Confirm detach ${externalIp.kind} IP`,
modalTitle: `Detach ${externalIp.kind} IP`,
modalContent: (
<p>
Are you sure you want to detach {label} from <HL>{instanceName}</HL>? The
Expand Down
7 changes: 4 additions & 3 deletions app/pages/project/instances/StorageTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { CardBlock } from '~/ui/lib/CardBlock'
import { EMBody, EmptyMessage } from '~/ui/lib/EmptyMessage'
import { TableEmptyBox } from '~/ui/lib/Table'
import { links } from '~/util/links'
import { capitalize } from '~/util/str'

import { snapshotDisabledReason } from './common'

Expand Down Expand Up @@ -189,7 +190,7 @@ export default function StorageTab() {
},
}),
errorTitle: 'Could not unset boot disk',
modalTitle: 'Confirm unset boot disk',
modalTitle: 'Unset boot disk',
// TODO: copy + link to docs
modalContent: (
<div className="space-y-2">
Expand Down Expand Up @@ -254,7 +255,7 @@ export default function StorageTab() {
},
}),
errorTitle: `Could not ${verb} boot disk`,
modalTitle: `Confirm ${verb} boot disk`,
modalTitle: `${capitalize(verb)} boot disk`,
modalContent: bootDiskName ? (
<p>
Are you sure you want to change the boot disk to <HL>{disk.name}</HL>?
Expand Down Expand Up @@ -286,7 +287,7 @@ export default function StorageTab() {
doAction: () =>
detachDisk({ body: { disk: disk.name }, path: { instance: instance.id } }),
errorTitle: 'Could not detach disk',
modalTitle: 'Confirm detach disk',
modalTitle: 'Detach disk',
// prettier-ignore
modalContent: <p>Are you sure you want to detach <HL>{disk.name}</HL>?</p>,
actionType: 'danger',
Expand Down
6 changes: 3 additions & 3 deletions app/pages/project/instances/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const useMakeInstanceActions = (
// prettier-ignore
onSuccess: () => addToast(<>Starting instance <HL>{instance.name}</HL></>),
}),
modalTitle: 'Confirm start instance',
modalTitle: 'Start instance',
modalContent: (
<p>
Are you sure you want to start <HL>{instance.name}</HL>?
Expand All @@ -88,7 +88,7 @@ export const useMakeInstanceActions = (
// prettier-ignore
addToast(<>Stopping instance <HL>{instance.name}</HL></>),
}),
modalTitle: 'Confirm stop instance',
modalTitle: 'Stop instance',
modalContent: (
<div className="space-y-2">
<p>
Expand Down Expand Up @@ -128,7 +128,7 @@ export const useMakeInstanceActions = (
// prettier-ignore
addToast(<>Rebooting instance <HL>{instance.name}</HL></>),
}),
modalTitle: 'Confirm reboot instance',
modalTitle: 'Reboot instance',
modalContent: (
<p>
Are you sure you want to reboot <HL>{instance.name}</HL>?
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/snapshots/SnapshotsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default function SnapshotsPage() {
query: { project },
}),
label: snapshot.name,
resourceKind: 'snapshot',
}),
},
],
Expand Down
4 changes: 2 additions & 2 deletions app/pages/project/vpcs/RouterPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ export default function RouterPage() {
onActivate: () =>
confirmAction({
doAction: () => deleteRouterRoute({ path: { route: routerRoute.id } }),
errorTitle: 'Could not remove route',
modalTitle: 'Confirm remove route',
errorTitle: 'Could not delete route',
modalTitle: 'Delete route',
modalContent: (
<p>
Are you sure you want to delete route <HL>{routerRoute.name}</HL>?
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/vpcs/VpcFirewallRulesTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export default function VpcFirewallRulesTab() {
},
}),
label: rule.name,
resourceKind: 'firewall rule',
}),
},
]),
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/vpcs/VpcPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default function VpcPage() {
onSelect={confirmDelete({
doDelete: () => deleteVpc({ path: { vpc: vpcName }, query: { project } }),
label: vpcName,
resourceKind: 'VPC',
})}
className="destructive"
/>
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/vpcs/VpcRoutersTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export default function VpcRoutersTab() {
}),
extraContent: 'This will also delete any routes belonging to this router.',
label: router.name,
resourceKind: 'VPC router',
}),
disabled: router.kind === 'system' && routeFormMessage.noDeletingSystemRouters,
},
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/vpcs/VpcSubnetsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default function VpcSubnetsTab() {
onActivate: confirmDelete({
doDelete: () => deleteSubnet({ path: { subnet: subnet.id } }),
label: subnet.name,
resourceKind: 'VPC subnet',
}),
},
],
Expand Down
1 change: 1 addition & 0 deletions app/pages/project/vpcs/VpcsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export default function VpcsPage() {
onActivate: confirmDelete({
doDelete: () => deleteVpc({ path: { vpc: vpc.name }, query: { project } }),
label: vpc.name,
resourceKind: 'VPC',
}),
},
],
Expand Down
1 change: 1 addition & 0 deletions app/pages/settings/AccessTokensPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default function AccessTokensPage() {
onActivate: confirmDelete({
doDelete: () => deleteToken({ path: { tokenId: token.id } }),
label: token.id,
resourceKind: 'access token',
extraContent:
'This cannot be undone. Any application or instance of the Oxide CLI that depends on this token will need a new one.',
}),
Expand Down
1 change: 1 addition & 0 deletions app/pages/settings/SSHKeysPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default function SSHKeysPage() {
onActivate: confirmDelete({
doDelete: () => deleteSshKey({ path: { sshKey: sshKey.name } }),
label: sshKey.name,
resourceKind: 'SSH key',
}),
},
],
Expand Down
1 change: 1 addition & 0 deletions app/pages/system/FleetAccessPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export default function FleetAccessPage() {
the <HL>{row.fleetRole}</HL> role for <HL>{row.name}</HL>
</span>
),
resourceKind: 'role assignment',
extraContent:
row.id === me.id ? 'This will remove your own fleet access.' : undefined,
}),
Expand Down
2 changes: 1 addition & 1 deletion app/pages/system/UpdatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export default function UpdatePage() {
setTargetRelease({
body: { systemVersion: repo.systemVersion },
}),
modalTitle: 'Confirm set target release',
modalTitle: 'Set target release',
modalContent: (
<p>
Are you sure you want to set <HL>{repo.systemVersion}</HL>{' '}
Expand Down
10 changes: 6 additions & 4 deletions app/pages/system/networking/IpPoolPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import { ALL_ISH } from '~/util/consts'
import { docLinks } from '~/util/links'
import { pb } from '~/util/path-builder'
import type * as PP from '~/util/path-params'
import { capitalize } from '~/util/str'

const ipPoolView = ({ pool }: PP.IpPool) => q(api.systemIpPoolView, { path: { pool } })
const ipPoolUtilizationView = ({ pool }: PP.IpPool) =>
Expand Down Expand Up @@ -164,6 +165,7 @@ export default function IpPoolpage() {
onSelect={confirmDelete({
doDelete: () => deletePool({ path: { pool: pool.name } }),
label: pool.name,
resourceKind: 'IP pool',
})}
disabled={
!!ranges.items.length &&
Expand Down Expand Up @@ -256,7 +258,7 @@ function IpRangesTable() {
body: range,
}),
errorTitle: 'Could not remove range',
modalTitle: 'Confirm remove range',
modalTitle: 'Remove range',
modalContent: (
<p>
Are you sure you want to remove range{' '}
Expand Down Expand Up @@ -326,7 +328,7 @@ function LinkedSilosTable() {
path: { silo: link.siloId, pool: link.ipPoolId },
body: { isDefault: false },
}),
modalTitle: 'Confirm clear default',
modalTitle: 'Clear default',
modalContent: (
<p>
Are you sure you want <HL>{pool.name}</HL> to stop being the default{' '}
Expand Down Expand Up @@ -376,7 +378,7 @@ function LinkedSilosTable() {
path: { silo: link.siloId, pool: link.ipPoolId },
body: { isDefault: true },
}),
modalTitle: `Confirm ${verb} default`,
modalTitle: `${capitalize(verb)} default`,
modalContent,
errorTitle: `Could not ${verb} default`,
actionType: 'primary',
Expand All @@ -395,7 +397,7 @@ function LinkedSilosTable() {
confirmAction({
doAction: () =>
unlinkSilo({ path: { silo: link.siloId, pool: link.ipPoolId } }),
modalTitle: 'Confirm unlink silo',
modalTitle: 'Unlink silo',
modalContent: (
<p>
Are you sure you want to unlink {siloLabel} from <HL>{pool.name}</HL>? Users
Expand Down
1 change: 1 addition & 0 deletions app/pages/system/networking/IpPoolsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export default function IpPoolsPage() {
onActivate: confirmDelete({
doDelete: () => deletePool({ path: { pool: pool.name } }),
label: pool.name,
resourceKind: 'IP pool',
}),
},
],
Expand Down
10 changes: 6 additions & 4 deletions app/pages/system/networking/SubnetPoolPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import { ALL_ISH } from '~/util/consts'
import { docLinks } from '~/util/links'
import { pb } from '~/util/path-builder'
import type * as PP from '~/util/path-params'
import { capitalize } from '~/util/str'

const subnetPoolView = ({ subnetPool }: PP.SubnetPool) =>
q(api.systemSubnetPoolView, { path: { pool: subnetPool } })
Expand Down Expand Up @@ -127,6 +128,7 @@ export default function SubnetPoolPage() {
onSelect={confirmDelete({
doDelete: () => deletePool({ path: { pool: pool.name } }),
label: pool.name,
resourceKind: 'subnet pool',
})}
disabled={
!!members.items.length &&
Expand Down Expand Up @@ -218,7 +220,7 @@ function MembersTable() {
body: { subnet: member.subnet },
}),
errorTitle: 'Could not remove member',
modalTitle: 'Confirm remove member',
modalTitle: 'Remove member',
modalContent: (
<p>
Are you sure you want to remove subnet <HL>{member.subnet}</HL> from the
Expand Down Expand Up @@ -318,7 +320,7 @@ function LinkedSilosTable() {
path: { silo: link.siloId, pool: link.subnetPoolId },
body: { isDefault: false },
}),
modalTitle: 'Confirm clear default',
modalTitle: 'Clear default',
modalContent: (
<p>
Are you sure you want <HL>{pool.name}</HL> to stop being the default{' '}
Expand Down Expand Up @@ -358,7 +360,7 @@ function LinkedSilosTable() {
path: { silo: link.siloId, pool: link.subnetPoolId },
body: { isDefault: true },
}),
modalTitle: `Confirm ${verb} default`,
modalTitle: `${capitalize(verb)} default`,
modalContent,
errorTitle: `Could not ${verb} default`,
actionType: 'primary',
Expand All @@ -376,7 +378,7 @@ function LinkedSilosTable() {
confirmAction({
doAction: () =>
unlinkSilo({ path: { silo: link.siloId, pool: link.subnetPoolId } }),
modalTitle: 'Confirm unlink silo',
modalTitle: 'Unlink silo',
modalContent: (
<p>
Are you sure you want to unlink {siloLabel} from <HL>{pool.name}</HL>? Users
Expand Down
1 change: 1 addition & 0 deletions app/pages/system/networking/SubnetPoolsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default function SubnetPoolsPage() {
onActivate: confirmDelete({
doDelete: () => deletePool({ path: { pool: pool.name } }),
label: pool.name,
resourceKind: 'subnet pool',
}),
},
],
Expand Down
Loading
Loading