OXYGENHUB
◆ v0.9.22 oxygenhub / templates / flow_tab.html
1.7 KiB · HTML · last changed Run a pipeline's WASM jobs in the browser tab (refs andymccall/oxygenflow#80); runner builds shared with the swarm (refs andymccall/oxygenflow#84); 0.9.15 7 days ago source blame history raw
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Run in this tab · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "flow") %}{% endblock %}
6
{% block content %}
7
<div class="head"><h1>Run in this tab <small><a href="{{ repo.url }}/flow">Flow</a> · WASM jobs, in your browser</small></h1>
8
<form class="inline" method="get" action="{{ repo.url }}/flow/tab"><label for="tab-bookmark" class="small mute">Jobs of</label> <select id="tab-bookmark" name="bookmark">{% for b in bookmarks %}<option value="{{ b }}"{% if *b == bookmark %} selected{% endif %}>{{ b }}</option>{% endfor %}</select> <button type="submit">Show</button></form>
9
</div>
10
<p class="small mute">The pipeline's jobs in a <code>runtime "wasm"</code> sandbox run here as a runner's WASM tier runs them: this tab fetches {{ bookmark }}'s files, and a worker runs each job's modules with them at <code>/src</code>, its arguments and environment, with no network and nothing of your computer. Nothing is reported to the hub: the tab shows the tier works in a browser, before a tab can take jobs as a runner (OxygenFlow #80).</p>
11
{% if let Some(p) = problem %}
12
<section class="panel"><p>{{ p }}</p></section>
13
{% else %}
14
<section class="panel" id="tab-runner" data-jobs="{{ jobs_json }}" data-archive="{{ archive }}" data-worker="/static/wasi-worker.js?v={{ shell.assets() }}">
15
  <p><button type="button" class="primary-btn" id="tab-run-all">Run all {{ jobs }}</button> <span class="small mute" id="tab-status"></span></p>
16
  <div id="tab-jobs"></div>
17
</section>
18
<script src="/static/wasm-tab.js?v={{ shell.assets() }}" defer></script>
19
{% endif %}
20
{% endblock %}