Bug 31642 - Session should be kept active during dialog for UMC server restart
Session should be kept active during dialog for UMC server restart
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Alexander Kläser
Dirk Wiesenthal
:
Depends on:
Blocks: 31886
  Show dependency treegraph
 
Reported: 2013-06-04 18:35 CEST by Alexander Kläser
Modified: 2013-07-10 14:17 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2013-06-04 18:35:47 CEST
From Bug 28081, Comment 0
> ... 
> * Gut wäre es zudem, wenn die Session (bspw. über einen "Ping" mit dem
> UMC-Server wie in System-Setup) beim Erscheinen des Frage-Dialogs automatisch
> offen gehalten wird, so dass der Benutzer in jedem Fall die Möglichkeit hat,
> die Dienste neuzustarten.

Additionally, there may be the hint of a browser reload popping up. This hint should be blocked, as well.
Comment 1 Alexander Kläser univentionstaff 2013-07-01 16:52:00 CEST
During the restart dialog, a "ping" request is sent every 30sec.

YAML file has been added, package has been built:

2013-07-01-univention-management-console-module-lib.yaml

Changes have been applied to 3.2 scope, as well, changelog has been adapted, pacakge built:

 univention-management-console-module-lib (2.0.0-1) unstable; urgency=low
 .
   * Bug #31642: keep session active during dialog for server restart
Comment 2 Dirk Wiesenthal univentionstaff 2013-07-03 18:50:47 CEST
3.1-1: Ok
3.2: Ok
Changelog, YAML: Ok, typo fixed

I really like the
  var timeout = 1000 * Math.min(tools.status('sessionTimeout') / 2, 30);

Something that is missing where that "ping pattern" is used, too: System setup. Also note that in some cases there is another dialog just before the restart dialog listing errors. During this dialog the session may run into a timeout. Important example: App Center. I cloned this bug for this case: Bug#31886 also expressing my hope that keeping alive the session should become part of the frontend making it unnecessary to implement it everywhere again and again.
Comment 3 Dirk Wiesenthal univentionstaff 2013-07-03 18:59:11 CEST
Sorry, REOPEN. My UMC is still pinging... _keepSessionOpen does not stop if clicking on the "x" in the restart dialog.
Comment 4 Alexander Kläser univentionstaff 2013-07-04 14:16:00 CEST
(In reply to Dirk Wiesenthal from comment #3)
> Sorry, REOPEN. My UMC is still pinging... _keepSessionOpen does not stop if
> clicking on the "x" in the restart dialog.

I fixed it for UCS 3.2 by setting the property closable to false (support for dijit/Dialog since Dojo 1.9). This resolves this problem which also occurs in other situations.

 univention-management-console-frontend (3.0.11-1) unstable; urgency=low
 .
   * Bug #31642: make sure that ConfirmDialogs are not closable via escape or
     the 'x' button


For the Erratum, I created a separate ConfirmDialog instance (instead of using dialog.confirm()) and added a handler for the "hide" event.

The behaviour can be validated via the command:
====================
require('umc/modules/lib').server.askRestart().then(function() {
  console.log('OK');
}, function() {
  console.log('Cancel');
});
====================

 univention-management-console-module-lib (1.0.4-3) unstable; urgency=low
 .
   * Bug #31642: handle escape and Dialog 'x'-button
Comment 5 Dirk Wiesenthal univentionstaff 2013-07-05 14:46:10 CEST
Okay, works
Comment 6 Moritz Muehlenhoff univentionstaff 2013-07-10 14:17:15 CEST
http://errata.univention.de/ucs/3.1/143.html