+}
+
+/* Log streamer */
+function NewLogEntry(e)
+{
+ var data;
+ try {
+ data = JSON.parse(e.data);
+ } catch(e) {
+ return;
+ }
+
+ if (data.sync_option != "sync_now")
+ {
+ var sync = (data.sync_option == "no_sync") ? false : true;
+ delete data.sync_option;
+
+ data_list_table.row.add({
+ 'Time':data.timestamp,
+ 'Level':data.level,
+ 'Subsystem':data.subsystem,
+ 'Event':data.event_id,
+ 'Message':data.msg,
+ 'Raw':JSON.stringify(data)});
+
+ if (!sync)
+ return;
+ }
+ data_list_table.draw(true);
+ data_list_table.rows().invalidate();
+ data_list_table.searchPanes.rebuildPane();
+}
+
+function StartLogStream(url)
+{
+ var source = new EventSource(url);
+ source.addEventListener('message', NewLogEntry, false);
+}