|
1 | | -<mat-toolbar> |
2 | | - <ng-container *ngIf="deviceType === deviceTypes.DESKTOP; else mobileView"> |
3 | | - <button class="btnBack" mat-icon-button routerLink="/manager"> |
4 | | - <mat-icon>arrow_back</mat-icon> |
5 | | - </button> |
6 | | - <span i18n>Logs</span> |
7 | | - <span class="toolbar-fill"></span> |
8 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
9 | | - <mat-select i18n-placeholder placeholder="Type" (selectionChange)="onTypeChange($event.value)" [value]="selectedType"> |
10 | | - <mat-option [value]="" i18n>All Types</mat-option> |
11 | | - <mat-option *ngFor="let type of types" [value]="type">{{type}}</mat-option> |
12 | | - </mat-select> |
13 | | - </mat-form-field> |
14 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
15 | | - <mat-select i18n-placeholder placeholder="Version" (selectionChange)="onVersionChange($event.value)" [value]="selectedVersion"> |
16 | | - <mat-option [value]="" i18n>All Versions</mat-option> |
17 | | - <mat-option *ngFor="let version of versions" [value]="version">{{version}}</mat-option> |
18 | | - </mat-select> |
19 | | - </mat-form-field> |
20 | | - <form [formGroup]="logsForm" *ngIf="showCustomDateFields"> |
21 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
22 | | - <input matInput [matDatepicker]="startPicker" i18n-placeholder placeholder="Start Date" formControlName="startDate" [min]="minDate" [max]="logsForm.get('endDate').value"> |
23 | | - <mat-datepicker-toggle matSuffix [for]="startPicker"></mat-datepicker-toggle> |
24 | | - <mat-datepicker #startPicker></mat-datepicker> |
25 | | - <mat-error i18n *ngIf="logsForm.errors?.invalidDates">Start date must be before end date</mat-error> |
26 | | - </mat-form-field> |
27 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
28 | | - <input matInput [matDatepicker]="endPicker" i18n-placeholder placeholder="End Date" formControlName="endDate" [min]="logsForm.get('startDate').value" [max]="today"> |
29 | | - <mat-datepicker-toggle matSuffix [for]="endPicker"></mat-datepicker-toggle> |
30 | | - <mat-datepicker #endPicker></mat-datepicker> |
31 | | - </mat-form-field> |
32 | | - </form> |
33 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
34 | | - <mat-select i18n-placeholder placeholder="Time Frame" (selectionChange)="onTimeFilterChange($event.value)" [value]="selectedTimeFilter"> |
35 | | - <mat-option *ngFor="let option of timeFilterOptions" [value]="option.value">{{option.label}}</mat-option> |
36 | | - </mat-select> |
37 | | - </mat-form-field> |
38 | | - <button mat-raised-button (click)="clearFilters()" color="primary" [disabled]="!searchValue && !selectedVersion && !selectedType && isDefaultTimeFilter" class="margin-lr-5"> |
39 | | - <span i18n>Clear</span> |
40 | | - </button> |
41 | | - <mat-icon>search</mat-icon> |
42 | | - <mat-form-field class="font-size-1"> |
43 | | - <input matInput (keyup)="filterData($event.target.value)" [value]="searchValue" i18n-placeholder placeholder="Search"> |
44 | | - </mat-form-field> |
45 | | - </ng-container> |
46 | | - |
47 | | - <ng-template #mobileView> |
48 | | - <mat-toolbar-row> |
49 | | - <button class="btnBack" mat-icon-button routerLink="/manager"> |
50 | | - <mat-icon>arrow_back</mat-icon> |
51 | | - </button> |
52 | | - <span i18n>Logs</span> |
53 | | - <span class="toolbar-fill"></span> |
54 | | - <button mat-icon-button (click)="this.showFiltersRow = !this.showFiltersRow"><mat-icon>filter_list</mat-icon></button> |
55 | | - </mat-toolbar-row> |
56 | | - <mat-toolbar-row *ngIf="showFiltersRow"> |
57 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
58 | | - <mat-select i18n-placeholder placeholder="Type" (selectionChange)="onTypeChange($event.value)" [value]="selectedType"> |
59 | | - <mat-option [value]="" i18n>All Types</mat-option> |
60 | | - <mat-option *ngFor="let type of types" [value]="type">{{type}}</mat-option> |
61 | | - </mat-select> |
62 | | - </mat-form-field> |
63 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
64 | | - <mat-select i18n-placeholder placeholder="Version" (selectionChange)="onVersionChange($event.value)" [value]="selectedVersion"> |
65 | | - <mat-option [value]="" i18n>All Versions</mat-option> |
66 | | - <mat-option *ngFor="let version of versions" [value]="version">{{version}}</mat-option> |
67 | | - </mat-select> |
68 | | - </mat-form-field> |
69 | | - </mat-toolbar-row> |
70 | | - <mat-toolbar-row *ngIf="showFiltersRow"> |
71 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
72 | | - <mat-select i18n-placeholder placeholder="Time Frame" (selectionChange)="onTimeFilterChange($event.value)" [value]="selectedTimeFilter"> |
73 | | - <mat-option *ngFor="let option of timeFilterOptions" [value]="option.value">{{option.label}}</mat-option> |
74 | | - </mat-select> |
75 | | - </mat-form-field> |
76 | | - </mat-toolbar-row> |
77 | | - <mat-toolbar-row *ngIf="showFiltersRow && showCustomDateFields"> |
78 | | - <form [formGroup]="logsForm"> |
79 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
80 | | - <input matInput [matDatepicker]="startPicker" i18n-placeholder placeholder="Start Date" formControlName="startDate" [min]="minDate" [max]="logsForm.get('endDate').value"> |
81 | | - <mat-datepicker-toggle matSuffix [for]="startPicker"></mat-datepicker-toggle> |
82 | | - <mat-datepicker #startPicker></mat-datepicker> |
83 | | - <mat-error i18n *ngIf="logsForm.errors?.invalidDates">Start date must be before end date</mat-error> |
84 | | - </mat-form-field> |
85 | | - </form> |
86 | | - </mat-toolbar-row> |
87 | | - <mat-toolbar-row *ngIf="showFiltersRow && showCustomDateFields"> |
88 | | - <form [formGroup]="logsForm"> |
89 | | - <mat-form-field class="margin-lr-5 font-size-1"> |
90 | | - <input matInput [matDatepicker]="endPicker" i18n-placeholder placeholder="End Date" formControlName="endDate" [min]="logsForm.get('startDate').value" [max]="today"> |
91 | | - <mat-datepicker-toggle matSuffix [for]="endPicker"></mat-datepicker-toggle> |
92 | | - <mat-datepicker #endPicker></mat-datepicker> |
93 | | - </mat-form-field> |
94 | | - </form> |
95 | | - </mat-toolbar-row> |
96 | | - <mat-toolbar-row *ngIf="showFiltersRow"> |
97 | | - <button mat-raised-button color="primary" (click)="clearFilters()" [disabled]="!searchValue && !selectedVersion && !selectedType && isDefaultTimeFilter" class="margin-lr-5"> |
98 | | - <span i18n>Clear</span> |
99 | | - </button> |
100 | | - <mat-icon>search</mat-icon> |
101 | | - <mat-form-field class="font-size-1"> |
102 | | - <input matInput (keyup)="filterData($event.target.value)" [value]="searchValue" i18n-placeholder placeholder="Search"> |
103 | | - </mat-form-field> |
104 | | - </mat-toolbar-row> |
105 | | - </ng-template> |
106 | | -</mat-toolbar> |
| 1 | +<planet-myplanet-toolbar i18n-title title="Logs" |
| 2 | + [types]="types" |
| 3 | + [showTypeFilter]="true" |
| 4 | + [versions]="versions" |
| 5 | + [selectedVersion]="selectedVersion" |
| 6 | + [selectedType]="selectedType" |
| 7 | + [timeFilterOptions]="timeFilterOptions" |
| 8 | + [selectedTimeFilter]="selectedTimeFilter" |
| 9 | + [formGroup]="filtersForm" |
| 10 | + [showCustomDateFields]="showCustomDateFields" |
| 11 | + [minDate]="minDate" |
| 12 | + [today]="today" |
| 13 | + [searchValue]="searchValue" |
| 14 | + [disableShowAllTime]="isDefaultTimeFilter" |
| 15 | + (typeChange)="onTypeChange($event)" |
| 16 | + (versionChange)="onVersionChange($event)" |
| 17 | + (timeFilterChange)="onTimeFilterChange($event)" |
| 18 | + (search)="filterData($event)" |
| 19 | + (clear)="clearFilters()" |
| 20 | + (resetDateFilter)="resetDateFilter()" |
| 21 | +></planet-myplanet-toolbar> |
107 | 22 | <div class="space-container"> |
108 | 23 | <mat-toolbar> |
109 | 24 | <mat-toolbar-row class="primary-color font-size-1"> |
|
0 commit comments