Merge pull request #563 from jumpserver/pr@dev@fix_test_storage_notify

fix: 统一测试存储时的命令提醒
This commit is contained in:
老广
2021-01-06 14:33:14 +08:00
committed by GitHub
2 changed files with 6 additions and 14 deletions

View File

@@ -73,15 +73,11 @@ export default {
type: 'primary', type: 'primary',
callback: function({ row, col, cellValue, reload }) { callback: function({ row, col, cellValue, reload }) {
TestCommandStorage(cellValue).then(data => { TestCommandStorage(cellValue).then(data => {
let success = 'success'
if (!data.is_valid) { if (!data.is_valid) {
success = 'error' this.$message.error(data.msg)
} else {
this.$message.success(data.msg)
} }
this.$notify({
message: data.msg,
type: success,
duration: 4500
})
}) })
} }
} }

View File

@@ -94,15 +94,11 @@ export default {
type: 'primary', type: 'primary',
callback: function({ row, col, cellValue, reload }) { callback: function({ row, col, cellValue, reload }) {
TestReplayStorage(cellValue).then(data => { TestReplayStorage(cellValue).then(data => {
let success = 'success'
if (!data.is_valid) { if (!data.is_valid) {
success = 'error' this.$message.error(data.msg)
} else {
this.$message.success(data.msg)
} }
this.$notify({
message: data.msg,
type: success,
duration: 4500
})
}) })
} }
} }