mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
update
This commit is contained in:
parent
ab1ae85694
commit
e3fc5ab6c7
@ -56,7 +56,7 @@ const props = defineProps({
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const networkProfilingStore = useNetworkProfilingStore();
|
||||
const layout = ref<LayoutConfig[]>(props.widgets);
|
||||
const layout = ref<LayoutConfig[]>(props.widgets || []);
|
||||
|
||||
function clickGrid(item: LayoutConfig) {
|
||||
networkProfilingStore.setActiveItem(item.i);
|
||||
|
@ -77,6 +77,7 @@ import type { PropType } from "vue";
|
||||
import { LayoutConfig } from "@/types/dashboard";
|
||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
import { useNetworkProfilingStore } from "@/store/modules/network-profiling";
|
||||
import graphs from "../../../../graphs/topology";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {
|
||||
@ -95,7 +96,7 @@ const props = {
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
name: "Widget",
|
||||
name: "Metric",
|
||||
components: { ...graphs },
|
||||
props,
|
||||
setup(props) {
|
||||
@ -107,6 +108,7 @@ export default defineComponent({
|
||||
const { data } = toRefs(props);
|
||||
const appStore = useAppStoreWithOut();
|
||||
const dashboardStore = useDashboardStore();
|
||||
const networkProfilingStore = useNetworkProfilingStore();
|
||||
const graph = computed(() => props.data.graph || {});
|
||||
const widget = computed(() => props.data.widget || {});
|
||||
|
||||
@ -137,15 +139,15 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function removeWidget() {
|
||||
dashboardStore.removeControls(props.data);
|
||||
networkProfilingStore.removeControls(props.data);
|
||||
}
|
||||
function editConfig() {
|
||||
dashboardStore.setConfigPanel(true);
|
||||
dashboardStore.selectWidget(props.data);
|
||||
networkProfilingStore.setConfigPanel(true);
|
||||
networkProfilingStore.setSelectedMetric(props.data);
|
||||
if (props.activeIndex) {
|
||||
dashboardStore.activeGridItem(props.activeIndex);
|
||||
networkProfilingStore.setActiveItem(props.activeIndex);
|
||||
} else {
|
||||
dashboardStore.activeGridItem(props.data.i);
|
||||
networkProfilingStore.setActiveItem(props.data.i);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user