update trace

This commit is contained in:
Qiuxia Fan 2022-03-24 20:07:49 +08:00
parent 6345c15f00
commit ff89735739
5 changed files with 14 additions and 27 deletions

View File

@ -65,10 +65,7 @@ export const logStore = defineStore({
if (res.data.errors) {
return res.data;
}
this.services = [
{ value: "0", label: "All" },
...res.data.data.services,
] || [{ value: "0", label: "All" }];
this.services = res.data.data.services;
return res.data;
},
async getInstances() {

View File

@ -82,10 +82,7 @@ export const profileStore = defineStore({
if (res.data.errors) {
return res.data;
}
this.services = [
{ value: "0", label: "All" },
...res.data.data.services,
] || [{ value: "0", label: "All" }];
this.services = res.data.data.services;
return res.data;
},
async getTaskList() {

View File

@ -80,10 +80,7 @@ export const traceStore = defineStore({
if (res.data.errors) {
return res.data;
}
this.services = [
{ value: "0", label: "All" },
...res.data.data.services,
] || [{ value: "0", label: "All" }];
this.services = res.data.data.services;
return res.data;
},
async getInstances() {

View File

@ -143,7 +143,7 @@ const isBrowser = ref<boolean>(dashboardStore.layerId === "BROWSER");
const state = reactive<any>({
instance: { value: "0", label: "All" },
endpoint: { value: "0", label: "All" },
service: { value: "0", label: "All" },
service: { value: "", label: "" },
});
init();
@ -154,11 +154,10 @@ async function init() {
ElMessage.error(resp.errors);
return;
}
await fetchSelectors();
await searchLogs();
state.instance = { value: "0", label: "All" };
state.endpoint = { value: "0", label: "All" };
state.service = { value: "0", label: "All" };
searchLogs();
fetchSelectors();
}
function fetchSelectors() {

View File

@ -113,7 +113,7 @@ const state = reactive<any>({
status: { label: "All", value: "ALL" },
instance: { value: "0", label: "All" },
endpoint: { value: "0", label: "All" },
service: { value: "0", label: "All" },
service: { value: "", label: "" },
});
// const dateTime = computed(() => [
@ -121,24 +121,21 @@ const state = reactive<any>({
// appStore.durationRow.end,
// ]);
init();
function init() {
searchTraces();
async function init() {
if (dashboardStore.entity === EntityType[1].value) {
getServices();
return;
await getServices();
}
if (dashboardStore.entity === EntityType[2].value) {
getInstances();
return;
await getInstances();
}
if (dashboardStore.entity === EntityType[3].value) {
getEndpoints();
return;
await getEndpoints();
}
if (dashboardStore.entity === EntityType[0].value) {
getInstances();
getEndpoints();
await getInstances();
await getEndpoints();
}
await searchTraces();
}
async function getServices() {