| 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 new-repo" method="post" action="/new" data-new-repo> |
| 7 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 8 |
<div class="row name-row"> |
| 9 |
<div><label for="owner">Owner</label><select id="owner" name="owner" data-orgs="{% for o in orgs %}{{ o }} {% endfor %}">{% for o in owners %}<option value="{{ o }}">{{ o }}</option>{% endfor %}</select></div> |
| 10 |
<div class="slash" aria-hidden="true">/</div> |
| 11 |
<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> |
| 12 |
</div> |
| 13 |
<p id="name-check" class="small name-check" role="status" aria-live="polite" data-base="{{ base_url }}"></p> |
| 14 |
<label for="description">Description <span class="small mute">(optional)</span></label><input type="text" id="description" name="description"> |
| 15 |
|
| 16 |
<fieldset class="choices"> |
| 17 |
<legend>Visibility</legend> |
| 18 |
<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> |
| 19 |
<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> |
| 20 |
<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> |
| 21 |
</fieldset> |
| 22 |
|
| 23 |
<fieldset class="choices"> |
| 24 |
<legend>Start with <span class="small mute">(optional; left empty, it starts empty and takes its first push)</span></legend> |
| 25 |
<label class="check"><input type="checkbox" name="readme" value="1"> a README with its name and description</label> |
| 26 |
<div class="row"> |
| 27 |
<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> |
| 28 |
<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> |
| 29 |
</div> |
| 30 |
<p class="small mute">The hub commits these as you, signed with its key as your delegate, as it does for edits on the site.</p> |
| 31 |
</fieldset> |
| 32 |
|
| 33 |
<fieldset class="choices"> |
| 34 |
<legend>Project board</legend> |
| 35 |
<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> |
| 36 |
<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, with finished work moving to Done. Its issues and proposals join the board as they open.</span></span></label> |
| 37 |
<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> |
| 38 |
{% 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">Its issues and proposals join it as they open.</span></span></label> |
| 39 |
<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 %} |
| 40 |
</fieldset> |
| 41 |
|
| 42 |
<details class="storage"><summary>Storage <span class="small mute">(this server's disk, unless you keep it in your own bucket)</span></summary> |
| 43 |
<label>Storage</label> |
| 44 |
<div class="choice"> |
| 45 |
<label><input type="radio" name="storage" value="hub" checked> this server's disk</label> |
| 46 |
<label><input type="radio" name="storage" value="bucket"> my own bucket (Amazon S3, Google Cloud Storage or Azure)</label> |
| 47 |
</div> |
| 48 |
<fieldset class="storage-bucket"> |
| 49 |
<legend>Your bucket <small class="mute">(only when kept in your own bucket)</small></legend> |
| 50 |
<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> |
| 51 |
<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"> |
| 52 |
<p class="small mute">Amazon S3: an access key.</p> |
| 53 |
<div class="row"> |
| 54 |
<div><label for="access_key_id">Access key ID</label><input type="text" id="access_key_id" name="access_key_id" autocomplete="off"></div> |
| 55 |
<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> |
| 56 |
</div> |
| 57 |
<p class="small mute">Google Cloud Storage: a service account key, the JSON file Google gives you.</p> |
| 58 |
<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> |
| 59 |
<p class="small mute">Azure: a service principal with a role on the container.</p> |
| 60 |
<div class="row"> |
| 61 |
<div><label for="tenant_id">Tenant ID</label><input type="text" id="tenant_id" name="tenant_id" autocomplete="off"></div> |
| 62 |
<div><label for="client_id">Client ID</label><input type="text" id="client_id" name="client_id" autocomplete="off"></div> |
| 63 |
<div><label for="client_secret">Client secret</label><input type="password" id="client_secret" name="client_secret" autocomplete="new-password"></div> |
| 64 |
</div> |
| 65 |
</fieldset> |
| 66 |
</details> |
| 67 |
<button type="submit">CREATE REPOSITORY</button> |
| 68 |
</form> |
| 69 |
{% endblock %} |