mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-24 16:59:02 +00:00
ui: ScheduleSimulator: split date and time into two columns
and align the time right. This makes it easier to compare times Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
cc911f63aa
commit
92df2742f5
@ -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,11 +105,18 @@ 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,
|
||||
},
|
||||
],
|
||||
store: {
|
||||
fields: ['timestamp'],
|
||||
|
Loading…
Reference in New Issue
Block a user