OXYGENHUB
# 69e4f27c5633 oxygenhub / templates / repo_new.html
3.4 KiB · HTML · last changed A repository can live in its owner's bucket 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}New repository{% endblock %}
3
{% block content %}
4
<div class="head"><h1>New repository <small>empty until the first push, which it takes its identity from</small></h1></div>
5
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
6
<form class="card" method="post" action="/new">
7
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
8
  <div class="row">
9
    <div><label for="owner">Owner</label><select id="owner" name="owner">{% for o in owners %}<option value="{{ o }}">{{ o }}</option>{% endfor %}</select></div>
10
    <div><label for="name">Name</label><input type="text" id="name" name="name" required pattern="[A-Za-z0-9][A-Za-z0-9._-]{0,63}"></div>
11
  </div>
12
  <label for="description">Description</label><input type="text" id="description" name="description">
13
  <label>Visibility</label>
14
  <div class="choice">
15
    <label><input type="radio" name="visibility" value="public" checked> public</label>
16
    <label><input type="radio" name="visibility" value="internal"> internal (anyone signed in)</label>
17
    <label><input type="radio" name="visibility" value="private"> private</label>
18
  </div>
19
  <label>Storage</label>
20
  <div class="choice">
21
    <label><input type="radio" name="storage" value="hub" checked> this server's disk</label>
22
    <label><input type="radio" name="storage" value="bucket"> my own bucket (Amazon S3, Google Cloud Storage or Azure)</label>
23
  </div>
24
  <fieldset class="storage-bucket">
25
    <legend>Your bucket <small class="mute">(only when kept in your own bucket)</small></legend>
26
    <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>
27
    <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">
28
    <p class="small mute">Amazon S3: an access key.</p>
29
    <div class="row">
30
      <div><label for="access_key_id">Access key ID</label><input type="text" id="access_key_id" name="access_key_id" autocomplete="off"></div>
31
      <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>
32
    </div>
33
    <p class="small mute">Google Cloud Storage: a service account key, the JSON file Google gives you.</p>
34
    <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>
35
    <p class="small mute">Azure: a service principal with a role on the container.</p>
36
    <div class="row">
37
      <div><label for="tenant_id">Tenant ID</label><input type="text" id="tenant_id" name="tenant_id" autocomplete="off"></div>
38
      <div><label for="client_id">Client ID</label><input type="text" id="client_id" name="client_id" autocomplete="off"></div>
39
      <div><label for="client_secret">Client secret</label><input type="password" id="client_secret" name="client_secret" autocomplete="new-password"></div>
40
    </div>
41
  </fieldset>
42
  <button type="submit">CREATE</button>
43
</form>
44
{% endblock %}