mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
Merge branch 'master' of github.com:jordansissel/logstash
This commit is contained in:
commit
8ee6a23fe3
6 changed files with 31 additions and 21 deletions
|
@ -21,11 +21,11 @@ class LogStash::Inputs::File < LogStash::Inputs::Base
|
|||
url.path = filetail.path
|
||||
@logger.debug(["original url", { :originalurl => @url, :newurl => url }])
|
||||
event = LogStash::Event.new({
|
||||
"@source" => url,
|
||||
"@message" => event,
|
||||
"@type" => @type,
|
||||
"@tags" => @tags.clone,
|
||||
})
|
||||
event.source = url
|
||||
@logger.debug(["Got event", event])
|
||||
@callback.call(event)
|
||||
end # def receive
|
||||
|
|
|
@ -24,11 +24,11 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
|
|||
url.port = port
|
||||
@logger.debug(["original url", { :originalurl => @url, :newurl => url }])
|
||||
event = LogStash::Event.new({
|
||||
"@source" => url,
|
||||
"@message" => event,
|
||||
"@type" => @type,
|
||||
"@tags" => @tags.clone,
|
||||
})
|
||||
event.source = url
|
||||
@logger.debug(["Got event", event])
|
||||
@callback.call(event)
|
||||
end # def receive
|
||||
|
|
|
@ -22,9 +22,8 @@ class LogStash::Outputs::Gelf < LogStash::Outputs::Base
|
|||
gelf.short_message = (event.fields["message"] or event.message)
|
||||
gelf.full_message = (event.message)
|
||||
gelf.level = 1
|
||||
source = URI.parse(event.source)
|
||||
gelf.host = source.host
|
||||
gelf.file = source.path
|
||||
gelf.host = event["@source_host"]
|
||||
gelf.file = event["@source_path"]
|
||||
|
||||
event.fields.each do |name, value|
|
||||
gelf.add_additional name, value
|
||||
|
|
|
@ -104,9 +104,11 @@
|
|||
return false;
|
||||
});
|
||||
|
||||
$("ul.results li.event").live("click", function() {
|
||||
var data = eval($(this).data("full"));
|
||||
var result_row_selector = "table.results tr.event";
|
||||
$(result_row_selector).live("click", function() {
|
||||
var data = eval($("td.message", this).data("full"));
|
||||
|
||||
console.log(event);
|
||||
/* Apply template to the dialog */
|
||||
var query = $("#query").val().replace(/^\s+|\s+$/g, "")
|
||||
var sanitize = function(str) {
|
||||
|
@ -161,7 +163,7 @@
|
|||
return 0;
|
||||
});
|
||||
|
||||
$("ul.results li.selected").removeClass("selected")
|
||||
$(result_row_selector).removeClass("selected")
|
||||
$(this).addClass("selected");
|
||||
var entry = this;
|
||||
$("#inspector li").remove()
|
||||
|
|
|
@ -22,11 +22,16 @@
|
|||
- if @next_href
|
||||
%a.pager{ :href => @next_href }
|
||||
next
|
||||
%ul.results
|
||||
%table.results
|
||||
%tr
|
||||
%th timestamp
|
||||
%th event
|
||||
- @hits.reverse.each do |hit|
|
||||
%li.event{ :"data-full" => hit.to_json }&= hit["_source"]["@message"]
|
||||
- if @hits.length == 0
|
||||
- if !params[:q]
|
||||
No query given. How about <a href="?q=*" class="querychanger">this?</a>
|
||||
- else
|
||||
No results for query '#{params[:q]}'
|
||||
%tr.event
|
||||
%td.timestamp&= hit["_source"]["@timestamp"]
|
||||
%td.message{ :"data-full" => hit.to_json }&= hit["_source"]["@message"]
|
||||
- if @hits.length == 0
|
||||
- if !params[:q]
|
||||
No query given. How about <a href="?q=*" class="querychanger">this?</a>
|
||||
- else
|
||||
No results for query '#{params[:q]}'
|
||||
|
|
|
@ -20,18 +20,22 @@ body
|
|||
margin-left: 2em
|
||||
margin-right: 2em
|
||||
margin-top: 1em
|
||||
#content ul.results
|
||||
#content table.results
|
||||
font-family: monospace
|
||||
#content li.event
|
||||
#content td.event
|
||||
padding-bottom: 3px
|
||||
white-space: pre-wrap
|
||||
#content li.selected
|
||||
#content td.timestamp
|
||||
white-space: nowrap
|
||||
font-size: 85%
|
||||
text-align: top
|
||||
#content tr.selected
|
||||
background-color: #FCE69D !important
|
||||
#content li.event:nth-child(2n)
|
||||
#content tr.event:nth-child(2n)
|
||||
background-color: #E3F6CE
|
||||
#content li.event:nth-child(2n+1)
|
||||
#content tr.event:nth-child(2n+1)
|
||||
background-color: #F5FBEF
|
||||
#content li.event:hover
|
||||
#content tr.event:hover
|
||||
background-color: lightgreen
|
||||
#error
|
||||
background-color: pink
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue