This is an automated email from the ASF dual-hosted git repository.
qiuxiafan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-rocketbot-ui.git
The following commit(s) were added to refs/heads/master by this push:
new b9ffe9f Feat: Search Endpoint use keyword params in trace view. (#494)
b9ffe9f is described below
commit b9ffe9f5a77852144a22447a485be10197158aa7
Author: liqiangz <[email protected]>
AuthorDate: Sat May 22 14:57:28 2021 +0800
Feat: Search Endpoint use keyword params in trace view. (#494)
---
src/views/components/common/trace-select.vue | 11 ++++++++++-
src/views/components/trace/trace-search.vue | 8 ++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/views/components/common/trace-select.vue
b/src/views/components/common/trace-select.vue
index 6c37e26..39ecc0d 100644
--- a/src/views/components/common/trace-select.vue
+++ b/src/views/components/common/trace-select.vue
@@ -36,7 +36,13 @@ limitations under the License. -->
</div>
<div class="rk-trace-sel" v-if="visible">
<div v-if="hasSearch">
- <input type="text" class="rk-trace-sel-search" v-model="search"
:placeholder="`${$t('search')}...`" />
+ <input
+ type="text"
+ class="rk-trace-sel-search"
+ v-model="search"
+ @keyup.enter="handlerEnter"
+ :placeholder="`${$t('search')}...`"
+ />
<svg class="icon sm close" @click="search = ''" v-if="search">
<use xlink:href="#clear"></use>
</svg>
@@ -75,6 +81,9 @@ limitations under the License. -->
this.$emit('input', i);
this.visible = false;
}
+ public handlerEnter() {
+ this.$emit('search', this.search);
+ }
}
</script>
diff --git a/src/views/components/trace/trace-search.vue
b/src/views/components/trace/trace-search.vue
index 75d8de4..fc92ac2 100644
--- a/src/views/components/trace/trace-search.vue
+++ b/src/views/components/trace/trace-search.vue
@@ -58,6 +58,7 @@ limitations under the License. -->
:title="$t('endpointName')"
:value="endpoint"
@input="chooseEndpoint"
+ @search="searchEndpoint"
:data="rocketTrace.endpoints"
/>
</div>
@@ -173,6 +174,13 @@ limitations under the License. -->
duration: this.durationTime,
});
}
+ private searchEndpoint(search: string) {
+ this.GET_ITEM_ENDPOINTS({
+ serviceId: this.service.key,
+ keyword: search,
+ duration: this.durationTime,
+ });
+ }
private chooseStatus(i: Option) {
this.traceState = i;
}