Trim down messages, UX comes later
This commit is contained in:
parent
44b0658a31
commit
39fbc58420
68
second.py
68
second.py
@ -60,7 +60,7 @@ def stack_deploy(app_name, env):
|
||||
|
||||
|
||||
def get_loaded_env(app_name, request_form):
|
||||
"""Load an environment with install form values for compose.yml injection."""
|
||||
"""Load environment from install form for compose.yml injection."""
|
||||
environment = environ.copy()
|
||||
for key in request_form.keys():
|
||||
environment[key.upper()] = request.form[key]
|
||||
@ -71,80 +71,26 @@ class GiteaInstallForm(FlaskForm):
|
||||
"""Gitea installation form."""
|
||||
|
||||
app_name = StringField("Application name", default="Git with a cup of tea")
|
||||
domain = StringField(
|
||||
# TODO(decentral1se): missing domain name validator
|
||||
"Domain name",
|
||||
validators=[DataRequired("Please enter a domain name")],
|
||||
)
|
||||
domain = StringField("Domain name", validators=[DataRequired()],)
|
||||
|
||||
db_host = StringField("Database host", default="mariadb:3306")
|
||||
db_name = StringField("Database name", default="gitea")
|
||||
db_passwd = PasswordField(
|
||||
"Database password",
|
||||
validators=[
|
||||
DataRequired(),
|
||||
Length(
|
||||
min=32,
|
||||
message=(
|
||||
"Your chosen password length is too short, "
|
||||
"must be at least 32 characters long"
|
||||
),
|
||||
),
|
||||
],
|
||||
"Database password", validators=[DataRequired(), Length(min=32)],
|
||||
)
|
||||
db_root_passwd = PasswordField(
|
||||
"Database root password",
|
||||
validators=[
|
||||
DataRequired(),
|
||||
Length(
|
||||
min=32,
|
||||
message=(
|
||||
"Your chosen password length is too short, "
|
||||
"it must be at least 32 characters long"
|
||||
),
|
||||
),
|
||||
],
|
||||
"Database root password", validators=[DataRequired(), Length(min=32)],
|
||||
)
|
||||
db_type = StringField("Database type", default="mysql")
|
||||
db_user = StringField("Database user", default="mysql")
|
||||
internal_token = PasswordField(
|
||||
"Internal secret token",
|
||||
validators=[
|
||||
DataRequired(),
|
||||
Length(
|
||||
min=105,
|
||||
message=(
|
||||
"Your chosen token length is too short, "
|
||||
"it must be at least 105 characters long"
|
||||
),
|
||||
),
|
||||
],
|
||||
"Internal secret token", validators=[DataRequired(), Length(min=105)],
|
||||
)
|
||||
jwt_secret = PasswordField(
|
||||
"JWT secret",
|
||||
validators=[
|
||||
DataRequired(),
|
||||
Length(
|
||||
min=43,
|
||||
message=(
|
||||
"Your chosen password length is too short, "
|
||||
"it must be at least 32 characters long"
|
||||
),
|
||||
),
|
||||
],
|
||||
"JWT secret", validators=[DataRequired(), Length(min=43)],
|
||||
)
|
||||
secret_key = PasswordField(
|
||||
"Secret key",
|
||||
validators=[
|
||||
DataRequired(),
|
||||
Length(
|
||||
min=64,
|
||||
message=(
|
||||
"Your chosen password length is too short, "
|
||||
"it must be at least 64 characters long"
|
||||
),
|
||||
),
|
||||
],
|
||||
"Secret key", validators=[DataRequired(), Length(min=64),],
|
||||
)
|
||||
ssh_port = StringField("SSH port", default="2222")
|
||||
|
||||
|
Reference in New Issue
Block a user