1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 12:04:15 +00:00
webvirtcloud/computes/templates/computes.html

253 lines
21 KiB
HTML
Raw Normal View History

2015-02-27 12:25:41 +00:00
{% extends "base.html" %}
2015-02-27 08:53:51 +00:00
{% load i18n %}
2015-02-27 12:25:41 +00:00
{% block title %}{% trans "Computes" %}{% endblock %}
{% block content %}
2015-03-05 09:55:15 +00:00
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
2015-04-02 13:20:46 +00:00
{% include 'create_comp_block.html' %}
2015-03-05 09:55:15 +00:00
<h1 class="page-header">{% trans "Computes" %}</h1>
</div>
</div>
<!-- /.row -->
2015-02-27 08:53:51 +00:00
2015-03-03 09:34:09 +00:00
{% include 'errors_block.html' %}
2015-02-27 08:53:51 +00:00
<div class="row">
{% if computes_info %}
{% for compute in computes_info %}
2015-03-05 14:56:22 +00:00
<div id="{{ compute.name }}" class="col-xs-12 col-sm-4">
<div class="panel {% if compute.status %}panel-success{% else %}panel-danger{% endif %} panel-data">
2015-02-27 08:53:51 +00:00
<div class="panel-heading">
{% ifequal compute.status 1 %}
<h3 class="panel-title">
2015-03-04 13:43:29 +00:00
<a href="{% url 'overview' compute.id %}"><strong>{{ compute.name }}</strong></a>
2015-03-05 14:56:22 +00:00
<a data-toggle="modal" href="#editHost{{ compute.id }}" class="pull-right" title="{% trans "Edit" %}">
2015-05-13 07:39:50 +00:00
<i class="fa fa-cog"></i>
2015-02-27 08:53:51 +00:00
</a>
</h3>
{% else %}
<h3 class="panel-title"><strong>{{ compute.name }}</strong>
2015-03-05 14:56:22 +00:00
<a data-toggle="modal" href="#editHost{{ compute.id }}" class="pull-right" title="{% trans "Edit" %}">
2015-02-27 08:53:51 +00:00
<span class="glyphicon glyphicon-cog"></span>
</a>
</h3>
{% endifequal %}
</div>
<div class="panel-body">
2015-03-05 14:56:22 +00:00
<div class="row">
<div class="col-xs-4 col-sm-4">
<p><strong>{% trans "Status:" %}</strong></p>
</div>
<div class="col-xs-4 col-sm-6">
{% if compute.status %}
<p>{% trans "Connected" %}</p>
{% else %}
<p>{% trans "Not Connected" %}</p>
{% endif %}
2016-03-18 18:21:44 +00:00
{% if compute.details %}
<p>{% trans compute.details %}</p>
{% else %}
<p>{% trans "No details available" %}</p>
{% endif %}
2015-03-05 14:56:22 +00:00
</div>
</div>
2015-02-27 08:53:51 +00:00
<!-- Modal Edit -->
2015-03-05 14:56:22 +00:00
<div class="modal fade" id="editHost{{ compute.id }}" tabindex="-1" role="dialog" aria-labelledby="editHostLabel" aria-hidden="true">
2015-02-27 08:53:51 +00:00
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
2015-03-05 14:56:22 +00:00
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
2015-02-27 08:53:51 +00:00
<h4 class="modal-title">{% trans "Edit connection" %}</h4>
</div>
{% ifequal compute.type 1 %}
2018-07-31 07:15:59 +00:00
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
<div class="modal-body">
2015-02-27 08:53:51 +00:00
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Label" %}</label>
<div class="col-sm-6">
<input type="hidden" name="host_id" value="{{ compute.id }}">
<input type="text" name="name" class="form-control" value="{{ compute.name }}" maxlength="20" required pattern="[a-zA-Z0-9\.\-_]+">
2015-02-27 08:53:51 +00:00
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "FQDN / IP" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="text" name="hostname" class="form-control" value="{{ compute.hostname }}" required pattern="[a-z0-9\.\-_]+">
2015-02-27 08:53:51 +00:00
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Username" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="text" name="login" class="form-control" value="{{ compute.login }}">
2015-02-27 08:53:51 +00:00
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Password" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="password" name="password" class="form-control" value="{{ compute.password }}">
2015-02-27 08:53:51 +00:00
</div>
</div>
2018-07-31 07:15:59 +00:00
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Details" %}</label>
<div class="col-sm-6">
<input type="text" name="details" class="form-control" placeholder="Details" value="{{ compute.details }}">
</div>
</div></div>
<div class="modal-footer">
<button type="submit" class="pull-left btn btn-danger" name="host_del">
{% trans "Delete" %}
</button>
<button type="button" class="btn btn-default" data-dismiss="modal">
{% trans "Close" %}
</button>
<button type="submit" class="btn btn-primary" name="host_edit">
{% trans "Change" %}
</button>
</div>
</form>
2015-02-27 08:53:51 +00:00
{% endifequal %}
{% ifequal compute.type 2 %}
2018-07-31 07:15:59 +00:00
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
<div class="modal-body">
2015-02-27 08:53:51 +00:00
<p class="modal-body">{% trans "Need create ssh <a href='https://github.com/retspen/webvirtmgr/wiki/Setup-SSH-Authorization'>authorization key</a>. If you have another SSH port on your server, you can add IP:PORT like '192.168.1.1:2222'." %}</p>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Label" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="hidden" name="host_id" value="{{ compute.id }}">
<input type="text" name="name" class="form-control" value="{{ compute.name }}" maxlength="20" required pattern="[a-z0-9\.\-_]+">
2015-02-27 08:53:51 +00:00
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "FQDN / IP" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="text" name="hostname" class="form-control" value="{{ compute.hostname }}" required pattern="[a-z0-9\:\.\-_]+">
2015-02-27 08:53:51 +00:00
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Username" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="text" name="login" class="form-control" value="{{ compute.login }}">
2018-07-31 07:15:59 +00:00
<input type="hidden" name="password" value="{{ compute.password }}">
2015-02-27 08:53:51 +00:00
</div>
</div>
2018-07-31 07:15:59 +00:00
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Details" %}</label>
<div class="col-sm-6">
<input type="text" name="details" class="form-control" placeholder="Details" value="{{ compute.details }}">
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="pull-left btn btn-danger" name="host_del">
{% trans "Delete" %}
</button>
<button type="button" class="btn btn-default" data-dismiss="modal">
{% trans "Close" %}
</button>
<button type="submit" class="btn btn-primary" name="host_edit">
{% trans "Change" %}
</button>
</div>
</form>
2015-02-27 08:53:51 +00:00
{% endifequal %}
{% ifequal compute.type 3 %}
2018-07-31 07:15:59 +00:00
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
<div class="modal-body">
2015-02-27 08:53:51 +00:00
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Label" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="hidden" name="host_id" value="{{ compute.id }}">
<input type="text" name="name" class="form-control" value="{{ compute.name }}" maxlength="20" required pattern="[a-z0-9\.\-_]+">
2015-02-27 08:53:51 +00:00
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "FQDN / IP" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="text" name="hostname" class="form-control" value="{{ compute.hostname }}" required pattern="[a-z0-9\:\.\-_]+">
2015-02-27 08:53:51 +00:00
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Username" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="text" name="login" class="form-control" placeholder="{% trans "Name" %}">
2015-02-27 08:53:51 +00:00
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Password" %}</label>
<div class="col-sm-6">
2015-03-06 11:59:27 +00:00
<input type="password" name="password" class="form-control" value="{{ compute.password }}">
</div>
</div>
2018-07-31 07:15:59 +00:00
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Details" %}</label>
<div class="col-sm-6">
<input type="text" name="details" class="form-control" placeholder="Details" value="{{ compute.details }}">
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="pull-left btn btn-danger" name="host_del">
{% trans "Delete" %}
</button>
<button type="button" class="btn btn-default" data-dismiss="modal">
{% trans "Close" %}
</button>
<button type="submit" class="btn btn-primary" name="host_edit">
{% trans "Change" %}
</button>
</div>
</form>
2015-04-03 10:12:48 +00:00
{% endifequal %}
{% ifequal compute.type 4 %}
2018-07-31 07:15:59 +00:00
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
<div class="modal-body">
2015-03-06 11:59:27 +00:00
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Label" %}</label>
<div class="col-sm-6">
<input type="hidden" name="host_id" value="{{ compute.id }}">
<input type="text" name="name" class="form-control" value="{{ compute.name }}" maxlength="20" required pattern="[a-z0-9\.\-_]+">
2015-02-27 08:53:51 +00:00
</div>
</div>
2018-07-31 07:15:59 +00:00
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Details" %}</label>
<div class="col-sm-6">
<input type="text" name="details" class="form-control" placeholder="Details" value="{{ compute.details }}">
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="pull-left btn btn-danger" name="host_del">
{% trans "Delete" %}
</button>
<button type="button" class="btn btn-default" data-dismiss="modal">
{% trans "Close" %}
</button>
<button type="submit" class="btn btn-primary" name="host_edit">
{% trans "Change" %}
</button>
</div>
</form>
2015-04-03 10:12:48 +00:00
{% endifequal %}
2015-02-27 08:53:51 +00:00
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
</div>
</div>
{% endfor %}
{% else %}
2015-03-05 09:55:15 +00:00
<div class="col-lg-12">
<div class="alert alert-warning alert-dismissable">
2018-08-01 14:18:51 +00:00
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
2015-03-05 09:55:15 +00:00
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning:" %}</strong> {% trans "Hypervisor doesn't have any Computes" %}
2015-02-27 08:53:51 +00:00
</div>
2015-03-06 11:59:27 +00:00
</div>
2015-02-27 08:53:51 +00:00
{% endif %}
</div>
{% endblock %}