A search agent is a persona, and every like or pass belongs to the one being viewed. The rail now opens on Viewing as: a full-width chooser, the name alone with one agent, a note with none, remembered in the URL and localStorage. The vote buttons, the reader's affinity control, the feed, the tag counts and the reader fetch all carry that agent; before, votes sent none and every one landed on the default agent. Best first and Newest first are back as the segmented control under Order, independent of the agent. The rail selects no longer clip descenders: Chrome ignores line-height on a select, so the fixed box is gone in favour of padding and a min-height. Settings render inside a sticky rail (Search agents; Sources with Job boards, Company boards, Runs, Messages; Account), a strip under the header on a phone, so Runs is one click away however long the company list gets. Sources shows one section at a time, chosen by the fragment, so the old redirects still land. Search agents are cards, newest first: name, an On/Off switch with its word, the intent in full, the weights, Edit in place, New agent on top, and a link to Roles as that agent. Switching one on rescores it. replace_scores writes nothing for an agent deleted while score was running, instead of failing the run on the foreign key. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
175 lines
8.7 KiB
HTML
175 lines
8.7 KiB
HTML
{% extends "settings/_layout.html" %}
|
|
{% block title %}Sources — roledesk{% endblock %}
|
|
|
|
{# One page, four sections: the `search` plugin's job board queries, the
|
|
`ats` plugin's company boards, the runs that read both, and the message
|
|
log. One is shown at a time, the one the URL fragment names (`#runs`), 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>
|
|
|
|
<section class="card" id="job-boards" data-section>
|
|
<h2>Job boards</h2>
|
|
<p class="lede">A query on Jobindex or Adzuna finds roles at any company. Switching one off closes its roles until you switch it back on.</p>
|
|
|
|
<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>
|
|
</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></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>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-new" class="secondary">New</button>
|
|
</div>
|
|
<p id="search-status" class="count" role="status"></p>
|
|
<ol id="search-sample" class="sample"></ol>
|
|
</form>
|
|
|
|
<p id="searches-count" class="count" role="status"></p>
|
|
<div id="searches-list" class="srows"></div>
|
|
</section>
|
|
|
|
<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
|
|
<select id="b-host">
|
|
<option value="greenhouse">Greenhouse</option>
|
|
<option value="lever">Lever</option>
|
|
<option value="ashby">Ashby</option>
|
|
<option value="workable">Workable</option>
|
|
<option value="smartrecruiters">SmartRecruiters</option>
|
|
<option value="recruitee">Recruitee</option>
|
|
<option value="personio">Personio</option>
|
|
</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 or board" 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="on">On</option>
|
|
<option value="off">Off</option>
|
|
</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>
|
|
|
|
<details class="prune">
|
|
<summary>Switch off boards with no roles in a region</summary>
|
|
<p class="lede">A board none of whose open roles is in the region is switched off; a board whose roles name no country is kept.</p>
|
|
<form id="prune-form" class="agent-form source-form" autocomplete="off">
|
|
<label>Region
|
|
<input type="text" id="p-region" value="europe" spellcheck="false">
|
|
<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></label>
|
|
<div class="agent-actions">
|
|
<button type="submit" class="secondary">Preview</button>
|
|
<button type="button" id="p-apply" disabled>Switch off these boards</button>
|
|
</div>
|
|
<p id="prune-status" class="count" role="status"></p>
|
|
<ul id="prune-list" class="sample"></ul>
|
|
</form>
|
|
</details>
|
|
</section>
|
|
|
|
<section class="card" id="runs" data-section>
|
|
<div class="row-between">
|
|
<h2>Runs</h2>
|
|
<button type="button" id="pull-now" class="secondary">Pull now</button>
|
|
</div>
|
|
<p class="lede">Every 6 hours the pull reads every board, then extract fills in what each posting says, embed and score rank them, and summarise writes the summaries. Change the cadence below.</p>
|
|
|
|
<h3>What is running</h3>
|
|
{# The heading and the idle line are the app's: the element takes up no
|
|
space while the queue is idle — that is its `idle="hide"` default, and a
|
|
strip that is always there is furniture — and a heading with nothing
|
|
under it reads as something that failed to load. The element and its
|
|
script are the queue's own, served by its own router — see
|
|
pipeline/web/static/jobs.js. #}
|
|
<p class="muted small" id="idle">Nothing at the moment.</p>
|
|
<script type="module" src="/_jobs/jobs.js"></script>
|
|
<desk-jobs></desk-jobs>
|
|
|
|
{# The element and its script are the scheduler's own, served by its own
|
|
router — see pipeline/web/static/schedules.js. A cadence is typed as
|
|
`every 15m`, `every 6h`, `daily at 06:00` or `weekly mon 07:00`; its add
|
|
row's placeholder shows two. #}
|
|
<h3>Schedule</h3>
|
|
<script type="module" src="/_jobs/schedules.js"></script>
|
|
<desk-schedules></desk-schedules>
|
|
|
|
<details class="stage">
|
|
<summary>Run one stage</summary>
|
|
<div id="kinds" class="buttons">
|
|
<span class="muted">loading…</span>
|
|
</div>
|
|
</details>
|
|
|
|
</section>
|
|
|
|
<section class="card" id="messages" data-section>
|
|
<div class="row-between">
|
|
<h2>Messages</h2>
|
|
<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>
|
|
</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 %}
|