]>
Commit | Line | Data |
---|---|---|
ab998f7b | 1 | <p-table |
b8cf27c0 | 2 | [value]="following" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
ab998f7b | 3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" |
b8cf27c0 RK |
4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
5 | currentPageReportTemplate="Showing {first} to {last} of {totalRecords} hosts" | |
04e0fc48 | 6 | > |
b014b6b9 C |
7 | <ng-template pTemplate="caption"> |
8 | <div class="caption"> | |
bb152476 | 9 | <div class="ml-auto"> |
b014b6b9 C |
10 | <input |
11 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
be27ef3b | 12 | (keyup)="onSearch($event)" |
b014b6b9 C |
13 | > |
14 | </div> | |
bb152476 RK |
15 | <a class="ml-2 follow-button" (click)="addDomainsToFollow()" (key.enter)="addDomainsToFollow()"> |
16 | <my-global-icon iconName="add"></my-global-icon> | |
17 | <ng-container i18n>Follow domain</ng-container> | |
18 | </a> | |
b014b6b9 C |
19 | </div> |
20 | </ng-template> | |
21 | ||
ab998f7b C |
22 | <ng-template pTemplate="header"> |
23 | <tr> | |
b1d40cff | 24 | <th i18n>Host</th> |
68d19a0a RK |
25 | <th style="width: 100px;" i18n pSortableColumn="state">State <p-sortIcon field="state"></p-sortIcon></th> |
26 | <th style="width: 200px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | |
27 | <th style="width: 160px;" i18n pSortableColumn="redundancyAllowed">Redundancy allowed <p-sortIcon field="redundancyAllowed"></p-sortIcon></th> | |
28 | <th style="width: 100px;"></th> | |
ab998f7b C |
29 | </tr> |
30 | </ng-template> | |
31 | ||
32 | <ng-template pTemplate="body" let-follow> | |
33 | <tr> | |
b8cf27c0 RK |
34 | <td> |
35 | <a [href]="'https://' + follow.following.host" i18n-title title="Open instance in a new tab" target="_blank" rel="noopener noreferrer"> | |
36 | {{ follow.following.host }} | |
37 | <span class="glyphicon glyphicon-new-window"></span> | |
38 | </a> | |
39 | </td> | |
3827c3b3 C |
40 | |
41 | <td *ngIf="follow.state === 'accepted'" i18n>Accepted</td> | |
42 | <td *ngIf="follow.state === 'pending'" i18n>Pending</td> | |
43 | ||
ab998f7b | 44 | <td>{{ follow.createdAt }}</td> |
c48e82b5 C |
45 | <td> |
46 | <my-redundancy-checkbox | |
47 | [host]="follow.following.host" [redundancyAllowed]="follow.following.hostRedundancyAllowed" | |
48 | ></my-redundancy-checkbox> | |
49 | </td> | |
ab998f7b C |
50 | <td class="action-cell"> |
51 | <my-delete-button (click)="removeFollowing(follow)"></my-delete-button> | |
52 | </td> | |
53 | </tr> | |
54 | </ng-template> | |
d3840613 RK |
55 | |
56 | <ng-template pTemplate="emptymessage"> | |
57 | <tr> | |
58 | <td colspan="6"> | |
59 | <div class="empty-table-message"> | |
60 | <ng-container *ngIf="search" i18n>No host found matching current filters.</ng-container> | |
b8cf27c0 | 61 | <ng-container *ngIf="!search" i18n>Your instance is not following anyone.</ng-container> |
d3840613 RK |
62 | </div> |
63 | </td> | |
64 | </tr> | |
65 | </ng-template> | |
ab998f7b | 66 | </p-table> |
bb152476 | 67 | |
b8cf27c0 RK |
68 | <my-batch-domains-modal #batchDomainsModal i18n-action action="Follow domains" (domains)="addFollowing($event)"> |
69 | <ng-container ngProjectAs="warning"> | |
70 | <div i18n *ngIf="httpEnabled() === false" class="alert alert-warning"> | |
71 | It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers. | |
72 | </div> | |
73 | </ng-container> | |
74 | </my-batch-domains-modal> |