endpoint.component.html 4.11 KB
Newer Older
1
<div>
FangyuanCheng's avatar
FangyuanCheng committed
2
    <div class="row"  class="endpoint-view">
3 4
        <div>
            <div class="row flex-items-xs-between rightPos">
kunw's avatar
kunw committed
5
                <div class="flex-items-xs-middle option-right">
Deng, Qian's avatar
Deng, Qian committed
6
                    <hbr-filter [withDivider]="true" filterPlaceholder='{{"REPLICATION.FILTER_TARGETS_PLACEHOLDER" | translate}}' (filterEvt)="doSearchTargets($event)" [currentValue]="targetName"></hbr-filter>
Steven Zou's avatar
Steven Zou committed
7
                    <span class="refresh-btn" (click)="refreshTargets()">
kunw's avatar
kunw committed
8
                        <clr-icon shape="refresh"></clr-icon>
Steven Zou's avatar
Steven Zou committed
9
                    </span>
kunw's avatar
kunw committed
10 11 12 13
                </div>
            </div>
        </div>
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
14
            <clr-datagrid [clrDgLoading]="loading"  [(clrDgSelected)]="selectedRow" (clrDgSelectedChange)="selectedChange()">
15
                <clr-dg-action-bar>
Meina Zhou's avatar
Meina Zhou committed
16 17 18
                    <button type="button" class="btn  btn-secondary" (click)="openModal()"><clr-icon shape="plus" size="16"></clr-icon>&nbsp;{{'DESTINATION.NEW_ENDPOINT' | translate}}</button>
                    <button type="button" class="btn  btn-secondary" [disabled]="!(selectedRow.length ===1)"  (click)="editTargets(selectedRow)" ><clr-icon shape="pencil" size="16"></clr-icon>&nbsp;{{'DESTINATION.EDIT' | translate}}</button>
                    <button type="button" class="btn  btn-secondary" [disabled]="!selectedRow.length" (click)="deleteTargets(selectedRow)"><clr-icon shape="times" size="16"></clr-icon>&nbsp;{{'DESTINATION.DELETE' | translate}}</button>
19
                </clr-dg-action-bar>
FangyuanCheng's avatar
FangyuanCheng committed
20
                <clr-dg-column [clrDgField]="'name'" class="flex-min-width">{{'DESTINATION.NAME' | translate}}</clr-dg-column>
21
                <clr-dg-column [clrDgField]="'status'" class="flex-min-width">{{'DESTINATION.STATUS' | translate}}</clr-dg-column>                
FangyuanCheng's avatar
FangyuanCheng committed
22
                <clr-dg-column [clrDgField]="'url'" class="flex-min-width">{{'DESTINATION.URL' | translate}}</clr-dg-column>
23
                <clr-dg-column [clrDgField]="'type'">{{'DESTINATION.PROVIDER' | translate}}</clr-dg-column>
24
                <clr-dg-column [clrDgSortBy]="'insecure'">{{'CONFIG.VERIFY_REMOTE_CERT' | translate }}</clr-dg-column>
FangyuanCheng's avatar
FangyuanCheng committed
25
                <clr-dg-column [clrDgField]="'credential.type'">{{'DESTINATION.AUTHENTICATION' | translate }}</clr-dg-column>
26
                <clr-dg-column [clrDgSortBy]="creationTimeComparator">{{'DESTINATION.CREATION_TIME' | translate}}</clr-dg-column>
Steven Zou's avatar
Steven Zou committed
27
                <clr-dg-placeholder>{{'DESTINATION.PLACEHOLDER' | translate }}</clr-dg-placeholder>
28
                <clr-dg-row *clrDgItems="let t of targets" [clrDgItem]='t'>
FangyuanCheng's avatar
FangyuanCheng committed
29
                    <clr-dg-cell class="flex-min-width">{{t.name}}</clr-dg-cell>
30 31 32 33 34
                    <clr-dg-cell class="flex-min-width">
                        <span *ngIf="t.status === 'healthy';else elseBlock" class="label label-success">{{'SCANNER.HEALTHY' | translate}}</span>
                        <ng-template #elseBlock>
                            <span class="label label-danger">{{'SCANNER.UNHEALTHY' | translate}}</span>
                        </ng-template>
FangyuanCheng's avatar
FangyuanCheng committed
35 36
                    </clr-dg-cell>
                    <clr-dg-cell class="flex-min-width">{{t.url}}</clr-dg-cell>
37
                    <clr-dg-cell>{{getAdapterText(t.type)}}</clr-dg-cell>
38 39
                    <clr-dg-cell>
                        {{!t.insecure}}
40
                    </clr-dg-cell>
FangyuanCheng's avatar
FangyuanCheng committed
41
                    <clr-dg-cell>{{t.credential.type}}</clr-dg-cell>
kunw's avatar
kunw committed
42 43
                    <clr-dg-cell>{{t.creation_time | date: 'short'}}</clr-dg-cell>
                </clr-dg-row>
44
                <clr-dg-footer>
45 46
                    <span *ngIf="targets?.length">{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} {{'DESTINATION.OF' | translate}}</span>
                    {{targets?.length}} {{'DESTINATION.ITEMS' | translate}}
47
                    <clr-dg-pagination #pagination [clrDgPageSize]="15"></clr-dg-pagination>
48
                </clr-dg-footer>
kunw's avatar
kunw committed
49 50 51
            </clr-datagrid>
        </div>
    </div>
52
    <confirmation-dialog #confirmationDialog (confirmAction)="confirmDeletion($event)"></confirmation-dialog>
53
    <hbr-create-edit-endpoint (reload)="reload($event)"></hbr-create-edit-endpoint>
Meina Zhou's avatar
Meina Zhou committed
54
</div>