2021-05-28 13:51:23 +00:00
|
|
|
{% extends "base.html.j2" %}
|
|
|
|
{% from "jobs/_breadcrumbs.html.j2" import breadcrumbs with context %}
|
2019-08-09 09:49:09 +00:00
|
|
|
|
2022-02-15 08:25:34 +00:00
|
|
|
{% block main_attribs %} class="service-scheme" data-service="{{ job.service }}"{% endblock main_attribs %}
|
2020-09-21 08:36:04 +00:00
|
|
|
|
2020-10-26 12:04:12 +00:00
|
|
|
{% block page_content %}
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
2021-11-30 15:22:16 +00:00
|
|
|
<div class="col s12" data-job-id="{{ job.hashid }}" data-user-id="{{ job.user.hashid }}" id="job-display">
|
2021-01-07 13:51:44 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col s8 m9 l10">
|
2023-01-03 16:03:47 +00:00
|
|
|
<h1 id="title"><i style="font-size: inherit;" class="nopaque-icons service-icons" data-service="{{ job.service }}"></i> <span class="job-title"></span></h1>
|
2021-01-07 13:51:44 +00:00
|
|
|
</div>
|
|
|
|
<div class="col s4 m3 l2 right-align">
|
|
|
|
<p> </p>
|
|
|
|
<p> </p>
|
2022-02-15 08:25:34 +00:00
|
|
|
<span class="chip job-status job-status-text job-status-color white-text"></span>
|
2022-02-08 11:26:20 +00:00
|
|
|
<div class="active preloader-wrapper small job-status-spinner">
|
2021-01-07 13:51:44 +00:00
|
|
|
<div class="spinner-layer spinner-blue-only">
|
|
|
|
<div class="circle-clipper left">
|
|
|
|
<div class="circle"></div>
|
|
|
|
</div>
|
|
|
|
<div class="gap-patch">
|
|
|
|
<div class="circle"></div>
|
|
|
|
</div>
|
|
|
|
<div class="circle-clipper right">
|
|
|
|
<div class="circle"></div>
|
2020-05-13 14:36:06 +00:00
|
|
|
</div>
|
2020-02-12 13:48:29 +00:00
|
|
|
</div>
|
2021-01-07 13:51:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-13 14:36:06 +00:00
|
|
|
|
2022-02-15 08:25:34 +00:00
|
|
|
<div class="card service-color-border border-darken" data-service="{{ job.service }}" style="border-top: 10px solid">
|
2021-01-07 13:51:44 +00:00
|
|
|
<div class="card-content">
|
|
|
|
<div class="row">
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="col s12">
|
2021-01-07 13:51:44 +00:00
|
|
|
<div class="input-field">
|
|
|
|
<input class="job-description" disabled id="job-description" type="text">
|
|
|
|
<label for="job-description">Description</label>
|
|
|
|
</div>
|
2020-10-26 12:04:12 +00:00
|
|
|
</div>
|
2020-05-13 14:36:06 +00:00
|
|
|
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="col s12 m6">
|
|
|
|
<div class="input-field">
|
2021-01-07 13:51:44 +00:00
|
|
|
<input class="job-creation-date" disabled id="job-creation-date" type="text">
|
|
|
|
<label for="job-creation-date">Creation date</label>
|
2020-10-26 12:04:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-12 13:48:29 +00:00
|
|
|
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="col s12 m6">
|
|
|
|
<div class="input-field">
|
2021-01-07 13:51:44 +00:00
|
|
|
<input class="job-end-date" disabled id="job-end-date" type="text">
|
|
|
|
<label for="job-end-date">End date</label>
|
2020-10-26 12:04:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-13 14:36:06 +00:00
|
|
|
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="col s12 m4">
|
|
|
|
<div class="input-field">
|
2021-01-07 13:51:44 +00:00
|
|
|
<input class="job-service" disabled id="job-service" type="text">
|
|
|
|
<label for="job-service">Service</label>
|
2020-10-26 12:04:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-12 13:48:29 +00:00
|
|
|
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="col s12 m4">
|
|
|
|
<div class="input-field">
|
2021-01-07 13:51:44 +00:00
|
|
|
<input class="job-service-args" disabled id="job-service-args" type="text">
|
|
|
|
<label for="job-service-args">Service arguments</label>
|
2020-10-26 12:04:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-13 14:36:06 +00:00
|
|
|
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="col s12 m4">
|
|
|
|
<div class="input-field">
|
2021-01-07 13:51:44 +00:00
|
|
|
<input class="job-service-version" disabled id="job-service-version" type="text">
|
|
|
|
<label for="job-service-version">Service version</label>
|
2020-10-26 12:04:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-12 13:48:29 +00:00
|
|
|
</div>
|
2020-05-13 14:36:06 +00:00
|
|
|
</div>
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="card-action right-align">
|
2021-01-07 13:51:44 +00:00
|
|
|
{% if current_user.is_administrator() %}
|
2023-03-09 13:55:52 +00:00
|
|
|
<a class="btn disabled waves-effect waves-light modal-trigger" id="log-job-modal"><i class="material-icons left">text_snippet</i>Log</a>
|
2020-10-26 12:04:12 +00:00
|
|
|
{% endif %}
|
2022-09-02 11:07:30 +00:00
|
|
|
<a class="action-button btn disabled waves-effect waves-light" data-action="restart-request"><i class="material-icons left">repeat</i>Restart</a>
|
2023-03-09 13:55:52 +00:00
|
|
|
<a class="btn red waves-effect waves-light modal-trigger" href="#delete-job-modal"><i class="material-icons left">delete</i>Delete</a>
|
2021-01-07 13:51:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-13 14:36:06 +00:00
|
|
|
</div>
|
|
|
|
|
2022-09-02 11:07:30 +00:00
|
|
|
<div class="col s12">
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="card">
|
2021-01-07 13:51:44 +00:00
|
|
|
<div class="card-content">
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="row">
|
2022-09-02 11:07:30 +00:00
|
|
|
<span class="card-title"><i class="left material-icons" style="font-size: inherit;">input</i>Inputs</span>
|
|
|
|
<div class="job-input-list" data-user-id="{{ job.user.hashid }}" data-job-id="{{ job.hashid }}"></div>
|
2020-10-26 12:04:12 +00:00
|
|
|
</div>
|
2020-05-13 14:36:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-09-02 11:07:30 +00:00
|
|
|
<div class="col s12">
|
2020-10-26 12:04:12 +00:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="row">
|
2022-09-02 11:07:30 +00:00
|
|
|
<span class="card-title"><i class="left material-icons" style="font-size: inherit;">done</i>Results</span>
|
|
|
|
<div class="job-result-list" data-user-id="{{ job.user.hashid }}" data-job-id="{{ job.hashid }}"></div>
|
2020-10-26 12:04:12 +00:00
|
|
|
</div>
|
2020-02-12 13:48:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-13 14:36:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-08-09 09:49:09 +00:00
|
|
|
</div>
|
2020-10-26 12:04:12 +00:00
|
|
|
{% endblock page_content %}
|
2019-11-15 10:45:04 +00:00
|
|
|
|
2023-03-09 13:55:52 +00:00
|
|
|
{% block modals %}
|
|
|
|
{{ super() }}
|
|
|
|
<div class="modal" id="delete-job-modal">
|
|
|
|
<div class="modal-content">
|
|
|
|
<h4>Confirm Job deletion</h4>
|
|
|
|
<p>Do you really want to delete the Job <b>{{job.title}}</b>? All files will be permanently deleted!</p>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<a class="action-button btn modal-close waves-effect waves-light" data-action="cancel">Cancel</a>
|
|
|
|
<a class="btn modal-close red waves-effect waves-light" id="delete-job-request">Delete</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal" id="log-job-modal">
|
|
|
|
<div class="modal-content">
|
|
|
|
<h4>Job logs</h4>
|
|
|
|
<pre><code>${text}</code></pre>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<a class="btn modal-close waves-effect waves-light">Close</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock modals %}
|
|
|
|
|
2021-12-01 13:15:20 +00:00
|
|
|
|
2020-10-26 12:04:12 +00:00
|
|
|
{% block scripts %}
|
|
|
|
{{ super() }}
|
2021-01-07 13:51:44 +00:00
|
|
|
<script>
|
|
|
|
let jobDisplay = new JobDisplay(document.querySelector('#job-display'));
|
2023-03-09 13:55:52 +00:00
|
|
|
let deleteJobRequestElement = document.querySelector('#delete-job-request');
|
|
|
|
let logJobModalElement = document.querySelector('#log-job-modal');
|
|
|
|
deleteJobRequestElement.addEventListener('click', (event) => {
|
|
|
|
Requests.jobs.entity.delete({{ job.hashid|tojson }});
|
|
|
|
});
|
|
|
|
logJobModalElement.addEventListener('click', (event) => {
|
|
|
|
Requests.jobs.entity.log({{ job.hashid|tojson }});
|
|
|
|
});
|
2019-11-15 10:45:04 +00:00
|
|
|
</script>
|
2020-10-26 12:04:12 +00:00
|
|
|
{% endblock scripts %}
|