mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- Use JSON.parse, not eval()
- Don't fade at all anymore.
This commit is contained in:
parent
99a0c37ede
commit
4c3bd9e7f1
1 changed files with 6 additions and 5 deletions
|
@ -57,16 +57,17 @@
|
|||
//console.log(["WebSocket open", ws])
|
||||
};
|
||||
ws.onmessage = function(event) {
|
||||
eval("var data = " + event.data);
|
||||
var data = JSON.parse(event.data);
|
||||
var el = $("#message-template").tmpl(data, { "message": data["@message"], "timestamp": data["@timestamp"] });
|
||||
//.css("display", "none")
|
||||
//.fadeIn()
|
||||
el.addClass("message")
|
||||
.appendTo($("#radiator"))
|
||||
.delay(10000)
|
||||
.hide(2000, function() {
|
||||
$(this).remove();
|
||||
});
|
||||
//.delay(10000)
|
||||
//.hide(2000, function() {
|
||||
//$(this).remove();
|
||||
//});
|
||||
setTimeout(function() { $(el).remove() }, 12000)
|
||||
//.fadeOut(2000, function() {
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue