fix: Search endpoints with keywords in the log bar (#532)

* fix: search endpoints in logs

* fix: update types
diff --git a/src/views/components/common/common-selector.vue b/src/views/components/common/common-selector.vue
index 5ab7c4d..ab0122d 100644
--- a/src/views/components/common/common-selector.vue
+++ b/src/views/components/common/common-selector.vue
@@ -124,7 +124,7 @@
   }
   .rk-common-sel {
     position: absolute;
-    top: 50px;
+    top: 45px;
     box-shadow: 0 1px 6px rgba(99, 99, 99, 0.2);
     background-color: #252a2f;
     width: 100%;
diff --git a/src/views/components/log/log-bar.vue b/src/views/components/log/log-bar.vue
index d85f173..8216294 100644
--- a/src/views/components/log/log-bar.vue
+++ b/src/views/components/log/log-bar.vue
@@ -102,9 +102,11 @@
     @Mutation('SELECT_ERROR_CATALOG') private SELECT_ERROR_CATALOG: any;
     @Mutation('SET_EVENTS') private SET_EVENTS: any;
     @Mutation('CLEAR_LOG_CONDITIONS') private CLEAR_LOG_CONDITIONS: any;
+    @Mutation('SET_ENDPOINTS') private SET_ENDPOINTS: any;
     @Action('SELECT_SERVICE') private SELECT_SERVICE: any;
     @Action('GET_ITEM_ENDPOINTS') private GET_ITEM_ENDPOINTS: any;
     @Action('SELECT_INSTANCE') private SELECT_INSTANCE: any;
+    @Action('SELECT_ENDPOINT') private SELECT_ENDPOINT: any;
     @Action('MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
     @Action('QUERY_LOGS') private QUERY_LOGS: any;
     @Action('QUERY_LOGS_BYKEYWORDS') private QUERY_LOGS_BYKEYWORDS: any;
@@ -139,7 +141,7 @@
     }
 
     private selectEndpoint(i: { key: string; label: string }) {
-      this.GET_ITEM_ENDPOINTS({ endpoint: i, duration: this.durationTime });
+      this.SELECT_ENDPOINT({ endpoint: i, duration: this.durationTime });
     }
 
     private selectInstance(i: { key: string; label: string }) {
@@ -162,6 +164,8 @@
         serviceId: this.rocketOption.currentService.key,
         keyword: search,
         duration: this.durationTime,
+      }).then((endpoints: any) => {
+        this.SET_ENDPOINTS(endpoints);
       });
     }
 
diff --git a/src/views/components/trace/trace-search.vue b/src/views/components/trace/trace-search.vue
index 57a9b8f..92b0c4f 100644
--- a/src/views/components/trace/trace-search.vue
+++ b/src/views/components/trace/trace-search.vue
@@ -41,8 +41,24 @@
           :value="service"
           @input="chooseService"
           :data="rocketTrace.services"
+          icon="package"
         />
-        <CommonSelector :hasSearch="true" :title="$t('instance')" v-model="instance" :data="rocketTrace.instances" />
+        <CommonSelector
+          :hasSearch="true"
+          :title="$t('instance')"
+          v-model="instance"
+          :data="rocketTrace.instances"
+          icon="disk"
+        />
+        <CommonSelector
+          :hasSearch="true"
+          :title="$t('endpoint')"
+          :value="endpoint"
+          @input="chooseEndpoint"
+          @search="searchEndpoint"
+          :data="rocketTrace.endpoints"
+          icon="code"
+        />
         <CommonSelector
           :title="$t('status')"
           :value="traceState"
@@ -52,14 +68,7 @@
             { label: 'Success', key: 'SUCCESS' },
             { label: 'Error', key: 'ERROR' },
           ]"
-        />
-        <CommonSelector
-          :hasSearch="true"
-          :title="$t('endpoint')"
-          :value="endpoint"
-          @input="chooseEndpoint"
-          @search="searchEndpoint"
-          :data="rocketTrace.endpoints"
+          icon="epic"
         />
       </div>
     </div>
@@ -171,6 +180,8 @@
         serviceId: this.service.key,
         keyword: search,
         duration: this.durationTime,
+      }).then((endpoints: Array<{ key: string; label: string }>) => {
+        this.SET_ENDPOINTS(endpoints);
       });
     }
     private chooseStatus(i: Option) {