diff --git a/sld-api-backend/src/deploy/infrastructure/models.py b/sld-api-backend/src/deploy/infrastructure/models.py index 8a542e19..36c61520 100644 --- a/sld-api-backend/src/deploy/infrastructure/models.py +++ b/sld-api-backend/src/deploy/infrastructure/models.py @@ -20,7 +20,6 @@ class Deploy(Base): action = Column(String(100)) start_time = Column(String(100)) destroy_time = Column(String(100)) - # stack_name = Column(String(100), ForeignKey("stacks.stack_name", ondelete='CASCADE')) stack_name = Column(String(100), ForeignKey("stacks.stack_name")) stack_branch = Column(String(100)) created_at = Column(DateTime, default=datetime.datetime.now()) @@ -31,5 +30,5 @@ class Deploy(Base): variables = Column(JSON) environment = Column(String(50)) tfvar_file = Column(String(50)) - project_path = Column(String(50)) + project_path = Column(String(500)) __table_args__ = (UniqueConstraint("squad", "environment", "name", "stack_name"),) diff --git a/sld-dashboard/app/base/static/assets/css/volt.css b/sld-dashboard/app/base/static/assets/css/volt.css index 36468552..16a9e039 100644 --- a/sld-dashboard/app/base/static/assets/css/volt.css +++ b/sld-dashboard/app/base/static/assets/css/volt.css @@ -41759,7 +41759,7 @@ pre { font-weight: normal; /* Peso de la fuente, ajusta según necesidad */ display: inline-block; /* Para asegurar que el estilo se aplique correctamente */ margin: 2px; /* Un pequeño margen alrededor del tag */ - width: 100px; /* Ancho fijo para el tag */ + width: auto; text-align: center; /* Centrar el texto dentro del tag */ } diff --git a/sld-dashboard/app/home/forms.py b/sld-dashboard/app/home/forms.py index 95c1ad01..f69cc0e0 100644 --- a/sld-dashboard/app/home/forms.py +++ b/sld-dashboard/app/home/forms.py @@ -47,7 +47,7 @@ class StackForm(FlaskForm): project_path = StringField( "Project_path", [ - validators.length(min=1, max=20, message="Folder path when use monorepo"), + validators.length(min=1, max=500, message="Folder path when use monorepo"), ], ) description = StringField( @@ -120,7 +120,7 @@ class DeployForm(FlaskForm): project_path = StringField( "project_path", [ - validators.length(min=2, max=30, message="Project path name."), + validators.length(min=2, max=500, message="Project path name."), ], ) environment = StringField( diff --git a/sld-dashboard/app/home/routes.py b/sld-dashboard/app/home/routes.py index 289f192d..7027c36f 100644 --- a/sld-dashboard/app/home/routes.py +++ b/sld-dashboard/app/home/routes.py @@ -1,8 +1,8 @@ # -*- encoding: utf-8 -*- - import ast import json import time +import logging from flask import jsonify, render_template, request, url_for, redirect, flash @@ -78,14 +78,14 @@ def output(task_id): uri=f"tasks/id/{task_id}", headers={"Authorization": f"Bearer {token}"} ) + if response.get("status_code") == 200: data = response.get("json").get("result").get("module").get("stdout") + if not isinstance(data, list): + data = [data] return data - except TemplateNotFound: - return render_template("page-404.html"), 404 - except TypeError: - return redirect(url_for("base_blueprint.logout")) - except Exception: + except Exception as err: + logging.error(err) return render_template("page-500.html"), 500 diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html index 8fecd188..a97ace17 100644 --- a/sld-dashboard/app/home/templates/deploys-list.html +++ b/sld-dashboard/app/home/templates/deploys-list.html @@ -420,7 +420,7 @@