94 lines
3.7 KiB
HTML
Executable File
94 lines
3.7 KiB
HTML
Executable File
{% extends "base_AdminLTE.html"%}
|
|
{% block title %}Docklet | Workspace{% endblock %}
|
|
|
|
{% block panel_title %}Workspace{% endblock %}
|
|
|
|
{% block panel_list %}
|
|
<ol class="breadcrumb">
|
|
<li>
|
|
<a href="/dashboard/"><i class="fa fa-dashboard"></i>Home</a>
|
|
</li>
|
|
<li class="active">
|
|
<strong>Workspace</strong>
|
|
</li>
|
|
</ol>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="box box-info">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">Workspace</h3>
|
|
|
|
<div class="box-tools pull-right">
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
|
</button>
|
|
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
|
</div>
|
|
</div>
|
|
<div class="box-body">
|
|
|
|
<p>
|
|
<a href="/workspace/create/"><button type="button" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> Add Workspace</button></a>
|
|
</p>
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Status</th>
|
|
<th>Operation</th>
|
|
<th>WorkSpace</th>
|
|
<th>Location</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for master in allclusters %}
|
|
{% for cluster in allclusters[master] %}
|
|
<tr>
|
|
<td>{{ cluster['id'] }}</td>
|
|
<td><a href="/config/">{{ cluster['name'] }}</a></td>
|
|
{% if cluster['status'] == 'running' %}
|
|
<td><a href="/vclusters/"><div class="text-success"><i class="fa fa-play"></i> Running</div></a></td>
|
|
<td>
|
|
<a href="/workspace/stop/{{ cluster['name'] }}/{{master.split("@")[0]}}/"><button type="button" class="btn btn-xs btn-warning"> Stop </button></a>
|
|
<button type="button" class="btn btn-xs btn-default"> Delete </button>
|
|
</td>
|
|
<td>
|
|
<a href="/{{ cluster['proxy_public_ip'] }}/go/{{ mysession['username'] }}/{{ cluster['name'] }}" target="_blank"><button type="button" class="btn btn-xs btn-success"> Go </button></a>
|
|
</td>
|
|
{% else %}
|
|
<td><a href="/vclusters/"><div class="text-warning"><i class="fa fa-stop "></i> Stopped</div></a></td>
|
|
<td>
|
|
<a href="/workspace/start/{{ cluster['name'] }}/{{master.split("@")[0]}}/"><button type="button" class="btn btn-xs btn-success"> Start </button></a>
|
|
<a href="/workspace/delete/{{ cluster['name'] }}/{{master.split("@")[0]}}/"><button type="button" class="btn btn-xs btn-danger">Delete</button></a>
|
|
</td>
|
|
<td>
|
|
<button type="button" class="btn btn-xs btn-default"> Go </button>
|
|
</td>
|
|
{% endif %}
|
|
<td><a href="/masterdesc/{{master.split("@")[1]}}/" target="_blank" title="{{desc[master.split("@")[1]]}}">{{master.split("@")[1]}}</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
{% block script_src %}
|
|
|
|
<script type="text/javascript">
|
|
function sendAdd(){
|
|
document.getElementById("addForm").submit();
|
|
}
|
|
function sendDel(){
|
|
document.getElementById("delForm").submit();
|
|
}
|
|
</script>
|
|
{% endblock %}
|