From 62204d18952b5175e4cc7be72f9dc3886a241d62 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Mon, 11 Sep 2023 21:47:08 +0300 Subject: [PATCH 1/2] Make some of the delete confirmation dialogs nicer Mostly removed unnecessary spaces before question marks. Signed-off-by: Yarden Shoham --- src/components/Replica/Replica.js | 2 +- src/routes/backingImage/BackingImageActions.js | 2 +- src/routes/engineimage/EngineImageActions.js | 2 +- src/routes/host/DiskActions.js | 2 +- src/routes/host/HostActions.js | 2 +- src/routes/host/ReplicaList.js | 2 +- src/routes/orphanedData/orphanedDataActions.js | 2 +- src/routes/recurringJob/RecurringJobActions.js | 2 +- src/routes/systemBackups/systemBackupsAction.js | 2 +- src/routes/volume/VolumeActions.js | 4 ++-- src/routes/volume/detail/RecurringJobActions.js | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/Replica/Replica.js b/src/components/Replica/Replica.js index 87199826..a6d08b92 100644 --- a/src/components/Replica/Replica.js +++ b/src/components/Replica/Replica.js @@ -19,7 +19,7 @@ class Replica extends React.Component { switch (event.key) { case 'delete': confirm({ - title: `Are you sure you want to delete replica ${record.name} ?`, + title: `Are you sure you want to delete replica ${record.name}?`, onOk() { deleteReplicas([record]) }, diff --git a/src/routes/backingImage/BackingImageActions.js b/src/routes/backingImage/BackingImageActions.js index 004f783c..66f83149 100644 --- a/src/routes/backingImage/BackingImageActions.js +++ b/src/routes/backingImage/BackingImageActions.js @@ -9,7 +9,7 @@ function actions({ selected, deleteBackingImage, cleanUpDiskMap, downloadBacking switch (event.key) { case 'delete': confirm({ - title: `Are you sure you want to delete backing image ${record.name} ?`, + title: `Are you sure you want to delete backing image ${record.name}?`, onOk() { deleteBackingImage(record) }, diff --git a/src/routes/engineimage/EngineImageActions.js b/src/routes/engineimage/EngineImageActions.js index ba24cde3..16a6f733 100644 --- a/src/routes/engineimage/EngineImageActions.js +++ b/src/routes/engineimage/EngineImageActions.js @@ -9,7 +9,7 @@ function actions({ selected, deleteEngineImage }) { switch (event.key) { case 'delete': confirm({ - title: `Are you sure you want to delete engine image ${record.name} ?`, + title: `Are you sure you want to delete engine image ${record.name}?`, onOk() { deleteEngineImage(record) }, diff --git a/src/routes/host/DiskActions.js b/src/routes/host/DiskActions.js index 9e13fd5c..c1ae5e09 100644 --- a/src/routes/host/DiskActions.js +++ b/src/routes/host/DiskActions.js @@ -16,7 +16,7 @@ function actions({ node, selected, updateDisk }) { } case 'delete': confirm({ - title: `Are you sure you want to delete disk which mounted on ${record.path}`, + title: `Are you sure you want to delete the disk that's mounted on ${record.path}?`, onOk() { const disks = Object.keys(node.disks) .filter(id => record.id !== id) diff --git a/src/routes/host/HostActions.js b/src/routes/host/HostActions.js index 316e8158..d3182bd6 100644 --- a/src/routes/host/HostActions.js +++ b/src/routes/host/HostActions.js @@ -13,7 +13,7 @@ function actions({ selected, showEditDisksModal, deleteHost }) { break case 'deleteHost': confirm({ - title: `Are you sure you want to delete node ${selected.name} ?`, + title: `Are you sure you want to delete node ${selected.name}?`, onOk() { deleteHost(record) }, diff --git a/src/routes/host/ReplicaList.js b/src/routes/host/ReplicaList.js index 27505f7b..aabf1dcf 100644 --- a/src/routes/host/ReplicaList.js +++ b/src/routes/host/ReplicaList.js @@ -9,7 +9,7 @@ function list({ dataSource, deleteReplicas, rowSelection }) { switch (event.key) { case 'delete': confirm({ - title: `Are you sure you want to delete replica ${record.name} ?`, + title: `Are you sure you want to delete replica ${record.name}?`, onOk() { deleteReplicas([record]) }, diff --git a/src/routes/orphanedData/orphanedDataActions.js b/src/routes/orphanedData/orphanedDataActions.js index 11eb7059..7c98acd5 100644 --- a/src/routes/orphanedData/orphanedDataActions.js +++ b/src/routes/orphanedData/orphanedDataActions.js @@ -9,7 +9,7 @@ function actions({ selected, deleteOrphanedData }) { switch (event.key) { case 'delete': confirm({ - title: `Are you sure you want to delete ${record.name} ?`, + title: `Are you sure you want to delete ${record.name}?`, width: 560, onOk() { deleteOrphanedData(record) diff --git a/src/routes/recurringJob/RecurringJobActions.js b/src/routes/recurringJob/RecurringJobActions.js index 3838ac38..77f2f196 100644 --- a/src/routes/recurringJob/RecurringJobActions.js +++ b/src/routes/recurringJob/RecurringJobActions.js @@ -9,7 +9,7 @@ function actions({ selected, deleteRecurringJob, editRecurringJob }) { switch (event.key) { case 'delete': confirm({ - title: `Are you sure you want to delete Recurring Job ${record.name} ?`, + title: `Are you sure you want to delete Recurring Job ${record.name}?`, content: Date: Tue, 24 Oct 2023 09:56:19 +0000 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Volker Theile Signed-off-by: Yarden Shoham --- src/routes/host/DiskActions.js | 2 +- src/routes/volume/VolumeActions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/host/DiskActions.js b/src/routes/host/DiskActions.js index c1ae5e09..652c0edf 100644 --- a/src/routes/host/DiskActions.js +++ b/src/routes/host/DiskActions.js @@ -16,7 +16,7 @@ function actions({ node, selected, updateDisk }) { } case 'delete': confirm({ - title: `Are you sure you want to delete the disk that's mounted on ${record.path}?`, + title: `Are you sure you want to delete the disk that is mounted on ${record.path}?`, onOk() { const disks = Object.keys(node.disks) .filter(id => record.id !== id) diff --git a/src/routes/volume/VolumeActions.js b/src/routes/volume/VolumeActions.js index dd9a876c..238062e6 100644 --- a/src/routes/volume/VolumeActions.js +++ b/src/routes/volume/VolumeActions.js @@ -141,7 +141,7 @@ function actions({ break case 'trimFilesystem': confirm({ - title: 'Are you sure you want to trim the fileystem?', + title: 'Are you sure you want to trim the filesystem?', onOk() { trimFilesystem(record) },