Skip to content

Commit

Permalink
Hide pagination controls if there is only one page (kubernetes#5827)
Browse files Browse the repository at this point in the history
* Hide paginators if they are not required

* Format files
Remove unused import
  • Loading branch information
Marcin Maciaszczyk authored Feb 25, 2021
1 parent 6c8dea1 commit 520a89d
Show file tree
Hide file tree
Showing 29 changed files with 2,352 additions and 2,296 deletions.
4,368 changes: 2,184 additions & 2,184 deletions i18n/messages.xlf

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@
*matRowDef="let row; columns: ['statusDetail']; let index=index"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@
*matRowDef="let row; columns: ['statusDetail']; let index=index"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@
*matRowDef="let row; columns: getColumns()"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@
*matRowDef="let row; columns: getColumns(); let index=index"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,12 @@
*matRowDef="let row; columns: ['statusDetail']; let index=index"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@
*matRowDef="let row; columns: ['statusDetail']; let index=index"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,12 @@
*matRowDef="let row; columns: ['statusDetail']; let index=index"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@
*matRowDef="let row; columns: ['statusDetail']; let index=index"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@
<mat-row *matRowDef="let row; columns: getColumns();"></mat-row>
</mat-table>

<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
[hidePageSize]="true"
[showFirstLastButtons]="true"></mat-paginator>
<div [hidden]="totalItems <= itemsPerPage">
<mat-paginator [length]="totalItems"
[pageSize]="itemsPerPage"
hidePageSize
showFirstLastButtons></mat-paginator>
</div>
</div>

<div content
Expand Down
Loading

0 comments on commit 520a89d

Please sign in to comment.