-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show/hide date histogram viz in Discover #17065
Changes from 5 commits
9d5aea8
bc62c4c
3a280f3
4156c7e
b31a2f0
ed6bb4a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,36 +101,43 @@ <h2>Searching</h2> | |
</span> | ||
</button> | ||
|
||
<section aria-label="Histogram of found documents" class="discover-timechart" ng-if="opts.timefield"> | ||
<section | ||
ng-if="opts.timefield" | ||
aria-label="Histogram of found documents" | ||
class="discover-timechart" | ||
> | ||
<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 form-inline"> | ||
<select | ||
class="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> | ||
Scaled to {{ bucketInterval.description }} | ||
<div ng-if="state.showViz"> | ||
<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 form-inline"> | ||
<select | ||
class="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> | ||
Scaled to {{ bucketInterval.description }} | ||
</span> | ||
|
||
</span> | ||
</span> | ||
</div> | ||
</center> | ||
|
||
</header> | ||
|
||
<visualization | ||
ng-if="vis && rows.length != 0" | ||
ng-if="state.showViz && vis && rows.length != 0" | ||
vis="vis" | ||
ui-state="uiState" | ||
vis-data="visData" | ||
|
@@ -139,6 +146,13 @@ <h2>Searching</h2> | |
style="height: 200px" | ||
> | ||
</visualization> | ||
|
||
<div> | ||
<center class="small"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<a ng-if="!state.showViz" kbn-accessible-click ng-click="showViz()">Show visualization</a> | ||
<a ng-if="state.showViz" kbn-accessible-click ng-click="hideViz()">Hide visualization</a> | ||
</center> | ||
</div> | ||
</section> | ||
|
||
<section class="discover-table" fixed-scroll aria-label="Documents"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can we use a different variable name, like maybe
isVizVisible
or something? It is a little confusing here thatstate.showViz
is a boolean while$scope.showViz
is a function.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
isVizVis
? 😆There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isVizable
!