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", name: "Trace",
children: [ children: [

View File

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

View File

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

View File

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