* [pve-devel] [PATCH manager 1/5] ui: reduce default size of Backup detail window
@ 2023-01-18 14:35 Dominik Csapak
2023-01-18 14:35 ` [pve-devel] [PATCH manager 2/5] ui: BackupView: add scrolling overflow handler for the toolbar Dominik Csapak
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Dominik Csapak @ 2023-01-18 14:35 UTC (permalink / raw)
To: pve-devel
on our minimal display size (1280x720), using height 700 is too large
when considering that the browser + os also need some vertical space.
For good measure, use a maximum of 600 pixels. Since the window is
resizable anyway, users with more space should not have a problem here.
reported in the forum:
https://forum.proxmox.com/threads/web-forms-extend-beyond-web-page-window-in-some-cases.120714
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/dc/Backup.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 4638cbb68..d69370b69 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -548,7 +548,7 @@ Ext.define('PVE.dc.BackupView', {
Ext.create('Ext.window.Window', {
modal: true,
width: 800,
- height: 700,
+ height: 600,
resizable: true,
layout: 'fit',
title: gettext('Backup Details'),
--
2.30.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [pve-devel] [PATCH manager 2/5] ui: BackupView: add scrolling overflow handler for the toolbar
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 ` Dominik Csapak
2023-01-19 17:13 ` [pve-devel] applied: " Thomas Lamprecht
2023-01-18 14:35 ` [pve-devel] [PATCH manager 3/5] ui: ScheduleSimulator: split date and time into two columns Dominik Csapak
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Dominik Csapak @ 2023-01-18 14:35 UTC (permalink / raw)
To: pve-devel
since we already have many elements here, and in our minimal resolution
of 1280x720 we don't see all elements any more.
reported in the forum:
https://forum.proxmox.com/threads/web-forms-extend-beyond-web-page-window-in-some-cases.120714
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/dc/Backup.js | 71 +++++++++++++++++++++------------------
1 file changed, 38 insertions(+), 33 deletions(-)
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index d69370b69..0c4051b65 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -747,41 +747,46 @@ Ext.define('PVE.dc.BackupView', {
viewConfig: {
trackOver: false,
},
- tbar: [
- {
- text: gettext('Add'),
- handler: function() {
- var win = Ext.create('PVE.dc.BackupEdit', {});
- win.on('destroy', reload);
- win.show();
+ dockedItems: [{
+ xtype: 'toolbar',
+ overflowHandler: 'scroller',
+ dock: 'top',
+ items: [
+ {
+ text: gettext('Add'),
+ handler: function() {
+ var win = Ext.create('PVE.dc.BackupEdit', {});
+ win.on('destroy', reload);
+ win.show();
+ },
},
- },
- '-',
- remove_btn,
- edit_btn,
- detail_btn,
- '-',
- run_btn,
- '->',
- noBackupJobWarning,
- noBackupJobInfoButton,
- '-',
- {
- xtype: 'proxmoxButton',
- selModel: null,
- text: gettext('Schedule Simulator'),
- handler: () => {
- let record = sm.getSelection()[0];
- let schedule;
- if (record) {
- schedule = record.data.schedule;
- }
- Ext.create('PVE.window.ScheduleSimulator', {
- schedule,
- }).show();
+ '-',
+ remove_btn,
+ edit_btn,
+ detail_btn,
+ '-',
+ run_btn,
+ '->',
+ noBackupJobWarning,
+ noBackupJobInfoButton,
+ '-',
+ {
+ xtype: 'proxmoxButton',
+ selModel: null,
+ text: gettext('Schedule Simulator'),
+ handler: () => {
+ let record = sm.getSelection()[0];
+ let schedule;
+ if (record) {
+ schedule = record.data.schedule;
+ }
+ Ext.create('PVE.window.ScheduleSimulator', {
+ schedule,
+ }).show();
+ },
},
- },
- ],
+ ],
+ }],
columns: [
{
header: gettext('Enabled'),
--
2.30.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [pve-devel] [PATCH manager 3/5] ui: ScheduleSimulator: split date and time into two columns
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-18 14:35 ` Dominik Csapak
2023-01-19 17:13 ` [pve-devel] applied: " Thomas Lamprecht
2023-01-18 14:35 ` [pve-devel] [RFC PATCH manager 4/5] ui: ScheduleSimulator: add rownumberer column Dominik Csapak
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Dominik Csapak @ 2023-01-18 14:35 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [pve-devel] [RFC PATCH manager 4/5] ui: ScheduleSimulator: add rownumberer column
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-18 14:35 ` [pve-devel] [PATCH manager 3/5] ui: ScheduleSimulator: split date and time into two columns Dominik Csapak
@ 2023-01-18 14:35 ` 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:11 ` [pve-devel] applied: [PATCH manager 1/5] ui: reduce default size of Backup detail window Thomas Lamprecht
4 siblings, 1 reply; 10+ messages in thread
From: Dominik Csapak @ 2023-01-18 14:35 UTC (permalink / raw)
To: pve-devel
so it's clear what the first time is, for that we have to disable
sorting, since the rownumberer will not sort with it
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
not sure if it's worth losing the sorting...
www/manager6/window/ScheduleSimulator.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/www/manager6/window/ScheduleSimulator.js b/www/manager6/window/ScheduleSimulator.js
index 6b02cbc98..7e708b43f 100644
--- a/www/manager6/window/ScheduleSimulator.js
+++ b/www/manager6/window/ScheduleSimulator.js
@@ -104,10 +104,15 @@ Ext.define('PVE.window.ScheduleSimulator', {
scrollable: true,
height: 300,
columns: [
+ {
+ xtype: 'rownumberer',
+ width: 35,
+ },
{
text: gettext('Date'),
renderer: 'renderDate',
dataIndex: 'timestamp',
+ sortable: false,
flex: 1,
},
{
@@ -115,6 +120,7 @@ Ext.define('PVE.window.ScheduleSimulator', {
renderer: 'renderTime',
dataIndex: 'timestamp',
align: 'right',
+ sortable: false,
flex: 1,
},
],
--
2.30.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [pve-devel] [RFC PATCH manager 5/5] ui: ScheduleSimulator: add UTC checkbox
2023-01-18 14:35 [pve-devel] [PATCH manager 1/5] ui: reduce default size of Backup detail window Dominik Csapak
` (2 preceding siblings ...)
2023-01-18 14:35 ` [pve-devel] [RFC PATCH manager 4/5] ui: ScheduleSimulator: add rownumberer column Dominik Csapak
@ 2023-01-18 14:35 ` 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
4 siblings, 1 reply; 10+ messages in thread
From: Dominik Csapak @ 2023-01-18 14:35 UTC (permalink / raw)
To: pve-devel
that displays the simulated times in UTC instead of the local timezone
Only takes effect on the next click of 'Simulate'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
wanted to make it clearer that the time is the Local timezone by default,
not sure if it does that...
www/manager6/window/ScheduleSimulator.js | 26 ++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/www/manager6/window/ScheduleSimulator.js b/www/manager6/window/ScheduleSimulator.js
index 7e708b43f..e4b4397f2 100644
--- a/www/manager6/window/ScheduleSimulator.js
+++ b/www/manager6/window/ScheduleSimulator.js
@@ -34,12 +34,23 @@ Ext.define('PVE.window.ScheduleSimulator', {
renderDate: function(value) {
let date = new Date(value*1000);
- return date.toLocaleDateString();
+
+ if (this.getViewModel().get('utc')) {
+ return date.toLocaleDateString(undefined, { timeZone: 'UTC' });
+ }
+ else {
+ return date.toLocaleDateString();
+ }
},
renderTime: function(value) {
let date = new Date(value*1000);
- return date.toLocaleTimeString();
+ if (this.getViewModel().get('utc')) {
+ return date.toLocaleTimeString(undefined, { timeZone: 'UTC' });
+ }
+ else {
+ return date.toLocaleTimeString();
+ }
},
init: function(view) {
@@ -50,6 +61,10 @@ Ext.define('PVE.window.ScheduleSimulator', {
},
},
+ viewModel: {
+ data: { },
+ },
+
bodyPadding: 10,
modal: true,
resizable: false,
@@ -77,6 +92,13 @@ Ext.define('PVE.window.ScheduleSimulator', {
reference: 'iterations',
fieldLabel: gettext('Iterations'),
},
+ {
+ xtype: 'checkbox',
+ bind: {
+ value: '{utc}'
+ },
+ fieldLabel: gettext('UTC'),
+ },
{
xtype: 'container',
layout: 'hbox',
--
2.30.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [pve-devel] applied: [PATCH manager 1/5] ui: reduce default size of Backup detail window
2023-01-18 14:35 [pve-devel] [PATCH manager 1/5] ui: reduce default size of Backup detail window Dominik Csapak
` (3 preceding siblings ...)
2023-01-18 14:35 ` [pve-devel] [RFC PATCH manager 5/5] ui: ScheduleSimulator: add UTC checkbox Dominik Csapak
@ 2023-01-19 17:11 ` Thomas Lamprecht
4 siblings, 0 replies; 10+ messages in thread
From: Thomas Lamprecht @ 2023-01-19 17:11 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 18/01/2023 um 15:35 schrieb Dominik Csapak:
> on our minimal display size (1280x720), using height 700 is too large
> when considering that the browser + os also need some vertical space.
>
> For good measure, use a maximum of 600 pixels. Since the window is
> resizable anyway, users with more space should not have a problem here.
>
> reported in the forum:
> https://forum.proxmox.com/threads/web-forms-extend-beyond-web-page-window-in-some-cases.120714
Can be a trailer and use the short-form of our forum:
Link: https://forum.proxmox.com/threads/120714/
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> www/manager6/dc/Backup.js | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [pve-devel] applied: [PATCH manager 2/5] ui: BackupView: add scrolling overflow handler for the toolbar
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 ` Thomas Lamprecht
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Lamprecht @ 2023-01-19 17:13 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 18/01/2023 um 15:35 schrieb Dominik Csapak:
> since we already have many elements here, and in our minimal resolution
> of 1280x720 we don't see all elements any more.
>
> reported in the forum:
> https://forum.proxmox.com/threads/web-forms-extend-beyond-web-page-window-in-some-cases.120714
Same here w.r.t. Link:
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> www/manager6/dc/Backup.js | 71 +++++++++++++++++++++------------------
> 1 file changed, 38 insertions(+), 33 deletions(-)
>
>
applied with merge conflict addressed as I made some patches already that I then
committed in before as it was easier as the other way around (after all I replied to
the forum thread and you did not coordinate starting on working on that anywhere
FWICT), thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [pve-devel] applied: [PATCH manager 3/5] ui: ScheduleSimulator: split date and time into two columns
2023-01-18 14:35 ` [pve-devel] [PATCH manager 3/5] ui: ScheduleSimulator: split date and time into two columns Dominik Csapak
@ 2023-01-19 17:13 ` Thomas Lamprecht
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Lamprecht @ 2023-01-19 17:13 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 18/01/2023 um 15:35 schrieb Dominik Csapak:
> 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(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [pve-devel] [RFC PATCH manager 5/5] ui: ScheduleSimulator: add UTC checkbox
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
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Lamprecht @ 2023-01-19 17:16 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 18/01/2023 um 15:35 schrieb Dominik Csapak:
> that displays the simulated times in UTC instead of the local timezone
> Only takes effect on the next click of 'Simulate'
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> wanted to make it clearer that the time is the Local timezone by default,
> not sure if it does that...
1) the simulate button needs to get disabled if there's no dirty change,
as re-enabling it on form change makes it clearer that the list isn't
auto-generated
2) A combobox that shows the actually used time zone (in a name or +0000 format)
and allows to select the UTC one?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [pve-devel] [RFC PATCH manager 4/5] ui: ScheduleSimulator: add rownumberer column
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
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Lamprecht @ 2023-01-20 9:30 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 18/01/2023 um 15:35 schrieb Dominik Csapak:
> so it's clear what the first time is, for that we have to disable
> sorting, since the rownumberer will not sort with it
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> not sure if it's worth losing the sorting...
IMO it isn't, if we would need to calculate a stable "run #"
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-01-20 9:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [pve-devel] [PATCH manager 3/5] ui: ScheduleSimulator: split date and time into two columns Dominik Csapak
2023-01-19 17:13 ` [pve-devel] applied: " 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox