From 3459de36f35839e98e894ae3b58c4f4374d90913 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Wed, 31 Aug 2022 17:45:20 +0200 Subject: Add Servers section In Servers section/view, users can add or delete ogServers from ogCP configuration file. Replaces Repositories views and recycle some of its code. --- ogcp/forms/action_forms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ogcp/forms') diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index dcf4965..d1789a7 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -194,11 +194,15 @@ class ImageDetailsForm(FlaskForm): permissions = StringField(label=_l('Permissions')) software_id = StringField(label=_l('Software id')) -class RepositoryForm(FlaskForm): +class ServerForm(FlaskForm): name = StringField(label=_l('Name'), validators=[InputRequired()]) ip = StringField(label=_l('IP'), validators=[InputRequired()]) + port = StringField(label=_l('Port'), + validators=[InputRequired()]) + api_token = StringField(label=_l('API token'), + validators=[InputRequired()]) submit = SubmitField(label=_l('Submit')) class DeleteRepositoryForm(FlaskForm): -- cgit v1.2.3-18-g5258