Dominik Csapak [Thu, 3 Mar 2022 14:11:45 +0000 (15:11 +0100)]
fix #3919: log view: show first task output line correctly
if a task did not produce output yet, we always get a single line
with "no output". our heuristic in the gui counts the total lines +
the current position. so to update the first output correctly, we
have to update every time in case we only have one line.
Otherwise, we only update on the second line, which is bad
in case the only line we ever get is the result.
Dominik Csapak [Wed, 23 Feb 2022 11:05:06 +0000 (12:05 +0100)]
fix drag&drop for pointerType 'pen'
some devices (e.g. vms via novnc, and some laptops) get the pointerType
'pen' under chromium.
the DragZone handler tries to ignore touch input for that by
checking for "=== 'mouse'" which does not include 'pen'
so override that to handle it when the pointerType !== 'touch'
Fabian Ebner [Tue, 7 Dec 2021 11:53:30 +0000 (12:53 +0100)]
sorters: use correct property 'direction' and keep default 'ASC'
Ext.util.Sorter does not have an 'order' property, so 'order: DESC'
didn't have an effect. The default is 'ASC' and it is arguably the
preferred direction for realm anyways.
If there are mirrors and log/special vdevs it just feels too small.
It also doesn't help if there are errors in the upper part taking up
space. Make it 600, which was used in PVE before.
improve error handling when adding webauthn entries
There are cases where we directly throw a string error
(particularly, when navigator.credentials.create() fails,
for example when trying to register the same WA device to
the same user twice), which would end up with the WA window
simply not closing before.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Thomas Lamprecht [Wed, 24 Nov 2021 17:23:35 +0000 (18:23 +0100)]
log viewer: add heuristic for scroll-direction dependent ratio distribution
if the user scrolls down make 2/3 of the buffer load the downward
(newer) buffer and only 1/3 the upward (older), and vice versa, if
the user scrolls up load 2/3 of the older messages vs. 1/3 of newer
ones.
If the user scrolls around frantically we're roughly as good as
previously and in all other cases we're better now.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Tue, 23 Nov 2021 12:02:29 +0000 (13:02 +0100)]
ui: logpanel: catch up to very fast task logs with api calls
by updating the start to 'total-limit' if we follow the task log live.
to do that, we decouple the 'scroll' event from updating the 'start'
parameter and call that directly after we scrolled down.
to not trigger the scroll event multiple times, suspend the scroll event
while doing that.
while we're touching those lines, remove the 'setTimeout' workaround
for touchscreens, since it seems to work fine since extjs 7.0
this also fixes the issue that the scroll event is not called sometimes
Dominik Csapak [Tue, 23 Nov 2021 09:49:35 +0000 (10:49 +0100)]
ui: journalview: fix wrong first load with timespan
calling updateParams here lead to making an api call with the default
timespan (last 3 days) on pbs/pmg when going to the 'administration'
panel, even though it would never be shown since on tab activate we would
show the 'live mode' which does not use the timespan
on pve this did not happen since the journalview is on its own page and
the change to livemode triggered too fast..
Thomas Lamprecht [Tue, 23 Nov 2021 08:34:41 +0000 (09:34 +0100)]
utils: format_duration_human: calculate years too
Add years and skip showing minute scale once we got over a year,
that's just not relevant anymore at that scale..
Months are just not an ideal thing to show, as they have different
lengths too (leap years have similar issue, but they differ 0.27%
from a normal year, while shortest to longest month is 10.7%
difference!)
Weeks could be done though, they're fixed at 7 days, but for now I
want to avoid unwieldy day numbers like 2634 d as that's just hard to
frame correctly. Also adding years now does not makes adding weeks in
the future impossible anyway..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Thu, 18 Nov 2021 09:50:10 +0000 (10:50 +0100)]
data: diffstore: fix autoDestroyRstore option
the change from extjs 6.0.1 to 7.0.0 removed 'onDestroy' but brought
us 'doDestroy' for stores
we did not notice since 'onDestroy' was a private method and thus
the changelog did not mention this (doDestroy is a public method meant
exactly for our use case)
Dominik Csapak [Thu, 5 Aug 2021 10:31:35 +0000 (12:31 +0200)]
panel/RRDCharts: enable scrolling for RRDCharts on touchscreens
quote from extjs docs (AbstractChart.js):
If you do have a chart inside a scrollable view, even if it has no
interactions, you have to set its touchAction config to the following:
touchAction: {
panX: true,
panY: true
}
Otherwise, if a touch action started on a chart,
a swipe will not scroll the view.
Since we have RRDCharts always in a scrollable view, and it does not seem to
hurt non-touchscreens, enable it by default so that users on touchscreens
can scroll it.
Reported by users in the forum:
https://forum.proxmox.com/threads/minor-but-annoying-ipad-swipe-bug.93686
adapted from PMG, because it has an additional fix to avoid setting
undefined in the view model, which still affects PBS (see pmg-gui
commit 774418f08b10c651357d11ccb161ac075e1ae905).
Thomas Lamprecht [Mon, 19 Jul 2021 13:54:14 +0000 (15:54 +0200)]
add package version window
we want that component in all projects, PVE and PBS have the code
duplicated for now, as PMG is about to receive this too I rather want
to use the chance add add it here for actual reuse.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Oguz Bektas [Tue, 13 Jul 2021 11:03:15 +0000 (13:03 +0200)]
service view: fix stale stop/restart button enabled behavior
fix an issue where the stop or restart button stays enabled for
elements in 'startOnlyServices' after switching selection from a
service that was not restricted to start-only
note: front-end change only as the backend already refused to stop a
start-only service.
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
added the following (necessary) changes:
* use Proxmox.Utils.authSchema
* omit the sync button/handler, but add a possibilty to add extra buttons
* check for an 'edit' property in the authSchema for enabling editing
* removed the onlineHelp property
* removed 'TFA' column (can be added by the caller)
node: repos: only show suites warning at the top if enabled repository is affected
The warning still shows up for the disabled repository itself, but
having a disabled repository with a bad suite is not problematic for
the configuration status as a whole.
alows to make the code simpler too, but we need to instantiate the
selection model explicitly, as we use a bit of a weird layout here to
be able to show the pending changes at the bottom, if any, so the
main gridpanel is not the parent of the toolbar buttons, so the
std-remove button does not automatically finds the selection model
when searching in the parent
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
since we use a buffered store on a grid, we cannot use our
normal monStoreErrors from Utils (The store on the grid is a memorystore
without our 'proxmox' proxy, and the store in the viewmodel is not
initialized yet in the init)
simply set the mask in the already existing 'updateLayout' function
which is exactly the right place for the buffered store load
since we use a remotefilter on a bufferedstore, the only event where
we can check if the selected element is still there is the 'refresh'
event. Simply deselect if the seleceted element is not in the store