Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
e526edca
Commit
e526edca
authored
5 years ago
by
Florian Gnägi
Browse files
Options
Downloads
Patches
Plain Diff
OO-4126 stop ajax poller when standby-message can not be loaded or
poller responds with 404
parent
bf56e23a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/gui/control/winmgr/_content/serverpart.html
+25
-2
25 additions, 2 deletions
...org/olat/core/gui/control/winmgr/_content/serverpart.html
with
25 additions
and
2 deletions
src/main/java/org/olat/core/gui/control/winmgr/_content/serverpart.html
+
25
−
2
View file @
e526edca
...
...
@@ -95,7 +95,24 @@ function tick () {
if
(
ts
>
sbtimestamp
)
{
window
.
onunload
=
null
;
window
.
onbeforeunload
=
null
;
window
.
location
=
'
$sburi/
'
;
##
First
probe
if
the
standby
window
mapper
is
available
jQuery
.
ajax
({
method
:
'
get
'
,
url
:
'
$sburi/
'
,
cache
:
false
,
success
:
function
()
{
##
OK
,
so
redirect
to
standby
window
.
location
=
'
$sburi/
'
;
},
error
:
function
()
{
##
NOK
:
standby
not
available
.
This
happens
when
the
other
opened
window
can
not
be
detected
##
(
e
.
g
.
in
other
browser
or
loaded
from
a
bookmark
etc
).
Normally
this
is
already
done
by
onPollFailure
,
##
but
this
does
not
catch
all
cases
.
##
Only
solution
:
stop
poller
as
this
triggers
some
fancy
***
.
dms
file
downloads
o_info
.
poller
.
cancel
();
}
})();
}
}
catch
(
e
)
{
// does not matter
...
...
@@ -127,8 +144,14 @@ function onPollSuccess(content, s, response) {
}
}
function
onPollFailure
()
{
function
onPollFailure
(
response
)
{
pollError
++
;
if
(
response
.
status
==
404
)
{
##
Not
found
-
happens
when
user
opened
a
second
window
and
logged
in
while
in
the
first
window
the
poller
is
still
running
.
##
Note
:
when
in
standby
-
mode
this
does
not
happen
as
the
user
session
is
still
valid
and
the
standby
document
exists
.
##
Only
solution
:
stop
poller
as
this
triggers
some
fancy
***
.
dms
file
downloads
o_info
.
poller
.
cancel
();
}
}
/* ]]> */
</script>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment