mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-15 10:47:06 +02:00
Stop polling if receive 401 response
This commit is contained in:
parent
51d7bf3309
commit
4baf45c36a
@ -15,10 +15,14 @@
|
|||||||
var fetch = function(){
|
var fetch = function(){
|
||||||
self.fetchAlertsData().then(function(alerts){
|
self.fetchAlertsData().then(function(alerts){
|
||||||
self.alerts = alerts;
|
self.alerts = alerts;
|
||||||
|
})["catch"](function(xhr){
|
||||||
|
if(xhr.status === 401) {
|
||||||
|
clearInterval(timer);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
fetch();
|
fetch();
|
||||||
setInterval(fetch, POLLING_INTERVAL);
|
var timer = setInterval(fetch, POLLING_INTERVAL);
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
Loading…
Reference in New Issue
Block a user