Skip to content

Commit 22973e9

Browse files
committed
refactor: dashboard layout update
1 parent 97e7636 commit 22973e9

File tree

13 files changed

+143
-75
lines changed

13 files changed

+143
-75
lines changed
8.56 KB
Loading

frontend/src/assets/img/none.png

-37 Bytes
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 4 additions & 2 deletions
Loading

frontend/src/i18n/en.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@
3131
"password_reset_successful": "Password reset successful"
3232
},
3333
"dashboard": {
34+
"rename_dashboard": "Rename Dashboard",
35+
"dashboard_name": "Dashboard Name",
36+
"select_dashboard_tips": "Please select a dashboard on the left",
37+
"no_dashboard": "No Dashboards",
38+
"no_dashboard_info": "No content yet, click the button below to add",
39+
"search": "Search",
40+
"time_asc": "Sort by Time (Ascending)",
41+
"time_desc": "Sort by Time (Descending)",
42+
"name_asc": "Sort by Name (Ascending)",
43+
"name_desc": "Sort by Name (Descending)",
3444
"select_dashboard": "Please Select Dashboard",
3545
"view": "View",
3646
"text": "Text",
@@ -336,4 +346,4 @@
336346
"back_community": "Restore to Community Edition",
337347
"confirm_tips": "Are you sure to restore to Community Edition?"
338348
}
339-
}
349+
}

frontend/src/i18n/zh-CN.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
"password_reset_successful": "重置密码成功"
3434
},
3535
"dashboard": {
36+
"rename_dashboard": "重命名仪表板",
37+
"dashboard_name": "仪表板名称",
38+
"select_dashboard_tips": "请在左侧选择仪表板",
39+
"no_dashboard": "暂无仪表板",
40+
"no_dashboard_info": "暂无内容,点击下列按钮进行添加",
41+
"search": "搜索",
42+
"time_asc": "按时间升序",
43+
"time_desc": "按时间降序",
44+
"name_asc": "按名称升序",
45+
"name_desc": "按名称降序",
3646
"select_dashboard": "请选择仪表板",
3747
"name": "名称",
3848
"view": "图表",

frontend/src/router/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createRouter, createWebHashHistory } from 'vue-router'
2-
2+
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
33
import Layout from '@/components/layout/index.vue'
44
import LayoutDsl from '@/components/layout/LayoutDsl.vue'
55
import SinglePage from '@/components/layout/SinglePage.vue'
@@ -11,7 +11,6 @@ import DashboardPreview from '@//views/dashboard/preview/SQPreviewSingle.vue'
1111
import Dashboard from '@/views/dashboard/index.vue'
1212
import Model from '@/views/system/model/Model.vue'
1313
import assistant from '@/views/embedded/assistant.vue'
14-
// import User from "@/views/system/user/index.vue";
1514
import User from '@/views/system/user/User.vue'
1615
import Workspace from '@/views/system/workspace/index.vue'
1716
import { watchRouter } from './watch'
@@ -63,7 +62,7 @@ const router = createRouter({
6362
},
6463
{
6564
path: '/dashboard',
66-
component: Layout,
65+
component: LayoutDsl,
6766
redirect: '/dashboard/index',
6867
children: [
6968
{

frontend/src/views/dashboard/common/EmptyBackground.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import { type PropType } from 'vue'
33
import nothingInput from '@/assets/img/nothing-input.png'
44
import nothingSelect from '@/assets/img/nothing-select.png'
55
import nothingTable from '@/assets/img/nothing-table.png'
6+
import nothingSelectDashoard from '@/assets/img/none-dashboard.png'
67
import none from '@/assets/img/none.png'
78
import error from '@/assets/img/error.png'
89
import nothingTree from '@/assets/img/nothing-tree.png'
910
import nothingNone from '@/assets/img/nothing-none.png'
1011
defineProps({
1112
imgType: {
1213
type: String as PropType<
13-
'input' | 'select' | 'table' | 'none' | 'noneWhite' | 'tree' | 'error'
14+
'input' | 'select' | 'table' | 'none' | 'noneWhite' | 'tree' | 'error' | 'selectDashboard'
1415
>,
1516
default: 'table',
1617
},
@@ -29,6 +30,7 @@ const getAssetsFile = {
2930
table: nothingTable,
3031
noneWhite: nothingNone,
3132
tree: nothingTree,
33+
selectDashboard: nothingSelectDashoard,
3234
error,
3335
none,
3436
}

frontend/src/views/dashboard/common/ResourceGroupOpt.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const state = reactive({
1414
placeholder: '',
1515
nodeType: 'folder',
1616
parentSelect: false,
17-
resourceFormNameLabel: t('dashboard.name'),
17+
resourceFormNameLabel: t('dashboard.dashboard_name'),
1818
dialogTitle: '',
1919
tData: [],
2020
tDataSource: [],
@@ -30,7 +30,7 @@ const getTitle = (opt: string) => {
3030
case 'newFolder':
3131
return t('dashboard.new_folder')
3232
case 'rename':
33-
return t('dashboard.rename')
33+
return t('dashboard.rename_dashboard')
3434
default:
3535
return
3636
}

0 commit comments

Comments
 (0)