diff --git a/app/models.py b/app/models.py index 8f6746b..5dae440 100644 --- a/app/models.py +++ b/app/models.py @@ -22,7 +22,7 @@ import onetimepass class Permission: DEPLOY = 0x01 - ADMINISTER = 0x80 + ADMINISTER = 0xff class Role(db.Model): __tablename__ = 'roles' @@ -36,7 +36,7 @@ class Role(db.Model): def insert_roles(): roles = { 'User': (Permission.DEPLOY, True), - 'Administrator': (0xff, False) + 'Administrator': (Permission.ADMINISTER, False) } for r in roles: role = Role.query.filter_by(name=r).first() diff --git a/app/panel/forms.py b/app/panel/forms.py index bb2ce7a..ee4d8b0 100644 --- a/app/panel/forms.py +++ b/app/panel/forms.py @@ -13,10 +13,10 @@ class OrderForm(FlaskForm): vmtype = SelectField('Type:', choices=vmtype_choices, coerce=int) cpu = DecimalRangeField('Processor Cores', default=2) - memory = DecimalRangeField('Memory', default=512) - storage = DecimalRangeField('Storage', default=10) + memory = DecimalRangeField('Memory', default=2048) + storage = DecimalRangeField('Storage', default=20) - alias = StringField('Machine Alias:', [validators.Regexp(message='ex.: myservice1.com, myservice2.local', regex='^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$'), validators.Length(6,64)]) + alias = StringField('Name:', [validators.Regexp(message='ex.: myservice1.com, myservice2.local', regex='^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$'), validators.Length(6,64)]) submit = SubmitField('DEPLOY') diff --git a/app/static/images/panel/icons8-administrative-tools-100.png b/app/static/images/panel/icons8-administrative-tools-100.png new file mode 100644 index 0000000..7c9d285 Binary files /dev/null and b/app/static/images/panel/icons8-administrative-tools-100.png differ diff --git a/app/static/images/panel/icons8-processor-40.png b/app/static/images/panel/icons8-processor-40.png new file mode 100644 index 0000000..edc8b03 Binary files /dev/null and b/app/static/images/panel/icons8-processor-40.png differ diff --git a/app/templates/nav.html b/app/templates/nav.html index ca13908..6c2caff 100644 --- a/app/templates/nav.html +++ b/app/templates/nav.html @@ -24,7 +24,8 @@ {% endif %} {% if current_user.is_authenticated %} - {% endif %} - -
  • Live Chat
  • @@ -49,10 +48,12 @@ diff --git a/app/templates/panel/deploy.html b/app/templates/panel/deploy.html index 917ac77..3cf81e2 100644 --- a/app/templates/panel/deploy.html +++ b/app/templates/panel/deploy.html @@ -1,11 +1,15 @@ {% extends "base.html" %} -{% block title %}Deploy New Instance{% endblock %} +{% block title %}Deploy a server{% endblock %} {% block scripts %} {{ super() }}