Skip to content

Commit 625ea0c

Browse files
committed
Merge branch 'dle-4-0-ui-fixes' into 'dle-4-0'
fix(ui): dle-4-0 UI adjustments and minor fixes See merge request postgres-ai/database-lab!997
2 parents afd82c2 + a3d7e04 commit 625ea0c

File tree

15 files changed

+98
-74
lines changed

15 files changed

+98
-74
lines changed

ui/packages/shared/components/DestroyCloneModal/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export const DestroyCloneModal = (props: Props) => {
2828
}
2929

3030
return (
31-
<Modal title={`Destroy clone ${cloneId}`} onClose={onClose} isOpen={isOpen}>
31+
<Modal title={`Delete clone ${cloneId}`} onClose={onClose} isOpen={isOpen}>
3232
<Text>
33-
Are you sure you want to destroy clone{' '}
33+
Are you sure you want to delete clone{' '}
3434
<ImportantText>{cloneId}</ImportantText>? This action cannot be undone.
3535
</Text>
3636

@@ -41,7 +41,7 @@ export const DestroyCloneModal = (props: Props) => {
4141
onClick: onClose,
4242
},
4343
{
44-
text: 'Destroy clone',
44+
text: 'Delete clone',
4545
variant: 'primary',
4646
onClick: handleClickDestroy,
4747
},

ui/packages/shared/components/DestroyCloneRestrictionModal/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ export const DestroyCloneRestrictionModal = observer((props: Props) => {
2525
const { isOpen, onClose, cloneId, clonePagePath } = props
2626

2727
return (
28-
<Modal title="Cannot destroy clone" isOpen={isOpen} onClose={onClose}>
28+
<Modal title="Cannot delete clone" isOpen={isOpen} onClose={onClose}>
2929
<Text>
30-
Cannot destroy clone <ImportantText>{cloneId}</ImportantText> because
30+
Cannot delete clone <ImportantText>{cloneId}</ImportantText> because
3131
deletion protection is enabled. You can disable deletion protection on{' '}
3232
{clonePagePath ? (
3333
<Link to={clonePagePath}>the clone page</Link>

ui/packages/shared/pages/Branches/Branch/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ export const BranchesPage = observer((props: Props) => {
219219
color="primary"
220220
onClick={() => setIsOpenDestroyModal(true)}
221221
disabled={isReloading}
222-
title={'Destroy this branch'}
222+
title={'Delete this branch'}
223223
className={classes.actionButton}
224224
>
225-
Destroy branch
225+
Delete branch
226226
</Button>
227227
<Button
228228
variant="outlined"
@@ -362,10 +362,10 @@ export const BranchesPage = observer((props: Props) => {
362362
className={classes.marginTop}
363363
tag="h2"
364364
level={2}
365-
text={'Destroy branch using CLI'}
365+
text={'Delete branch using CLI'}
366366
/>
367367
<p className={classes.cliText}>
368-
You can destroy this branch using CLI. To do this, run the command
368+
You can delete this branch using CLI. To do this, run the command
369369
below:
370370
</p>
371371
<SyntaxHighlight content={`dblab branch delete ${props.branchId}`} />

ui/packages/shared/pages/Branches/components/BranchesTable/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export const BranchesTable = ({
156156
onClick: () => copy(branch.snapshotID),
157157
},
158158
{
159-
name: 'Destroy branch',
159+
name: 'Delete branch',
160160
onClick: () => {
161161
setBranchId(branch.name)
162162
setIsOpenDestroyModal(true)

ui/packages/shared/pages/Branches/components/Modals/DeleteBranchModal/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const DeleteBranchModal = ({
6060
return (
6161
<Modal title="Confirmation" onClose={handleClose} isOpen={isOpen} size="xs">
6262
<Text>
63-
Are you sure you want to destroy branch{' '}
63+
Are you sure you want to delete branch{' '}
6464
<ImportantText>{branchName}</ImportantText>? This action cannot be
6565
undone.
6666
</Text>
@@ -72,7 +72,7 @@ export const DeleteBranchModal = ({
7272
onClick: handleClose,
7373
},
7474
{
75-
text: 'Destroy branch',
75+
text: 'Delete branch',
7676
variant: 'primary',
7777
onClick: handleDelete,
7878
isDisabled: branchName === 'main',

ui/packages/shared/pages/Clone/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,10 @@ export const Clone = observer((props: Props) => {
335335
color="primary"
336336
onClick={requestDestroyClone}
337337
disabled={isDisabledControls}
338-
title={'Destroy this clone'}
338+
title={'Delete this clone'}
339339
className={classes.actionButton}
340340
>
341-
Destroy clone
341+
Delete clone
342342
{isDestroyingClone && (
343343
<Spinner size="sm" className={classes.spinner} />
344344
)}
@@ -348,7 +348,7 @@ export const Clone = observer((props: Props) => {
348348
color="primary"
349349
onClick={createSnapshot}
350350
disabled={isDisabledControls}
351-
title={'Destroy this clone'}
351+
title={'Delete this clone'}
352352
className={classes.actionButton}
353353
>
354354
Create snapshot
@@ -627,12 +627,12 @@ export const Clone = observer((props: Props) => {
627627
/>
628628
<br />
629629
<span className={classes.remark}>
630-
When enabled, no one can destroy this clone and automated deletion
630+
When enabled, no one can delete this clone and automated deletion
631631
is also disabled.
632632
<br />
633633
Please be careful: abandoned clones with this checkbox enabled may
634634
cause out-of-disk-space events. Check disk space on daily basis
635-
and destroy this clone once the work is done.
635+
and delete this clone once the work is done.
636636
</span>
637637
</p>
638638
{stores.main.updateCloneError && (
@@ -655,10 +655,10 @@ export const Clone = observer((props: Props) => {
655655
className={classes.title}
656656
tag="h2"
657657
level={2}
658-
text={'Destroy clone using CLI'}
658+
text={'Delete clone using CLI'}
659659
/>
660660
<p className={classes.tooltip}>
661-
You can destroy the clone using CLI using the following command:
661+
You can delete the clone using CLI using the following command:
662662
</p>
663663
<SyntaxHighlight content={getCliDestroyCloneCommand(props.cloneId)} />
664664

ui/packages/shared/pages/CreateClone/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,12 @@ export const CreateClone = observer((props: Props) => {
309309
/>
310310

311311
<p className={styles.remark}>
312-
When enabled, no one can destroy this clone and automated deletion
312+
When enabled, no one can delete this clone and automated deletion
313313
is also disabled.
314314
<br />
315315
Please be careful: abandoned clones with this checkbox enabled may
316-
cause out-of-disk-space events. Check disk space on daily basis
317-
and destroy this clone once the work is done.
316+
cause out-of-disk-space events. Check disk space on a daily basis
317+
and delete this clone once the work is done.
318318
</p>
319319
</div>
320320

ui/packages/shared/pages/Instance/Clones/ClonesList/MenuCell/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const MenuCell = observer((props: Props) => {
6161
onClick: () => onConnect(clone.id),
6262
},
6363
{
64-
name: 'Destroy clone',
64+
name: 'Delete clone',
6565
onClick: handleClickDestroyClone,
6666
},
6767
{

ui/packages/shared/pages/Instance/Clones/ClonesList/MenuCell/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
export const destroyRestriction = (cloneId: string) => {
9-
const message = `The clone "${cloneId}" is marked as protected. To destroy it, disable the destroy protection first.`
9+
const message = `The clone "${cloneId}" is marked as protected. To delete it, disable the delete protection first.`
1010
window.alert(message)
1111
}
1212

@@ -16,6 +16,6 @@ export const getResetApprove = (cloneId: string) => {
1616
}
1717

1818
export const getDestroyApprove = (cloneId: string) => {
19-
const message = `Are you sure you want to destroy the Database Lab clone: "${cloneId}"?`
19+
const message = `Are you sure you want to delete the Database Lab clone: "${cloneId}"?`
2020
return window.confirm(message)
2121
}

ui/packages/shared/pages/Instance/Snapshots/components/SnapshotsList/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const SnapshotListItem = ({
186186
onClick: () => openClonesModal(),
187187
},
188188
{
189-
name: 'Destroy snapshot',
189+
name: 'Delete snapshot',
190190
onClick: () =>
191191
setSnapshotModal({
192192
isOpen: true,
@@ -267,7 +267,7 @@ export const SnapshotsList = observer(
267267
onClose={() => setSnapshotModal({ isOpen: false, snapshotId: '' })}
268268
snapshotId={snapshotModal.snapshotId}
269269
instanceId={instanceId}
270-
afterSubmitClick={() => window.location.reload()}
270+
afterSubmitClick={() => stores.main.load(instanceId)}
271271
destroySnapshot={stores.main.destroySnapshot as DestroySnapshot}
272272
/>
273273
)}

0 commit comments

Comments
 (0)