mirror of
https://github.com/retspen/webvirtcloud
synced 2024-11-01 12:04:15 +00:00
159 lines
No EOL
10 KiB
HTML
159 lines
No EOL
10 KiB
HTML
{% load i18n %}
|
|
{% if request.user.is_superuser %}
|
|
<a href="#addHost" type="button" class="btn btn-success pull-right" data-toggle="modal">
|
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
|
</a>
|
|
|
|
<!-- Modal -->
|
|
<div class="modal fade" id="addHost" tabindex="-1" role="dialog" aria-labelledby="addHostLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title">{% trans "Add Connection" %}</h4>
|
|
</div>
|
|
<div class="tabbable">
|
|
<ul class="nav nav-tabs">
|
|
<li class="active">
|
|
<a href="#1" data-toggle="tab">{% trans "TCP Connections" %}</a>
|
|
</li>
|
|
<li><a href="#2" data-toggle="tab">{% trans "SSH Connections" %}</a></li>
|
|
<li><a href="#3" data-toggle="tab">{% trans "TLS Connection" %}</a></li>
|
|
<li><a href="#4" data-toggle="tab">{% trans "Local Socket" %}</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="tab-content">
|
|
<div class="tab-pane active" id="1">
|
|
<div class="modal-body">
|
|
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "Label" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="name" class="form-control" placeholder="Label Name" maxlength="20" required pattern="[a-z0-9\.\-_]+">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "FQDN / IP" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="hostname" class="form-control" placeholder="{% trans "FQDN or IP Address" %}" required pattern="[a-z0-9\.\-_]+">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "Username" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="login" class="form-control" placeholder="{% trans "Username" %}">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "Password" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="password" name="password" class="form-control" placeholder="{% trans "Password" %}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">
|
|
{% trans "Close" %}
|
|
</button>
|
|
<button type="submit" class="btn btn-primary" name="host_tcp_add">
|
|
{% trans "Add" %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="tab-pane" id="2">
|
|
<div class="modal-body">
|
|
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
|
|
<p class="modal-body">{% trans "You must 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">
|
|
<input type="text" name="name" class="form-control" placeholder="Label Name" maxlength="20" required pattern="[a-z0-9\.\-_]+">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "FQDN / IP" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="hostname" class="form-control" placeholder="{% trans "FQDN or IP Address" %}" required pattern="[a-z0-9\:\.\-_]+">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "Username" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="login" class="form-control" placeholder="{% trans "Username" %}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">
|
|
{% trans "Close" %}
|
|
</button>
|
|
<button type="submit" class="btn btn-primary" name="host_ssh_add">
|
|
{% trans "Add" %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="tab-pane" id="3">
|
|
<div class="modal-body">
|
|
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "Label" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="name" class="form-control" placeholder="Label Name" maxlength="20" required pattern="[a-z0-9\.\-_]+">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "FQDN / IP" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="hostname" class="form-control" placeholder="{% trans "FQDN or IP Address" %}" required pattern="[a-z0-9\.\-_]+">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "Username" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="login" class="form-control" placeholder="{% trans "Username" %}">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "Password" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="password" name="password" class="form-control" placeholder="{% trans "Password" %}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">
|
|
{% trans "Close" %}
|
|
</button>
|
|
<button type="submit" class="btn btn-primary" name="host_tls_add">
|
|
{% trans "Add" %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="tab-pane" id="4">
|
|
<div class="modal-body">
|
|
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans "Label" %}</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="name" class="form-control" placeholder="Label Name" maxlength="20" required pattern="[a-z0-9\.\-_]+">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">
|
|
{% trans "Close" %}
|
|
</button>
|
|
<button type="submit" class="btn btn-primary" name="host_socket_add">
|
|
{% trans "Add" %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div> <!-- /.tab-content -->
|
|
</div> <!-- /.modal-content -->
|
|
</div> <!-- /.modal-dialog -->
|
|
</div><!-- /.modal -->
|
|
{% endif %} |