All files / src/app/ceph/cluster/logs logs.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 1086x                                                                                                                                                                                                                      
<div *ngIf="contentData">
<ng-container *ngTemplateOutlet="logFiltersTpl"></ng-container>
<tabset>
  <tab i18n-heading
       heading="Cluster Logs">
  <div class="well">
    <div *ngIf="clog">
      <p *ngFor="let line of clog">
        <span class="timestamp">{{ line.stamp }}</span>
        <span class="priority {{ line.priority | logPriority }}">{{ line.priority }}</span>
        <span class="message">{{ line.message }}</span>
      </p>
    </div>
    <div *ngIf="contentData.clog.length === 0">
      <p i18n>No entries found</p>
    </div>
  </div>
  </tab>
 
  <tab i18n-heading
       heading="Audit Logs">
  <div class="well">
    <div *ngIf="audit_log">
      <p *ngFor="let line of audit_log">
        <span class="timestamp">{{ line.stamp }}</span>
        <span class="priority {{ line.priority | logPriority }}">{{ line.priority }}</span>
        <span class="message">{{ line.message }}</span>
      </p>
    </div>
    <div *ngIf="contentData.audit_log.length === 0">
      <p i18n>No entries found</p>
    </div>
  </div>
  </tab>
</tabset>
</div>
 
<ng-template #logFiltersTpl>
  <div class="row log-filters">
    <div class="col-xs-4 col-md-2 cd-col-1 filter-box">
      <label i18n>Priority:</label>
      <select class="form-control"
              [(ngModel)]="priority"
              (ngModelChange)="filterLogs()">
        <option class="form-control" 
                *ngFor="let prio of prioritys"
                [value]="prio.value">{{ prio.name }}</option>
      </select>
    </div>
    <div class="col-xs-4 col-md-3 cd-col-3 filter-box">
      <label i18n>Keyword:</label>
      <div class="input-group">
        <span class="input-group-addon">
          <i class="glyphicon glyphicon-search"></i>
        </span>
        <input class="form-control"
               type="text"
               [(ngModel)]="search"
               (keyup)="filterLogs()">
        <span class="input-group-btn">
          <button type="button"
                  class="btn btn-default clear-input tc_clearInputBtn"
                  (click)="clearSearchKey()">
            <i class="icon-prepend fa fa-remove"></i>
          </button>
        </span>
      </div>
    </div>
    <div class="col-xs-4 col-md-3 cd-col-2 filter-box">
      <label i18n>Date:</label>
      <div class="input-group">
        <input type="text"
               class="form-control"
               i18n-placeholder
               placeholder="Datepicker"
               [bsConfig]="bsConfig"
               bsDatepicker
               [(ngModel)]="selectedDate"
               (ngModelChange)="filterLogs()">
        <span class="input-group-btn">
          <button type="button"
                  class="btn btn-default clear-input tc_clearInputBtn"
                  (click)="clearDate()">
            <i class="icon-prepend fa fa-remove"></i>
          </button>
        </span>
      </div>
    </div>
    <div class="clearfix visible-xs-block"></div>
    <div class="col-xs-8 col-md-4 cd-col-4 filter-box time-box">
      <label i18n>Time range:</label>
      <timepicker [showMeridian]="false"
                  [showSpinners]="showSpinners"
                  [minuteStep]="1"
                  [(ngModel)]="startTime"
                  (ngModelChange)="filterLogs()">
      </timepicker>
      <span>&nbsp;&mdash;&nbsp;</span>
      <timepicker [showMeridian]="false"
                  [showSpinners]="showSpinners"
                  [minuteStep]="1"
                  [(ngModel)]="endTime"
                  (ngModelChange)="filterLogs()">
      </timepicker>
    </div>
  </div>
</ng-template>