]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / logs / logs.component.html
CommitLineData
11fdf7f2 1<div *ngIf="contentData">
9f95a23c 2 <ng-container *ngTemplateOutlet="logFiltersTpl"></ng-container>
11fdf7f2 3
f67539c2
TL
4 <ul ngbNav
5 #nav="ngbNav"
6 class="nav-tabs"
7 cdStatefulTab="logs">
8 <li ngbNavItem="cluster-logs">
9 <a ngbNavLink
10 i18n>Cluster Logs</a>
11 <ng-template ngbNavContent>
12 <div class="card bg-light mb-3"
13 *ngIf="clog">
14 <div class="btn-group"
15 role="group"
16 *ngIf="clog.length">
17 <cd-download-button [objectItem]="clog"
18 [textItem]="clogText"
19 fileName="cluster_log">
20 </cd-download-button>
21 <cd-copy-2-clipboard-button
22 [source]="clogText"
23 [byId]="false">
24 </cd-copy-2-clipboard-button>
25 </div>
26 <div class="card-body">
27 <p *ngFor="let line of clog">
28 <span class="timestamp">{{ line.stamp | cdDate }}</span>
29 <span class="priority {{ line.priority | logPriority }}">{{ line.priority }}</span>
30 <span class="message">{{ line.message }}</span>
31 </p>
9f95a23c 32
f67539c2
TL
33 <ng-container *ngIf="clog.length != 0 else noEntriesTpl"></ng-container>
34 </div>
9f95a23c 35 </div>
f67539c2
TL
36 </ng-template>
37 </li>
38 <li ngbNavItem="audit-logs">
39 <a ngbNavLink
40 i18n>Audit Logs</a>
41 <ng-template ngbNavContent>
42 <div class="card bg-light mb-3"
43 *ngIf="audit_log">
44 <div class="btn-group"
45 role="group"
46 *ngIf="audit_log.length">
47 <cd-download-button [objectItem]="audit_log"
48 [textItem]="auditLogText"
49 fileName="audit_log">
50 </cd-download-button>
51 <cd-copy-2-clipboard-button
52 [source]="auditLogText"
53 [byId]="false">
54 </cd-copy-2-clipboard-button>
55 </div>
56 <div class="card-body">
57 <p *ngFor="let line of audit_log">
58 <span class="timestamp">{{ line.stamp | cdDate }}</span>
59 <span class="priority {{ line.priority | logPriority }}">{{ line.priority }}</span>
60 <span class="message">{{ line.message }}</span>
61 </p>
9f95a23c 62
f67539c2
TL
63 <ng-container *ngIf="audit_log.length != 0 else noEntriesTpl"></ng-container>
64 </div>
9f95a23c 65 </div>
f67539c2
TL
66 </ng-template>
67 </li>
68 </ul>
69
70 <div [ngbNavOutlet]="nav"></div>
11fdf7f2
TL
71</div>
72
73<ng-template #logFiltersTpl>
9f95a23c
TL
74 <div class="form-inline">
75 <div class="form-group">
f67539c2 76 <label for="logs-priority"
9f95a23c 77 i18n>Priority:</label>
f67539c2
TL
78 <select id="logs-priority"
79 class="form-control custom-select"
11fdf7f2
TL
80 [(ngModel)]="priority"
81 (ngModelChange)="filterLogs()">
f67539c2 82 <option *ngFor="let prio of priorities"
11fdf7f2
TL
83 [value]="prio.value">{{ prio.name }}</option>
84 </select>
85 </div>
9f95a23c
TL
86
87 <div class="form-group">
f67539c2 88 <label for="logs-keyword"
9f95a23c 89 i18n>Keyword:</label>
11fdf7f2 90 <div class="input-group">
9f95a23c
TL
91 <div class="input-group-prepend">
92 <span class="input-group-text">
93 <i [ngClass]="[icons.search]"></i>
94 </span>
95 </div>
96
11fdf7f2 97 <input class="form-control"
f67539c2 98 id="logs-keyword"
11fdf7f2
TL
99 type="text"
100 [(ngModel)]="search"
101 (keyup)="filterLogs()">
9f95a23c
TL
102
103 <div class="input-group-append">
11fdf7f2 104 <button type="button"
9f95a23c 105 class="btn btn-light"
11fdf7f2 106 (click)="clearSearchKey()">
9f95a23c 107 <i class="icon-prepend {{ icons.destroy }}"></i>
11fdf7f2 108 </button>
9f95a23c 109 </div>
11fdf7f2
TL
110 </div>
111 </div>
9f95a23c
TL
112
113 <div class="form-group">
f67539c2 114 <label for="logs-date"
9f95a23c 115 i18n>Date:</label>
11fdf7f2 116 <div class="input-group">
f67539c2
TL
117 <input class="form-control"
118 id="logs-date"
119 placeholder="YYYY-MM-DD"
120 ngbDatepicker
121 [maxDate]="maxDate"
122 #d="ngbDatepicker"
123 (click)="d.open()"
11fdf7f2
TL
124 [(ngModel)]="selectedDate"
125 (ngModelChange)="filterLogs()">
9f95a23c 126 <span class="input-group-append">
11fdf7f2 127 <button type="button"
9f95a23c 128 class="btn btn-light"
11fdf7f2 129 (click)="clearDate()">
9f95a23c 130 <i class="icon-prepend {{ icons.destroy }}"></i>
11fdf7f2
TL
131 </button>
132 </span>
133 </div>
134 </div>
9f95a23c
TL
135
136 <div class="form-group">
f67539c2
TL
137 <label i18n>Time range:</label>
138 <ngb-timepicker [spinners]="false"
139 [(ngModel)]="startTime"
140 (ngModelChange)="filterLogs()"></ngb-timepicker>
141
142 <span>&nbsp;&mdash;&nbsp;</span>
143
144 <ngb-timepicker [spinners]="false"
145 [(ngModel)]="endTime"
146 (ngModelChange)="filterLogs()"></ngb-timepicker>
11fdf7f2
TL
147 </div>
148 </div>
149</ng-template>
f67539c2
TL
150
151<ng-template #noEntriesTpl>
152 <span i18n>No log entries found. Please try to select different filter options.</span>
153 <span>&nbsp;</span>
154 <a href="#"
155 (click)="resetFilter()"
156 i18n>Reset filter.</a>
157</ng-template>