2023-01-02 17:01:44 +00:00
|
|
|
{% extends 'layouts/bootstrap-dashboard.html' %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
<title>Origins</title>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2023-01-04 08:52:15 +00:00
|
|
|
<div>
|
|
|
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
|
|
|
<h1 class="h2">Origins <small>with leases</small></h1>
|
|
|
|
<div class="btn-toolbar mb-2 mb-md-0">
|
|
|
|
<div class="btn-group me-2">
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOrigin().finally(() => load())">
|
|
|
|
delete origin
|
|
|
|
</button>
|
2024-02-27 19:53:32 +00:00
|
|
|
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteExpiredOrigins().finally(() => load())">
|
|
|
|
delete all expired origins
|
|
|
|
</button>
|
2023-01-04 11:11:55 +00:00
|
|
|
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOriginsWrapper()">
|
2023-01-04 08:52:15 +00:00
|
|
|
delete all
|
|
|
|
</button>
|
|
|
|
</div>
|
2023-01-04 11:11:23 +00:00
|
|
|
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="load()" title="refresh">
|
|
|
|
<i class="bi bi-arrow-clockwise"></i>
|
|
|
|
</button>
|
2023-01-02 17:01:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-01-04 08:52:15 +00:00
|
|
|
<div id="origins" class="mt-3"></div>
|
|
|
|
</div>
|
2023-01-02 17:01:44 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
{{ super() }}
|
2023-01-04 08:52:15 +00:00
|
|
|
<script type="application/javascript">
|
|
|
|
function load() {
|
|
|
|
const origins = document.getElementById('origins')
|
|
|
|
fetchOriginsWithLeases(origins)
|
|
|
|
}
|
|
|
|
|
|
|
|
load()
|
2023-01-04 11:11:55 +00:00
|
|
|
|
|
|
|
function deleteOriginsWrapper() {
|
|
|
|
const response = confirm('Are you sure you want to delete all origins and their leases?');
|
|
|
|
|
|
|
|
if (response)
|
|
|
|
deleteOrigins().finally(() => load())
|
|
|
|
}
|
2023-01-04 08:52:15 +00:00
|
|
|
</script>
|
2023-01-02 17:01:44 +00:00
|
|
|
{% endblock %}
|