Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛fix: project path lenght #186

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions sld-api-backend/src/deploy/infrastructure/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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"),)
2 changes: 1 addition & 1 deletion sld-dashboard/app/base/static/assets/css/volt.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}

Expand Down
4 changes: 2 additions & 2 deletions sld-dashboard/app/home/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
12 changes: 6 additions & 6 deletions sld-dashboard/app/home/routes.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion sld-dashboard/app/home/templates/deploys-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ <h5 class="modal-title" id="DeleteModalLongTitle-{{deploy.id}}">Delete Deploy
if (line.startsWith('+')) return 'plus';
if (line.startsWith('-')) return 'minus';
if (line.startsWith('~')) return 'tilde';
return 'others';
return 'other';
}

// Asignar el evento click a los botones para abrir el modal
Expand Down
Loading