mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +00:00 
			
		
		
		
	Translate, indentation and typo fixes
This commit is contained in:
		
							parent
							
								
									f3b8b251b5
								
							
						
					
					
						commit
						b18290794e
					
				
					 23 changed files with 3013 additions and 3031 deletions
				
			
		|  | @ -1,121 +1,62 @@ | |||
| {% load i18n %} | ||||
| {% if request.user.is_superuser %} | ||||
| <a href="#addvol" type="button" class="btn btn-success pull-right" data-toggle="modal" title="Add Volume"> | ||||
|     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||||
| </a> | ||||
|     <a href="#addvol" type="button" class="btn btn-success pull-right" data-toggle="modal" title="Add Volume"> | ||||
|         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||||
|     </a> | ||||
| 
 | ||||
| <!-- Modal pool --> | ||||
| <div class="modal fade" id="addvol" tabindex="-1" role="dialog" aria-labelledby="addInstanceVolumeLabel" 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 Instance Volume" %}</h4> | ||||
|             </div> | ||||
|             <div class="modal-body"> | ||||
|                 <div class="row"> | ||||
|                     <ul class="nav nav-tabs"> | ||||
|                         <li role="presentation" class="active"><a href="#NewDisk" data-toggle="tab">{% trans 'New Disk' %}</a></li> | ||||
|                         <li role="presentation"><a href="#ExistingDisk" data-toggle="tab">{% trans 'Existing Disk' %}</a></li> | ||||
|                     </ul> | ||||
|     <!-- Modal pool --> | ||||
|     <div class="modal fade" id="addvol" tabindex="-1" role="dialog" aria-labelledby="addInstanceVolumeLabel" 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 Instance Volume" %}</h4> | ||||
|                 </div> | ||||
|                 <div class="modal-body"> | ||||
|                     <div class="row"> | ||||
|                         <ul class="nav nav-tabs"> | ||||
|                             <li role="presentation" class="active"><a href="#NewDisk" data-toggle="tab">{% trans 'New Disk' %}</a></li> | ||||
|                             <li role="presentation"><a href="#ExistingDisk" data-toggle="tab">{% trans 'Existing Disk' %}</a></li> | ||||
|                         </ul> | ||||
| 
 | ||||
|                     <div class="tab-content"> | ||||
|                         <div class="tab-pane active" id="NewDisk"> | ||||
|                             <form class="form-horizontal" method="post" role="form">{% csrf_token %} | ||||
|                         <div class="tab-content"> | ||||
|                             <div class="tab-pane active" id="NewDisk"> | ||||
|                                 <form class="form-horizontal" method="post" role="form">{% csrf_token %} | ||||
| 
 | ||||
|                             <p style="font-weight:bold;">{% trans "Volume parameters" %}</p> | ||||
|                             <div class="form-group"> | ||||
|                                 <label class="col-sm-3 control-label">{% trans "Storage" %}</label> | ||||
|                                 <div class="col-sm-4"> | ||||
|                                     <select name="storage" class="form-control image-format"> | ||||
|                                         {% for storage in storages %} | ||||
|                                             <option value="{{ storage }}">{{ storage }}</option> | ||||
|                                         {% endfor %} | ||||
|                                     </select> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                             <div class="form-group"> | ||||
|                                 <label class="col-sm-3 control-label">{% trans "Name" %}</label> | ||||
|                                 <div class="col-sm-4"> | ||||
|                                     <input type="text" class="form-control" name="name" placeholder="{% trans "Name" %}" required pattern="[a-zA-Z0-9\.\-_]+"> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                             <div class="form-group"> | ||||
|                                 <label class="col-sm-3 control-label">{% trans "Format" %}</label> | ||||
|                                 <div class="col-sm-4"> | ||||
|                                     <select name="format" class="form-control image-format"> | ||||
|                                         {% for format in formats %} | ||||
|                                             <option value="{{ format }}" {% if format == default_format %}selected{% endif %}>{% trans format %}</option> | ||||
|                                         {% endfor %} | ||||
|                                     </select> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                             <div class="form-group"> | ||||
|                                 <label class="col-sm-3 control-label">{% trans "Size" %}</label> | ||||
|                                 <div class="col-sm-4"> | ||||
|                                     <input type="text" class="form-control" name="size" value="10" maxlength="5" required pattern="[0-9]+"> | ||||
|                                 </div> | ||||
|                                 <label class="col-sm-1 control-label">{% trans "GB" %}</label> | ||||
|                             </div> | ||||
|                             <div class="form-group"> | ||||
|                                 <label class="col-sm-3 control-label">{% trans "Bus" %}</label> | ||||
|                                 <div class="col-sm-4"> | ||||
|                                     <select name="bus" class="form-control image-format"> | ||||
|                                         {% for bus in busses %} | ||||
|                                             <option value="{{ bus }}" {% if bus == default_bus %}selected{% endif %}>{% trans bus %}</option> | ||||
|                                         {% endfor %} | ||||
|                                     </select> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                             <div class="form-group"> | ||||
|                                 <label class="col-sm-3 control-label">{% trans "Cache" %}</label> | ||||
|                                 <div class="col-sm-4"> | ||||
|                                     <select name="cache" class="form-control image-format"> | ||||
|                                         {% for mode, name in cache_modes %} | ||||
|                                             <option value="{{ mode }}" {% if mode == default_cache %}selected{% endif %}>{% trans name %}</option> | ||||
|                                         {% endfor %} | ||||
|                                     </select> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                             <div class="form-group meta-prealloc"> | ||||
|                                 <label class="col-sm-3 control-label">{% trans "Metadata" %}</label> | ||||
|                                 <div class="col-sm-4"> | ||||
|                                     <input type="checkbox" name="meta_prealloc" value="true"> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                             <div class="modal-footer"> | ||||
|                                 <button type="submit" class="btn btn-lg btn-success pull-right" name="add_new_vol">{% trans "Add Volume" %}</button> | ||||
|                             </div> | ||||
|                         </form> | ||||
|                         </div> | ||||
|                         <div class="tab-pane" id="ExistingDisk"> | ||||
|                             <form class="form-horizontal" method="post" role="form">{% csrf_token %} | ||||
|                             <div class="modal-body"> | ||||
|                                 <p style="font-weight:bold;">{% trans "Volume parameters" %}</p> | ||||
|                                 <div class="form-group"> | ||||
|                                     <label class="col-sm-3 control-label">{% trans "Storage" %}</label> | ||||
|                                     <div class="col-sm-4"> | ||||
|                                         <div class="dropdown"> | ||||
|                                           <button id="select_storage" class="btn btn-default dropdown-toggle form-control" type="button" data-toggle="dropdown">{% trans 'Select Pool...' %} | ||||
|                                           <span class="caret"></span></button> | ||||
|                                           <ul class="dropdown-menu"> | ||||
|                                               {% for storage in storages %} | ||||
|                                                   <li><a href="#" onclick="get_volumes({{ compute_id }}, '{{ storage }}')">{{ storage }}</a></li> | ||||
|                                               {% endfor %} | ||||
|                                           </ul> | ||||
|                                           <input id="selected_storage" name="selected_storage" hidden/> | ||||
|                                         </div> | ||||
|                                         <select name="storage" class="form-control image-format"> | ||||
|                                             {% for storage in storages %} | ||||
|                                                 <option value="{{ storage }}">{{ storage }}</option> | ||||
|                                             {% endfor %} | ||||
|                                         </select> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                                 <div class="form-group"> | ||||
|                                     <label class="col-sm-3 control-label" >{% trans "Volume" %}</label> | ||||
|                                     <label class="col-sm-3 control-label">{% trans "Name" %}</label> | ||||
|                                     <div class="col-sm-4"> | ||||
|                                         <select id="vols" name="vols" class="form-control" disabled> | ||||
|                                             <option value="" selected>{% trans 'None' %}</option> | ||||
|                                             <!-- populate with javascript --> | ||||
|                                         <input type="text" class="form-control" name="name" placeholder="{% trans "Name" %}" required pattern="[a-zA-Z0-9\.\-_]+"> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                                 <div class="form-group"> | ||||
|                                     <label class="col-sm-3 control-label">{% trans "Format" %}</label> | ||||
|                                     <div class="col-sm-4"> | ||||
|                                         <select name="format" class="form-control image-format"> | ||||
|                                             {% for format in formats %} | ||||
|                                                 <option value="{{ format }}" {% if format == default_format %}selected{% endif %}>{% trans format %}</option> | ||||
|                                             {% endfor %} | ||||
|                                         </select> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                                 <div class="form-group"> | ||||
|                                     <label class="col-sm-3 control-label">{% trans "Size" %}</label> | ||||
|                                     <div class="col-sm-4"> | ||||
|                                         <input type="text" class="form-control" name="size" value="10" maxlength="5" required pattern="[0-9]+"> | ||||
|                                     </div> | ||||
|                                     <label class="col-sm-1 control-label">{% trans "GB" %}</label> | ||||
|                                 </div> | ||||
|                                 <div class="form-group"> | ||||
|                                     <label class="col-sm-3 control-label">{% trans "Bus" %}</label> | ||||
|                                     <div class="col-sm-4"> | ||||
|  | @ -136,16 +77,75 @@ | |||
|                                         </select> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                                 <div class="form-group meta-prealloc"> | ||||
|                                     <label class="col-sm-3 control-label">{% trans "Metadata" %}</label> | ||||
|                                     <div class="col-sm-4"> | ||||
|                                         <input type="checkbox" name="meta_prealloc" value="true"> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                                 <div class="modal-footer"> | ||||
|                                     <button type="submit" class="btn btn-lg btn-success pull-right" name="add_new_vol">{% trans "Add Volume" %}</button> | ||||
|                                 </div> | ||||
|                             </form> | ||||
|                             </div> | ||||
|                             <div class="modal-footer"> | ||||
|                                  <button type="submit" class="btn btn-lg btn-success pull-right" name="add_existing_vol">{% trans "Add Volume" %}</button> | ||||
|                             <div class="tab-pane" id="ExistingDisk"> | ||||
|                                 <form class="form-horizontal" method="post" role="form">{% csrf_token %} | ||||
|                                 <div class="modal-body"> | ||||
|                                     <p style="font-weight:bold;">{% trans "Volume parameters" %}</p> | ||||
|                                     <div class="form-group"> | ||||
|                                         <label class="col-sm-3 control-label">{% trans "Storage" %}</label> | ||||
|                                         <div class="col-sm-4"> | ||||
|                                             <div class="dropdown"> | ||||
|                                               <button id="select_storage" class="btn btn-default dropdown-toggle form-control" type="button" data-toggle="dropdown">{% trans 'Select Pool...' %} | ||||
|                                               <span class="caret"></span></button> | ||||
|                                               <ul class="dropdown-menu"> | ||||
|                                                   {% for storage in storages %} | ||||
|                                                       <li><a href="#" onclick="get_volumes({{ compute_id }}, '{{ storage }}')">{{ storage }}</a></li> | ||||
|                                                   {% endfor %} | ||||
|                                               </ul> | ||||
|                                               <input id="selected_storage" name="selected_storage" hidden/> | ||||
|                                             </div> | ||||
|                                         </div> | ||||
|                                     </div> | ||||
|                                     <div class="form-group"> | ||||
|                                         <label class="col-sm-3 control-label" >{% trans "Volume" %}</label> | ||||
|                                         <div class="col-sm-4"> | ||||
|                                             <select id="vols" name="vols" class="form-control" disabled> | ||||
|                                                 <option value="" selected>{% trans 'None' %}</option> | ||||
|                                                 <!-- populate with javascript --> | ||||
|                                             </select> | ||||
|                                         </div> | ||||
|                                     </div> | ||||
|                                     <div class="form-group"> | ||||
|                                         <label class="col-sm-3 control-label">{% trans "Bus" %}</label> | ||||
|                                         <div class="col-sm-4"> | ||||
|                                             <select name="bus" class="form-control image-format"> | ||||
|                                                 {% for bus in busses %} | ||||
|                                                     <option value="{{ bus }}" {% if bus == default_bus %}selected{% endif %}>{% trans bus %}</option> | ||||
|                                                 {% endfor %} | ||||
|                                             </select> | ||||
|                                         </div> | ||||
|                                     </div> | ||||
|                                     <div class="form-group"> | ||||
|                                         <label class="col-sm-3 control-label">{% trans "Cache" %}</label> | ||||
|                                         <div class="col-sm-4"> | ||||
|                                             <select name="cache" class="form-control image-format"> | ||||
|                                                 {% for mode, name in cache_modes %} | ||||
|                                                     <option value="{{ mode }}" {% if mode == default_cache %}selected{% endif %}>{% trans name %}</option> | ||||
|                                                 {% endfor %} | ||||
|                                             </select> | ||||
|                                         </div> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                                 <div class="modal-footer"> | ||||
|                                      <button type="submit" class="btn btn-lg btn-success pull-right" name="add_existing_vol">{% trans "Add Volume" %}</button> | ||||
|                                 </div> | ||||
|                             </form> | ||||
|                             </div> | ||||
|                         </form> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 </div> <!-- row --> | ||||
|             </div> <!-- /.modal-body --> | ||||
|         </div> <!-- /.modal-content --> | ||||
|     </div> <!-- /.modal-dialog --> | ||||
| </div> <!-- /.modal --> | ||||
|                     </div> <!-- row --> | ||||
|                 </div> <!-- /.modal-body --> | ||||
|             </div> <!-- /.modal-content --> | ||||
|         </div> <!-- /.modal-dialog --> | ||||
|     </div> <!-- /.modal --> | ||||
| {% endif %} | ||||
|  |  | |||
|  | @ -6,140 +6,140 @@ | |||
|     <link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" /> | ||||
| {% endblock %} | ||||
| {% block content %} | ||||
|                 <!-- Page Heading --> | ||||
|                 <div class="row"> | ||||
|                     <div class="col-lg-12"> | ||||
|                         {% if request.user.is_superuser %} | ||||
|                             {% include 'create_inst_block.html' %} | ||||
|                         {% endif %} | ||||
|                         {% if all_host_vms or all_user_vms %} | ||||
|                             <div class="pull-right search"> | ||||
|                                 <input id="filter" class="form-control" type="text" placeholder="Search"> | ||||
|     <!-- Page Heading --> | ||||
|     <div class="row"> | ||||
|         <div class="col-lg-12"> | ||||
|             {% if request.user.is_superuser %} | ||||
|                 {% include 'create_inst_block.html' %} | ||||
|             {% endif %} | ||||
|             {% if all_host_vms or all_user_vms %} | ||||
|                 <div class="pull-right search"> | ||||
|                     <input id="filter" class="form-control" type="text" placeholder="Search"> | ||||
|                 </div> | ||||
|             {% endif %} | ||||
|             <h1 class="page-header">{% trans "Instances" %}</h1> | ||||
|         </div> | ||||
|     </div> | ||||
|     <!-- /.row --> | ||||
| 
 | ||||
|     {% include 'errors_block.html' %} | ||||
| 
 | ||||
|     <div class="row"> | ||||
|         <div class="col-lg-12"> | ||||
|             <div class="table-responsive"> | ||||
|                 {% if request.user.is_superuser %} | ||||
|                     {% if not all_host_vms %} | ||||
|                         <div class="col-lg-12"> | ||||
|                             <div class="alert alert-warning alert-dismissable"> | ||||
|                                 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | ||||
|                                 <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning:" %}</strong> {% trans "You don't have any Instance" %} | ||||
|                             </div> | ||||
|                         {% endif %} | ||||
|                         <h1 class="page-header">{% trans "Instances" %}</h1> | ||||
|                     </div> | ||||
|                 </div> | ||||
|                 <!-- /.row --> | ||||
| 
 | ||||
|                 {% include 'errors_block.html' %} | ||||
| 
 | ||||
|                 <div class="row"> | ||||
|                     <div class="col-lg-12"> | ||||
|                         <div class="table-responsive"> | ||||
|                             {% if request.user.is_superuser %} | ||||
|                                 {% if not all_host_vms %} | ||||
|                                     <div class="col-lg-12"> | ||||
|                                         <div class="alert alert-warning alert-dismissable"> | ||||
|                                             <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | ||||
|                                             <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning:" %}</strong> {% trans "You don't have any Instance" %} | ||||
|                                         </div> | ||||
|                                     </div> | ||||
|                                 {% else %} | ||||
|                                    {% ifequal view_style "nongrouped"  %} | ||||
|                                        {% include 'allinstances_index_nongrouped.html' %} | ||||
|                                    {% endifequal %} | ||||
|                                    {% ifequal view_style "grouped" %} | ||||
|                                        {% include 'allinstances_index_grouped.html' %} | ||||
|                                    {% endifequal %} | ||||
|                                 {% endif %} | ||||
|                             {% else %} | ||||
|                                 {% if not all_user_vms %} | ||||
|                                     <div class="col-lg-12"> | ||||
|                                         <div class="alert alert-warning alert-dismissable"> | ||||
|                                             <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | ||||
|                                             <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning:" %}</strong> {% trans "You don't have any Instance" %} | ||||
|                                         </div> | ||||
|                                     </div> | ||||
|                                 {% else  %} | ||||
|                                     <table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable> | ||||
|                                         <thead> | ||||
|                                             <tr> | ||||
|                                                 <th>{% trans 'Name' %}</th> | ||||
|                                                 <th>{% trans 'Status' %}</th> | ||||
|                                                 <th>{% trans 'VCPU' %}</th> | ||||
|                                                 <th>{% trans 'Memory' %}</th> | ||||
|                                                 <th data-sortable="false" style="width: 165px;">{% trans 'Actions' %}</th> | ||||
|                                             </tr> | ||||
|                                         </thead> | ||||
|                                         <tbody class="searchable"> | ||||
|                                             {% for inst, vm in all_user_vms.items %} | ||||
|                                                 <tr> | ||||
|                                                     <td><a href="{% url 'instance' vm.compute_id vm.name %}">{{ vm.name }}</a><br><small><em>{{ vm.title }}</em></small></td> | ||||
|                                                     <td>{% ifequal vm.status 1 %} | ||||
|                                                             <span class="text-success">{% trans "Active" %}</span> | ||||
|                                                         {% endifequal %} | ||||
|                                                         {% ifequal vm.status 5 %} | ||||
|                                                             <span class="text-danger">{% trans "Off" %}</span> | ||||
|                                                         {% endifequal %} | ||||
|                                                         {% ifequal vm.status 3 %} | ||||
|                                                             <span class="text-warning">{% trans "Suspend" %}</span> | ||||
|                                                         {% endifequal %} | ||||
|                                                     </td> | ||||
|                                                     <td>{{ vm.vcpu }}</td> | ||||
|                                                     <td>{{ vm.memory }} {% trans "MB" %}</td> | ||||
|                                                     <td><form action="" method="post" role="form">{% csrf_token %} | ||||
|                                                             <input type="hidden" name="name" value="{{ vm.name }}"/> | ||||
|                                                             <input type="hidden" name="compute_id" value="{{ vm.compute_id }}"/> | ||||
|                                                             {% ifequal vm.status 5 %} | ||||
|                                                                 {% if inst.instance.is_template %} | ||||
|                                                                     <button class="btn btn-sm btn-default" type="button" name="clone" title="{% trans "Clone" %}" onclick="goto_instance_clone({{ vm.compute_id }}, '{{ vm.name }}');"> | ||||
|                                                                         <span class="glyphicon glyphicon-duplicate"></span> | ||||
|                                                                     </button> | ||||
|                                                                 {% else %} | ||||
|                                                                     <button class="btn btn-sm btn-default" type="submit" name="poweron" title="{% trans "Power On" %}"> | ||||
|                                                                         <span class="glyphicon glyphicon-play"></span> | ||||
|                                                                     </button> | ||||
|                                                                 {% endif %} | ||||
|                                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-off"></span> | ||||
|                                                                 </button> | ||||
|                                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                                 </button> | ||||
|                                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                                 </button> | ||||
|                                                             {% endifequal %} | ||||
|                                                             {% ifequal vm.status 3 %} | ||||
|                                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-play"></span> | ||||
|                                                                 </button> | ||||
|                                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-off"></span> | ||||
|                                                                 </button> | ||||
|                                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                                 </button> | ||||
|                                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "VNC/Spice Console" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                                 </button> | ||||
|                                                             {% endifequal %} | ||||
|                                                             {% ifequal vm.status 1 %} | ||||
|                                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-play"></span> | ||||
|                                                                 </button> | ||||
|                                                                 <button class="btn btn-sm btn-default" type="submit" name="poweroff" title="{% trans "Power Off" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-off"></span> | ||||
|                                                                 </button> | ||||
|                                                                 <button class="btn btn-sm btn-default" type="submit" name="powercycle" title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')"> | ||||
|                                                                     <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                                 </button> | ||||
|                                                                 <a href="#" class="btn btn-sm btn-default" onclick='open_console("{{ vm.compute_id }}-{{ vm.uuid }}")' title="{% trans "Console" %}"> | ||||
|                                                                     <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                                 </a> | ||||
|                                                             {% endifequal %} | ||||
|                                                         </form> | ||||
|                                                     </td> | ||||
|                                                 </tr> | ||||
|                                             {% endfor %} | ||||
|                                         </tbody> | ||||
|                                     </table> | ||||
|                                 {% endif %} | ||||
|                             {% endif %} | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 </div> | ||||
|                     {% else %} | ||||
|                        {% ifequal view_style "nongrouped"  %} | ||||
|                            {% include 'allinstances_index_nongrouped.html' %} | ||||
|                        {% endifequal %} | ||||
|                        {% ifequal view_style "grouped" %} | ||||
|                            {% include 'allinstances_index_grouped.html' %} | ||||
|                        {% endifequal %} | ||||
|                     {% endif %} | ||||
|                 {% else %} | ||||
|                     {% if not all_user_vms %} | ||||
|                         <div class="col-lg-12"> | ||||
|                             <div class="alert alert-warning alert-dismissable"> | ||||
|                                 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | ||||
|                                 <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any Instance" %} | ||||
|                             </div> | ||||
|                         </div> | ||||
|                     {% else  %} | ||||
|                         <table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable> | ||||
|                             <thead> | ||||
|                                 <tr> | ||||
|                                     <th>{% trans 'Name' %}</th> | ||||
|                                     <th>{% trans 'Status' %}</th> | ||||
|                                     <th>{% trans 'VCPU' %}</th> | ||||
|                                     <th>{% trans 'Memory' %}</th> | ||||
|                                     <th data-sortable="false" style="width: 165px;">{% trans 'Actions' %}</th> | ||||
|                                 </tr> | ||||
|                             </thead> | ||||
|                             <tbody class="searchable"> | ||||
|                                 {% for inst, vm in all_user_vms.items %} | ||||
|                                     <tr> | ||||
|                                         <td><a href="{% url 'instance' vm.compute_id vm.name %}">{{ vm.name }}</a><br><small><em>{{ vm.title }}</em></small></td> | ||||
|                                         <td>{% ifequal vm.status 1 %} | ||||
|                                                 <span class="text-success">{% trans "Active" %}</span> | ||||
|                                             {% endifequal %} | ||||
|                                             {% ifequal vm.status 5 %} | ||||
|                                                 <span class="text-danger">{% trans "Off" %}</span> | ||||
|                                             {% endifequal %} | ||||
|                                             {% ifequal vm.status 3 %} | ||||
|                                                 <span class="text-warning">{% trans "Suspend" %}</span> | ||||
|                                             {% endifequal %} | ||||
|                                         </td> | ||||
|                                         <td>{{ vm.vcpu }}</td> | ||||
|                                         <td>{{ vm.memory }} {% trans "MB" %}</td> | ||||
|                                         <td><form action="" method="post" role="form">{% csrf_token %} | ||||
|                                                 <input type="hidden" name="name" value="{{ vm.name }}"/> | ||||
|                                                 <input type="hidden" name="compute_id" value="{{ vm.compute_id }}"/> | ||||
|                                                 {% ifequal vm.status 5 %} | ||||
|                                                     {% if inst.instance.is_template %} | ||||
|                                                         <button class="btn btn-sm btn-default" type="button" name="clone" title="{% trans "Clone" %}" onclick="goto_instance_clone({{ vm.compute_id }}, '{{ vm.name }}');"> | ||||
|                                                             <span class="glyphicon glyphicon-duplicate"></span> | ||||
|                                                         </button> | ||||
|                                                     {% else %} | ||||
|                                                         <button class="btn btn-sm btn-default" type="submit" name="poweron" title="{% trans "Power On" %}"> | ||||
|                                                             <span class="glyphicon glyphicon-play"></span> | ||||
|                                                         </button> | ||||
|                                                     {% endif %} | ||||
|                                                     <button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-off"></span> | ||||
|                                                     </button> | ||||
|                                                     <button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                     </button> | ||||
|                                                     <button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                     </button> | ||||
|                                                 {% endifequal %} | ||||
|                                                 {% ifequal vm.status 3 %} | ||||
|                                                     <button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-play"></span> | ||||
|                                                     </button> | ||||
|                                                     <button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-off"></span> | ||||
|                                                     </button> | ||||
|                                                     <button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                     </button> | ||||
|                                                     <button class="btn btn-sm btn-default disabled" title="{% trans "VNC/Spice Console" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                     </button> | ||||
|                                                 {% endifequal %} | ||||
|                                                 {% ifequal vm.status 1 %} | ||||
|                                                     <button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-play"></span> | ||||
|                                                     </button> | ||||
|                                                     <button class="btn btn-sm btn-default" type="submit" name="poweroff" title="{% trans "Power Off" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-off"></span> | ||||
|                                                     </button> | ||||
|                                                     <button class="btn btn-sm btn-default" type="submit" name="powercycle" title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')"> | ||||
|                                                         <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                     </button> | ||||
|                                                     <a href="#" class="btn btn-sm btn-default" onclick='open_console("{{ vm.compute_id }}-{{ vm.uuid }}")' title="{% trans "Console" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                     </a> | ||||
|                                                 {% endifequal %} | ||||
|                                             </form> | ||||
|                                         </td> | ||||
|                                     </tr> | ||||
|                                 {% endfor %} | ||||
|                             </tbody> | ||||
|                         </table> | ||||
|                     {% endif %} | ||||
|                 {% endif %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| {% endblock %} | ||||
| {% block script %} | ||||
| <script src="{% static "js/sortable.min.js" %}"></script> | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
|     <thead> | ||||
|     <tr> | ||||
|         <th><a href="#" id="hide_all_instances" onclick="hide_all_host_instances()">#</a> </th> | ||||
|         <th>{% trans "Name" %}<br>{% trans "Description" %}</th></th> | ||||
|         <th>{% trans "Name" %}<br>{% trans "Description" %}</th> | ||||
|         <th>{% trans "User"%}</th> | ||||
|         <th>{% trans "Status" %}</th> | ||||
|         <th>{% trans "VCPU" %}</th> | ||||
|  |  | |||
|  | @ -2,11 +2,11 @@ | |||
| <table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable> | ||||
|     <thead> | ||||
|     <tr> | ||||
|         <th>Name<br>Description</th> | ||||
|         <th>Host<br>User</th> | ||||
|         <th>Status</th> | ||||
|         <th>VCPU</th> | ||||
|         <th>Memory</th> | ||||
|         <th>{% trans "Name" %}<br>{% trans "Description" %}</th> | ||||
|         <th>{% trans "Host" %}<br>{% trans "User"%}</th> | ||||
|         <th>{% trans "Status" %}</th> | ||||
|         <th>{% trans "VCPU" %}</th> | ||||
|         <th>{% trans "Memory" %}</th> | ||||
|         <th data-sortable="false" style="width:205px;">{% trans "Actions" %}</th> | ||||
|     </tr> | ||||
|     </thead> | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -7,156 +7,155 @@ | |||
| {% endblock %} | ||||
| {% block content %} | ||||
|     <!-- Page Heading --> | ||||
|                 <div class="row"> | ||||
|                     <div class="col-lg-12"> | ||||
|                         {% if request.user.is_superuser %} | ||||
|                              <a href="{% url 'create_instance' compute.id %}" type="button" class="btn btn-success btn-header pull-right" data-toggle="modal"> | ||||
|                                 <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||||
|                              </a> | ||||
|                         {% endif %} | ||||
|                         {% if all_host_vms or all_user_vms %} | ||||
|                             <div class="pull-right search"> | ||||
|                                 <input id="filter" class="form-control" type="text" placeholder="Search"> | ||||
|                             </div> | ||||
|                         {% endif %} | ||||
|                         <h1 class="page-header">{{ compute.name }}</h1> | ||||
|                     </div> | ||||
|     <div class="row"> | ||||
|         <div class="col-lg-12"> | ||||
|             {% if request.user.is_superuser %} | ||||
|                  <a href="{% url 'create_instance' compute.id %}" type="button" class="btn btn-success btn-header pull-right" data-toggle="modal"> | ||||
|                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||||
|                  </a> | ||||
|             {% endif %} | ||||
|             {% if all_host_vms or all_user_vms %} | ||||
|                 <div class="pull-right search"> | ||||
|                     <input id="filter" class="form-control" type="text" placeholder="Search"> | ||||
|                 </div> | ||||
|             <div class="row"> | ||||
|                 <div class="col-lg-12"> | ||||
| 
 | ||||
|                     <ol class="breadcrumb"> | ||||
|                         <li class="active"> | ||||
|                             <i class="fa fa-dashboard"></i> <a href="{% url 'overview' compute.id %}">{% trans "Overview" %}</a> | ||||
|                         </li> | ||||
|                         <li> | ||||
|                             <i class="fa fa-server"></i> {% trans "Instances" %} | ||||
|                         </li> | ||||
|                         <li> | ||||
|                             <i class="fa fa-hdd-o"></i> <a href="{% url 'storages' compute.id %}">{% trans "Storages" %}</a> | ||||
|                         </li> | ||||
|                         <li> | ||||
|                             <i class="fa fa-sitemap"></i> <a href="{% url 'networks' compute.id %}">{% trans "Networks" %}</a> | ||||
|                         </li> | ||||
|                         <li> | ||||
|                             <i class="fa fa-wifi"></i> <a href="{% url 'interfaces' compute.id %}">{% trans "Interfaces" %}</a> | ||||
|                         </li> | ||||
|                         <li> | ||||
|                             <i class="fa fa-filter"></i> <a href="{% url 'nwfilters' compute.id %}">{% trans "NWFilters" %}</a> | ||||
|                         </li> | ||||
|                         <li> | ||||
|                             <i class="fa fa-key"></i> <a href="{% url 'secrets' compute.id %}">{% trans "Secrets" %}</a> | ||||
|                         </li> | ||||
|                     </ol> | ||||
|             {% endif %} | ||||
|             <h1 class="page-header">{{ compute.name }}</h1> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class="row"> | ||||
|         <div class="col-lg-12"> | ||||
|             <ol class="breadcrumb"> | ||||
|                 <li class="active"> | ||||
|                     <i class="fa fa-dashboard"></i> <a href="{% url 'overview' compute.id %}">{% trans "Overview" %}</a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <i class="fa fa-server"></i> {% trans "Instances" %} | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <i class="fa fa-hdd-o"></i> <a href="{% url 'storages' compute.id %}">{% trans "Storages" %}</a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <i class="fa fa-sitemap"></i> <a href="{% url 'networks' compute.id %}">{% trans "Networks" %}</a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <i class="fa fa-wifi"></i> <a href="{% url 'interfaces' compute.id %}">{% trans "Interfaces" %}</a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <i class="fa fa-filter"></i> <a href="{% url 'nwfilters' compute.id %}">{% trans "NWFilters" %}</a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <i class="fa fa-key"></i> <a href="{% url 'secrets' compute.id %}">{% trans "Secrets" %}</a> | ||||
|                 </li> | ||||
|             </ol> | ||||
|         </div> | ||||
|     </div> | ||||
|     <!-- /.row --> | ||||
|     {% include 'errors_block.html' %} | ||||
|     <div class="row"> | ||||
|         {% if not  all_host_vms %} | ||||
|             <div class="col-lg-12"> | ||||
|                 <div class="alert alert-warning alert-dismissable"> | ||||
|                     <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | ||||
|                     <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any instances" %} | ||||
|                 </div> | ||||
|             </div> | ||||
|             <!-- /.row --> | ||||
| 
 | ||||
|             {% include 'errors_block.html' %} | ||||
|             <div class="row"> | ||||
|                 {% if not  all_host_vms %} | ||||
|                     <div class="col-lg-12"> | ||||
|                         <div class="alert alert-warning alert-dismissable"> | ||||
|                             <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | ||||
|                             <i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning:" %}</strong> {% trans "Hypervisor doesn't have any instances" %} | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 {% else %} | ||||
|                     <div class="col-lg-12"> | ||||
|                         <table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable> | ||||
|                             <thead> | ||||
|         {% else %} | ||||
|             <div class="col-lg-12"> | ||||
|                 <table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable> | ||||
|                     <thead> | ||||
|                     <tr> | ||||
|                         <th>{% trans 'Name' %}<br>{% trans 'Description' %}</th> | ||||
|                         <th>{% trans 'User' %}</th> | ||||
|                         <th>{% trans 'Status' %}</th> | ||||
|                         <th>{% trans 'VCPU' %}</th> | ||||
|                         <th>{% trans 'Memory' %}</th> | ||||
|                         <th data-sortable="false" style="width:205px;">{% trans 'Actions' %}</th> | ||||
|                     </tr> | ||||
|                     </thead> | ||||
|                     <tbody class="searchable"> | ||||
|                     {% for host, inst  in all_host_vms.items %} | ||||
|                         {% for vm, info in inst.items %} | ||||
|                             <tr> | ||||
|                                 <th>{% trans 'Name' %}<br>{% trans 'Description' %}</th> | ||||
|                                 <th>{% trans 'Host' %}<br>{% trans 'User' %}</th> | ||||
|                                 <th>{% trans 'Status' %}</th> | ||||
|                                 <th>{% trans 'VCPU' %}</th> | ||||
|                                 <th>{% trans 'Memory' %}</th> | ||||
|                                 <th data-sortable="false" style="width:205px;">{% trans 'Actions' %}</th> | ||||
|                                 <td><a href="{% url 'instance' host.0 vm %}">{{ vm }}</a><br><small><em>{{ info.title }}</em></small></td> | ||||
|                                 <td><em>{% if info.userinstances.count > 0 %}{{ info.userinstances.first_user.user.username }}{% if info.userinstances.count > 1 %} (+{{ info.userinstances.count|add:"-1" }}){% endif %}{% endif %}</em></td> | ||||
|                                 <td> | ||||
|                                     {% ifequal info.status 1 %}<span class="text-success">{% trans "Active" %}</span>{% endifequal %} | ||||
|                                     {% ifequal info.status 5 %}<span class="text-danger">{% trans "Off" %}</span>{% endifequal %} | ||||
|                                     {% ifequal info.status 3 %}<span class="text-warning">{% trans "Suspend" %}</span>{% endifequal %} | ||||
|                                 </td> | ||||
|                                 <td>{{ info.vcpu }}</td> | ||||
|                                 <td>{{ info.memory|filesizeformat }}</td> | ||||
|                                 <td> | ||||
|                                     <form action="" method="post" role="form">{% csrf_token %} | ||||
|                                         <input type="hidden" name="name" value="{{ vm }}"/> | ||||
|                                         <input type="hidden" name="compute_id" value="{{ host.0 }}"/> | ||||
|                                         {% ifequal info.status 5 %} | ||||
|                                             {% if info.is_template %} | ||||
|                                                 <button class="btn btn-sm btn-default" type="button" name="clone" title="{% trans "Clone" %}" onclick="goto_instance_clone({{ host.0 }}, '{{ vm }}');"> | ||||
|                                                     <span class="glyphicon glyphicon-duplicate"></span> | ||||
|                                                 </button> | ||||
|                                             {% else %} | ||||
|                                                 <button class="btn btn-sm btn-default" type="submit" name="poweron" title="{% trans "Power On" %}"> | ||||
|                                                     <span class="glyphicon glyphicon-play"></span> | ||||
|                                                 </button> | ||||
|                                             {% endif %} | ||||
|                                             <button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}" disabled> | ||||
|                                                 <span class="glyphicon glyphicon-pause"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}" disabled> | ||||
|                                                 <span class="glyphicon glyphicon-off"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}" disabled> | ||||
|                                                 <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}" disabled> | ||||
|                                                 <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                             </button> | ||||
|                                         {% endifequal %} | ||||
|                                         {% ifequal info.status 3 %} | ||||
|                                             <button class="btn btn-sm btn-default" type="submit" name="resume" title="{% trans "Resume" %}"> | ||||
|                                                 <span class="glyphicon glyphicon-play"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}" disabled> | ||||
|                                                 <span class="glyphicon glyphicon-pause"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default" type="submit" name="powerforce" title="{% trans "Force Off" %}" onclick="return confirm('Are you sure to force it down?')"> | ||||
|                                                 <span class="glyphicon glyphicon-off"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}" disabled> | ||||
|                                                 <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}" disabled> | ||||
|                                                 <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                             </button> | ||||
|                                         {% endifequal %} | ||||
|                                         {% ifequal info.status 1 %} | ||||
|                                             <button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}" disabled> | ||||
|                                                 <span class="glyphicon glyphicon-play"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default" type="submit" name="suspend" title="{% trans "Suspend" %}"> | ||||
|                                                 <span class="glyphicon glyphicon-pause"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default" type="submit" name="poweroff" title="{% trans "Power Off" %}" onclick="return confirm('Are you sure?')"> | ||||
|                                                 <span class="glyphicon glyphicon-off"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default" type="submit" name="powercycle" title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')"> | ||||
|                                                 <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                             </button> | ||||
|                                             <button class="btn btn-sm btn-default" type="button" onclick='open_console("{{ host.0 }}-{{ info.uuid }}")' title="{% trans "Console" %}"> | ||||
|                                                 <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                             </button> | ||||
|                                         {% endifequal %} | ||||
|                                     </form> | ||||
|                                 </td> | ||||
|                             </tr> | ||||
|                             </thead> | ||||
|                             <tbody class="searchable"> | ||||
|                             {% for host, inst  in all_host_vms.items %} | ||||
|                                 {% for vm, info in inst.items %} | ||||
|                                     <tr> | ||||
|                                         <td><a href="{% url 'instance' host.0 vm %}">{{ vm }}</a><br><small><em>{{ info.title }}</em></small></td> | ||||
|                                         <td><a href="{% url 'overview' host.0 %}">{{ host.1 }}</a><br><small><em>{% if info.userinstances.count > 0 %}{{ info.userinstances.first_user.user.username }}{% if info.userinstances.count > 1 %} (+{{ info.userinstances.count|add:"-1" }}){% endif %}{% endif %}</em></small></td> | ||||
|                                         <td> | ||||
|                                             {% ifequal info.status 1 %}<span class="text-success">{% trans "Active" %}</span>{% endifequal %} | ||||
|                                             {% ifequal info.status 5 %}<span class="text-danger">{% trans "Off" %}</span>{% endifequal %} | ||||
|                                             {% ifequal info.status 3 %}<span class="text-warning">{% trans "Suspend" %}</span>{% endifequal %} | ||||
|                                         </td> | ||||
|                                         <td>{{ info.vcpu }}</td> | ||||
|                                         <td>{{ info.memory|filesizeformat }}</td> | ||||
|                                         <td><form action="" method="post" role="form">{% csrf_token %} | ||||
|                                             <input type="hidden" name="name" value="{{ vm }}"/> | ||||
|                                             <input type="hidden" name="compute_id" value="{{ host.0 }}"/> | ||||
|                                             {% ifequal info.status 5 %} | ||||
|                                                 {% if info.is_template %} | ||||
|                                                     <button class="btn btn-sm btn-default" type="button" name="clone" title="{% trans "Clone" %}" onclick="goto_instance_clone({{ host.0 }}, '{{ vm }}');"> | ||||
|                                                         <span class="glyphicon glyphicon-duplicate"></span> | ||||
|                                                     </button> | ||||
|                                                 {% else %} | ||||
|                                                     <button class="btn btn-sm btn-default" type="submit" name="poweron" title="{% trans "Power On" %}"> | ||||
|                                                         <span class="glyphicon glyphicon-play"></span> | ||||
|                                                     </button> | ||||
|                                                 {% endif %} | ||||
|                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}" disabled> | ||||
|                                                     <span class="glyphicon glyphicon-pause"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}" disabled> | ||||
|                                                     <span class="glyphicon glyphicon-off"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}" disabled> | ||||
|                                                     <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}" disabled> | ||||
|                                                     <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                 </button> | ||||
|                                             {% endifequal %} | ||||
|                                             {% ifequal info.status 3 %} | ||||
|                                                 <button class="btn btn-sm btn-default" type="submit" name="resume" title="{% trans "Resume" %}"> | ||||
|                                                     <span class="glyphicon glyphicon-play"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}" disabled> | ||||
|                                                     <span class="glyphicon glyphicon-pause"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default" type="submit" name="powerforce" title="{% trans "Force Off" %}" onclick="return confirm('Are you sure to force it down?')"> | ||||
|                                                     <span class="glyphicon glyphicon-off"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}" disabled> | ||||
|                                                     <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}" disabled> | ||||
|                                                     <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                 </button> | ||||
|                                             {% endifequal %} | ||||
|                                             {% ifequal info.status 1 %} | ||||
|                                                 <button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}" disabled> | ||||
|                                                     <span class="glyphicon glyphicon-play"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default" type="submit" name="suspend" title="{% trans "Suspend" %}"> | ||||
|                                                     <span class="glyphicon glyphicon-pause"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default" type="submit" name="poweroff" title="{% trans "Power Off" %}" onclick="return confirm('Are you sure?')"> | ||||
|                                                     <span class="glyphicon glyphicon-off"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default" type="submit" name="powercycle" title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')"> | ||||
|                                                     <span class="glyphicon glyphicon-refresh"></span> | ||||
|                                                 </button> | ||||
|                                                 <button class="btn btn-sm btn-default" type="button" onclick='open_console("{{ host.0 }}-{{ info.uuid }}")' title="{% trans "Console" %}"> | ||||
|                                                     <span class="glyphicon glyphicon-eye-open"></span> | ||||
|                                                 </button> | ||||
|                                             {% endifequal %} | ||||
|                                         </form> | ||||
|                                         </td> | ||||
|                                     </tr> | ||||
|                                 {% endfor %} | ||||
|                             {% endfor %} | ||||
|                             </tbody> | ||||
|                         </table> | ||||
|                      </div> | ||||
|                 {% endif %} | ||||
|             </div> | ||||
|                         {% endfor %} | ||||
|                     {% endfor %} | ||||
|                     </tbody> | ||||
|                 </table> | ||||
|              </div> | ||||
|         {% endif %} | ||||
|     </div> | ||||
| {% endblock %} | ||||
| {% block script %} | ||||
| <script src="{% static "js/sortable.min.js" %}"></script> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue