2018-09-28 10:33:21 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load i18n %}
|
2020-07-13 09:33:09 +00:00
|
|
|
{% load icons %}
|
2021-06-15 06:42:55 +00:00
|
|
|
{% load static %}
|
2018-09-28 10:33:21 +00:00
|
|
|
{% block title %}{% trans "Instances" %}{% endblock %}
|
|
|
|
{% block style %}
|
2021-06-10 12:17:53 +00:00
|
|
|
<link rel="stylesheet" href="{% static 'css/sortable-theme-bootstrap.css' %}" />
|
2018-09-28 10:33:21 +00:00
|
|
|
{% 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 %}
|
2021-06-10 12:17:53 +00:00
|
|
|
{% include 'search_block.html' %}
|
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 }}
|
2021-07-07 11:12:38 +00:00
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
2020-07-13 09:33:09 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-01-22 11:50:12 +00:00
|
|
|
<div class="col-lg-12">
|
2023-03-13 08:22:40 +00:00
|
|
|
{% if 'instances.view_instances' in perms %}
|
|
|
|
{% if app_settings.VIEW_INSTANCES_LIST_STYLE == 'grouped' and request.user.is_superuser %}
|
|
|
|
{% include 'allinstances_index_grouped.html' %}
|
|
|
|
{% else %}
|
|
|
|
{% include 'allinstances_index_nongrouped.html' %}
|
|
|
|
{% endif %}
|
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 %}
|
2021-06-10 12:17:53 +00:00
|
|
|
<script src="{% static 'js/sortable.min.js' %}"></script>
|
2020-07-13 09:33:09 +00:00
|
|
|
<script src="{% static 'js/filter-table.js' %}"></script>
|
|
|
|
{% if request.user.is_superuser %}
|
|
|
|
<script>
|
2023-05-10 10:59:13 +00:00
|
|
|
function goto_compute(compute) {
|
|
|
|
//let compute = $("#compute_select").val();
|
2020-07-13 09:33:09 +00:00
|
|
|
window.location.href = "{% url 'instances:create_instance_select_type' 1 %}".replace(1, compute);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock script %}
|