mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Added new commands to index.html
This commit is contained in:
@@ -58,13 +58,6 @@ class RenderJob:
|
|||||||
for key in keys_to_remove:
|
for key in keys_to_remove:
|
||||||
job_dict['worker'].pop(key, None)
|
job_dict['worker'].pop(key, None)
|
||||||
|
|
||||||
# jobs from current_session generate percent completed
|
|
||||||
# jobs after loading server pull in a saved value. Have to check if callable object or not
|
|
||||||
|
|
||||||
percent_complete = self.worker.percent_complete if isinstance(self.worker.percent_complete, numbers.Number) \
|
|
||||||
else self.worker.percent_complete()
|
|
||||||
job_dict['worker']['percent_complete'] = percent_complete
|
|
||||||
|
|
||||||
# convert to json and back to auto-convert dates to iso format
|
# convert to json and back to auto-convert dates to iso format
|
||||||
def date_serializer(o):
|
def date_serializer(o):
|
||||||
if isinstance(o, datetime):
|
if isinstance(o, datetime):
|
||||||
@@ -105,6 +98,9 @@ class RenderJob:
|
|||||||
def log_path(self):
|
def log_path(self):
|
||||||
return self.worker.log_path
|
return self.worker.log_path
|
||||||
|
|
||||||
|
def percent_complete(self):
|
||||||
|
return self.worker.percent_complete()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def generate_id(cls):
|
def generate_id(cls):
|
||||||
return str(uuid.uuid4()).split('-')[0]
|
return str(uuid.uuid4()).split('-')[0]
|
||||||
@@ -6,14 +6,16 @@
|
|||||||
<title>Zordon Dashboard</title>
|
<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://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">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<script src="https://kit.fontawesome.com/698705d14d.js" crossorigin="anonymous"></script>
|
||||||
|
<script type="text/javascript" src="{{ url_for('static', filename = 'modals.js') }}"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
|
||||||
<div class="navbar-brand">
|
<div class="navbar-brand">
|
||||||
<a class="navbar-item" href="#">
|
<span class="navbar-item h1">
|
||||||
Zordon Render Server - {{hostname}}
|
Zordon Render Server - {{hostname}}
|
||||||
</a>
|
</span>
|
||||||
|
|
||||||
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
|
<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>
|
||||||
@@ -70,8 +72,8 @@
|
|||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="table-container px-2">
|
<div class="table-container">
|
||||||
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
|
<table class="table is-bordered is-striped is-hoverable is-fullwidth">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Preview</th>
|
<th>Preview</th>
|
||||||
@@ -80,8 +82,10 @@
|
|||||||
<th>Priority</th>
|
<th>Priority</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Time Elapsed</th>
|
<th>Time Elapsed</th>
|
||||||
|
<th>%</th>
|
||||||
<th>Frame Count</th>
|
<th>Frame Count</th>
|
||||||
<th>Client</th>
|
<th>Client</th>
|
||||||
|
<th>Last Output</th>
|
||||||
<th>Commands</th>
|
<th>Commands</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -99,22 +103,31 @@
|
|||||||
<td>{{job.priority}}</td>
|
<td>{{job.priority}}</td>
|
||||||
<td>{{job.render_status().value}}</td>
|
<td>{{job.render_status().value}}</td>
|
||||||
<td>{{job.time_elapsed()}}</td>
|
<td>{{job.time_elapsed()}}</td>
|
||||||
|
<td>{{job.percent_complete()}}</td>
|
||||||
<td>{{job.frame_count()}}</td>
|
<td>{{job.frame_count()}}</td>
|
||||||
<td>{{job.client}}</td>
|
<td>{{job.client}}</td>
|
||||||
|
<td>{{job.worker.last_output}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="buttons are-small">
|
<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-info" onclick="window.location.href='/ui/job/{{job.id}}/full_details';">
|
||||||
<button class="button is-outlined" onclick="window.location.href='/api/job/{{job.id}}/logs';">Logs</button>
|
<span class="icon"><i class="fa-solid fa-info"></i></span>
|
||||||
|
</button>
|
||||||
|
<button class="button is-link" onclick="window.location.href='/api/job/{{job.id}}/logs';">
|
||||||
|
<span class="icon"><i class="fa-regular fa-file-lines"></i></span>
|
||||||
|
</button>
|
||||||
{% if job.render_status().value in ['running', 'scheduled', 'not_started']: %}
|
{% 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';">
|
<button class="button is-warning is-active" onclick="window.location.href='/api/job/{{job.id}}/cancel?confirm=True';">
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
{% elif job.render_status().value == 'completed': %}
|
{% elif job.render_status().value == 'completed': %}
|
||||||
<button class="button is-success is-active" onclick="window.location.href='/api/job/{{job.id}}/download_all';">
|
<button class="button is-success" onclick="window.location.href='/api/job/{{job.id}}/download_all';">
|
||||||
Download ({{job.file_list() | length}})
|
<span class="icon"><i class="fa-solid fa-download"></i></span>
|
||||||
|
<span>{{job.file_list() | length}}</span>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button class="button is-danger is-outlined" onclick="window.location.href='/api/job/{{job.id}}/delete?confirm=True'">Delete</button>
|
<button class="button is-danger" onclick="window.location.href='/api/job/{{job.id}}/delete?confirm=True'">
|
||||||
|
<span class="icon"><i class="fa-regular fa-trash-can"></i></span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user