From 9d2386ff17dbcaffe5e8db6f9510bd1c1486df9e Mon Sep 17 00:00:00 2001 From: Tino Hager Date: Mon, 22 Jul 2024 09:57:18 +0200 Subject: [PATCH] Optimize Mail Flow Table --- src/Frontend/src/components/MailFlowTable.vue | 59 +++++++++++-------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/src/Frontend/src/components/MailFlowTable.vue b/src/Frontend/src/components/MailFlowTable.vue index 32f212f..24656d5 100644 --- a/src/Frontend/src/components/MailFlowTable.vue +++ b/src/Frontend/src/components/MailFlowTable.vue @@ -37,7 +37,7 @@ const columns : QTableProps['columns'] = [ { name: 'dateTime', align: 'left', - label: 'Time', + label: 'Time (UTC)', field: 'dateTime', sortable: false }, @@ -49,31 +49,17 @@ const columns : QTableProps['columns'] = [ sortable: false }, { - name: 'byDomain', + name: 'by', align: 'left', - label: 'By Domain', - field: 'byDomain', + label: 'By', + field: 'by', sortable: false }, { - name: 'byIpAddress', + name: 'from', align: 'left', - label: 'By IpAddress', - field: 'byIpAddress', - sortable: false - }, - { - name: 'fromDomain', - align: 'left', - label: 'From Domain', - field: 'fromDomain', - sortable: false - }, - { - name: 'fromIpAddress', - align: 'left', - label: 'From IpAddress', - field: 'fromIpAddress', + label: 'From', + field: 'from', sortable: false }, { @@ -88,7 +74,8 @@ const columns : QTableProps['columns'] = [ align: 'left', label: 'With', field: 'with', - sortable: false + sortable: false, + style: 'white-space: pre-wrap;' }, { name: 'id', @@ -106,6 +93,20 @@ const columns : QTableProps['columns'] = [ } ] +function formatDate (date: Date): string { + const options : Intl.DateTimeFormatOptions = { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + timeZone: 'UTC' + } + + return new Intl.DateTimeFormat(undefined, options).format(date) +} +