docklet/web/templates/dashboard.html

94 lines
3.7 KiB
HTML
Raw Normal View History

{% extends "base_AdminLTE.html"%}
2017-02-17 16:27:31 +08:00
{% block title %}Docklet | Workspace{% endblock %}
2017-02-17 16:27:31 +08:00
{% 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">
2017-02-17 16:27:31 +08:00
<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">
2017-04-07 16:25:57 +08:00
<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>
2017-04-07 16:25:57 +08:00
<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>
2017-04-07 16:25:57 +08:00
<th>Location</th>
</tr>
</thead>
<tbody>
2017-04-07 16:25:57 +08:00
{% 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>
2017-04-07 16:25:57 +08:00
<a href="/workspace/stop/{{ cluster['name'] }}/{{master.split("@")[0]}}/"><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>
2017-05-29 16:45:35 +08:00
<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>
2017-04-07 16:25:57 +08:00
<a href="/workspace/start/{{ cluster['name'] }}/{{master.split("@")[0]}}/"><button type="button" class="btn btn-xs btn-success"> &nbsp;Start&nbsp;</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">&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 %}
2017-04-07 16:25:57 +08:00
{% 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 %}