]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: ScheduleSimulator: split date and time into two columns
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 18 Jan 2023 14:35:21 +0000 (15:35 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 19 Jan 2023 17:08:19 +0000 (18:08 +0100)
and align the time right. This makes it easier to compare times

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/window/ScheduleSimulator.js

index 20a20a6b8d1508c681291678ec4b7298c897d093..6b02cbc98e5e4e016c221cf02cc5b5147889d4f6 100644 (file)
@@ -32,9 +32,14 @@ Ext.define('PVE.window.ScheduleSimulator', {
            this.lookup('simulateBtn').setDisabled(!value);
        },
 
-       renderTimestamp: function(value) {
+       renderDate: function(value) {
            let date = new Date(value*1000);
-           return date.toLocaleString();
+           return date.toLocaleDateString();
+       },
+
+       renderTime: function(value) {
+           let date = new Date(value*1000);
+           return date.toLocaleTimeString();
        },
 
        init: function(view) {
@@ -100,9 +105,16 @@ Ext.define('PVE.window.ScheduleSimulator', {
                    height: 300,
                    columns: [
                        {
-                           text: gettext('Local Time'),
-                           renderer: 'renderTimestamp',
+                           text: gettext('Date'),
+                           renderer: 'renderDate',
+                           dataIndex: 'timestamp',
+                           flex: 1,
+                       },
+                       {
+                           text: gettext('Time'),
+                           renderer: 'renderTime',
                            dataIndex: 'timestamp',
+                           align: 'right',
                            flex: 1,
                        },
                    ],