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(){
|
||||
self.fetchAlertsData().then(function(alerts){
|
||||
self.alerts = alerts;
|
||||
})["catch"](function(xhr){
|
||||
if(xhr.status === 401) {
|
||||
clearInterval(timer);
|
||||
}
|
||||
});
|
||||
};
|
||||
fetch();
|
||||
setInterval(fetch, POLLING_INTERVAL);
|
||||
var timer = setInterval(fetch, POLLING_INTERVAL);
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
Loading…
Reference in New Issue
Block a user