feat(log-viewer): Add the ability to specify displayed line count (#1914)

pull/1916/head
kirdia 2018-05-21 11:51:56 +03:00 committed by Anthony Lapenna
parent 63d338c4da
commit 19c3fa276b
5 changed files with 13 additions and 4 deletions

View File

@ -4,6 +4,7 @@ angular.module('portainer.docker').component('logViewer', {
bindings: {
data: '=',
displayTimestamps: '=',
logCollectionChange: '<'
logCollectionChange: '<',
lineCount: '='
}
});

View File

@ -33,6 +33,14 @@
<input class="form-control" type="text" name="logs_search" ng-model="$ctrl.state.search" ng-change="$ctrl.state.selectedLines.length = 0;" placeholder="Filter...">
</div>
</div>
<div class="form-group">
<label for="lines_count" class="col-sm-1 control-label text-left">
Lines
</label>
<div class="col-sm-11">
<input class="form-control" type="number" name="lines_count" ng-model="$ctrl.lineCount" placeholder="Enter no of lines...">
</div>
</div>
<div class="form-group" ng-if="$ctrl.state.copySupported">
<label class="col-sm-1 control-label text-left">
Actions

View File

@ -6,5 +6,5 @@
</rd-header>
<log-viewer
data="logs" ng-if="logs" log-collection-change="changeLogCollection" display-timestamps="state.displayTimestamps"
data="logs" ng-if="logs" log-collection-change="changeLogCollection" display-timestamps="state.displayTimestamps" line-count="state.lineCount"
></log-viewer>

View File

@ -6,5 +6,5 @@
</rd-header>
<log-viewer
data="logs" ng-if="logs" log-collection-change="changeLogCollection" display-timestamps="state.displayTimestamps"
data="logs" ng-if="logs" log-collection-change="changeLogCollection" display-timestamps="state.displayTimestamps" line-count="state.lineCount"
></log-viewer>

View File

@ -6,5 +6,5 @@
</rd-header>
<log-viewer
data="logs" ng-if="logs" log-collection-change="changeLogCollection" display-timestamps="state.displayTimestamps"
data="logs" ng-if="logs" log-collection-change="changeLogCollection" display-timestamps="state.displayTimestamps" line-count="state.lineCount"
></log-viewer>