This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/directives/logs-view.html
Joseph Schorr ad12df0f93 Fix logs UI around date time handling
Makes the UI nicer looking and removes the 2 week limit; instead we have a 1 month limit, which is the max days we keep the logs in the database before being rotated.

Fixes #1480
2016-05-23 15:51:34 -04:00

92 lines
3.8 KiB
HTML

<div class="logs-view-element">
<div class="manager-header" header-title="Usage Logs">
<span id="logs-range" class="mini">
<span class="date-line">
<span class="date-line-caption">From</span>
<input type="text" class="logs-date-picker input-sm" name="start"
ng-model="options.logStartDate" data-min-date="{{ options.monthAgo }}"
data-max-date="{{ options.logEndDate }}"
bs-datepicker>
</span>
<span class="date-line">
<span class="date-line-caption add-on">to</span>
<input type="text" class="logs-date-picker input-sm" name="end"
ng-model="options.logEndDate" data-min-date="{{ options.logStartDate }}"
data-max-date="{{ options.now }}"
data-placement="bottom-right"
bs-datepicker>
</span>
</span>
<span class="hidden-xs right">
<i class="fa fa-bar-chart-o toggle-icon" ng-class="chartVisible ? 'active' : ''"
ng-click="toggleChart()" data-title="Toggle Chart" bs-tooltip="tooltip.title"></i>
</span>
</div>
<div>
<div id="bar-chart" style="width: 800px; height: 500px;" ng-show="chartVisible">
<svg style="width: 800px; height: 500px;"></svg>
<div class="cor-loader" ng-if="chartLoading"></div>
</div>
<div class="hidden-xs side-controls">
<div class="result-count">
Showing {{(logs | visibleLogFilter:kindsAllowed | filter:search).length}} matching logs
</div>
<div class="filter-input">
<input id="log-filter" class="form-control" placeholder="Filter Logs" type="text" ng-model="search.$">
</div>
</div>
<div class="table-container" infinite-scroll="nextPage()"
infinite-scroll-disabled="loading || !hasAdditional"
infinite-scroll-distance="2">
<table class="cor-table">
<thead>
<td>Description</td>
<td style="min-width: 226px">Date/Time</td>
<td>User/Token/App</td>
<td>IP Address</td>
</thead>
<tr class="log" ng-repeat="log in (logs | visibleLogFilter:kindsAllowed | filter:search)"
bindonce>
<td>
<span class="circle" style="{{ 'background: ' + getColor(log.kind, chart) }}"></span>
<span class="log-description" bo-html="getDescription(log)"></span>
</td>
<td><span bo-text="log.datetime"></span></td>
<td>
<span class="log-performer" bo-if="log.metadata.oauth_token_application">
<div>
<span class="application-reference"
data-title="log.metadata.oauth_token_application"
client-id="log.metadata.oauth_token_application_id"></span>
</div>
<div style="text-align: center; font-size: 12px; color: #aaa; padding: 4px;">on behalf of</div>
<div>
<span class="entity-reference" entity="log.performer" namespace="organization.name"></span>
</div>
</span>
<span class="log-performer" bo-if="!log.metadata.oauth_token_application && log.performer">
<span class="entity-reference" entity="log.performer" namespace="organization.name"></span>
</span>
<span class="log-performer" bo-if="!log.performer && log.metadata.token">
<i class="fa fa-key"></i>
<span bo-text="log.metadata.token"></span>
</span>
<span bo-if="!log.performer && !log.metadata.token">
(anonymous)
</span>
</td>
<td>
<span bo-if="log.metadata._ip"><span bo-text="log.metadata._ip"></span></span>
<span class="empty" bo-if="!log.metadata._ip">(No data)</span>
</td>
</tr>
</table>
<div class="cor-loader" ng-show="loading"></div>
</div>
</div>
</div>