Skip to content

Commit

Permalink
style(task): add warning message when host list is null
Browse files Browse the repository at this point in the history
  • Loading branch information
noovertime7 committed Oct 20, 2022
1 parent 9ab6b91 commit c8ff288
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions front/src/views/cluster/task/elastic/table/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,9 @@ clear: () => {
'type': 2
}
GetHostNames(query).then((res) => {
if (res.data.hosts === null) {
this.$message.error('当前服务为空请先添加主机,页面加载失败!')
if (res.data.list === null) {
this.$message.warn('当前应用列表为空,请先添加ElasticSearch应用')
this.$router.push('/cluster/app')
}
this.host_list = res.data.list
if (this.hostByEdit !== '' || undefined) {
Expand Down
6 changes: 4 additions & 2 deletions front/src/views/cluster/task/mysql/table/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,10 @@ clear: () => {
'type': 1
}
GetHostNames(query).then((res) => {
if (res.data.hosts === null) {
this.$message.error('当前服务为空请先添加主机,页面加载失败!')
console.log(res.data)
if (res.data.list === null) {
this.$message.warn('当前应用列表为空,请先添加Mysql应用')
this.$router.push('/cluster/app')
}
this.host_list = res.data.list
if (this.hostByEdit !== '' || undefined) {
Expand Down

0 comments on commit c8ff288

Please sign in to comment.