Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
adm
pinger
Commits
77700b9a
Commit
77700b9a
authored
Aug 16, 2017
by
John Fox Woland
Browse files
+ 'Server is unreachable' indication
parent
5c8bd8f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Server.py
View file @
77700b9a
...
...
@@ -120,11 +120,8 @@ function SendRequest(r_method, r_path, r_args, r_handler)
//Если обмен данными завершен
if (Request.readyState == 4)
{
if (Request.status == 200)
//Передаем управление обработчику пользователя
r_handler(Request);
else
; // error
//Передаем управление обработчику пользователя
r_handler(Request);
}
}
...
...
@@ -153,8 +150,14 @@ function SendRequest(r_method, r_path, r_args, r_handler)
setInterval(function () {
SendRequest('GET', '/flag', '', function (Request) {
if (Request.responseText == '1')
location.reload();
if (Request.status == 200)
{
document.getElementById('page').setAttribute('style', '');
if (Request.responseText == '1')
location.reload();
}
else
document.getElementById('page').setAttribute('style', 'opacity: 0.3');
});
}, 1000);
'''
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment