mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-08 10:43:51 +00:00
157 lines
6.1 KiB
HTML
157 lines
6.1 KiB
HTML
<div ng-controller="discoverW" class="app-container">
|
|
|
|
<kbn-top-nav name="discover" config="topNavMenu">
|
|
|
|
</kbn-top-nav>
|
|
<!-- Transcluded elements. -->
|
|
<div data-transclude-slots>
|
|
<!-- Breadcrumbs. -->
|
|
<div data-transclude-slot="topLeftCorner" class="kuiLocalBreadcrumbs">
|
|
<h1 tabindex="0" id="kui_local_breadcrumb" class="kuiLocalBreadcrumb">
|
|
<span ng-show="opts.savedSearch.id" class="kuiLocalBreadcrumb__emphasis">
|
|
<span data-test-subj="discoverCurrentQuery" ng-bind="opts.savedSearch.lastSavedTitle"></span>
|
|
<i id="reload_saved_search" tabindex="0" aria-label="Reload Saved Search" tooltip="Reload Saved Search" ng-click="resetQuery();" class="fa fa-undo small"></i>
|
|
</span>
|
|
<span data-test-subj="discoverQueryHits" class="kuiLocalBreadcrumb__emphasis">{{(hits || 0) | number:0}}</span>
|
|
<ng-pluralize count="hits" when="{'1':'hit', 'other':'hits'}"></ng-pluralize>
|
|
</h1>
|
|
</div>
|
|
|
|
<!-- Search. -->
|
|
<form
|
|
data-transclude-slot="bottomRow"
|
|
class="fullWidth"
|
|
role="form"
|
|
name="discoverSearch"
|
|
ng-submit="fetch()"
|
|
>
|
|
<div class="typeahead" kbn-typeahead="discover" on-select="fetch()">
|
|
<div class="kuiLocalSearch">
|
|
<div class="kuiLocalSearchAssistedInput">
|
|
<input
|
|
parse-query
|
|
input-focus
|
|
kbn-typeahead-input
|
|
ng-model="state.query"
|
|
placeholder="Search... (e.g. status:200 AND extension:PHP)"
|
|
aria-label="Search input"
|
|
type="text"
|
|
class="kuiLocalSearchInput kuiLocalSearchInput--lucene"
|
|
ng-class="{'kuiLocalSearchInput-isInvalid': discoverSearch.$invalid}"
|
|
>
|
|
<div class="kuiLocalSearchAssistedInput__assistance">
|
|
<p class="kuiText">
|
|
<a
|
|
class="kuiLink"
|
|
ng-href="{{queryDocLinks.luceneQuerySyntax}}"
|
|
target="_blank"
|
|
>
|
|
Uses lucene query syntax
|
|
</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<button
|
|
type="submit"
|
|
aria-label="Search"
|
|
class="kuiLocalSearchButton"
|
|
ng-disabled="discoverSearch.$invalid"
|
|
>
|
|
<span class="kuiIcon fa-search" aria-hidden="true"></span>
|
|
</button>
|
|
</div>
|
|
<kbn-typeahead-items></kbn-typeahead-items>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="container-fluid" role="main">
|
|
<div class="row">
|
|
<filter-bar
|
|
state="state"
|
|
index-patterns="[indexPattern]"
|
|
></filter-bar>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-2 sidebar-container collapsible-sidebar">
|
|
<disc-field-chooser
|
|
columns="state.columns"
|
|
hits="rows"
|
|
field-counts="fieldCounts"
|
|
index-pattern="searchSource.get('index')"
|
|
index-pattern-list="opts.indexPatternList"
|
|
state="state"
|
|
on-add-field="addColumn"
|
|
on-add-filter="filterQuery"
|
|
on-remove-field="removeColumn">
|
|
</disc-field-chooser>
|
|
</div>
|
|
|
|
|
|
<div class="discover-wrapper col-md-10">
|
|
<div class="discover-content">
|
|
<div ng-show="resultState === 'none'">
|
|
<div class="discover-overlay" style="position: relative !important; opacity: 1 !important;">
|
|
<h2 aria-hidden="true"><i aria-hidden="true" class="fa fa-meh-o"></i></h2>
|
|
<h4>No results found</h4>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- loading -->
|
|
<div ng-show="resultState === 'loading'">
|
|
<div class="discover-overlay" style="position: relative !important; opacity: 1 !important;">
|
|
<h2>Searching</h2>
|
|
<div ng-show="fetchStatus">{{fetchStatus.complete}}/{{fetchStatus.total}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- result -->
|
|
<div class="results" ng-show="resultState === 'ready'">
|
|
<div class="discover-timechart" ng-if="opts.timefield" ng-show="true">
|
|
<header>
|
|
<center class="small">
|
|
<span tooltip="To change the time, click the clock icon in the navigation bar">{{timeRange.from | moment}} - {{timeRange.to | moment}}</span> —
|
|
|
|
<span class="results-interval" ng-hide="showInterval">
|
|
<a
|
|
ng-click="toggleInterval()">
|
|
{{ intervalName }}
|
|
</a>
|
|
</span>
|
|
|
|
<span ng-show="showInterval" class="results-interval form-inline">
|
|
<select
|
|
class="form-control"
|
|
ng-model="state.interval"
|
|
ng-options="interval.val as interval.display for interval in intervalOptions | filter: intervalEnabled"
|
|
>
|
|
</select>
|
|
</span>
|
|
</center>
|
|
|
|
</header>
|
|
|
|
<visualize ng-if="vis && rows.length != 0 && state.sort" vis="vis" ui-state="uiState" es-resp="mergedEsResp" search-source="searchSource">
|
|
</visualize>
|
|
</div>
|
|
|
|
<div class="discover-table" fixed-scroll ng-style="{ 'height': tableHeight }" ng-if="state.sort && state.columns">
|
|
<doc-table hits="rows" index-pattern="indexPattern" sorting="state.sort" columns="state.columns" infinite-scroll="infiniteScroll"
|
|
filter="filterQuery" on-add-column="addColumn" on-remove-column="removeColumn">
|
|
</doc-table>
|
|
|
|
<div ng-if="rows.length == opts.sampleSize" class="discover-table-footer">
|
|
<center>
|
|
These are the first {{opts.sampleSize}} documents matching the search.
|
|
</center>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|