mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 10:05:24 +00:00
reset mode
This commit is contained in:
parent
53ea5c4a0f
commit
60a6ff7e1b
@ -59,7 +59,7 @@ export const dashboardStore = defineStore({
|
|||||||
currentTabItems: [],
|
currentTabItems: [],
|
||||||
dashboards: [],
|
dashboards: [],
|
||||||
currentDashboard: null,
|
currentDashboard: null,
|
||||||
editMode: true,
|
editMode: false,
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
setLayout(data: LayoutConfig[]) {
|
setLayout(data: LayoutConfig[]) {
|
||||||
|
@ -44,7 +44,11 @@ limitations under the License. -->
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="name" label="Name" />
|
<el-table-column prop="name" label="Name">
|
||||||
|
<template #default="scope">
|
||||||
|
<span @click="handleView(scope.row)">{{ scope.row.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="layer" label="Layer" width="200" />
|
<el-table-column prop="layer" label="Layer" width="200" />
|
||||||
<el-table-column prop="entity" label="Entity" width="200" />
|
<el-table-column prop="entity" label="Entity" width="200" />
|
||||||
<el-table-column prop="isRoot" label="Root" width="100">
|
<el-table-column prop="isRoot" label="Root" width="100">
|
||||||
@ -56,10 +60,10 @@ limitations under the License. -->
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Operations">
|
<el-table-column label="Operations">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleView(scope.row)">
|
<el-button size="small" @click="handleEdit(scope.row)">
|
||||||
{{ t("edit") }}
|
{{ t("edit") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" @click="handleEdit(scope.row)">
|
<el-button size="small" @click="handleRename(scope.row)">
|
||||||
{{ t("rename") }}
|
{{ t("rename") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
@ -196,7 +200,20 @@ function exportTemplates() {
|
|||||||
multipleTableRef.value!.clearSelection();
|
multipleTableRef.value!.clearSelection();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
function handleEdit(row: DashboardItem) {
|
||||||
|
dashboardStore.setMode(true);
|
||||||
|
dashboardStore.setEntity(row.entity);
|
||||||
|
dashboardStore.setLayer(row.layer);
|
||||||
|
dashboardStore.setCurrentDashboard(row);
|
||||||
|
router.push(
|
||||||
|
`/dashboard/${row.layer}/${row.entity}/${row.name.split(" ").join("-")}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function handleView(row: DashboardItem) {
|
function handleView(row: DashboardItem) {
|
||||||
|
dashboardStore.setMode(false);
|
||||||
|
dashboardStore.setEntity(row.entity);
|
||||||
|
dashboardStore.setLayer(row.layer);
|
||||||
dashboardStore.setCurrentDashboard(row);
|
dashboardStore.setCurrentDashboard(row);
|
||||||
router.push(
|
router.push(
|
||||||
`/dashboard/${row.layer}/${row.entity}/${row.name.split(" ").join("-")}`
|
`/dashboard/${row.layer}/${row.entity}/${row.name.split(" ").join("-")}`
|
||||||
@ -267,7 +284,7 @@ async function setRoot(row: DashboardItem) {
|
|||||||
searchDashboards();
|
searchDashboards();
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
function handleEdit(row: DashboardItem) {
|
function handleRename(row: DashboardItem) {
|
||||||
ElMessageBox.prompt("Please input dashboard name", "Edit", {
|
ElMessageBox.prompt("Please input dashboard name", "Edit", {
|
||||||
confirmButtonText: "OK",
|
confirmButtonText: "OK",
|
||||||
cancelButtonText: "Cancel",
|
cancelButtonText: "Cancel",
|
||||||
|
Loading…
Reference in New Issue
Block a user