mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Initial commit of index html and add ability to delete jobs
This commit is contained in:
127
templates/index.html
Normal file
127
templates/index.html
Normal file
@@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Zordon Dashboard</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="#">
|
||||
Zordon Render Server - {{hostname}}
|
||||
</a>
|
||||
|
||||
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- <div id="navbarBasicExample" class="navbar-menu">-->
|
||||
<!-- <div class="navbar-start">-->
|
||||
<!-- <a class="navbar-item">-->
|
||||
<!-- Home-->
|
||||
<!-- </a>-->
|
||||
|
||||
<!-- <a class="navbar-item">-->
|
||||
<!-- Documentation-->
|
||||
<!-- </a>-->
|
||||
|
||||
<!-- <div class="navbar-item has-dropdown is-hoverable">-->
|
||||
<!-- <a class="navbar-link">-->
|
||||
<!-- More-->
|
||||
<!-- </a>-->
|
||||
|
||||
<!-- <div class="navbar-dropdown">-->
|
||||
<!-- <a class="navbar-item">-->
|
||||
<!-- About-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="navbar-item">-->
|
||||
<!-- Jobs-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="navbar-item">-->
|
||||
<!-- Contact-->
|
||||
<!-- </a>-->
|
||||
<!-- <hr class="navbar-divider">-->
|
||||
<!-- <a class="navbar-item">-->
|
||||
<!-- Report an issue-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="navbar-end">-->
|
||||
<!-- <div class="navbar-item">-->
|
||||
<!-- <div class="buttons">-->
|
||||
<!-- <a class="button is-primary">-->
|
||||
<!-- <strong>Sign up</strong>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="button is-light">-->
|
||||
<!-- Log in-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</nav>
|
||||
|
||||
<div class="table-container px-2">
|
||||
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Preview</th>
|
||||
<th>Name</th>
|
||||
<th>Renderer</th>
|
||||
<th>Priority</th>
|
||||
<th>Status</th>
|
||||
<th>Time Elapsed</th>
|
||||
<th>Frame Count</th>
|
||||
<th>Client</th>
|
||||
<th>Commands</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- <tfoot>-->
|
||||
<!-- <tr>-->
|
||||
<!-- </tr>-->
|
||||
<!-- </tfoot>-->
|
||||
{% for job in all_jobs %}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Image Here</td>
|
||||
<td>{{job.name}}</td>
|
||||
<td>{{job.renderer}}-{{job.worker.renderer_version}}</td>
|
||||
<td>{{job.priority}}</td>
|
||||
<td>{{job.render_status().value}}</td>
|
||||
<td>{{job.time_elapsed()}}</td>
|
||||
<td>{{job.frame_count()}}</td>
|
||||
<td>{{job.client}}</td>
|
||||
<td>
|
||||
<div class="buttons are-small">
|
||||
<button class="button is-outlined" onclick="window.location.href='/ui/job/{{job.id}}/full_details';">Details</button>
|
||||
<button class="button is-outlined" onclick="window.location.href='/api/job/{{job.id}}/logs';">Logs</button>
|
||||
{% if job.render_status().value in ['running', 'scheduled', 'not_started']: %}
|
||||
<button class="button is-warning is-active" onclick="window.location.href='/api/job/{{job.id}}/cancel?confirm=True';">
|
||||
Cancel
|
||||
</button>
|
||||
{% elif job.render_status().value == 'completed': %}
|
||||
<button class="button is-success is-active" onclick="window.location.href='/api/job/{{job.id}}/download_all';">
|
||||
Download ({{job.file_list() | length}})
|
||||
</button>
|
||||
{% endif %}
|
||||
<button class="button is-danger is-outlined" onclick="window.location.href='/api/job/{{job.id}}/delete?confirm=True'">Delete</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user