forked from antekov/Adwizard
{% extends "base.html" %}
| |
| |
{% block title %}Работа {{ job.id_job }} - Веб-приложение для оптимизации Adwizard{% endblock %}
| |
| |
{% block content %}
| |
<div class="row">
| |
<div class="col-md-12">
| |
<h2>Работа: {{ job.id_job }}</h2>
| |
<div class="card mb-4">
| |
<div class="card-body">
| |
<h5 class="card-title">Информация о работе</h5>
| |
<table class="table table-borderless">
| |
<tr>
| |
<th width="200">ID работы:</th>
| |
<td>{{ job.id_job }}</td>
| |
</tr>
| |
<tr>
| |
<th>Символ:</th>
| |
<td>{{ job.symbol }}</td>
| |
</tr>
| |
<tr>
| |
<th>Таймфрейм:</th>
| |
<td>{{ job.period }}</td>
| |
</tr>
| |
<tr>
| |
<th>Статус:</th>
| |
<td>
| |
<span class="badge
| |
{% if job.status == 'Queued' %}bg-warning
| |
{% elif job.status == 'Process' %}bg-info
| |
{% else %}bg-success{% endif %}">
| |
{{ job.status }}
| |
</span>
| |
</td>
| |
</tr>
| |
<tr>
| |
<th>Входные параметры тестера:</th>
| |
<td>{{ job.tester_inputs or 'Не указаны' }}</td>
| |
</tr>
| |
<tr>
| |
<th>Этап:</th>
| |
<td><a href="{{ url_for('stage_detail', stage_id=job.id_stage) }}">{{ job.stage.name }}</a></td>
| |
</tr>
| |
</table>
| |
</div>
| |
</div>
| |
</div>
| |
</div>
| |
| |
<div class="row">
| |
<div class="col-md-12">
| |
<h3>Задачи работы</h3>
| |
{% if tasks %}
| |
<table class="table table-striped table-hover">
| |
<thead>
| |
<tr>
| |
<th>ID</th>
| |
<th>Критерий оптимизации</th>
| |
<th>Статус</th>
| |
<th>Дата начала</th>
| |
<th>Дата окончания</th>
| |
<th>Действия</th>
| |
</tr>
| |
</thead>
| |
<tbody>
| |
{% for task in tasks %}
| |
<tr>
| |
<td>{{ task.id_task }}</td>
| |
<td>{{ task.optimization_criterion }}</td>
| |
<td>
| |
<span class="badge
| |
{% if task.status == 'Queued' %}bg-warning
| |
{% elif task.status == 'Process' %}bg-info
| |
{% else %}bg-success{% endif %}">
| |
{{ task.status }}
| |
</span>
| |
</td>
| |
<td>{{ task.start_date if task.start_date else 'Не указана' }}</td>
| |
<td>{{ task.finish_date if task.finish_date else 'Не указана' }}</td>
| |
<td>
| |
<a href="{{ url_for('task_detail', task_id=task.id_task) }}" class="btn btn-sm btn-outline-primary">Детали</a>
| |
</td>
| |
</tr>
| |
{% endfor %}
| |
</tbody>
| |
</table>
| |
{% else %}
| |
<div class="alert alert-info">
| |
<p>У этой работы пока нет задач.</p>
| |
</div>
| |
{% endif %}
| |
</div>
| |
</div>
| |
{% endblock %} |