mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-07 18:52:54 +00:00
fix errors (#124)
This commit is contained in:
parent
bec86e80fd
commit
017f5bf709
@ -36,7 +36,7 @@ limitations under the License. -->
|
|||||||
<Header :needQuery="needQuery" />
|
<Header :needQuery="needQuery" />
|
||||||
</div>
|
</div>
|
||||||
<div class="event">
|
<div class="event">
|
||||||
<Content />
|
<Content :data="data" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -30,7 +30,13 @@ import { dateFormatTime } from "@/utils/dateFormat";
|
|||||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||||
|
|
||||||
const eventStore = useEventStore();
|
const eventStore = useEventStore();
|
||||||
/*global Nullable */
|
/*global defineProps, Nullable */
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
const timeline = ref<Nullable<HTMLDivElement>>(null);
|
const timeline = ref<Nullable<HTMLDivElement>>(null);
|
||||||
const visGraph = ref<Nullable<any>>(null);
|
const visGraph = ref<Nullable<any>>(null);
|
||||||
const oldVal = ref<{ width: number; height: number }>({ width: 0, height: 0 });
|
const oldVal = ref<{ width: number; height: number }>({ width: 0, height: 0 });
|
||||||
@ -97,9 +103,10 @@ function visTimeline() {
|
|||||||
};
|
};
|
||||||
visGraph.value = new Timeline(timeline.value, items, options);
|
visGraph.value = new Timeline(timeline.value, items, options);
|
||||||
visGraph.value.on("select", (properties: { items: number[] }) => {
|
visGraph.value.on("select", (properties: { items: number[] }) => {
|
||||||
if (!dashboardStore.selectedGrid.eventAssociate) {
|
if (!props.data.eventAssociate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
dashboardStore.selectWidget(props.data);
|
||||||
const all = getDashboard(dashboardStore.currentDashboard).widgets;
|
const all = getDashboard(dashboardStore.currentDashboard).widgets;
|
||||||
const widgets = all.filter(
|
const widgets = all.filter(
|
||||||
(d: { value: string; label: string } & LayoutConfig) => {
|
(d: { value: string; label: string } & LayoutConfig) => {
|
||||||
|
@ -125,6 +125,9 @@ function fetchSelectors() {
|
|||||||
|
|
||||||
async function getEndpoints(id?: string) {
|
async function getEndpoints(id?: string) {
|
||||||
const resp = await eventStore.getEndpoints(id);
|
const resp = await eventStore.getEndpoints(id);
|
||||||
|
if (!resp) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (resp.errors) {
|
if (resp.errors) {
|
||||||
ElMessage.error(resp.errors);
|
ElMessage.error(resp.errors);
|
||||||
return;
|
return;
|
||||||
@ -148,6 +151,9 @@ async function queryEvents() {
|
|||||||
if (dashboardStore.entity === EntityType[3].value) {
|
if (dashboardStore.entity === EntityType[3].value) {
|
||||||
instance = selectorStore.currentPod.id;
|
instance = selectorStore.currentPod.id;
|
||||||
}
|
}
|
||||||
|
if (!selectorStore.currentService) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
eventStore.setEventCondition({
|
eventStore.setEventCondition({
|
||||||
// layer: dashboardStore.layerId,
|
// layer: dashboardStore.layerId,
|
||||||
paging: {
|
paging: {
|
||||||
|
Loading…
Reference in New Issue
Block a user