change(ui): dashboard list show created by
This commit is contained in:
parent
04754504ce
commit
31efd79d5a
3 changed files with 5 additions and 5 deletions
|
|
@ -42,9 +42,9 @@ function DashboardList({ siteId }: { siteId: string }) {
|
|||
},
|
||||
{
|
||||
title: 'Owner',
|
||||
dataIndex: 'ownerEmail',
|
||||
dataIndex: 'owner',
|
||||
width: '16.67%',
|
||||
sorter: (a, b) => a.ownerEmail.localeCompare(b.ownerEmail),
|
||||
sorter: (a, b) => a.owner.localeCompare(b.owner),
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default class Dashboard {
|
|||
currentWidget: Widget = new Widget()
|
||||
config: any = {}
|
||||
createdAt: number = new Date().getTime()
|
||||
ownerEmail: string = ""
|
||||
owner: string = ""
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this)
|
||||
|
|
@ -66,7 +66,7 @@ export default class Dashboard {
|
|||
this.isPublic = json.isPublic
|
||||
this.key = json.dashboardId
|
||||
this.createdAt = DateTime.fromMillis(new Date(json.createdAt).getTime())
|
||||
this.ownerEmail = json.ownerEmail
|
||||
this.owner = json.ownerName
|
||||
if (json.widgets) {
|
||||
const smallWidgets: any[] = json.widgets.filter(wi => wi.config.col === 1)
|
||||
const otherWidgets: any[] = json.widgets.filter(wi => wi.config.col !== 1)
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ export default class Widget {
|
|||
? json.series.map((series: any) => new FilterSeries().fromJson(series))
|
||||
: [new FilterSeries()];
|
||||
this.dashboards = json.dashboards || [];
|
||||
this.owner = json.ownerEmail;
|
||||
this.owner = json.ownerName;
|
||||
this.lastModified =
|
||||
json.editedAt || json.createdAt
|
||||
? DateTime.fromMillis(json.editedAt || json.createdAt)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue