From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 3/5] ui: ScheduleSimulator: split date and time into two columns
Date: Wed, 18 Jan 2023 15:35:21 +0100 [thread overview]
Message-ID: <20230118143523.3587956-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20230118143523.3587956-1-d.csapak@proxmox.com>
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 | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/www/manager6/window/ScheduleSimulator.js b/www/manager6/window/ScheduleSimulator.js
index 20a20a6b8..6b02cbc98 100644
--- a/www/manager6/window/ScheduleSimulator.js
+++ b/www/manager6/window/ScheduleSimulator.js
@@ -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,
},
],
--
2.30.2
next prev parent reply other threads:[~2023-01-18 14:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 14:35 [pve-devel] [PATCH manager 1/5] ui: reduce default size of Backup detail window Dominik Csapak
2023-01-18 14:35 ` [pve-devel] [PATCH manager 2/5] ui: BackupView: add scrolling overflow handler for the toolbar Dominik Csapak
2023-01-19 17:13 ` [pve-devel] applied: " Thomas Lamprecht
2023-01-18 14:35 ` Dominik Csapak [this message]
2023-01-19 17:13 ` [pve-devel] applied: [PATCH manager 3/5] ui: ScheduleSimulator: split date and time into two columns Thomas Lamprecht
2023-01-18 14:35 ` [pve-devel] [RFC PATCH manager 4/5] ui: ScheduleSimulator: add rownumberer column Dominik Csapak
2023-01-20 9:30 ` Thomas Lamprecht
2023-01-18 14:35 ` [pve-devel] [RFC PATCH manager 5/5] ui: ScheduleSimulator: add UTC checkbox Dominik Csapak
2023-01-19 17:16 ` Thomas Lamprecht
2023-01-19 17:11 ` [pve-devel] applied: [PATCH manager 1/5] ui: reduce default size of Backup detail window Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230118143523.3587956-3-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox