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" />
|
||||
</div>
|
||||
<div class="event">
|
||||
<Content />
|
||||
<Content :data="data" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -30,7 +30,13 @@ import { dateFormatTime } from "@/utils/dateFormat";
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
|
||||
const eventStore = useEventStore();
|
||||
/*global Nullable */
|
||||
/*global defineProps, Nullable */
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const timeline = ref<Nullable<HTMLDivElement>>(null);
|
||||
const visGraph = ref<Nullable<any>>(null);
|
||||
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.on("select", (properties: { items: number[] }) => {
|
||||
if (!dashboardStore.selectedGrid.eventAssociate) {
|
||||
if (!props.data.eventAssociate) {
|
||||
return;
|
||||
}
|
||||
dashboardStore.selectWidget(props.data);
|
||||
const all = getDashboard(dashboardStore.currentDashboard).widgets;
|
||||
const widgets = all.filter(
|
||||
(d: { value: string; label: string } & LayoutConfig) => {
|
||||
|
@ -125,6 +125,9 @@ function fetchSelectors() {
|
||||
|
||||
async function getEndpoints(id?: string) {
|
||||
const resp = await eventStore.getEndpoints(id);
|
||||
if (!resp) {
|
||||
return;
|
||||
}
|
||||
if (resp.errors) {
|
||||
ElMessage.error(resp.errors);
|
||||
return;
|
||||
@ -148,6 +151,9 @@ async function queryEvents() {
|
||||
if (dashboardStore.entity === EntityType[3].value) {
|
||||
instance = selectorStore.currentPod.id;
|
||||
}
|
||||
if (!selectorStore.currentService) {
|
||||
return;
|
||||
}
|
||||
eventStore.setEventCondition({
|
||||
// layer: dashboardStore.layerId,
|
||||
paging: {
|
||||
|
Loading…
Reference in New Issue
Block a user