diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue index 44e6d92a8..dbe8de7b2 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue @@ -37,25 +37,36 @@ -
- + + + + <!– begin--顶部按钮–>
- - + <!– end--顶部按钮–> + <!–begin--标题–>
{{subBox.title}}
- - + <!–end--标题–> + <!––>
- + <!– begin--搜索框–>
- - + <!– end--搜索框–> + <!– begin--table–>
IP
@@ -98,15 +109,14 @@
- + <!– end--table–>
-
{{endpoint.host}}
- +
{{endpoint.host}}
-->
@@ -345,9 +355,22 @@ this.selectedAsset = obj; this.endpoint.host = obj.host; this.endpoint.assetId = obj.id; - this.endpoint.asset = obj; + this.$refs.endPointForm.validate(); + }, + inputAsset(e) { + this.endpoint.assetId = ""; + let host = e.target.value; + if (host) { + for (let i = 0; i < this.assetList.length; i++) { + if (host == this.assetList[i].host) { + this.endpoint.assetId = this.assetList[i].id; + this.selectedAsset = this.assetList[i]; + this.endpoint.host = host; + break; + } + } + } }, - // 获取endpoint弹框中module下拉框数据 getModuleList(projectId) { this.$get('module', {projectId: projectId}).then(response => { @@ -416,6 +439,20 @@ this.assetSearch.label = label; this.assetSearch.dropdownShow = false; }, + /*asset搜索建议*/ + assetSuggestion(queryString, callback) { + let data = []; + if (!queryString) { + data = this.assetList; + } else { + for (let i = 0; i < this.assetList.length; i++) { + if (this.assetList[i].host.indexOf(queryString.toLowerCase()) != -1) { + data.push(this.assetList[i]); + } + } + } + callback(data); + }, }, created() { this.getProjectList(); diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue index c35ac80a7..75c59311e 100644 --- a/nezha-fronted/src/components/page/alert/list.vue +++ b/nezha-fronted/src/components/page/alert/list.vue @@ -29,9 +29,11 @@ -
- -
+ +
+ +
+