mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
feat: Support searching endpoints with keyword (#43)
This commit is contained in:
@@ -46,6 +46,8 @@ limitations under the License. -->
|
||||
:options="logStore.endpoints"
|
||||
placeholder="Select a endpoint"
|
||||
@change="changeField('endpoint', $event)"
|
||||
:isRemote="true"
|
||||
@query="searchEndpoints"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -243,6 +245,12 @@ function changeField(type: string, opt: any) {
|
||||
getInstances(state.service.id);
|
||||
}
|
||||
}
|
||||
async function searchEndpoints(keyword: string) {
|
||||
const resp = await logStore.getEndpoints(state.service.id, keyword);
|
||||
if (resp.errors) {
|
||||
ElMessage.error(resp.errors);
|
||||
}
|
||||
}
|
||||
function updateTags(data: { tagsMap: Array<Option>; tagsList: string[] }) {
|
||||
tagsList.value = data.tagsList;
|
||||
tagsMap.value = data.tagsMap;
|
||||
|
@@ -41,7 +41,9 @@ limitations under the License. -->
|
||||
:value="state.endpoint.value"
|
||||
:options="traceStore.endpoints"
|
||||
placeholder="Select a endpoint"
|
||||
:isRemote="true"
|
||||
@change="changeField('endpoint', $event)"
|
||||
@query="searchEndpoints"
|
||||
/>
|
||||
</div>
|
||||
<div class="mr-5">
|
||||
@@ -149,8 +151,8 @@ async function getServices() {
|
||||
getInstances(state.service.id);
|
||||
}
|
||||
|
||||
async function getEndpoints(id?: string) {
|
||||
const resp = await traceStore.getEndpoints(id);
|
||||
async function getEndpoints(id?: string, keyword?: string) {
|
||||
const resp = await traceStore.getEndpoints(id, keyword);
|
||||
if (resp.errors) {
|
||||
ElMessage.error(resp.errors);
|
||||
return;
|
||||
@@ -208,6 +210,12 @@ function updateTags(data: { tagsMap: Array<Option>; tagsList: string[] }) {
|
||||
tagsList.value = data.tagsList;
|
||||
tagsMap.value = data.tagsMap;
|
||||
}
|
||||
async function searchEndpoints(keyword: string) {
|
||||
const resp = await traceStore.getEndpoints(state.service.id, keyword);
|
||||
if (resp.errors) {
|
||||
ElMessage.error(resp.errors);
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => [selectorStore.currentPod],
|
||||
() => {
|
||||
|
Reference in New Issue
Block a user