Commit d9392f3f authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Merge branch 'ui-fixes-entrypoint' into 'django'

fill webapp.entrypoint with a default value and let the user change it

See merge request !133
parents 4ae31dca 92dc6b68
Pipeline #40739 failed with stage
in 1 minute and 3 seconds
......@@ -79,7 +79,7 @@ class UserWebappForm(forms.ModelForm):
class Meta:
model = Webapp
fields = ('name', 'description', 'contact', 'notebook_gitrepo',
'private', 'owner', 'docker_os', 'tags')
'private', 'owner', 'docker_os', 'tags', 'entrypoint')
class HomeSignupForm(SignupForm):
......@@ -180,6 +180,8 @@ class WebappForm(forms.ModelForm):
initial=1,
label='Default queue type',
label_suffix='')
entrypoint = forms.CharField(label="Entrypoint", label_suffix="",
initial="/home/allgo/entrypoint")
def __init__(self, *args, **kwargs):
super(WebappForm, self).__init__(*args, **kwargs)
......@@ -198,7 +200,7 @@ class WebappForm(forms.ModelForm):
class Meta:
model = Webapp
fields = ('name', 'description', 'logo_file_name', 'contact', 'entrypoint', 'job_queue', 'private', 'docker_os')
fields = ('name', 'description', 'logo_file_name', 'contact', 'entrypoint', 'job_queue', 'private', 'docker_os', 'entrypoint')
class WebappSandboxForm(forms.ModelForm):
......
......@@ -99,8 +99,15 @@
{% endfor %}
</select>
</div>
</div>
<div class="form-group col-md-6">
{{ form.entrypoint.label_tag }}
<div class="input-group">
{{ form.entrypoint | add_class:"form-control" }}
</div>
</div>
</div>
</div>
<input class="btn btn-primary float-right" type="submit" value="Create webapp">
......
......@@ -46,6 +46,13 @@
{{ form.description | attr:"placeholder:Enter the description of your app here" | add_class:"form-control" }}
</div>
<div class="form-group">
{{ form.entrypoint.label_tag }}
<div class="input-group">
{{ form.entrypoint | add_class:"form-control" }}
</div>
</div>
<div class="form-group">
{{ form.docker_os.label_tag }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment