mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 17:05:10 +00:00
fix condition
This commit is contained in:
parent
a9f4fdd5ec
commit
bb744fc0f4
@ -18,7 +18,7 @@ limitations under the License. -->
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useEventStore } from "../../../../store/modules/event";
|
import { useEventStore } from "@/store/modules/event";
|
||||||
import { DataSet, Timeline } from "vis-timeline/standalone";
|
import { DataSet, Timeline } from "vis-timeline/standalone";
|
||||||
import "vis-timeline/styles/vis-timeline-graph2d.css";
|
import "vis-timeline/styles/vis-timeline-graph2d.css";
|
||||||
const eventStore = useEventStore();
|
const eventStore = useEventStore();
|
||||||
@ -34,6 +34,9 @@ function visTimeline() {
|
|||||||
if (!timeline.value) {
|
if (!timeline.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (visGraph.value) {
|
||||||
|
visGraph.value.destroy();
|
||||||
|
}
|
||||||
const h = timeline.value.getBoundingClientRect().height;
|
const h = timeline.value.getBoundingClientRect().height;
|
||||||
const events = eventStore.events.map((d, index) => {
|
const events = eventStore.events.map((d, index) => {
|
||||||
return {
|
return {
|
||||||
|
@ -140,8 +140,8 @@ async function getInstances(id?: string) {
|
|||||||
state.instance = eventStore.instances[0];
|
state.instance = eventStore.instances[0];
|
||||||
}
|
}
|
||||||
async function queryEvents() {
|
async function queryEvents() {
|
||||||
let endpoint = "",
|
let endpoint = state.endpoint.value,
|
||||||
instance = "";
|
instance = state.instance.value;
|
||||||
if (dashboardStore.entity === EntityType[2].value) {
|
if (dashboardStore.entity === EntityType[2].value) {
|
||||||
endpoint = selectorStore.currentPod.id;
|
endpoint = selectorStore.currentPod.id;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user