240 lines
15 KiB
HTML
240 lines
15 KiB
HTML
{% extends "settings/_layout.html" %}
|
|
{% block title %}Sources — roledesk{% endblock %}
|
|
|
|
{# One page, three sections: the `search` plugin's job board queries, the
|
|
`ats` plugin's company boards, and the runs that read both, with the
|
|
message log as their last block. One is shown at a time, the one the URL
|
|
fragment names (`#runs`) or contains (`#messages`), or Job boards without
|
|
one; sources.js hides the rest and the rail picks one. Hidden rather than
|
|
separate pages, because each section keeps the element ids it had as a
|
|
page of its own and its script (sources.js, companies.js, jobs.js,
|
|
messages.js) is unchanged: it finds its root or does nothing. The ids are
|
|
`SECTIONS` in app/web/pages.py, which the rail links to. #}
|
|
{% block content %}
|
|
<h1>Sources</h1>
|
|
<p class="lede">Sources are where roles come from: queries on job boards that span companies, and the boards of the companies you follow. Each section is one plugin; the runs read them all.</p>
|
|
|
|
{# The Job boards form is a `<template>` because only one edits at a time, so
|
|
its ids stay unique: sources.js puts it in place of a row on Edit, and on
|
|
top of the list on New, as agents.js does for the Search agents cards. #}
|
|
<section class="card" id="job-boards" data-section>
|
|
<h2>Job boards</h2>
|
|
<p class="lede">A query on Jobindex, Adzuna, Platsbanken, freehire, Jobnet or Akademikernes Jobbank finds roles at any company. Switching one off closes its roles until you switch it back on.</p>
|
|
|
|
<div class="agents-head">
|
|
<p id="searches-count" class="count" role="status"></p>
|
|
<button type="button" id="s-add">New job board</button>
|
|
</div>
|
|
<p id="searches-answer" class="count" role="status"></p>
|
|
<div id="searches-list" class="srows"></div>
|
|
</section>
|
|
|
|
<template id="search-form-template">
|
|
<form id="search-form" class="agent-form source-form" autocomplete="off">
|
|
<h3 id="search-form-title">New job board</h3>
|
|
<div class="form-row">
|
|
<label>Board
|
|
<select id="s-provider">
|
|
<option value="jobindex">Jobindex (Denmark)</option>
|
|
<option value="adzuna">Adzuna (UK and EU)</option>
|
|
<option value="platsbanken">Platsbanken (Sweden)</option>
|
|
{% for value, label in providers %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
|
|
</select></label>
|
|
<label>Name <input type="text" id="s-name" required placeholder="Copenhagen backend"></label>
|
|
</div>
|
|
<label>Query
|
|
<input type="text" id="s-q" required spellcheck="false">
|
|
<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>
|
|
<span class="hint" data-provider="platsbanken" hidden>Free text; every word counts towards the match.</span>
|
|
<span class="hint" data-provider="freehire" hidden>Words are OR over title, company, text and place, so a query is noisy; narrow it by country.</span>
|
|
<span class="hint" data-provider="jobnet" hidden>Every word must appear; no phrases, so one term a search.</span>
|
|
<span class="hint" data-provider="jobbank" hidden>Words are OR.</span></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>Place <input type="text" id="s-where" placeholder="Berlin"></label>
|
|
<label data-provider="platsbanken" hidden>Region
|
|
<select id="s-region">
|
|
<option value="">All of Sweden</option>
|
|
{% for value, label in regions %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
|
|
</select></label>
|
|
<label data-provider="freehire" hidden>Countries <input type="text" id="s-countries" placeholder="dk,se" spellcheck="false">
|
|
<span class="hint">ISO codes, comma-separated; empty for all</span></label>
|
|
<label data-provider="freehire" hidden>Work mode
|
|
<select id="s-mode">
|
|
<option value="">Any</option>
|
|
{% for value, label in modes %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
|
|
</select></label>
|
|
<label data-provider="jobnet" hidden>Region
|
|
<select id="s-region-jobnet">
|
|
<option value="">All of Denmark</option>
|
|
{% for value, label in jobnet_regions %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
|
|
</select></label>
|
|
<label data-provider="jobbank" hidden>Region
|
|
<select id="s-region-jobbank">
|
|
<option value="">All of Denmark</option>
|
|
{% for value, label in jobbank_regions %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
|
|
</select></label>
|
|
<label data-provider="jobbank" hidden>Remote work
|
|
<select id="s-remote-jobbank">
|
|
<option value="">Any</option>
|
|
{% for value, label in jobbank_remote %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
|
|
</select></label>
|
|
<label>Pages
|
|
<input type="number" id="s-pages" min="1" max="10" value="10">
|
|
<span class="hint">per pull, up to 10</span></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-cancel" class="secondary">Cancel</button>
|
|
</div>
|
|
<p id="search-status" class="count" role="status"></p>
|
|
<ol id="search-sample" class="sample"></ol>
|
|
</form>
|
|
</template>
|
|
|
|
<section class="card" id="company-boards" data-section>
|
|
<h2>Company boards</h2>
|
|
<p class="lede">Every company roledesk has seen, and how many of its roles are open. Switching a board off stops reading it and closes its roles; hiding a company keeps reading it but leaves its roles out of the list and unscored, and favourite or like lifts one instead, in Best match.</p>
|
|
|
|
<form id="board-form" class="agent-form source-form" autocomplete="off">
|
|
<h3>Follow a company</h3>
|
|
<div class="form-row">
|
|
<label>Host
|
|
{# The hosts plugins.ats reads (HOST_OPTIONS in app/web/pages.py).
|
|
companies.js copies these options into each row's Set board
|
|
control, so the page has one list of hosts. #}
|
|
<select id="b-host">
|
|
{% for value, label in hosts %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
|
|
</select></label>
|
|
<label>Slug
|
|
<input type="text" id="b-slug" required placeholder="acme" spellcheck="false">
|
|
<span class="hint">The part after the host in the careers URL: boards.greenhouse.io/<strong>acme</strong>.</span></label>
|
|
<label>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>
|
|
|
|
<form class="filters" autocomplete="off" onsubmit="return false">
|
|
<input type="search" id="c-q" placeholder="Filter by name, board or country code" aria-label="Filter companies">
|
|
<select id="c-filter" aria-label="Filter">
|
|
<option value="">Any</option>
|
|
<option value="favourite">Favourite</option>
|
|
<option value="liked">Liked</option>
|
|
<option value="hidden">Hidden</option>
|
|
<option value="all_countries">All countries</option>
|
|
<option value="all_roles">All roles</option>
|
|
<option value="on">On</option>
|
|
<option value="off">Off</option>
|
|
<option value="unreadable">Not readable yet</option>
|
|
{# The phrases of app/jobs/limits.py `WORDS`, with their meanings; a test
|
|
compares the two. companies.js shows the meaning on the row. #}
|
|
<optgroup label="Limits">
|
|
<option value="failing" title="the last read failed; the roles stay open until it has failed for 21 days">failing</option>
|
|
<option value="read incomplete" title="the last read answered but did not list the whole board, so it closed nothing">read incomplete</option>
|
|
<option value="swept" title="the board is over the page cap and is read across several pulls">swept</option>
|
|
<option value="filtered by reach" title="the read asked the host for the agents' countries and remote only">filtered by reach</option>
|
|
<option value="remote not asked" title="filtered by country on a host with no remote filter while the agents want remote">remote not asked</option>
|
|
<option value="narrowed by terms" title="read by the agents' fetch terms, so a role outside them is never listed">narrowed by terms</option>
|
|
<option value="nothing asked" title="the host knows none of the places asked, so the read asked nothing and closed nothing">nothing asked</option>
|
|
<option value="size 0" title="the board was sized at no roles">size 0</option>
|
|
<option value="over the ceiling" title="the board is at or over what the host answers at all, so the read is incomplete">over the ceiling</option>
|
|
<option value="text per role" title="the list has no text; enrich reads each role's page, ranked roles first">text per role</option>
|
|
<option value="no text" title="the host gives no text">no text</option>
|
|
<option value="excerpt only" title="the host gives a teaser and nothing more">excerpt only</option>
|
|
<option value="no pay" title="the host states no pay">no pay</option>
|
|
<option value="date not trusted" title="the host's date is not the posting date">date not trusted</option>
|
|
<option value="without text" title="open roles with no description, teaser or page text (the number follows)">without text</option>
|
|
<option value="text failed" title="roles whose page read failed and is tried again (the number follows)">text failed</option>
|
|
<option value="read whole" title="under 300 roles or a host that cannot filter, so the reach does not narrow it">read whole</option>
|
|
</optgroup>
|
|
</select>
|
|
{# Liked and hidden are per search agent: this picks whose the list shows
|
|
and whose the buttons set. companies.js fills it from /api/agents. #}
|
|
<label class="inline">Liked and hidden for <select id="c-agent" aria-label="Search agent"></select></label>
|
|
</form>
|
|
<p id="c-no-agent" class="note" hidden>Liking a company needs a search agent. Add one under <a href="/settings/agents">Search agents</a>.</p>
|
|
|
|
<p id="companies-count" class="count" role="status"></p>
|
|
<div id="companies-list" class="crows"></div>
|
|
</section>
|
|
|
|
<section class="card" id="runs" data-section>
|
|
<div class="row-between">
|
|
<h2>Runs</h2>
|
|
<button type="button" id="pull-now" class="secondary">Run the pull now</button>
|
|
</div>
|
|
<p class="lede">On the schedule below the pull reads every board, embed and score rank every role, extract fills in what the best postings say, score runs again with what it filled, and summarise writes the summaries.</p>
|
|
|
|
{# The two stages that ask a model, switched here rather than in config.yaml
|
|
(`GET /api/stages`); jobs.js draws the rows into #stages-list. #}
|
|
<h3 id="stages">What the model reads</h3>
|
|
<p class="lede">Extract and summarise ask a model, which costs tokens on the API. Turning one on starts nothing: the next pull runs it, and Run the pull now does so at once. How deep each reads is set per search agent, under <a href="/settings/agents">Search agents</a>.</p>
|
|
<div id="stages-list" class="srows"></div>
|
|
<p id="stages-answer" class="count" role="status"></p>
|
|
|
|
<h3>What is running</h3>
|
|
{# The element is the queue's own, served by its own router — see
|
|
pipeline/web/static/jobs.js; base.html loads its script. `idle="show"`
|
|
keeps it under the heading and has it say "Nothing running." when the
|
|
queue is idle, since a heading with nothing under it reads as something
|
|
that failed to load. #}
|
|
<desk-jobs idle="show"></desk-jobs>
|
|
|
|
{# The element and its script are the scheduler's own, served by its own
|
|
router — see pipeline/web/static/schedules.js. The cadence is picked
|
|
(every 6h, daily at 06:00, weekly mon 07:00). `add="off"`, because the
|
|
pull is the only schedule and it is declared in app/jobs/cascade.py. #}
|
|
<h3>Schedule</h3>
|
|
<script type="module" src="/_jobs/schedules.js"></script>
|
|
<desk-schedules add="off"></desk-schedules>
|
|
|
|
{# The message log, the queue's own through `/api/notices`. `#messages` is
|
|
where the old Messages paths and the toasts' "all messages" link land. #}
|
|
<div id="messages">
|
|
<div class="row-between">
|
|
<h3>Problems</h3>
|
|
<button type="button" id="clear-all" class="secondary">Clear all</button>
|
|
</div>
|
|
<p class="lede">What the server said that nobody has cleared, newest first. A message goes when you clear it, or a fortnight after it was last said.</p>
|
|
<div id="notices"><span class="muted">loading…</span></div>
|
|
</div>
|
|
</section>
|
|
|
|
{# What prep could not place, from `/api/prep/unlinked` and
|
|
`/api/prep/unmapped`; sources.js draws both lists. A fix is a line of code
|
|
(the `unmapped` skill in .claude/skills says where), so the page only
|
|
lists, and Copy hands the whole list over as text. #}
|
|
<section class="card" id="unmapped" data-section>
|
|
<div class="row-between">
|
|
<h2>Unmapped</h2>
|
|
<button type="button" id="unmapped-copy" class="secondary">Copy the list</button>
|
|
</div>
|
|
<p class="lede">What prep could not place. A place text no city or country resolves leaves its role without that place, and a host word no table maps leaves the level, contract or remote empty. Tell Claude what one is, such as "Überlingen is a town in Germany" or "Home Based - Americas is remote", or paste the copied list. The fix goes into the code, and the next pull applies it to every open role.</p>
|
|
<pre id="unmapped-text" class="copy-out" hidden></pre>
|
|
<h3>Places</h3>
|
|
<p id="unlinked-count" class="count" role="status"></p>
|
|
<div id="unlinked-list" class="srows"></div>
|
|
<h3>Host words</h3>
|
|
<p id="words-count" class="count" role="status"></p>
|
|
<div id="words-list" class="srows"></div>
|
|
</section>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{{ asset('sources.js') }}"></script>
|
|
<script src="{{ asset('companies.js') }}"></script>
|
|
<script src="{{ asset('jobs.js') }}"></script>
|
|
<script src="{{ asset('messages.js') }}"></script>
|
|
{% endblock %}
|