wazuh-kibana-app/public/templates/kibana-template/kibana-discover-template.html
2019-06-28 11:30:37 +02:00

123 lines
7.3 KiB
HTML

<discover-app-w class="app-container">
<!-- Local nav. -->
<div data-transclude-slot="topLeftCorner" class="kuiLocalBreadcrumbs" ng-if="tabView === 'discover'">
<h1 tabindex="0" id="kui_local_breadcrumb" class="kuiLocalBreadcrumb" ng-if="opts.savedSearch.id">
<span class="kuiLocalBreadcrumb__emphasis">
<span id="reload_saved_search" aria-label="{{::'kbn.discover.reloadSavedSearchAriaLabel' | i18n: {defaultMessage: 'Reload saved search'} }}"
tooltip="{{::'kbn.discover.reloadSavedSearchTooltip' | i18n: {defaultMessage: 'Reload saved search'} }}"
tooltip-placement="right" tooltip-append-to-body="1" ng-click="resetQuery()" kbn-accessible-click class="kuiIcon fa-undo small"></span>&nbsp;
</span>
</h1>
<div class="kuiLocalBreadcrumb">
<span data-test-subj="discoverQueryHits" class="kuiLocalBreadcrumb__emphasis">{{(hits || 0) | number:0}}</span>
<span i18n-id="kbn.discover.hitsPluralTitle" i18n-default-message="{hits, plural, one {hit} other {hits}}"
i18n-values="{ hits }"></span>
</div>
</div>
<kbn-top-nav name="discover" config="topNavMenu" class="wzKbnTopNav">
<!-- Transcluded elements. -->
<div data-transclude-slots>
<!-- Search. -->
<div data-transclude-slot="bottomRow" class="fullWidth">
<wz-search-bar query="state.query" on-query-submit="updateQueryAndFetch" app-name="'discover'" index-patterns="[indexPattern]"
filters="filters" on-filters-updated="onFiltersUpdated" show-date-picker="enableTimeRangeSelector"
date-range-from="time.from" date-range-to="time.to" is-refresh-paused="refreshInterval.pause"
refresh-interval="refreshInterval.value" on-refresh-change="onRefreshChange" watch-depth="reference"
show-filter-bar="tabView !== 'cluster-monitoring'"></wz-search-bar>
</div>
</div>
</kbn-top-nav>
<main ng-show="tabView !== 'cluster-monitoring'" class="container-fluid">
<div ng-show="tabView === 'discover'" class="row">
<div ng-if="tabView === 'discover'" class="col-md-2 sidebar-container collapsible-sidebar" id="discover-sidebar">
<disc-field-chooser class="dscFieldChooser" columns="state.columns" hits="rows" field-counts="fieldCounts"
index-pattern="searchSource.getField('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="dscWrapper col-md-10">
<div class="dscWrapper__content">
<discover-unsupported-index-pattern ng-if="isUnsupportedIndexPattern" unsupported-type="unsupportedIndexPatternType"></discover-unsupported-index-pattern>
<discover-no-results ng-show="resultState === 'none'" shard-failures="failures" time-field-name="opts.timefield"
query-language="state.query.language" get-doc-link="getDocLink"></discover-no-results>
<!-- loading -->
<div ng-show="resultState === 'loading'">
<discover-fetch-error ng-show="fetchError" fetch-error="fetchError"></discover-fetch-error>
<div ng-hide="fetchError" class="dscOverlay">
<h2 i18n-id="kbn.discover.searchingTitle" i18n-default-message="Searching" class="euiTitle euiTitle--small"></h2>
<div class="euiSpacer euiSpacer--m"></div>
<div class="euiLoadingSpinner euiLoadingSpinner--large"></div>
<div class="euiSpacer euiSpacer--m"></div>
<div ng-show="fetchStatus">{{fetchStatus.complete}} / {{fetchStatus.total}}</div>
</div>
</div>
<!-- result -->
<div class="dscResults" ng-show="resultState === 'ready'">
<button class="kuiButton kuiButton--basic kuiButton--iconText dscSkipButton" ng-click="showAllRows(); scrollToBottom()">
<span class="kuiButton__inner">
<span aria-hidden="true" class="kuiButton__icon kuiIcon fa-chevron-down"></span>
<span i18n-id="kbn.discover.skipToBottomButtonLabel" i18n-default-message="Skip to bottom"></span>
</span>
</button>
<section aria-label="{{::'kbn.discover.histogramOfFoundDocumentsAriaLabel' | i18n: {defaultMessage: 'Histogram of found documents'} }}"
class="dscTimechart" ng-if="opts.timefield">
<header class="dscTimechart__header">
<div class="small">
<span tooltip="{{::'kbn.discover.howToChangeTheTimeTooltip' | i18n: {defaultMessage: 'To change the time, click the clock icon in the navigation bar'} }}">
{{timeRange.from | moment}} - {{timeRange.to | moment}}
</span>
&mdash;
<span class="form-inline">
<select class="dscResults__interval form-control" ng-model="state.interval" ng-options="interval.val as interval.display for interval in intervalOptions | filter: intervalEnabled"
ng-blur="toggleInterval()" data-test-subj="discoverIntervalSelect">
</select>
<span ng-if="bucketInterval.scaled">
<icon-tip content="getBucketIntervalToolTipText()" position="'top'"></icon-tip>
<span i18n-id="kbn.discover.scaledToDescription" i18n-default-message="Scaled to {bucketIntervalDescription}"
i18n-values="{
bucketIntervalDescription: bucketInterval.description
}"></span>
</span>
</span>
</div>
</header>
<div id="discoverHistogram" ng-show="vis && rows.length !== 0" style="display: flex; height: 200px">
</div>
</section>
<section ng-if="tabView === 'discover'" class="dscTable" fixed-scroll aria-label="{{::'kbn.discover.documentsAriaLabel' | i18n: {defaultMessage: 'Documents'} }}">
<doc-table hits="rows" index-pattern="indexPattern" sorting="state.sort" columns="state.columns"
infinite-scroll="true" filter="filterQuery" filters="state.filters" data-shared-item data-title="{{opts.savedSearch.lastSavedTitle}}"
data-description="{{opts.savedSearch.description}}" minimum-visible-rows="minimumVisibleRows"
render-complete on-add-column="addColumn" on-change-sort-order="setSortOrder" on-move-column="moveColumn"
on-remove-column="removeColumn"></doc-table>
<a tabindex="0" id="discoverBottomMarker"></a>
<div ng-if="rows.length == opts.sampleSize" class="dscTable__footer">
<span i18n-id="kbn.discover.howToSeeOtherMatchingDocumentsDescription" i18n-default-message="These are the first {sampleSize} documents matching
your search, refine your search to see others. "
i18n-values="{
sampleSize: opts.sampleSize,
}"></span>
<a kbn-accessible-click ng-click="scrollToTop()" i18n-id="kbn.discover.backToTopLinkText"
i18n-default-message="Back to top."></a>
</div>
</section>
</div>
</div>
</div>
</div>
</main>
</discover-app-w>