2015-03-06 11:59:27 +00:00
{% load i18n %}
2015-03-03 09:34:09 +00:00
{% if request.user.is_superuser %}
2015-03-06 11:59:27 +00:00
< a href = "#addHost" type = "button" class = "btn btn-success pull-right" data-toggle = "modal" >
2015-03-03 09:34:09 +00:00
< span class = "glyphicon glyphicon-plus" aria-hidden = "true" > < / span >
2015-03-06 11:59:27 +00:00
< / 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 -->
2015-03-03 09:34:09 +00:00
{% endif %}