浏览代码

No error message on browser tab 2 after timeout on browser tab 1

This addresses the following issue:

1. Login to SSPR, and stay at the main menu.  Idle timeout at the bottom of the page will show "about 4 minutes."

2. Open a second browser tab, go to SSPR, and open the help desk module.   Idle timeout at the bottom of this page will show "about 59 minutes."

3. Wait until the idle timeout is reached on the first tab (the main menu).

4. Attempt to search for something in the help desk module on the second tab.  A spinning wheel will be shown.

An error dialog now shows up, instructing the user to reload the page.
James Albright 8 年之前
父节点
当前提交
1096393958

+ 1 - 0
server/src/main/java/password/pwm/i18n/Display.java

@@ -98,6 +98,7 @@ public enum Display implements PwmDisplayBundle {
     Display_GuestRegistration,
     Display_GuestUpdate,
     Display_Helpdesk,
+    Display_HelpdeskNoData,
     Display_Hour,
     Display_Hours,
     Display_IdleTimeout,

+ 1 - 0
server/src/main/resources/password/pwm/i18n/Display.properties

@@ -94,6 +94,7 @@ Display_GuestRegistration=To register a new guest account, please enter the foll
 Display_GuestUpdate=To update a guest account, please check and modify the following information.
 Display_Helpdesk=Please enter search data for the user.
 Display_HelpdeskOtpValidation=Instruct the user to load their mobile authentication app and share the current pass code.
+Display_HelpdeskNoData=The server did not respond with valid results.  This can often be caused from an expired session in another browser tab.  Reloading the page should allow you to log in and try again.
 Display_Hour=hour
 Display_Hours=hours
 Display_IdleTimeout=Idle Timeout\:

+ 30 - 22
server/src/main/webapp/public/resources/js/helpdesk.js

@@ -338,30 +338,38 @@ PWM_HELPDESK.processHelpdeskSearch = function() {
         PWM_MAIN.getObject('searchIndicator').style.display = 'none';
     };
     validationProps['processResultsFunction'] = function(data) {
-        var grid = PWM_VAR['heldesk_search_grid'];
-        if (data['error']) {
-            PWM_MAIN.showErrorDialog(data);
-            grid.refresh();
+        if (data == null) {
+            PWM_MAIN.showErrorDialog(PWM_MAIN.showString('Display_HelpdeskNoData'));
         } else {
-            var gridData = data['data']['searchResults'];
-            var sizeExceeded = data['data']['sizeExceeded'];
-            grid.refresh();
-            grid.renderArray(gridData);
-            var sortState = grid.get("sort");
-            grid.set("sort", sortState);
-
-            if (sizeExceeded) {
-                PWM_MAIN.getObject('maxResultsIndicator').style.display = 'inherit';
-                PWM_MAIN.showTooltip({id:'maxResultsIndicator',position:'below',text:PWM_MAIN.showString('Display_SearchResultsExceeded')})
-            } else if (PWM_MAIN.JSLibrary.isEmpty(data['data']['searchResults']) && validationProps['usernameField'].length > 0) {
-                PWM_MAIN.getObject('maxResultsIndicator').style.display = 'inherit';
-                PWM_MAIN.showTooltip({
-                    id: 'maxResultsIndicator',
-                    position: 'below',
-                    text: PWM_MAIN.showString('Display_SearchResultsNone')
-                })
+            var grid = PWM_VAR['heldesk_search_grid'];
+            if (data['error']) {
+                PWM_MAIN.showErrorDialog(data);
+                grid.refresh();
             } else {
-                PWM_MAIN.getObject('maxResultsIndicator').style.display = 'none';
+                var gridData = data['data']['searchResults'];
+                var sizeExceeded = data['data']['sizeExceeded'];
+                grid.refresh();
+                grid.renderArray(gridData);
+                var sortState = grid.get("sort");
+                grid.set("sort", sortState);
+
+                if (sizeExceeded) {
+                    PWM_MAIN.getObject('maxResultsIndicator').style.display = 'inherit';
+                    PWM_MAIN.showTooltip({
+                        id: 'maxResultsIndicator',
+                        position: 'below',
+                        text: PWM_MAIN.showString('Display_SearchResultsExceeded')
+                    })
+                } else if (PWM_MAIN.JSLibrary.isEmpty(data['data']['searchResults']) && validationProps['usernameField'].length > 0) {
+                    PWM_MAIN.getObject('maxResultsIndicator').style.display = 'inherit';
+                    PWM_MAIN.showTooltip({
+                        id: 'maxResultsIndicator',
+                        position: 'below',
+                        text: PWM_MAIN.showString('Display_SearchResultsNone')
+                    })
+                } else {
+                    PWM_MAIN.getObject('maxResultsIndicator').style.display = 'none';
+                }
             }
         }
     };