47 lines
1.3 KiB
HTML
47 lines
1.3 KiB
HTML
{% extends 'dash_base.html' %}
|
|
|
|
{% block sidebar %}
|
|
{% with current_sidebar="instances" %}
|
|
{{block.super}}
|
|
{% endwith %}
|
|
{% endblock %}
|
|
|
|
{% block page_header %}
|
|
{% url dash_instances request.user.tenant as refresh_link %}
|
|
{# to make searchable false, just remove it from the include statement #}
|
|
{% include "_page_header.html" with title="Instances" refresh_link=refresh_link searchable="true" %}
|
|
{% endblock page_header %}
|
|
|
|
{% block dash_main %}
|
|
{% if instances %}
|
|
{% include '_instance_list.html' %}
|
|
{% else %}
|
|
<div class="message_box info">
|
|
<h2>Info</h2>
|
|
<p>There are currently no instances. You can launch an instance from the <a href='{% url dash_images request.user.tenant %}'>Images Page.</a></p>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block footer_js %}
|
|
<script type="text/javascript" charset="utf-8">
|
|
$(function(){
|
|
$("#spinner").hide()
|
|
function loadInstances(){
|
|
$('#spinner').show();
|
|
$('#instances').load('{% url dash_instances_refresh request.user.tenant %}', function(){
|
|
$("#spinner").hide()
|
|
});
|
|
}
|
|
setInterval(function(){
|
|
loadInstances();
|
|
}, 15000);
|
|
|
|
$("a.refresh").click(function(e){
|
|
e.preventDefault()
|
|
loadInstances();
|
|
})
|
|
})
|
|
</script>
|
|
{% endblock footer_js %}
|