Change user events tutorial Redis error to be an inline box
Fixes #1653
This commit is contained in:
parent
d240ad9a2c
commit
cb9a99fc7b
3 changed files with 19 additions and 3 deletions
|
@ -284,11 +284,20 @@ angular.module("angular-tour", [])
|
|||
var fullUrl = tourScope._replaceData(url);
|
||||
checker.$source = new EventSource(fullUrl);
|
||||
checker.$source.onmessage = function(e) {
|
||||
checker.$message = JSON.parse(e.data);
|
||||
var parsed = JSON.parse(e.data);
|
||||
if (!parsed['data']) {
|
||||
return;
|
||||
}
|
||||
|
||||
checker.$message = parsed;
|
||||
};
|
||||
|
||||
checker.$source.onopen = function(e) {
|
||||
checker.$hasError = false;
|
||||
};
|
||||
|
||||
checker.$source.onerror = function(e) {
|
||||
bootbox.alert('Could not read user events from server due to a Redis issue. ' +
|
||||
' Please contact support.')
|
||||
checker.$hasError = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue