docklet/web/templates/dashboard.html

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/{{master.split("@")[0]}}/stop/{{ cluster['name'] }}/"><button type="button" class="btn btn-xs btn-warning"> &nbsp;Stop&nbsp;&nbsp; </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">&nbsp;&nbsp;&nbsp;Go&nbsp;&nbsp;&nbsp;</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/{{master.split("@")[0]}}/start/{{ cluster['name'] }}/"><button type="button" class="btn btn-xs btn-success"> &nbsp;Start&nbsp;</button></a>
<a href="/workspace/{{master.split("@")[0]}}/delete/{{ cluster['name'] }}/"><button type="button" class="btn btn-xs btn-danger">Delete</button></a>
</td>
<td>
<button type="button" class="btn btn-xs btn-default">&nbsp;&nbsp;&nbsp;Go&nbsp;&nbsp;&nbsp;</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 %}