mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-07-16 15:25:59 +00:00
93 lines
2.9 KiB
HTML
93 lines
2.9 KiB
HTML
{{extends "base.html"}}
|
|
{{import "breadcrumb.html"}}
|
|
|
|
{{block head()}}
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
var table = $('#datatable').DataTable({
|
|
"pageLength": 10,
|
|
"order": [[ 4, 'desc' ]],
|
|
"stateSave": false,
|
|
"searchCols": [
|
|
null,
|
|
{search: $('input:checkbox[name="sha256_chk"]').val()},
|
|
],
|
|
"language": {
|
|
"emptyTable": "No events."
|
|
}
|
|
});
|
|
|
|
$.fn.dataTable.ext.search.push(function( settings, searchData, index, rowData, counter ) {
|
|
var action = $('input:checkbox[name="action_chk"]:checked').map(function() {
|
|
return this.value;
|
|
}).get();
|
|
if (action.length === 0) {
|
|
return true;
|
|
}
|
|
if (action.indexOf(searchData[0]) !== -1) {
|
|
return true;
|
|
}
|
|
return false;
|
|
});
|
|
$('input:checkbox[name="action_chk"]').on('change', function () {
|
|
table.draw();
|
|
});
|
|
|
|
$('input:checkbox[name="sha256_chk"]').on('change', function () {
|
|
if ($(this).prop('checked')) {
|
|
table.column(1).search($(this).val()).draw() ;
|
|
} else {
|
|
table.column(1).search('').draw() ;
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{{end}}
|
|
|
|
{{block body()}}
|
|
<ol class="breadcrumb">
|
|
{{ yield breadcrumb() }}
|
|
<li class="active">Event Log</li>
|
|
</ol>
|
|
|
|
{{if eventsAllowed}}
|
|
<div class="form-check form-switch">
|
|
<input class="form-check-input" type="checkbox" name="action_chk" value="push">
|
|
<label class="form-check-label">Hide Pull</label>
|
|
<label class="form-check-label" style="margin-right:10px"></label>
|
|
<input class="form-check-input" type="checkbox" name="sha256_chk" value="!@sha256" checked>
|
|
<label class="form-check-label">Hide sha256 entries</label>
|
|
</div>
|
|
<table id="datatable" class="table table-striped table-bordered">
|
|
<thead bgcolor="#ddd">
|
|
<tr>
|
|
<th>Action</th>
|
|
<th>Image</th>
|
|
<th>IP Address</th>
|
|
<th>User</th>
|
|
<th>Time</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range _, e := events}}
|
|
<tr>
|
|
<td>{{ e.Action }}</td>
|
|
{{if hasPrefix(e.Tag,"sha256:") }}
|
|
<td title="{{ e.Tag }}"><a href="{{ basePath }}/{{ e.Repository }}@{{ e.Tag }}">{{ e.Repository }}@{{ e.Tag[:19] }}...</a></td>
|
|
{{else}}
|
|
<td><a href="{{ basePath }}/{{ e.Repository }}:{{ e.Tag }}">{{ e.Repository }}:{{ e.Tag }}</a></td>
|
|
{{end}}
|
|
<td>{{ e.IP }}</td>
|
|
<td>{{ e.User }}</td>
|
|
<td>{{ e.Created|pretty_time }}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<div class="text-center">
|
|
<h4>User "{{user}}" is not permitted to view the Event Log.</h4>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|