148 lines
4.9 KiB
HTML
148 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Bitmine — Агрегатор задач</title>
|
|
<style>
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
background: #f5f5f5;
|
|
padding: 20px;
|
|
}
|
|
.container { max-width: 1400px; margin: 0 auto; }
|
|
h1 { color: #333; margin-bottom: 20px; }
|
|
.controls {
|
|
background: white;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
.btn {
|
|
background: #007bff;
|
|
color: white;
|
|
border: none;
|
|
padding: 12px 24px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
}
|
|
.btn:hover { background: #0056b3; }
|
|
.btn:disabled { background: #ccc; cursor: not-allowed; }
|
|
.btn-bitrix { background: #00aeef; }
|
|
.btn-bitrix:hover { background: #008cc7; }
|
|
table {
|
|
width: 100%;
|
|
background: white;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
border-collapse: collapse;
|
|
}
|
|
th, td {
|
|
padding: 12px 16px;
|
|
text-align: left;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
th { background: #f8f9fa; font-weight: 600; color: #333; }
|
|
tr:hover { background: #f8f9fa; }
|
|
.status {
|
|
padding: 4px 12px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
.status-new { background: #e3f2fd; color: #1976d2; }
|
|
.status-progress { background: #fff3e0; color: #f57c00; }
|
|
.status-resolved { background: #e8f5e9; color: #388e3c; }
|
|
.status-closed { background: #f5f5f5; color: #616161; }
|
|
.error {
|
|
background: #ffebee;
|
|
color: #c62828;
|
|
padding: 16px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.source-badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
.source-redmine { background: #5c2d91; color: white; }
|
|
.source-bitrix { background: #00aeef; color: white; }
|
|
.note-text {
|
|
max-width: 300px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>🔗 Bitmine — Агрегатор задач</h1>
|
|
|
|
<div class="controls">
|
|
<a href="/api/redmine/tasks" class="btn">📋 Получить задачи из Redmine</a>
|
|
<button class="btn btn-bitrix" disabled>📌 Получить задачи из Bitrix24</button>
|
|
</div>
|
|
|
|
{% if error.is_some() %}
|
|
<div class="error">{{ error.as_ref().unwrap() }}</div>
|
|
{% endif %}
|
|
|
|
{% if !issues.is_empty() %}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>№</th>
|
|
<th>Источник</th>
|
|
<th>Проект</th>
|
|
<th>Статус</th>
|
|
<th>Тема</th>
|
|
<th>Последнее примечание</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for issue in issues %}
|
|
<tr style="cursor: pointer;" onclick="window.location.href='/task/{{ issue.id }}'">
|
|
<td>{{ issue.id }}</td>
|
|
<td>
|
|
<span class="source-badge source-{{ issue.source }}">
|
|
{{ issue.source }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
{% match issue.project %}
|
|
{% when Some(proj) %}{{ proj }}
|
|
{% when None %}—
|
|
{% endmatch %}
|
|
</td>
|
|
<td>
|
|
<span class="status status-{{ issue.status_class }}">
|
|
{{ issue.status_name }}
|
|
</span>
|
|
</td>
|
|
<td>{{ issue.subject }}</td>
|
|
<td class="note-text">
|
|
{% match issue.last_note %}
|
|
{% when Some(note) %}{{ note }}
|
|
{% when None %}—
|
|
{% endmatch %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</body>
|
|
</html>
|