Files
jobboard/app/templates/sources.html
T
WolfandClaude Opus 5.5 6b40702a9a Sources tab: searches, company boards and the prune by region, in the app
What a pull reads can now be changed on a page instead of only the command
line: try a search and see its first ten results before saving it, edit or
remove one, follow a company's ATS board, switch any board or search on or
off, and preview and apply a prune by region. Each row shows its open roles
and the countries they are in.

The page and `app companies`/`app searches` call the same functions in
app/jobs/sources.py. Switching a target off closes its open roles, and the
pull's settle closes them again if a batch in flight reopened them. Roles
pulled before `country` existed are backfilled at startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 15:15:04 +02:00

108 lines
5.0 KiB
HTML

{% extends "base.html" %}
{% block title %}Sources — roledesk{% endblock %}
{% block content %}
<div class="row-between">
<h1>Sources</h1>
<button type="button" id="pull-now" class="secondary">Pull now</button>
</div>
<p class="lede">What a pull reads: saved searches, which find roles at any company, and company boards, which read every role one company lists. A pull runs on the Schedules tab's cadence. Switching one off closes its open roles at once; switched back on, the next pull reopens the ones it still finds.</p>
<p id="pull-status" class="count" role="status"></p>
<section class="section">
<h2>Searches</h2>
<p id="searches-count" class="count" role="status"></p>
<table class="list">
<thead>
<tr><th>Search</th><th>Query</th><th class="num">Open roles</th><th>Countries</th><th>On</th><th></th></tr>
</thead>
<tbody id="searches-list"></tbody>
</table>
<form id="search-form" class="agent-form source-form" autocomplete="off">
<h2 id="search-form-title">New search</h2>
<div class="form-row">
<label>Board
<select id="s-provider">
<option value="jobindex">Jobindex (Denmark)</option>
<option value="adzuna">Adzuna (UK and EU)</option>
</select></label>
<label class="grow">Name <input type="text" id="s-name" required placeholder="Copenhagen backend"></label>
</div>
<label>Query
<span class="hint" data-provider="jobindex">Jobindex syntax: words are OR, <code>"a b"</code> is a phrase, <code>+word</code> is required.</span>
<span class="hint" data-provider="adzuna" hidden>Every word must appear.</span>
<input type="text" id="s-q" required spellcheck="false"></label>
<div class="form-row">
<label data-provider="jobindex">Area
<select id="s-area">
{% for value, label in areas %}<option value="{{ value }}"{% if value == 1 %} selected{% endif %}>{{ label }}</option>{% endfor %}
</select></label>
<label data-provider="adzuna" hidden>Country
<select id="s-country">
{% for value, label in countries %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
</select></label>
<label data-provider="adzuna" hidden class="grow">Place <input type="text" id="s-where" placeholder="Berlin"></label>
<label>Pages <span class="hint">per pull, up to 10</span>
<input type="number" id="s-pages" min="1" max="10" value="10"></label>
</div>
<p id="adzuna-key" class="note" hidden>No Adzuna key is set. Get a free one at developer.adzuna.com and set <code>ADZUNA_APP_ID</code> and <code>ADZUNA_APP_KEY</code> before starting the app.</p>
<div class="agent-actions">
<button type="button" id="s-try" class="secondary">Try it</button>
<button type="submit">Save</button>
<button type="button" id="s-new" class="secondary">New</button>
</div>
<p id="search-status" class="count" role="status"></p>
<ol id="search-sample" class="sample"></ol>
</form>
</section>
<section class="section">
<h2>Company boards</h2>
<form class="filters" autocomplete="off" onsubmit="return false">
<input type="search" id="b-q" placeholder="Filter by company or board" aria-label="Filter boards">
<select id="b-on" aria-label="On or off">
<option value="">On and off</option>
<option value="on">On</option>
<option value="off">Off</option>
</select>
</form>
<p id="boards-count" class="count" role="status"></p>
<table class="list">
<thead>
<tr><th>Company</th><th>Board</th><th class="num">Open roles</th><th>Countries</th><th>On</th></tr>
</thead>
<tbody id="boards-list"></tbody>
</table>
<form id="board-form" class="agent-form source-form" autocomplete="off">
<h2>Follow a company</h2>
<div class="form-row">
<label class="grow">Board <span class="hint">host:slug, from its careers page URL: greenhouse, lever, ashby, workable, smartrecruiters, recruitee, personio</span>
<input type="text" id="b-board" required placeholder="ashby:acme" spellcheck="false"></label>
<label class="grow">Company <input type="text" id="b-name" required placeholder="Acme"></label>
</div>
<div class="agent-actions"><button type="submit">Follow</button></div>
<p id="board-status" class="count" role="status"></p>
</form>
</section>
<section class="section">
<h2>Prune boards by region</h2>
<form id="prune-form" class="agent-form source-form" autocomplete="off">
<label>Region <span class="hint"><code>europe</code>, or country codes such as <code>DK,SE,NO,EU</code>. EU is a role open anywhere in Europe.</span>
<input type="text" id="p-region" value="europe" spellcheck="false"></label>
<div class="agent-actions">
<button type="submit" class="secondary">Preview</button>
<button type="button" id="p-apply" disabled>Switch them off</button>
</div>
<p id="prune-status" class="count" role="status"></p>
<ul id="prune-list" class="sample"></ul>
</form>
</section>
{% endblock %}
{% block scripts %}
<script src="{{ asset('sources.js') }}"></script>
{% endblock %}