95 lines
3.6 KiB
HTML
95 lines
3.6 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Admin · Guess the RAL{% endblock %}
|
|
{% block content %}
|
|
<section class="admin-grid">
|
|
<div class="pixel-panel">
|
|
<h1>WORKER</h1>
|
|
<p class="tiny">Playable jobs: {{ playable }} · queued/running: {{ queued }}</p>
|
|
<form class="stack" method="post" action="/admin/fetch">
|
|
<label>LINKEDIN JOB URL
|
|
<input name="url" required placeholder="https://www.linkedin.com/jobs/view/..." />
|
|
</label>
|
|
<button class="btn" type="submit">QUEUE FETCH</button>
|
|
</form>
|
|
<h2>TASKS</h2>
|
|
<table class="pixel-table">
|
|
<tr><th>ID</th><th>STATUS</th><th>URL</th><th>ERROR</th></tr>
|
|
{% for t in tasks %}
|
|
<tr>
|
|
<td>{{ t.id }}</td>
|
|
<td class="st-{{ t.status }}">{{ t.status }}</td>
|
|
<td class="clip">{{ t.url }}</td>
|
|
<td class="clip">{{ t.error[:120] }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
<div class="pixel-panel">
|
|
<h1>ADD JOB</h1>
|
|
<form class="stack" method="post" action="/admin/job">
|
|
<label>TITLE <input name="title" required /></label>
|
|
<label>COMPANY <input name="company" /></label>
|
|
<div class="grid-2">
|
|
<label>SUBJECT
|
|
<select name="subject">
|
|
<option>technology</option>
|
|
<option>financial</option>
|
|
<option>business</option>
|
|
<option>healthcare</option>
|
|
<option>legal</option>
|
|
<option>hr</option>
|
|
<option>design</option>
|
|
<option>other</option>
|
|
</select>
|
|
</label>
|
|
<label>WORK
|
|
<select name="work_type">
|
|
<option value="hybrid">hybrid</option>
|
|
<option value="remote">full remote</option>
|
|
<option value="onsite">in-place</option>
|
|
</select>
|
|
</label>
|
|
</div>
|
|
<label>LOCATION <input name="location" /></label>
|
|
<div class="grid-2">
|
|
<label>RAL EXACT <input name="ral_exact" /></label>
|
|
<label>RAL MIN <input name="ral_min" /></label>
|
|
</div>
|
|
<label>RAL MAX <input name="ral_max" /></label>
|
|
<label>EXTRA CLUES <input name="extra_info" /></label>
|
|
<label>DESCRIPTION <textarea name="description" rows="5"></textarea></label>
|
|
<button class="btn" type="submit">SAVE JOB</button>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
<section class="pixel-panel">
|
|
<div class="row-between">
|
|
<h1>JOBS</h1>
|
|
<form method="post" action="/admin/logout"><button class="btn btn-ghost" type="submit">LOGOUT</button></form>
|
|
</div>
|
|
<table class="pixel-table">
|
|
<tr><th>ID</th><th>TITLE</th><th>COMPANY</th><th>RAL</th><th>TYPE</th><th>STATUS</th><th></th></tr>
|
|
{% for j in jobs %}
|
|
<tr>
|
|
<td>{{ j.id }}</td>
|
|
<td>{{ j.title }}</td>
|
|
<td>{{ j.company }}</td>
|
|
<td>{{ j.ral_exact or (j.ral_min and j.ral_max and (j.ral_min|string + '-' + j.ral_max|string)) or '?' }}</td>
|
|
<td>{{ j.work_type }}</td>
|
|
<td class="st-{{ j.status }}">{{ j.status }}</td>
|
|
<td>
|
|
<form method="post" action="/admin/job/{{ j.id }}/status">
|
|
<select name="status">
|
|
<option value="ready" {% if j.status=='ready' %}selected{% endif %}>ready</option>
|
|
<option value="needs_salary" {% if j.status=='needs_salary' %}selected{% endif %}>needs_salary</option>
|
|
<option value="hidden" {% if j.status=='hidden' %}selected{% endif %}>hidden</option>
|
|
</select>
|
|
<button class="btn btn-tiny" type="submit">SET</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</section>
|
|
{% endblock %}
|