mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 10:56:11 +02:00
Fix flashing regexp (Fix #145)
This commit is contained in:
parent
38ec9483ca
commit
61ec84f4f7
@ -120,9 +120,12 @@
|
||||
},
|
||||
|
||||
preview: function(){
|
||||
if(this.previewAjax) {
|
||||
this.previewAjax.abort();
|
||||
}
|
||||
var self = this;
|
||||
new Promise(function(resolve, reject) {
|
||||
$.ajax({
|
||||
self.previewAjax = $.ajax({
|
||||
method: "POST",
|
||||
url: "/api/regexp_preview",
|
||||
data: {
|
||||
@ -137,7 +140,9 @@
|
||||
self.regexpMatches = result.matches;
|
||||
self.updateHighlightedLines();
|
||||
})["catch"](function(error){
|
||||
console.error(error.stack);
|
||||
if(error.stack) {
|
||||
console.error(error.stack);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user