mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 20:01:28 +00:00
fix: polish pages and bugs fix (#36)
This commit is contained in:
@@ -32,6 +32,7 @@ interface AppState {
|
||||
timer: Nullable<any>;
|
||||
autoRefresh: boolean;
|
||||
pageTitle: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
export const appStore = defineStore({
|
||||
@@ -49,6 +50,7 @@ export const appStore = defineStore({
|
||||
timer: null,
|
||||
autoRefresh: false,
|
||||
pageTitle: "",
|
||||
version: "",
|
||||
}),
|
||||
getters: {
|
||||
duration(): Duration {
|
||||
@@ -155,6 +157,16 @@ export const appStore = defineStore({
|
||||
|
||||
return res.data;
|
||||
},
|
||||
async fetchVersion(): Promise<void> {
|
||||
const res: AxiosResponse = await graphql
|
||||
.query("queryOAPVersion")
|
||||
.params({});
|
||||
if (res.data.errors) {
|
||||
return res.data;
|
||||
}
|
||||
this.version = res.data.data.version;
|
||||
return res.data;
|
||||
},
|
||||
},
|
||||
});
|
||||
export function useAppStoreWithOut(): any {
|
||||
|
@@ -65,15 +65,15 @@ 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() {
|
||||
async getInstances(id: string) {
|
||||
const serviceId = this.selectorStore.currentService
|
||||
? this.selectorStore.currentService.id
|
||||
: id;
|
||||
const res: AxiosResponse = await graphql.query("queryInstances").params({
|
||||
serviceId: this.selectorStore.currentService.id,
|
||||
serviceId,
|
||||
duration: this.durationTime,
|
||||
});
|
||||
|
||||
@@ -86,9 +86,12 @@ export const logStore = defineStore({
|
||||
] || [{ value: " 0", label: "All" }];
|
||||
return res.data;
|
||||
},
|
||||
async getEndpoints() {
|
||||
async getEndpoints(id: string) {
|
||||
const serviceId = this.selectorStore.currentService
|
||||
? this.selectorStore.currentService.id
|
||||
: id;
|
||||
const res: AxiosResponse = await graphql.query("queryEndpoints").params({
|
||||
serviceId: this.selectorStore.currentService.id,
|
||||
serviceId,
|
||||
duration: this.durationTime,
|
||||
keyword: "",
|
||||
});
|
||||
|
@@ -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() {
|
||||
|
@@ -80,15 +80,15 @@ 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() {
|
||||
async getInstances(id: string) {
|
||||
const serviceId = this.selectorStore.currentService
|
||||
? this.selectorStore.currentService.id
|
||||
: id;
|
||||
const res: AxiosResponse = await graphql.query("queryInstances").params({
|
||||
serviceId: this.selectorStore.currentService.id,
|
||||
serviceId: serviceId,
|
||||
duration: this.durationTime,
|
||||
});
|
||||
|
||||
@@ -101,9 +101,12 @@ export const traceStore = defineStore({
|
||||
] || [{ value: " 0", label: "All" }];
|
||||
return res.data;
|
||||
},
|
||||
async getEndpoints() {
|
||||
async getEndpoints(id: string) {
|
||||
const serviceId = this.selectorStore.currentService
|
||||
? this.selectorStore.currentService.id
|
||||
: id;
|
||||
const res: AxiosResponse = await graphql.query("queryEndpoints").params({
|
||||
serviceId: this.selectorStore.currentService.id,
|
||||
serviceId,
|
||||
duration: this.durationTime,
|
||||
keyword: "",
|
||||
});
|
||||
|
Reference in New Issue
Block a user