preserve grid-host on probe. remove on invalid response
This commit is contained in:
parent
220469f09b
commit
6c90b4fff0
1 changed files with 4 additions and 0 deletions
|
|
@ -1070,6 +1070,8 @@ self.kiri.license = exports.LICENSE;
|
||||||
xhtr.onreadystatechange = function() {
|
xhtr.onreadystatechange = function() {
|
||||||
if (xhtr.readyState === 4) {
|
if (xhtr.readyState === 4) {
|
||||||
if (xhtr.status >= 200 && xhtr.status < 300) {
|
if (xhtr.status >= 200 && xhtr.status < 300) {
|
||||||
|
SDB['grid-host'] = host;
|
||||||
|
SDB['grid-apik'] = apik;
|
||||||
var res = JSON.parse(xhtr.responseText);
|
var res = JSON.parse(xhtr.responseText);
|
||||||
var sel = false;
|
var sel = false;
|
||||||
var html = [];
|
var html = [];
|
||||||
|
|
@ -1094,6 +1096,8 @@ self.kiri.license = exports.LICENSE;
|
||||||
} else if (xhtr.status === 401) {
|
} else if (xhtr.status === 401) {
|
||||||
$('gpapik').style.display = '';
|
$('gpapik').style.display = '';
|
||||||
} else {
|
} else {
|
||||||
|
SDB.removeItem('grid-host');
|
||||||
|
SDB.removeItem('grid-apik');
|
||||||
console.log("invalid grid:host url");
|
console.log("invalid grid:host url");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue