1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 23:55:24 +00:00
webvirtcloud/instances/templates/allinstances.html

46 lines
1.7 KiB
HTML
Raw Permalink Normal View History

{% extends "base.html" %}
{% load i18n %}
2021-06-15 06:42:55 +00:00
{% load static %}
{% 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' %}" />
{% endblock %}
2020-10-15 14:18:45 +00:00
{% block page_heading %}{% trans "Instances" %}{% endblock page_heading %}
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 %}
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="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
2020-07-13 09:33:09 +00:00
</div>
{% endif %}
{% endfor %}
<div class="col-lg-12">
2024-02-13 11:24:38 +00:00
{% 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 %}
2019-07-31 08:03:48 +00:00
</div>
2020-07-13 09:33:09 +00:00
{% endblock content %}
{% 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>
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 %}