← All changes
Harvester UI · Reviewed

Admins can set the login session timeouts, and the UI says when it loses its connection

Today the only way to shorten a Harvester login session is the command line, and when the browser loses its live connection the UI keeps showing old VM states without a word. This change adds the two session timeouts to Settings and shows a "Disconnected" pill in the header while the connection is down.

To review PR 1178 ↗ Issue 11287 ↗
What changes for the user

The flow

1

Two new settings under Settings > UI

The session timeout and the idle timeout now show next to branding, each with a short description.

Settings, UI tab: before without session settings, after with the idle timeout and session timeout
Before, these two settings existed on the server but were hidden in the UI.
2

Edit the idle timeout and save

Edit Setting opens a simple form with a value in minutes. We set 2 minutes and save.

The idle timeout form with value 2, and the settings list showing 2 marked Modified
After saving, the list shows the new value, marked "Modified".
3

Wrong values are stopped

0 is refused, and so is an idle timeout longer than the session timeout.

Two error messages: value must be a whole number above 0; idle timeout cannot be greater than the session timeout
The server itself accepts any value for these two settings, so this check in the form is the only safety net.
4

Idle users get a warning before logout

With the idle timeout below the session timeout, a "Session expiring" dialog with a countdown appears before the user is logged out.

The Session expiring dialog with a countdown bar and a Resume Session button
The dialog already existed in the UI but never showed, because both timeouts were 16 hours. "Resume Session" keeps the user logged in.
5

Connection lost: the header now says so

We cut the browser's live connection on the Virtual Machines list and wait 15 seconds.

VM list 15 seconds after the connection dropped: before shows nothing, after shows a red Disconnected pill
Before, the page looks normal while its states may already be stale. After, a red "Disconnected" pill shows in the header.
6

The pill explains itself

Hovering (or tabbing to) the pill shows what it means and what it does not mean.

Tooltip: the UI lost its connection and is trying to reconnect; states may be outdated; this does not indicate a problem with the cluster
When the connection is back, the pill disappears by itself (shown in the video).

Video (optional)

0:00 Before · 0:35 After: settings and the idle warning · 1:31 After: losing the connection

Notes