Skip to content

Commit

Permalink
Merge pull request #650 from yardenshoham/nicer
Browse files Browse the repository at this point in the history
Make some of the delete confirmation dialogs nicer
  • Loading branch information
votdev authored Oct 25, 2023
2 parents 1b2b2db + 92eb68c commit edba105
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Replica/Replica.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])
},
Expand Down
2 changes: 1 addition & 1 deletion src/routes/backingImage/BackingImageActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
Expand Down
2 changes: 1 addition & 1 deletion src/routes/engineimage/EngineImageActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
Expand Down
2 changes: 1 addition & 1 deletion src/routes/host/DiskActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 is mounted on ${record.path}?`,
onOk() {
const disks = Object.keys(node.disks)
.filter(id => record.id !== id)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/host/HostActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
Expand Down
2 changes: 1 addition & 1 deletion src/routes/host/ReplicaList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])
},
Expand Down
2 changes: 1 addition & 1 deletion src/routes/orphanedData/orphanedDataActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/recurringJob/RecurringJobActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: <Alert
description={`If the recurring job ${record.name} is the last one of a job group, Longhorn will remove the group from all volumes automatically.`}
type="warning"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/systemBackups/systemBackupsAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function actions({ selected, deleteSystemBackup, createSystemRestore }) {
switch (event.key) {
case 'delete':
confirm({
title: `Are you sure you want to delete System Backup ${record.name} ?`,
title: `Are you sure you want to delete System Backup ${record.name}?`,
onOk() {
deleteSystemBackup({ name: record.id })
},
Expand Down
4 changes: 2 additions & 2 deletions src/routes/volume/VolumeActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function actions({
break
case 'rollback':
confirm({
title: `Are you sure you want to rollback volume ${record.name} ?`,
title: `Are you sure you want to rollback volume ${record.name}?`,
onOk() {
rollback(record)
},
Expand Down Expand Up @@ -141,7 +141,7 @@ function actions({
break
case 'trimFilesystem':
confirm({
title: 'Are you sure you want to trim Fileystem ?',
title: 'Are you sure you want to trim the filesystem?',
onOk() {
trimFilesystem(record)
},
Expand Down
2 changes: 1 addition & 1 deletion src/routes/volume/detail/RecurringJobActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function actions({ selected, deleteVolumeRecurringJob, editRecurringJob, isGroup
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}?`,
onOk() {
deleteVolumeRecurringJob(record)
},
Expand Down

0 comments on commit edba105

Please sign in to comment.