This commit is contained in:
Qiuxia Fan 2022-06-21 16:06:22 +08:00
parent 0f0ac4d6e9
commit d9c56b7593
4 changed files with 20 additions and 20 deletions

View File

@ -19,7 +19,7 @@ import { store } from "@/store";
import graphql from "@/graphql";
import { AxiosResponse } from "axios";
import { Event, QueryEventCondition } from "@/types/events";
import { Instance, Endpoint, Service } from "@/types/selector";
import { Instance, Endpoint } from "@/types/selector";
import { useAppStoreWithOut } from "@/store/modules/app";
import { useSelectorStore } from "@/store/modules/selectors";

View File

@ -159,10 +159,7 @@ div.vis-tooltip {
max-width: 600px;
overflow: hidden;
background-color: #fff !important;
.message {
word-wrap: break-word !important;
}
white-space: normal !important;
}
.vis-item {

View File

@ -55,21 +55,15 @@ function visTimeline() {
tooltip: {
template(item) {
const data = item.data || {};
return `<div><span>Event ID: </span>${data.uuid || ""}</div>
<div><span>Event Name: </span>${data.name || ""}</div>
<div class="mb-5"><span>Event Type: </span>${data.type || ""}</div>
<div class="mb-5"><span>Start Time: </span>${
data.startTime ? visDate(data.startTime) : ""
}</div>
<div class="mb-5"><span>End Time: </span>${
data.endTime ? visDate(data.endTime) : ""
}</div>
<div class="message">Event Message: ${data.message || ""}</div>
return `<div>ID: ${data.uuid || ""}</div>
<div>Name: ${data.name || ""}</div>
<div>Event Type: ${data.type || ""}</div>
<div>Start Time: ${data.startTime ? visDate(data.startTime) : ""}</div>
<div>End Time: ${data.endTime ? visDate(data.endTime) : ""}</div>
<div>Message: ${data.message || ""}</div>
<div>Service: ${data.source.service || ""}</div>
<div>Endpoint: ${data.source.endpoint || ""}
</div>
<div>Service Instance: ${data.source.instance || ""}
</div></div>`;
<div>Endpoint: ${data.source.endpoint || ""}</div>
<div>Service Instance: ${data.source.instance || ""}</div>`;
},
},
};

View File

@ -181,6 +181,15 @@ function updatePage(p: number) {
queryEvents();
}
watch(
() => [selectorStore.currentService],
() => {
if (dashboardStore.entity === EntityType[0].value) {
init();
}
}
);
watch(
() => [selectorStore.currentPod],
() => {