mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-17 03:37:06 +02:00
Merge pull request #146 from fluent/fix_flashing_regexp
Fix flashing regexp (Fix #145)
This commit is contained in:
commit
db79a91345
@ -120,9 +120,12 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
preview: function(){
|
preview: function(){
|
||||||
|
if(this.previewAjax) {
|
||||||
|
this.previewAjax.abort();
|
||||||
|
}
|
||||||
var self = this;
|
var self = this;
|
||||||
new Promise(function(resolve, reject) {
|
new Promise(function(resolve, reject) {
|
||||||
$.ajax({
|
self.previewAjax = $.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/api/regexp_preview",
|
url: "/api/regexp_preview",
|
||||||
data: {
|
data: {
|
||||||
@ -137,7 +140,9 @@
|
|||||||
self.regexpMatches = result.matches;
|
self.regexpMatches = result.matches;
|
||||||
self.updateHighlightedLines();
|
self.updateHighlightedLines();
|
||||||
})["catch"](function(error){
|
})["catch"](function(error){
|
||||||
console.error(error.stack);
|
if(error.stack) {
|
||||||
|
console.error(error.stack);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user