diff --git a/frontend/src/js/component/wb-live-logs.js b/frontend/src/js/component/wb-live-logs.js index e7a0a11..a827c74 100644 --- a/frontend/src/js/component/wb-live-logs.js +++ b/frontend/src/js/component/wb-live-logs.js @@ -6,6 +6,7 @@ class WBLiveLogs extends Component { constructor(...args) { super(...args); this.state.page = 0; + this.state.moreItemsPerPage = false; this.terminalRef = createRef(); } @@ -22,8 +23,11 @@ class WBLiveLogs extends Component { } fetchData() { - const { uuid, app, itemsPerPage } = this.props; - const { page } = this.state; + const { uuid, app } = this.props; + let { itemsPerPage } = this.props; + const { page, moreItemsPerPage } = this.state; + if (moreItemsPerPage) + itemsPerPage *= 10; const { arvHost, arvToken } = app.state; const filters = [ [ 'object_uuid', '=', uuid ] @@ -44,9 +48,16 @@ class WBLiveLogs extends Component { }); } - render({}, { content, page, numPages }) { + render({}, { content, page, numPages, moreItemsPerPage }) { return (
+
+ { this.state.moreItemsPerPage = e.target.checked; + this.state.page = 0; this.fetchData(); } } /> + +
{ this.state.page = page; this.fetchData(); } } />
@@ -58,7 +69,7 @@ class WBLiveLogs extends Component {
 }
 
 WBLiveLogs.defaultProps = {
-  itemsPerPage: 1000
+  itemsPerPage: 100
 };
 
 export default WBLiveLogs;