正在显示
1 个修改的文件
包含
16 行增加
和
4 行删除
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | <el-table-column label="端口号" prop="port" align="center" width="100"></el-table-column> | 39 | <el-table-column label="端口号" prop="port" align="center" width="100"></el-table-column> |
| 40 | <el-table-column label="状态" prop="elasticsearchState" align="center" width="100"> | 40 | <el-table-column label="状态" prop="elasticsearchState" align="center" width="100"> |
| 41 | <template slot-scope="scope"> | 41 | <template slot-scope="scope"> |
| 42 | - <span v-if="scope.row.elasticsearchState ===true" style="color: #32ff7e"> | 42 | + <span v-if="scope.row.elasticsearchState ===true" style="color: #3742fa"> |
| 43 | 运行状态 | 43 | 运行状态 |
| 44 | </span> | 44 | </span> |
| 45 | <span v-if="scope.row.elasticsearchState ===false" style="color: #eb2f06"> | 45 | <span v-if="scope.row.elasticsearchState ===false" style="color: #eb2f06"> |
| @@ -519,6 +519,11 @@ | @@ -519,6 +519,11 @@ | ||
| 519 | }).then((response) => { | 519 | }).then((response) => { |
| 520 | return response.json(); | 520 | return response.json(); |
| 521 | }).then((data) => { | 521 | }).then((data) => { |
| 522 | + if (data.cluster_name === undefined || data.name === undefined || | ||
| 523 | + data.cluster_name === null || data.cluster_name === '' | ||
| 524 | + || data.name === null || data.name === '') { | ||
| 525 | + return this.$message.error("这并不是ES配置,请仔细检查"); | ||
| 526 | + } | ||
| 522 | this.es_addForm.clusterName = data.cluster_name; | 527 | this.es_addForm.clusterName = data.cluster_name; |
| 523 | this.es_addForm.elasticsearchName = data.name; | 528 | this.es_addForm.elasticsearchName = data.name; |
| 524 | this.addESInfo(); | 529 | this.addESInfo(); |
| @@ -656,12 +661,19 @@ | @@ -656,12 +661,19 @@ | ||
| 656 | } | 661 | } |
| 657 | }).then((response) => { | 662 | }).then((response) => { |
| 658 | if (response.status === 200) { | 663 | if (response.status === 200) { |
| 659 | - this.editESInfo(); | ||
| 660 | - this.es_loading.editLoading = false; | 664 | + return response.json(); |
| 661 | } else { | 665 | } else { |
| 662 | this.es_loading.editLoading = false; | 666 | this.es_loading.editLoading = false; |
| 663 | - this.$message.error("请仔细检查ES信息,请务必进行ES连接测试!"); | 667 | + return this.$message.error("请仔细检查ES信息,请务必进行ES连接测试!"); |
| 664 | } | 668 | } |
| 669 | + }).then(data => { | ||
| 670 | + if (data.cluster_name === undefined || data.name === undefined || | ||
| 671 | + data.cluster_name === null || data.cluster_name === '' | ||
| 672 | + || data.name === null || data.name === '') { | ||
| 673 | + return this.$message.error("这并不是ES配置,请仔细检查!"); | ||
| 674 | + } | ||
| 675 | + this.editESInfo(); | ||
| 676 | + this.es_loading.editLoading = false; | ||
| 665 | }).catch(error => { | 677 | }).catch(error => { |
| 666 | this.es_loading.editLoading = false; | 678 | this.es_loading.editLoading = false; |
| 667 | this.$message.error("请仔细检查ES信息,请务必进行ES连接测试!"); | 679 | this.$message.error("请仔细检查ES信息,请务必进行ES连接测试!"); |
-
请 注册 或 登录 后发表评论