-
Notifications
You must be signed in to change notification settings - Fork 1k
/
index.scala.html
43 lines (38 loc) · 1.63 KB
/
index.scala.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@(currentUser: org.graylog2.restclient.models.User,
query: String,
search: org.graylog2.restclient.models.UniversalSearch,
page: Integer,
savedSearch: org.graylog2.restclient.models.SavedSearch,
selectedFields: java.util.Set[String],
searchResult: org.graylog2.restclient.models.api.results.SearchResult,
histogram: org.graylog2.restclient.models.api.results.DateHistogramResult,
formattedHistogramResults: String,
nodes: Map[String, controllers.SearchController.NodeDescription],
streams: Map[String, controllers.SearchController.StreamDescription],
inputs: Map[String, controllers.SearchController.InputDescription]
)(implicit stream: org.graylog2.restclient.models.Stream)
@import play.libs.Json;
@import controllers.SearchController.StreamDescription
@streamId = @{
if (stream == null) {
null
} else {
stream.getId
}
}
@main("Search", null, query, currentUser, true) {
<div id="react-search-result"
data-query="@query"
data-current-page="@page"
data-selected-fields="@Json.toJson(selectedFields)"
data-timerange="@search.getTimeRange"
data-search-result="@Json.toJson(searchResult)"
data-histogram="@Json.toJson(histogram)"
data-formatted-histogram="@formattedHistogramResults"
data-streams="@Json.toJson(streams)"
data-inputs="@Json.toJson(inputs)"
data-nodes="@Json.toJson(nodes)"
data-search-in-stream="@Json.toJson(StreamDescription.of(stream))"
>
</div>
}