2018-09-28 10:33:21 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load i18n %}
|
2020-07-13 09:33:09 +00:00
|
|
|
{% load icons %}
|
2018-09-28 10:33:21 +00:00
|
|
|
{% load staticfiles %}
|
|
|
|
{% block title %}{% trans "Instances" %}{% endblock %}
|
|
|
|
{% block style %}
|
|
|
|
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" />
|
|
|
|
{% endblock %}
|
2020-10-15 14:18:45 +00:00
|
|
|
{% block page_heading %}{% trans "Instances" %}{% endblock page_heading %}
|
2018-09-28 10:33:21 +00:00
|
|
|
|
2020-10-15 14:18:45 +00:00
|
|
|
{% block page_heading_extra %}
|
2020-07-13 09:33:09 +00:00
|
|
|
{% if request.user.is_superuser %}
|
|
|
|
{% include 'create_inst_block.html' %}
|
|
|
|
{% endif %}
|
|
|
|
<div class="float-right search">
|
|
|
|
<input id="filter" class="form-control" type="text" placeholder="{% trans 'Search' %}">
|
|
|
|
</div>
|
2020-10-15 14:18:45 +00:00
|
|
|
{% endblock page_heading_extra %}
|
2018-09-28 10:33:21 +00:00
|
|
|
|
2020-07-13 09:33:09 +00:00
|
|
|
{% block content %}
|
|
|
|
{% for compute in computes %}
|
|
|
|
{% if compute.status is not True %}
|
|
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
|
|
{% trans 'Problem occurred with host' %} {{ compute.name }}: {{ compute.status }}
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-01-22 11:50:12 +00:00
|
|
|
<div class="col-lg-12">
|
2020-07-13 09:33:09 +00:00
|
|
|
{% if app_settings.VIEW_INSTANCES_LIST_STYLE == 'grouped' and request.user.is_superuser %}
|
|
|
|
{% include 'allinstances_index_grouped.html' %}
|
2020-01-22 11:50:12 +00:00
|
|
|
{% else %}
|
2020-07-13 09:33:09 +00:00
|
|
|
{% include 'allinstances_index_nongrouped.html' %}
|
2020-01-22 11:50:12 +00:00
|
|
|
{% endif %}
|
2019-07-31 08:03:48 +00:00
|
|
|
</div>
|
2020-07-13 09:33:09 +00:00
|
|
|
{% endblock content %}
|
2018-09-28 10:33:21 +00:00
|
|
|
{% block script %}
|
2020-07-13 09:33:09 +00:00
|
|
|
<script src="{% static "js/sortable.min.js" %}"></script>
|
|
|
|
<script src="{% static 'js/filter-table.js' %}"></script>
|
|
|
|
{% if request.user.is_superuser %}
|
|
|
|
<script>
|
|
|
|
function goto_compute() {
|
|
|
|
let compute = $("#compute_select").val();
|
|
|
|
window.location.href = "{% url 'instances:create_instance_select_type' 1 %}".replace(1, compute);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock script %}
|