Skip to content

Commit b2e8327

Browse files
ui: Admin, account and project dashboard improvements (#8193)
Signed-off-by: Rohit Yadav <[email protected]>
1 parent e65c9ff commit b2e8327

File tree

9 files changed

+882
-260
lines changed

9 files changed

+882
-260
lines changed

ui/public/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,6 +2148,7 @@
21482148
"label.volumetotal": "Volume",
21492149
"label.volumetype": "Volume Type",
21502150
"label.vpc": "VPC",
2151+
"label.vpcs": "VPCs",
21512152
"label.vpc.id": "VPC ID",
21522153
"label.vpc.offerings": "VPC offerings",
21532154
"label.vpc.virtual.router": "VPC virtual router",

ui/src/components/widgets/ChartCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export default {
9393
}
9494
9595
&-footer {
96-
border-top: 1px solid #e8e8e8;
9796
padding-top: 9px;
9897
margin-top: 8px;
9998
}

ui/src/components/widgets/Drawer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export default {
134134
text-align: center;
135135
transition: all 0.5s;
136136
cursor: pointer;
137-
top: calc(50% - 45px);
137+
top: calc(100% - 45px);
138138
z-index: 100;
139139
140140
&.left{

ui/src/config/router.js

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { UserLayout, BasicLayout, RouteView } from '@/layouts'
2020
import AutogenView from '@/views/AutogenView.vue'
2121
import IFramePlugin from '@/views/plugins/IFramePlugin.vue'
2222

23-
import { shallowRef, defineAsyncComponent } from 'vue'
23+
import { shallowRef } from 'vue'
2424
import { vueProps } from '@/vue-app'
2525

2626
import compute from '@/config/section/compute'
@@ -201,26 +201,7 @@ export function asyncRouterMap () {
201201
name: 'dashboard',
202202
meta: {
203203
title: 'label.dashboard',
204-
icon: 'DashboardOutlined',
205-
tabs: [
206-
{
207-
name: 'dashboard',
208-
component: shallowRef(defineAsyncComponent(() => import('@/views/dashboard/UsageDashboardChart')))
209-
},
210-
{
211-
name: 'accounts',
212-
show: (record, route, user) => { return record.account === user.account || ['Admin', 'DomainAdmin'].includes(user.roletype) },
213-
component: shallowRef(defineAsyncComponent(() => import('@/views/project/AccountsTab')))
214-
},
215-
{
216-
name: 'limits',
217-
params: {
218-
projectid: 'id'
219-
},
220-
show: (record, route, user) => { return ['Admin'].includes(user.roletype) },
221-
component: shallowRef(defineAsyncComponent(() => import('@/components/view/ResourceLimitTab.vue')))
222-
}
223-
]
204+
icon: 'DashboardOutlined'
224205
},
225206
component: () => import('@/views/dashboard/Dashboard')
226207
},

ui/src/core/lazy_lib/components_use.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ import {
6363
Slider,
6464
AutoComplete,
6565
Collapse,
66-
Space
66+
Space,
67+
Statistic
6768
} from 'ant-design-vue'
6869
import VueClipboard from 'vue3-clipboard'
6970
import VueCropper from 'vue-cropper'
@@ -127,5 +128,6 @@ export default {
127128
app.use(Collapse)
128129
app.use(Descriptions)
129130
app.use(Space)
131+
app.use(Statistic)
130132
}
131133
}

ui/src/style/dark-mode.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
.dark-mode {
3737
background: @dark-bgColor;
3838

39-
h1, h2, h3, h4, h5, h6 {
39+
h1, h2, h3, h4, h5, h6, .ant-statistic-title, .ant-statistic-content {
4040
color: @dark-text-color-3;
4141
}
4242

@@ -959,4 +959,4 @@
959959
.button-clear-notification {
960960
background-color: @dark-secondary-bgColor;
961961
}
962-
}
962+
}

ui/src/utils/device.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const deviceEnquire = function (callback) {
4343
}
4444

4545
enquireJs
46-
.register('screen and (max-width: 800px)', matchMobile)
47-
.register('screen and (min-width: 800px) and (max-width: 1366px)', matchTablet)
48-
.register('screen and (min-width: 1367px)', matchDesktop)
46+
.register('screen and (max-width: 765px)', matchMobile)
47+
.register('screen and (min-width: 766px) and (max-width: 1279px)', matchTablet)
48+
.register('screen and (min-width: 1280px)', matchDesktop)
4949
}

0 commit comments

Comments
 (0)