forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate Console History panel from editor with a drop-shadow, and ad…
…d a Close button. (elastic#39972)
- Loading branch information
Showing
5 changed files
with
81 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 59 additions & 48 deletions
107
src/legacy/core_plugins/console/public/src/directives/history.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,64 @@ | ||
<h2 | ||
class="kuiLocalDropdownTitle" | ||
i18n-id="console.historyPage.pageTitle" | ||
i18n-default-message="History" | ||
></h2> | ||
<div class="conHistory"> | ||
<h2 | ||
class="kuiLocalDropdownTitle" | ||
i18n-id="console.historyPage.pageTitle" | ||
i18n-default-message="History" | ||
></h2> | ||
|
||
<div class="conHistory__body"> | ||
<ul | ||
class="list-group conHistory__reqs" | ||
tabindex="0" | ||
role="listbox" | ||
aria-activedescendant="historyReq{{ history.selectedIndex }}" | ||
scrollto-activedescendant | ||
ng-keydown="history.onKeyDown($event)" | ||
aria-label="{{:: 'console.historyPage.requestListAriaLabel' | i18n: { defaultMessage: 'History of sent requests' } }}" | ||
> | ||
<li | ||
class="list-group-item conHistory__req" | ||
role="option" | ||
ng-repeat="req in history.reqs" | ||
id="historyReq{{$index}}" | ||
ng-class="{ 'conHistory__req-selected': history.viewingReq === req }" | ||
ng-click="history.selectedReq = req; history.viewingReq = req; history.selectedIndex = $index" | ||
ng-mouseenter="history.viewingReq = req" | ||
ng-mouseleave="history.viewingReq = history.selectedReq" | ||
ng-dblclick="history.restore(req)" | ||
aria-label="{{:: 'console.historyPage.itemOfRequestListAriaLabel' | i18n: { defaultMessage: 'Request: {historyItem}', values: { historyItem: history.describeReq(req) },} }}" | ||
aria-selected="{{ history.selectedReq === req }}" | ||
<div class="conHistory__body"> | ||
<ul | ||
class="list-group conHistory__reqs" | ||
tabindex="0" | ||
role="listbox" | ||
aria-activedescendant="historyReq{{ history.selectedIndex }}" | ||
scrollto-activedescendant | ||
ng-keydown="history.onKeyDown($event)" | ||
aria-label="{{:: 'console.historyPage.requestListAriaLabel' | i18n: { defaultMessage: 'History of sent requests' } }}" | ||
> | ||
{{ history.describeReq(req) }} | ||
<span class="conHistory__reqIcon"><i class="fa fa-chevron-right"></i></span> | ||
</li> | ||
</ul> | ||
<li | ||
class="list-group-item conHistory__req" | ||
role="option" | ||
ng-repeat="req in history.reqs" | ||
id="historyReq{{$index}}" | ||
ng-class="{ 'conHistory__req-selected': history.viewingReq === req }" | ||
ng-click="history.selectedReq = req; history.viewingReq = req; history.selectedIndex = $index" | ||
ng-mouseenter="history.viewingReq = req" | ||
ng-mouseleave="history.viewingReq = history.selectedReq" | ||
ng-dblclick="history.restore(req)" | ||
aria-label="{{:: 'console.historyPage.itemOfRequestListAriaLabel' | i18n: { defaultMessage: 'Request: {historyItem}', values: { historyItem: history.describeReq(req) },} }}" | ||
aria-selected="{{ history.selectedReq === req }}" | ||
> | ||
{{ history.describeReq(req) }} | ||
<span class="conHistory__reqIcon"><i class="fa fa-chevron-right"></i></span> | ||
</li> | ||
</ul> | ||
|
||
<sense-history-viewer class="conHistory__viewer" req="history.viewingReq" /> | ||
</div> | ||
<sense-history-viewer class="conHistory__viewer" req="history.viewingReq" /> | ||
</div> | ||
|
||
<div class="conHistory__footer"> | ||
<button | ||
class="kuiButton kuiButton--danger" | ||
ng-click="history.clear()" | ||
i18n-id="console.historyPage.clearHistoryButtonLabel" | ||
i18n-default-message="Clear" | ||
></button> | ||
|
||
<div class="conHistory__footerButtonsRight"> | ||
<button | ||
class="kuiButton kuiButton--hollow" | ||
ng-click="history.close()" | ||
i18n-id="console.historyPage.closehistoryButtonLabel" | ||
i18n-default-message="Close" | ||
></button> | ||
|
||
<div class="conHistory__footer"> | ||
<button | ||
class="kuiButton kuiButton--danger" | ||
ng-click="history.clear()" | ||
i18n-id="console.historyPage.clearHistoryButtonLabel" | ||
i18n-default-message="Clear" | ||
></button> | ||
<button | ||
class="kuiButton kuiButton--primary" | ||
ng-disabled="!history.selectedReq" | ||
ng-click="history.restore()" | ||
i18n-id="console.historyPage.applyHistoryButtonLabel" | ||
i18n-default-message="Apply" | ||
> | ||
</button> | ||
<button | ||
class="kuiButton kuiButton--primary" | ||
ng-disabled="!history.selectedReq" | ||
ng-click="history.restore()" | ||
i18n-id="console.historyPage.applyHistoryButtonLabel" | ||
i18n-default-message="Apply" | ||
></button> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters