mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-16 21:55:24 +00:00
fix dashboards
This commit is contained in:
parent
aa73338e47
commit
eea641d8ce
@ -78,7 +78,7 @@ async function setTemplate() {
|
|||||||
dashboardStore.setCurrentDashboard({
|
dashboardStore.setCurrentDashboard({
|
||||||
layer: p.layerId,
|
layer: p.layerId,
|
||||||
entity: p.entity,
|
entity: p.entity,
|
||||||
name: p.name,
|
name: String(p.name).split("-").join(" "),
|
||||||
id: c.id,
|
id: c.id,
|
||||||
isRoot: layout.isRoot,
|
isRoot: layout.isRoot,
|
||||||
});
|
});
|
||||||
|
@ -214,8 +214,7 @@ function handleView(row: DashboardItem) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function setRoot(row: DashboardItem) {
|
async function setRoot(row: DashboardItem) {
|
||||||
console.log(row);
|
const items: DashboardItem[] = [];
|
||||||
const items: any[] = [];
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
for (const d of dashboardStore.dashboards) {
|
for (const d of dashboardStore.dashboards) {
|
||||||
if (d.id === row.id) {
|
if (d.id === row.id) {
|
||||||
|
@ -42,6 +42,7 @@ limitations under the License. -->
|
|||||||
import { defineComponent, onBeforeUnmount } from "vue";
|
import { defineComponent, onBeforeUnmount } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
|
import { useSelectorStore } from "@/store/modules/selectors";
|
||||||
import { LayoutConfig } from "@/types/dashboard";
|
import { LayoutConfig } from "@/types/dashboard";
|
||||||
import controls from "../controls/index";
|
import controls from "../controls/index";
|
||||||
|
|
||||||
@ -51,6 +52,7 @@ export default defineComponent({
|
|||||||
setup() {
|
setup() {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
|
const selectorStore = useSelectorStore();
|
||||||
function layoutUpdatedEvent(newLayout: LayoutConfig[]) {
|
function layoutUpdatedEvent(newLayout: LayoutConfig[]) {
|
||||||
dashboardStore.setLayout(newLayout);
|
dashboardStore.setLayout(newLayout);
|
||||||
}
|
}
|
||||||
@ -60,6 +62,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
dashboardStore.setLayout([]);
|
dashboardStore.setLayout([]);
|
||||||
|
selectorStore.setCurrentService(null);
|
||||||
|
selectorStore.setCurrentPod(null);
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
dashboardStore,
|
dashboardStore,
|
||||||
|
Loading…
Reference in New Issue
Block a user