| 1 |
{% extends "base.html" %} |
| 2 |
{% block title %}New repository{% endblock %} |
| 3 |
{% block content %} |
| 4 |
<div class="head"><h1>New repository</h1></div> |
| 5 |
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %} |
| 6 |
<form class="card full new-repo" method="post" action="/new" data-new-repo> |
| 7 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 8 |
|
| 9 |
<section class="nr-sec"> |
| 10 |
<div class="nr-head"><h2>Repository</h2><p class="small mute">Where it lives and what it is called.</p></div> |
| 11 |
<div class="nr-body"> |
| 12 |
<div class="row name-row"> |
| 13 |
<div><label for="owner">Owner</label><select id="owner" name="owner" data-orgs="{% for o in orgs %}{{ o }} {% endfor %}" data-runners="{% for o in runner_owners %}{{ o }} {% endfor %}">{% for (o, b, from) in bookmarks %}<option value="{{ o }}" data-bookmark="{{ b }}" data-bookmark-from="{{ from }}">{{ o }}</option>{% endfor %}</select></div> |
| 14 |
<div class="slash" aria-hidden="true">/</div> |
| 15 |
<div class="grow"><label for="name">Name</label><input type="text" id="name" name="name" required pattern="[A-Za-z0-9][A-Za-z0-9._-]{0,63}" autocomplete="off" aria-describedby="name-check" autofocus></div> |
| 16 |
</div> |
| 17 |
<p id="name-check" class="small name-check" role="status" aria-live="polite" data-base="{{ base_url }}"></p> |
| 18 |
<label for="description">Description <span class="small mute">(optional; the README and the wiki start with it)</span></label><input type="text" id="description" name="description"> |
| 19 |
<label for="default_bookmark">Default bookmark</label><input type="text" id="default_bookmark" class="nr-bookmark" name="default_bookmark" pattern="[A-Za-z0-9][A-Za-z0-9._-]{0,63}" autocomplete="off" spellcheck="false" aria-describedby="bookmark-from" data-default-bookmark> |
| 20 |
<p id="bookmark-from" class="small mute nr-hint" data-bookmark-hint></p> |
| 21 |
</div> |
| 22 |
</section> |
| 23 |
|
| 24 |
<section class="nr-sec"> |
| 25 |
<div class="nr-head"><h2>Visibility</h2><p class="small mute">Who can see and clone it. You can change it later in Settings.</p></div> |
| 26 |
<div class="nr-body nr-cards three" role="radiogroup" aria-label="Visibility"> |
| 27 |
<label class="choice-card"><input type="radio" name="visibility" value="public" checked><span><strong>Public</strong><span class="small mute">Anyone can see and clone it. You choose who may push.</span></span></label> |
| 28 |
<label class="choice-card"><input type="radio" name="visibility" value="internal"><span><strong>Internal</strong><span class="small mute">Anyone signed in to this hub can see it.</span></span></label> |
| 29 |
<label class="choice-card"><input type="radio" name="visibility" value="private"><span><strong>Private</strong><span class="small mute">Only you{% if !orgs.is_empty() %}, the organisation's members{% endif %} and the people you add.</span></span></label> |
| 30 |
</div> |
| 31 |
</section> |
| 32 |
|
| 33 |
<section class="nr-sec"> |
| 34 |
<div class="nr-head"><h2>Starting files</h2><p class="small mute">Optional. Left empty, it starts empty and takes its first push. The hub commits these as you, signed with its key as your delegate.</p></div> |
| 35 |
<div class="nr-body"> |
| 36 |
<label class="nr-toggle"><input type="checkbox" name="readme" value="1"><span><strong>README</strong><span class="small mute">Its name and description, as README.md.</span></span></label> |
| 37 |
<div class="row nr-pair"> |
| 38 |
<div><label for="licence">Licence</label><select id="licence" name="licence"><option value="">none</option>{% for (id, what) in licences %}<option value="{{ id }}">{{ id }}: {{ what }}</option>{% endfor %}</select></div> |
| 39 |
<div><label for="ignore">.oxyignore</label><select id="ignore" name="ignore"><option value="">none</option>{% for l in ignores %}<option>{{ l }}</option>{% endfor %}</select></div> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
</section> |
| 43 |
|
| 44 |
<section class="nr-sec"> |
| 45 |
<div class="nr-head"><h2>Wiki</h2><p class="small mute">Pages beside the code, cloned as its <code>.wiki</code>.</p></div> |
| 46 |
<div class="nr-body"> |
| 47 |
<label class="nr-toggle"><input type="checkbox" name="wiki" value="1"><span><strong>Start the wiki</strong><span class="small mute">A Home page with its name and description, ready to edit. Left off, the first page anyone writes starts it.</span></span></label> |
| 48 |
</div> |
| 49 |
</section> |
| 50 |
|
| 51 |
<section class="nr-sec"> |
| 52 |
<div class="nr-head"><h2>Project board</h2><p class="small mute">Its issues and proposals join the board as they open.</p></div> |
| 53 |
<div class="nr-body"> |
| 54 |
<div class="nr-cards three" role="radiogroup" aria-label="Project board"> |
| 55 |
<label class="choice-card"><input type="radio" name="board" value="" checked data-board-none><span><strong>No board</strong><span class="small mute">Add its issues to a board later.</span></span></label> |
| 56 |
<label class="choice-card"><input type="radio" name="board" value="new" data-board-new><span><strong>A new board</strong><span class="small mute">Backlog, Doing and Done; finished work moves to Done.</span></span></label> |
| 57 |
{% if !boards.is_empty() %}<label class="choice-card"><input type="radio" name="board" value="existing" data-board-existing><span><strong>An existing board</strong><span class="small mute">One of the owner's open boards.</span></span></label>{% endif %} |
| 58 |
</div> |
| 59 |
<div class="board-title"><label for="board_title">Board title</label><input type="text" id="board_title" name="board_title" maxlength="100" placeholder="the repository's name"></div> |
| 60 |
{% if !boards.is_empty() %}<div class="board-existing"><label for="board_n">Board</label><select id="board_n" name="board_n" data-board-list>{% for (o, n, t) in boards %}<option value="{{ n }}" data-owner="{{ o }}">{{ o }} #{{ n }}: {{ t }}</option>{% endfor %}</select></div>{% endif %} |
| 61 |
</div> |
| 62 |
</section> |
| 63 |
|
| 64 |
<section class="nr-sec"> |
| 65 |
<div class="nr-head"><h2>OxygenFlow</h2><p class="small mute">Pipelines: once it is on, every push with a <code>.flow/pipeline.kdl</code> starts a run, and its jobs show as checks.</p></div> |
| 66 |
<div class="nr-body nr-cards three" role="radiogroup" aria-label="OxygenFlow"> |
| 67 |
<label class="choice-card"><input type="radio" name="flow" value="" checked><span><strong>Not yet</strong><span class="small mute">The site's default. Switch it on later in Settings › Pipelines.</span></span></label> |
| 68 |
<label class="choice-card{% if !admin %} off{% endif %}"><input type="radio" name="flow" value="on"{% if !admin %} disabled{% endif %}><span><strong>On, site runners</strong><span class="small mute">{% if admin %}The site's runners take its jobs.{% else %}A site administrator's choice.{% endif %}</span></span></label> |
| 69 |
<label class="choice-card" data-flow-own><input type="radio" name="flow" value="own"><span><strong>On, own runners</strong><span class="small mute" data-flow-own-note>Only the owner's own runners take its jobs.</span></span></label> |
| 70 |
</div> |
| 71 |
</section> |
| 72 |
|
| 73 |
<details class="nr-sec nr-storage"> |
| 74 |
<summary><h2>Storage</h2><span class="small mute">This server's disk, unless you keep it in your own bucket.</span></summary> |
| 75 |
<div class="nr-body"> |
| 76 |
<div class="nr-cards two"> |
| 77 |
<label class="choice-card"><input type="radio" name="storage" value="hub" checked><span><strong>This server's disk</strong><span class="small mute">The default. Backed up with the hub.</span></span></label> |
| 78 |
<label class="choice-card"><input type="radio" name="storage" value="bucket"><span><strong>My own bucket</strong><span class="small mute">Amazon S3, Google Cloud Storage or Azure; this server keeps a cache. It starts empty.</span></span></label> |
| 79 |
</div> |
| 80 |
<fieldset class="storage-bucket"> |
| 81 |
<legend>Your bucket <small class="mute">(only when kept in your own bucket)</small></legend> |
| 82 |
<p class="small mute">The repository's data lives in the bucket and this server keeps a cache. The bucket, or the prefix in it, must be empty. It is checked before anything is created. The credentials are sealed on this server and used only for this repository; give them read, write, list and delete under the prefix and nothing more.</p> |
| 83 |
<label for="store_url">Store URL</label><input type="text" id="store_url" name="store_url" placeholder="s3://my-bucket/repos/name?region=eu-west-2, gs://my-bucket/name, az://account/container/name" autocomplete="off"> |
| 84 |
<p class="small mute">Amazon S3: an access key.</p> |
| 85 |
<div class="row"> |
| 86 |
<div><label for="access_key_id">Access key ID</label><input type="text" id="access_key_id" name="access_key_id" autocomplete="off"></div> |
| 87 |
<div><label for="secret_access_key">Secret access key</label><input type="password" id="secret_access_key" name="secret_access_key" autocomplete="new-password"></div> |
| 88 |
</div> |
| 89 |
<p class="small mute">Google Cloud Storage: a service account key, the JSON file Google gives you.</p> |
| 90 |
<label for="service_account_key">Service account key</label><textarea id="service_account_key" name="service_account_key" rows="3" autocomplete="off" spellcheck="false"></textarea> |
| 91 |
<p class="small mute">Azure: a service principal with a role on the container.</p> |
| 92 |
<div class="row"> |
| 93 |
<div><label for="tenant_id">Tenant ID</label><input type="text" id="tenant_id" name="tenant_id" autocomplete="off"></div> |
| 94 |
<div><label for="client_id">Client ID</label><input type="text" id="client_id" name="client_id" autocomplete="off"></div> |
| 95 |
<div><label for="client_secret">Client secret</label><input type="password" id="client_secret" name="client_secret" autocomplete="new-password"></div> |
| 96 |
</div> |
| 97 |
</fieldset> |
| 98 |
</div> |
| 99 |
</details> |
| 100 |
|
| 101 |
<div class="nr-foot"><button type="submit">CREATE REPOSITORY</button></div> |
| 102 |
</form> |
| 103 |
{% endblock %} |