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