Add confirmation when try to shutdown jobs or servers (#103)
diff --git a/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/lang/en-US.js b/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/lang/en-US.js
index 86a223a..bd4472d 100644
--- a/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/lang/en-US.js
+++ b/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/lang/en-US.js
@@ -221,6 +221,9 @@
enable: 'Enable',
shutdown: 'Shutdown',
remove: 'Remove'
+ },
+ actionConfirm: {
+ shutdown: 'Are you sure to shutdown the job?'
}
},
operationServers: {
@@ -247,6 +250,9 @@
enable: 'Enable',
shutdown: 'Shutdown',
remove: 'Remove'
+ },
+ actionConfirm: {
+ shutdown: 'Are you sure to shutdown the server?'
}
},
historyTrace: {
diff --git a/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/lang/zh-CN.js b/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/lang/zh-CN.js
index 833fe0a..25bba01 100644
--- a/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/lang/zh-CN.js
+++ b/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/lang/zh-CN.js
@@ -221,6 +221,9 @@
enable: '生效',
shutdown: '终止',
remove: '删除'
+ },
+ actionConfirm: {
+ shutdown: '您确定要终止调度吗?'
}
},
operationServers: {
@@ -247,6 +250,9 @@
enable: '生效',
shutdown: '终止',
remove: '删除'
+ },
+ actionConfirm: {
+ shutdown: '您确定要下线服务器吗?'
}
},
historyTrace: {
diff --git a/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/views/operation-jobs/module/operationJobs.vue b/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/views/operation-jobs/module/operationJobs.vue
index cedbfc1..73bb37a 100644
--- a/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/views/operation-jobs/module/operationJobs.vue
+++ b/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/views/operation-jobs/module/operationJobs.vue
@@ -517,6 +517,9 @@
})
},
handleShutdown(row) {
+ if (!confirm(this.$t('operationJobs').actionConfirm.shutdown)) {
+ return
+ }
const params = {
jobName: row.jobName
}
diff --git a/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/views/operation-servers/module/operationServers.vue b/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/views/operation-servers/module/operationServers.vue
index aa72625..2cad2d4 100644
--- a/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/views/operation-servers/module/operationServers.vue
+++ b/shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-frontend/src/views/operation-servers/module/operationServers.vue
@@ -206,6 +206,9 @@
})
},
handleShutdown(row) {
+ if (!confirm(this.$t('operationServers').actionConfirm.shutdown)) {
+ return
+ }
const params = {
serverIp: row.serverIp
}