audit-log.component.html 2.2 KB
Newer Older
kunw's avatar
kunw committed
1 2
<div class="row">
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">  
kunw's avatar
kunw committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
    <div class="row flex-items-xs-right">
      <div class="col-xs-3 push-md-2 flex-xs-middle">
        <button class="btn btn-link" (click)="toggleOptionalName(currentOption)">{{toggleName[currentOption]}}</button>
      </div>
      <div class="col-xs-3 flex-xs-middle">
        <clr-icon shape="filter" style="position: relative; left: 15px;"></clr-icon><input style="padding-left: 20px;" type="text" placeholder="Filter logs" #searchUsername (keyup.enter)="doSearchAuditLogs(searchUsername.value)">
      </div>
    </div>
    <div class="row flex-items-xs-right advance-option" [hidden]="currentOption === 0">
      <div class="col-xs-2 push-md-1">
        <clr-dropdown [clrMenuPosition]="'bottom-left'" >
          <button class="btn btn-link" clrDropdownToggle>
            All Operations
            <clr-icon shape="caret down"></clr-icon>
          </button>
          <div class="dropdown-menu">
            <a href="javascript:void(0)" clrDropdownItem *ngFor="let f of filterOptions" (click)="toggleFilterOption(f.key)"><clr-icon shape="check" [hidden]="!f.checked"></clr-icon> {{f.description}}</a>
          </div>
        </clr-dropdown>
      </div>
      <div class="col-xs-5 push-md-1">
        <clr-icon shape="date"></clr-icon><input type="date" #fromTime  (change)="doSearchByTimeRange(fromTime.value, 'begin')">
        <clr-icon shape="date"></clr-icon><input type="date" #toTime  (change)="doSearchByTimeRange(toTime.value, 'end')">
kunw's avatar
kunw committed
26 27 28 29 30 31 32 33 34 35
      </div>
    </div>
    <clr-datagrid>
      <clr-dg-column>Username</clr-dg-column>
      <clr-dg-column>Repository Name</clr-dg-column>
      <clr-dg-column>Tag</clr-dg-column>
      <clr-dg-column>Operation</clr-dg-column>
      <clr-dg-column>Timestamp</clr-dg-column>
      <clr-dg-row *ngFor="let l of auditLogs">
        <clr-dg-cell>{{l.username}}</clr-dg-cell>
kunw's avatar
kunw committed
36 37
        <clr-dg-cell>{{l.repo_name}}</clr-dg-cell>
        <clr-dg-cell>{{l.repo_tag}}</clr-dg-cell>
kunw's avatar
kunw committed
38
        <clr-dg-cell>{{l.operation}}</clr-dg-cell>
kunw's avatar
kunw committed
39
        <clr-dg-cell>{{l.op_time}}</clr-dg-cell>
kunw's avatar
kunw committed
40
      </clr-dg-row>
kunw's avatar
kunw committed
41
      <clr-dg-footer>{{ (auditLogs ? auditLogs.length : 0) }} item(s)</clr-dg-footer>
kunw's avatar
kunw committed
42 43 44
    </clr-datagrid>
  </div>
</div>