feat: Add Log widget in dashboards (#22)

This commit is contained in:
Fine0830
2022-03-08 14:39:42 +08:00
committed by GitHub
parent 1377703185
commit 8ad1c91082
24 changed files with 760 additions and 99 deletions

View File

@@ -144,7 +144,7 @@ import { Option } from "@/types/app";
import copy from "@/utils/copy";
import List from "./components/List.vue";
import graphs from "./components/index";
import LogTable from "@/views/components/LogTable/Index.vue";
import LogTable from "@/views/dashboard/related/components/LogTable/Index.vue";
import { ElMessage } from "element-plus";
export default defineComponent({
@@ -166,7 +166,7 @@ export default defineComponent({
dayjs(date).format(pattern);
const showTraceLogs = ref<boolean>(false);
function handleClick(ids: string[]) {
function handleClick(ids: string[] | any) {
let copyValue = null;
if (ids.length === 1) {
copyValue = ids[0];
@@ -176,7 +176,7 @@ export default defineComponent({
copy(copyValue);
}
async function changeTraceId(opt: Option[]) {
async function changeTraceId(opt: Option[] | any) {
traceId.value = opt[0].value;
loading.value = true;
const res = await traceStore.getTraceSpans({ traceId: opt[0].value });