This commit is contained in:
Qiuxia Fan 2022-03-14 10:50:54 +08:00
parent fc981f678b
commit a7f05d35ad
4 changed files with 30 additions and 5 deletions

View File

@ -332,6 +332,31 @@ export const ServiceLayout = {
},
],
},
{
name: "Topology",
children: [
{
x: 0,
y: 0,
w: 4,
h: 6,
i: "0",
metrics: [],
metricTypes: [],
type: "Topology",
widget: {},
graph: {
fontColor: "white",
backgroundColor: "green",
iconTheme: true,
content: "Topology",
fontSize: 18,
showDepth: true,
},
standard: {},
},
],
},
{
name: "Trace",
children: [

View File

@ -38,7 +38,7 @@ interface LogState {
}
export const logStore = defineStore({
id: "trace",
id: "log",
state: (): LogState => ({
services: [{ value: "0", label: "All" }],
instances: [{ value: "0", label: "All" }],
@ -101,7 +101,7 @@ export const logStore = defineStore({
] || [{ value: "0", label: "All" }];
return res.data;
},
async queryLogsByKeywords() {
async getLogsByKeywords() {
const res: AxiosResponse = await graphql
.query("queryLogsByKeywords")
.params({});

View File

@ -44,7 +44,7 @@ interface ProfileState {
highlightTop: boolean;
}
export const traceStore = defineStore({
export const profileStore = defineStore({
id: "profile",
state: (): ProfileState => ({
services: [{ value: "0", label: "All" }],
@ -208,5 +208,5 @@ export const traceStore = defineStore({
});
export function useProfileStore(): any {
return traceStore(store);
return profileStore(store);
}

View File

@ -148,7 +148,7 @@ const state = reactive<any>({
init();
async function init() {
const resp = await logStore.queryLogsByKeywords();
const resp = await logStore.getLogsByKeywords();
if (resp.errors) {
ElMessage.error(resp.errors);