feat: add log

This commit is contained in:
Qiuxia Fan 2022-03-04 14:17:29 +08:00
parent 59441f7a67
commit c8c82cd311
6 changed files with 23 additions and 3 deletions

View File

@ -21,7 +21,7 @@ import { routesMesh } from "./serviceMesh";
import { routesDatabase } from "./database";
import { routesInfra } from "./infrastructure";
import { routesDashboard } from "./dashboard";
import { routesLog } from "./log";
// import { routesLog } from "./log";
import { routesEvent } from "./event";
import { routesAlert } from "./alert";
import { routesSetting } from "./setting";
@ -34,7 +34,6 @@ const routes: Array<RouteRecordRaw> = [
...routesDatabase,
...routesInfra,
...routesDashboard,
...routesLog,
...routesEvent,
...routesAlert,
...routesSetting,

View File

@ -95,7 +95,7 @@ export const dashboardStore = defineStore({
showDepth: true,
};
}
if (type === "Trace" || type === "Profile") {
if (type === "Trace" || type === "Profile" || type === "Log") {
newItem.h = 36;
}
this.layout = this.layout.map((d: LayoutConfig) => {

View File

@ -0,0 +1,17 @@
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div class="log-wrapper flex-v">Log</div>
</template>

View File

@ -168,6 +168,7 @@ export const ToolIcons = [
{ name: "device_hub", content: "Add Topology", id: "topology" },
{ name: "merge", content: "Add Trace", id: "trace" },
{ name: "timeline", content: "Add Profile", id: "profile" },
{ name: "assignment", content: "Add Log", id: "log" },
// { name: "save_alt", content: "Export", id: "export" },
// { name: "folder_open", content: "Import", id: "import" },
// { name: "settings", content: "Settings", id: "settings" },

View File

@ -301,6 +301,9 @@ function clickIcons(t: { id: string; content: string; name: string }) {
case "profile":
dashboardStore.addControl("Profile");
break;
case "log":
dashboardStore.addControl("Log");
break;
case "topology":
dashboardStore.addControl("Topology");
break;