From 312bbc7433c4ec09de1cd48b05f458751295f4e3 Mon Sep 17 00:00:00 2001
From: Diego La Falce <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Tue, 7 Nov 2023 18:40:41 +0100
Subject: [PATCH 01/18] =?UTF-8?q?=F0=9F=94=A7refactor:=20Migrate=20to=20py?=
=?UTF-8?q?thon=203.11?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sld-api-backend/.tool-versions | 1 +
sld-api-backend/config/api.py | 15 ++-
sld-api-backend/requirements.txt | 91 ++++++++++---------
.../src/users/application/validator.py | 2 +-
sld-api-backend/test/config/api.py | 3 +-
sld-dashboard/.tool-versions | 1 +
sld-dashboard/app/__init__.py | 12 +--
sld-dashboard/app/helpers/config/api.py | 2 +-
sld-dashboard/requirements.txt | 69 +++++++-------
sld-remote-state/.tool-versions | 1 +
sld-remote-state/configs/storage.py | 2 +-
sld-remote-state/requirements.txt | 70 +++++++-------
12 files changed, 142 insertions(+), 127 deletions(-)
create mode 100644 sld-api-backend/.tool-versions
create mode 100644 sld-dashboard/.tool-versions
create mode 100644 sld-remote-state/.tool-versions
diff --git a/sld-api-backend/.tool-versions b/sld-api-backend/.tool-versions
new file mode 100644
index 00000000..b4736d5d
--- /dev/null
+++ b/sld-api-backend/.tool-versions
@@ -0,0 +1 @@
+python 3.11.6
diff --git a/sld-api-backend/config/api.py b/sld-api-backend/config/api.py
index 93940aef..98a21dd8 100644
--- a/sld-api-backend/config/api.py
+++ b/sld-api-backend/config/api.py
@@ -1,8 +1,7 @@
import os
from typing import List
-from pydantic import BaseSettings
-
+from pydantic_settings import BaseSettings
class Settings(BaseSettings):
# Schedle config
@@ -23,7 +22,7 @@ class Settings(BaseSettings):
"SLD_SECRET_KEY",
"09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7",
)
- ALGORITHM = "HS256"
+ ALGORITHM: str = "HS256"
# 60 minutes * 24 hours * 8 days = 8 days
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 8
SECRET_VAULT: bytes = os.getenv(
@@ -36,11 +35,11 @@ class Settings(BaseSettings):
WORKER_TMOUT: int = os.getenv("SLD_WORKER_TMOUT", 300)
ENV: str = os.getenv("SLD_ENV", "dev")
DEBUG: bool = os.getenv("SLD_DEBUG", False)
- BACKEND_USER = os.getenv("BACKEND_USER", "")
- BACKEND_PASSWD = os.getenv("BACKEND_PASSWD", "")
- BACKEND_SERVER = os.getenv("BACKEND_SERVER", "redis")
+ BACKEND_USER: str = os.getenv("BACKEND_USER", "")
+ BACKEND_PASSWD: str = os.getenv("BACKEND_PASSWD", "")
+ BACKEND_SERVER: str = os.getenv("BACKEND_SERVER", "redis")
# init user
- INIT_USER = {
+ INIT_USER: dict = {
"username": os.getenv("SLD_INIT_USER_NAME", "admin"),
"fullname": os.getenv("SLD_INIT_USER_FULLNAME", "Master of the universe user"),
"email": os.getenv("SLD_INIT_USER_email", "admin@example.com"),
@@ -50,7 +49,7 @@ class Settings(BaseSettings):
AWS_SHARED_CONFIG_FILE: str = f"{AWS_CONGIG_DEFAULT_FOLDER}/config"
TASK_MAX_RETRY: int = os.getenv("SLD_TASK_MAX_RETRY", 1)
TASK_RETRY_INTERVAL: int = os.getenv("SLD_TASK_RETRY_INTERVAL", 20)
- TASK_LOCKED_EXPIRED = os.getenv("SLD_TASK_LOCKED_EXPIRED", 300)
+ TASK_LOCKED_EXPIRED: int = os.getenv("SLD_TASK_LOCKED_EXPIRED", 300)
TASK_ROUTE: bool = os.getenv("SLD_TASK_ROUTE", False)
TERRAFORM_BIN_REPO: str = os.getenv(
"SLD_TERRAFORM_BIN_REPO", "https://releases.hashicorp.com/terraform"
diff --git a/sld-api-backend/requirements.txt b/sld-api-backend/requirements.txt
index 6764324f..248c120c 100644
--- a/sld-api-backend/requirements.txt
+++ b/sld-api-backend/requirements.txt
@@ -1,68 +1,73 @@
aioredis==2.0.1
amqp==5.1.1
-anyio==3.6.2
-async-timeout==4.0.2
-attrs==22.2.0
+annotated-types==0.6.0
+anyio==3.7.1
+async-timeout==4.0.3
+attrs==23.1.0
bcrypt==4.0.1
-billiard==3.6.4.0
-celery==5.2.7
-certifi==2022.12.7
-cffi==1.15.1
-charset-normalizer==3.0.1
-click==8.1.3
+billiard==4.1.0
+celery==5.3.4
+certifi==2023.7.22
+cffi==1.16.0
+charset-normalizer==3.3.0
+click==8.1.7
click-didyoumean==0.3.0
click-plugins==1.1.1
-click-repl==0.2.0
-croniter==1.3.8
-cryptography==39.0.1
+click-repl==0.3.0
+croniter==2.0.1
+cryptography==41.0.4
dependency-injector==4.41.0
-Deprecated==1.2.13
-dnspython==2.3.0
+Deprecated==1.2.14
+dnspython==2.4.2
ecdsa==0.18.0
-email-validator==1.3.1
-exceptiongroup==1.1.0
-fastapi==0.91.0
+email-validator==2.0.0.post2
+exceptiongroup==1.1.3
+fastapi==0.104.1
fastapi-limiter==0.1.5
fastapi-versioning==0.10.0
-greenlet==2.0.2
+greenlet==3.0.0
h11==0.14.0
idna==3.4
iniconfig==2.0.0
Jinja2==3.1.2
jmespath==1.0.1
-kombu==5.2.4
-MarkupSafe==2.1.2
-mysqlclient==2.1.1
-packaging==23.0
+kombu==5.3.2
+MarkupSafe==2.1.3
+mysqlclient==2.2.0
+packaging==23.2
passlib==1.7.4
password-strength==0.0.3.post2
-pluggy==1.0.0
-prompt-toolkit==3.0.36
+pluggy==1.3.0
+prompt-toolkit==3.0.39
py==1.11.0
-pyasn1==0.4.8
+pyasn1==0.5.0
pycparser==2.21
-pydantic==1.10.4
-pyhcl==0.4.4
-PyJWT==2.6.0
-PyMySQL==1.0.2
-pyparsing==3.0.9
-pytest==7.2.1
+pydantic==2.4.2
+pydantic-settings==2.0.3
+pydantic_core==2.10.1
+pyhcl==0.4.5
+PyJWT==2.8.0
+PyMySQL==1.1.0
+pyparsing==3.1.1
+pytest==7.4.2
python-dateutil==2.8.2
+python-dotenv==1.0.0
python-jose==3.3.0
-python-multipart==0.0.5
-python-usernames==0.3.1
-pytz==2022.7.1
-redis==4.5.1
-requests==2.28.2
+python-multipart==0.0.6
+python-usernames==1.0.0
+pytz==2023.3.post1
+redis==4.6.0
+requests==2.31.0
rsa==4.9
six==1.16.0
sniffio==1.3.0
-SQLAlchemy==2.0.3
-starlette==0.24.0
+SQLAlchemy==2.0.22
+starlette==0.27.0
tomli==2.0.1
-typing_extensions==4.4.0
-urllib3==1.26.14
-uvicorn==0.20.0
+typing_extensions==4.8.0
+tzdata==2023.3
+urllib3==2.0.7
+uvicorn==0.23.2
vine==5.0.0
-wcwidth==0.2.6
-wrapt==1.14.1
+wcwidth==0.2.8
+wrapt==1.15.0
diff --git a/sld-api-backend/src/users/application/validator.py b/sld-api-backend/src/users/application/validator.py
index 3d667a95..db94823e 100644
--- a/sld-api-backend/src/users/application/validator.py
+++ b/sld-api-backend/src/users/application/validator.py
@@ -2,7 +2,7 @@
from dependency_injector import containers, providers
from password_strength import PasswordPolicy
-from usernames import is_safe_username
+from python_usernames import is_safe_username
class PasswordValidator:
diff --git a/sld-api-backend/test/config/api.py b/sld-api-backend/test/config/api.py
index a4c5d69a..2afa5d74 100644
--- a/sld-api-backend/test/config/api.py
+++ b/sld-api-backend/test/config/api.py
@@ -1,7 +1,6 @@
import os
-from pydantic import BaseSettings
-
+from pydantic_settings import BaseSettings
class Settings(BaseSettings):
SERVER: str = "http://localhost"
diff --git a/sld-dashboard/.tool-versions b/sld-dashboard/.tool-versions
new file mode 100644
index 00000000..b4736d5d
--- /dev/null
+++ b/sld-dashboard/.tool-versions
@@ -0,0 +1 @@
+python 3.11.6
diff --git a/sld-dashboard/app/__init__.py b/sld-dashboard/app/__init__.py
index 1a17e638..2611d2c4 100644
--- a/sld-dashboard/app/__init__.py
+++ b/sld-dashboard/app/__init__.py
@@ -23,12 +23,12 @@ def register_blueprints(app):
def configure_database(app):
- @app.before_first_request
- def initialize_database():
- try:
- pass
- except Exception as err:
- pass
+ with app.app_context():
+ def initialize_database():
+ try:
+ pass
+ except Exception as err:
+ pass
@app.teardown_request
def shutdown_session(exception=None):
diff --git a/sld-dashboard/app/helpers/config/api.py b/sld-dashboard/app/helpers/config/api.py
index 2ab9c7eb..f94538e2 100644
--- a/sld-dashboard/app/helpers/config/api.py
+++ b/sld-dashboard/app/helpers/config/api.py
@@ -1,6 +1,6 @@
import os
-from pydantic import BaseSettings
+from pydantic_settings import BaseSettings
class Settings(BaseSettings):
diff --git a/sld-dashboard/requirements.txt b/sld-dashboard/requirements.txt
index 457496ab..c9b87de5 100644
--- a/sld-dashboard/requirements.txt
+++ b/sld-dashboard/requirements.txt
@@ -1,45 +1,50 @@
-alembic==1.8.1
-async-timeout==4.0.2
+alembic==1.12.0
+annotated-types==0.6.0
+async-timeout==4.0.3
bcrypt==4.0.1
-certifi==2022.12.7
-cffi==1.15.1
-chardet==5.1.0
-charset-normalizer==2.1.1
-click==8.1.3
-cryptography==39.0.1
-Deprecated==1.2.13
-dnspython==2.2.1
-email-validator==1.3.0
+blinker==1.6.3
+certifi==2023.7.22
+cffi==1.16.0
+chardet==5.2.0
+charset-normalizer==3.3.0
+click==8.1.7
+cryptography==41.0.4
+Deprecated==1.2.14
+dnspython==2.4.2
+email-validator==2.0.0.post2
fernet==1.0.1
-Flask==2.2.2
+Flask==2.3.3
Flask-Login==0.6.2
-Flask-Migrate==4.0.0
-Flask-MySQLdb==1.0.1
-Flask-SQLAlchemy==3.0.2
-Flask-WTF==1.0.1
-greenlet==2.0.1
-gunicorn==20.1.0
+Flask-Migrate==4.0.5
+Flask-MySQLdb==2.0.0
+Flask-SQLAlchemy==3.1.1
+Flask-WTF==1.2.1
+greenlet==3.0.0
+gunicorn==21.2.0
idna==3.4
itsdangerous==2.1.2
Jinja2==3.1.2
Mako==1.2.4
-MarkupSafe==2.1.1
-mysqlclient==2.1.1
-packaging==21.3
+MarkupSafe==2.1.3
+mysqlclient==2.2.0
+packaging==23.2
passlib==1.7.4
pyaes==1.6.1
pycparser==2.21
-pydantic==1.10.2
-pyparsing==3.0.9
+pydantic==2.4.2
+pydantic-settings==2.0.3
+pydantic_core==2.10.1
+pyparsing==3.1.1
python-dateutil==2.8.2
-python-decouple==3.6
+python-decouple==3.8
+python-dotenv==1.0.0
python-editor==1.0.4
-redis==4.3.5
-requests==2.28.1
+redis==5.0.1
+requests==2.31.0
six==1.16.0
-SQLAlchemy==1.4.44
-typing_extensions==4.4.0
-urllib3==1.26.13
-Werkzeug==2.2.2
-wrapt==1.14.1
-WTForms==3.0.1
+SQLAlchemy==2.0.22
+typing_extensions==4.8.0
+urllib3==2.0.7
+Werkzeug==2.3.7
+wrapt==1.15.0
+WTForms==3.1.0
diff --git a/sld-remote-state/.tool-versions b/sld-remote-state/.tool-versions
new file mode 100644
index 00000000..b4736d5d
--- /dev/null
+++ b/sld-remote-state/.tool-versions
@@ -0,0 +1 @@
+python 3.11.6
diff --git a/sld-remote-state/configs/storage.py b/sld-remote-state/configs/storage.py
index 0b433d7c..0a63c598 100644
--- a/sld-remote-state/configs/storage.py
+++ b/sld-remote-state/configs/storage.py
@@ -1,6 +1,6 @@
import os
-from pydantic import BaseSettings
+from pydantic_settings import BaseSettings
class Settings(BaseSettings):
diff --git a/sld-remote-state/requirements.txt b/sld-remote-state/requirements.txt
index b7ddb4da..91015fb9 100644
--- a/sld-remote-state/requirements.txt
+++ b/sld-remote-state/requirements.txt
@@ -1,46 +1,50 @@
-anyio==3.6.2
-asgiref==3.5.2
-azure-core==1.26.1
-azure-storage-blob==12.14.1
-boto3==1.26.21
-botocore==1.29.21
-cachetools==5.2.0
-certifi==2022.12.7
-cffi==1.15.1
-charset-normalizer==2.1.1
-click==8.1.3
-cryptography==39.0.1
-dnspython==2.2.1
-fastapi==0.88.0
-google-api-core==2.11.0
-google-auth==2.15.0
-google-cloud-core==2.3.2
-google-cloud-storage==2.6.0
+annotated-types==0.6.0
+anyio==3.7.1
+asgiref==3.7.2
+azure-core==1.29.5
+azure-storage-blob==12.18.3
+boto3==1.28.79
+botocore==1.31.79
+cachetools==5.3.2
+certifi==2023.7.22
+cffi==1.16.0
+charset-normalizer==3.3.2
+click==8.1.7
+cryptography==41.0.5
+dnspython==2.4.2
+fastapi==0.104.1
+google-api-core==2.12.0
+google-auth==2.23.4
+google-cloud-core==2.3.3
+google-cloud-storage==2.13.0
google-crc32c==1.5.0
-google-resumable-media==2.4.0
-googleapis-common-protos==1.57.0
-greenlet==2.0.1
+google-resumable-media==2.6.0
+googleapis-common-protos==1.61.0
+greenlet==3.0.1
h11==0.14.0
idna==3.4
isodate==0.6.1
jmespath==1.0.1
msrest==0.7.1
oauthlib==3.2.2
-protobuf==4.21.10
-pyasn1==0.4.8
-pyasn1-modules==0.2.8
+protobuf==4.25.0
+pyasn1==0.5.0
+pyasn1-modules==0.3.0
pycparser==2.21
-pydantic==1.10.2
-pymongo==4.3.3
+pydantic==2.4.2
+pydantic-settings==2.0.3
+pydantic_core==2.10.1
+pymongo==4.6.0
python-dateutil==2.8.2
-requests==2.28.1
+python-dotenv==1.0.0
+requests==2.31.0
requests-oauthlib==1.3.1
rsa==4.9
-s3transfer==0.6.0
+s3transfer==0.7.0
six==1.16.0
sniffio==1.3.0
-SQLAlchemy==1.4.44
-starlette==0.22.0
-typing_extensions==4.4.0
-urllib3==1.26.13
-uvicorn==0.20.0
+SQLAlchemy==2.0.23
+starlette==0.27.0
+typing_extensions==4.8.0
+urllib3==2.0.7
+uvicorn==0.24.0.post1
From ce59ef50a2d39e406e421c69c5848638c990bbca Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Fri, 10 Nov 2023 22:23:08 +0100
Subject: [PATCH 02/18] =?UTF-8?q?=F0=9F=94=A7refactor:=20outputs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sld-api-backend/config/celery_config.py | 10 +++++-----
.../src/worker/providers/hashicorp/actions.py | 15 +++++++--------
.../src/worker/providers/hashicorp/templates.py | 2 +-
sld-dashboard/app/home/__init__.py | 2 +-
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/sld-api-backend/config/celery_config.py b/sld-api-backend/config/celery_config.py
index 9262dd41..be4392ae 100644
--- a/sld-api-backend/config/celery_config.py
+++ b/sld-api-backend/config/celery_config.py
@@ -4,13 +4,13 @@
celery_app = None
# Rabbit broker config
-BROKER_USER = os.getenv("BROKER_USER", "admin")
-BROKER_PASSWD = os.getenv("BROKER_PASSWD", "admin")
-BROKER_SERVER = os.getenv("BROKER_SERVER", "rabbit") # use rabbit or redis
+BROKER_USER = os.getenv("BROKER_USER", "")
+BROKER_PASSWD = os.getenv("BROKER_PASSWD", "")
+BROKER_SERVER = os.getenv("BROKER_SERVER", "redis") # use rabbit or redis
BROKER_SERVER_PORT = os.getenv(
- "BROKER_SERVER_PORT", "5672"
+ "BROKER_SERVER_PORT", "6379"
) # use por 6379 for redis or 5672 for RabbitMQ
-BROKER_TYPE = os.getenv("BROKER_TYPE", "amqp") # use amqp for RabbitMQ or redis
+BROKER_TYPE = os.getenv("BROKER_TYPE", "redis") # use amqp for RabbitMQ or redis
# Redus backend config
BACKEND_TYPE = os.getenv("BACKEND_TYPE", "redis")
BACKEND_USER = os.getenv("BACKEND_USER", "")
diff --git a/sld-api-backend/src/worker/providers/hashicorp/actions.py b/sld-api-backend/src/worker/providers/hashicorp/actions.py
index 8636df6c..1dc4ac94 100644
--- a/sld-api-backend/src/worker/providers/hashicorp/actions.py
+++ b/sld-api-backend/src/worker/providers/hashicorp/actions.py
@@ -80,7 +80,7 @@ def plan_execute(self) -> dict:
"tfvars_files": self.variables_file,
"remote_state": f"http://remote-state:8080/terraform_state/{deploy_state}",
"project_path": f"/tmp/{self.stack_name}/{self.environment}/{self.squad}/{self.name}/{self.project_path}",
- "stdout": [result.stderr.split("\n")],
+ "stdout": result.stderr.split("\n"),
}
return {
"command": "plan",
@@ -92,7 +92,7 @@ def plan_execute(self) -> dict:
"tfvars_files": self.variables_file,
"remote_state": f"http://remote-state:8080/terraform_state/{deploy_state}",
"project_path": f"/tmp/{self.stack_name}/{self.environment}/{self.squad}/{self.name}/{self.project_path}",
- "stdout": [result.stdout.split("\n")],
+ "stdout": result.stdout.split("\n"),
}
except Exception:
return {
@@ -105,7 +105,7 @@ def plan_execute(self) -> dict:
"tfvars_files": self.variables_file,
"remote_state": f"http://remote-state:8080/terraform_state/{deploy_state}",
"project_path": f"/tmp/{self.stack_name}/{self.environment}/{self.squad}/{self.name}/{self.project_path}",
- "stdout": [result.stderr.split("\n")],
+ "stdout": result.stderr.split("\n"),
}
def apply_execute(self) -> dict:
@@ -156,7 +156,7 @@ def apply_execute(self) -> dict:
"tfvars_files": self.variables_file,
"remote_state": f"http://remote-state:8080/terraform_state/{deploy_state}",
"self.project_path": f"/tmp/{self.stack_name}/{self.environment}/{self.squad}/{self.name}/{self.project_path}",
- "stdout": [result.stderr.split("\n")],
+ "stdout": result.stderr.split("\n"),
}
return {
"command": "apply",
@@ -168,7 +168,7 @@ def apply_execute(self) -> dict:
"tfvars_files": self.variables_file,
"self.project_path": f"/tmp/{self.stack_name}/{self.environment}/{self.squad}/{self.name}/{self.project_path}",
"remote_state": f"http://remote-state:8080/terraform_state/{deploy_state}",
- "stdout": [result.stdout.split("\n")],
+ "stdout": result.stdout.split("\n"),
}
except Exception:
return {
@@ -235,7 +235,7 @@ def destroy_execute(self) -> dict:
"tfvars_files": self.variables_file,
"remote_state": f"http://remote-state:8080/terraform_state/{deploy_state}",
"self.project_path": f"/tmp/{self.stack_name}/{self.environment}/{self.squad}/{self.name}/{self.project_path}",
- "stdout": [result.stderr.split("\n")],
+ "stdout": result.stderr.split("\n"),
}
return {
"command": "destroy",
@@ -247,7 +247,7 @@ def destroy_execute(self) -> dict:
"tfvars_files": self.variables_file,
"self.project_path": f"/tmp/{self.stack_name}/{self.environment}/{self.squad}/{self.name}/{self.project_path}",
"remote_state": f"http://remote-state:8080/terraform_state/{deploy_state}",
- "stdout": [result.stdout.split("\n")],
+ "stdout": result.stdout.split("\n"),
}
except Exception:
return {
@@ -260,7 +260,6 @@ def destroy_execute(self) -> dict:
"tfvars_files": self.variables_file,
"self.project_path": f"/tmp/{self.stack_name}/{self.environment}/{self.squad}/{self.name}/{self.project_path}",
"remote_state": f"http://remote-state:8080/terraform_state/{deploy_state}",
- # "stdout": [result.stderr.split("\n")],
"stdout": "ko",
}
diff --git a/sld-api-backend/src/worker/providers/hashicorp/templates.py b/sld-api-backend/src/worker/providers/hashicorp/templates.py
index ca261d4a..52c59e48 100644
--- a/sld-api-backend/src/worker/providers/hashicorp/templates.py
+++ b/sld-api-backend/src/worker/providers/hashicorp/templates.py
@@ -41,7 +41,7 @@ def save(self) -> dict:
tf_state.write(provider_backend)
return {"command": "tfserver", "rc": 0, "stdout": data}
except Exception as err:
- return {"command": "tfserver", "rc": 1, "stderr": err}
+ return {"command": "tfserver", "rc": 1, "stdout": str(err)}
@dataclass
diff --git a/sld-dashboard/app/home/__init__.py b/sld-dashboard/app/home/__init__.py
index ee3a0641..a3dcb7ec 100644
--- a/sld-dashboard/app/home/__init__.py
+++ b/sld-dashboard/app/home/__init__.py
@@ -58,7 +58,7 @@ def get_output(task_id, token):
return {"result": content.get("result").get("status"), "type": "str"}
if not isinstance(data, list):
return {"result": content.get("result").get("module").get("stdout")}
- return {"result": content.get("result").get("module").get("stdout")[0]}
+ return {"result": content.get("result").get("module").get("stdout")}
except Exception as err:
return {"result": response}
From f36e8f4547ea7ae80cd619b6aed424e49791a26c Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Fri, 10 Nov 2023 23:41:00 +0100
Subject: [PATCH 03/18] =?UTF-8?q?=F0=9F=94=A7refactor:=20outputs=20symbol?=
=?UTF-8?q?=20colors?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sld-dashboard/app/base/static/assets/css/volt.css | 9 +++++++++
.../app/home/templates/deploys-list.html | 15 ++++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/sld-dashboard/app/base/static/assets/css/volt.css b/sld-dashboard/app/base/static/assets/css/volt.css
index 739262a4..b5a8ac32 100644
--- a/sld-dashboard/app/base/static/assets/css/volt.css
+++ b/sld-dashboard/app/base/static/assets/css/volt.css
@@ -41710,3 +41710,12 @@ pre {
display: block;
word-wrap: break-word;
}
+
+.plus { color: #54C571; }
+.minus { color: #C34A2C; }
+.tilde { color: #5500FF; }
+
+.modal-black-background {
+ background-color: black;
+ color: white;
+}
diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html
index d9276a17..7d5866de 100644
--- a/sld-dashboard/app/home/templates/deploys-list.html
+++ b/sld-dashboard/app/home/templates/deploys-list.html
@@ -238,7 +238,7 @@
Unlock Deploy
-
+
-
+
{% set stdout = task_log(deploy.task_id, token).result %}
{% if stdout is iterable and (stdout is not string and stdout is not mapping) %}
{%for i in stdout %}
-
{{i}}
+ {% set stripped_line = i.strip() %}
+ {% if stripped_line.startswith('+') %}
+
{{ i }}
+ {% elif stripped_line.startswith('-') %}
+
{{ i }}
+ {% elif stripped_line.startswith('~') %}
+
{{ i }}
+ {% else %}
+
{{i}}
+ {% endif %}
{% endfor %}
{% else %}
{{stdout}}
From 4e9be667b9837eebebe1fc3d23421a4164e8c86a Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Fri, 10 Nov 2023 23:46:24 +0100
Subject: [PATCH 04/18] =?UTF-8?q?=F0=9F=94=A7refactor:=20outputs=20symbol?=
=?UTF-8?q?=20colors=20update=20in=20place?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sld-dashboard/app/base/static/assets/css/volt.css | 2 +-
sld-dashboard/app/home/templates/deploys-list.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sld-dashboard/app/base/static/assets/css/volt.css b/sld-dashboard/app/base/static/assets/css/volt.css
index b5a8ac32..b9e8c08d 100644
--- a/sld-dashboard/app/base/static/assets/css/volt.css
+++ b/sld-dashboard/app/base/static/assets/css/volt.css
@@ -41713,7 +41713,7 @@ pre {
.plus { color: #54C571; }
.minus { color: #C34A2C; }
-.tilde { color: #5500FF; }
+.tilde { color: #6698FF; }
.modal-black-background {
background-color: black;
diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html
index 7d5866de..040640c5 100644
--- a/sld-dashboard/app/home/templates/deploys-list.html
+++ b/sld-dashboard/app/home/templates/deploys-list.html
@@ -248,7 +248,7 @@
Output Deploy
×
-
+
{% set stdout = task_log(deploy.task_id, token).result %}
{% if stdout is iterable and (stdout is not string and stdout is not mapping) %}
{%for i in stdout %}
From f5271042037b53f4d2634055940c65e11c597e1f Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Sat, 11 Nov 2023 00:28:28 +0100
Subject: [PATCH 05/18] =?UTF-8?q?=F0=9F=94=A7refactor:=20deploy=20set=20pa?=
=?UTF-8?q?gination=20and=20search?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/home/templates/deploys-list.html | 94 ++++++++++++++++---
1 file changed, 83 insertions(+), 11 deletions(-)
diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html
index 040640c5..eeac0c9c 100644
--- a/sld-dashboard/app/home/templates/deploys-list.html
+++ b/sld-dashboard/app/home/templates/deploys-list.html
@@ -74,10 +74,10 @@
All Deploys
All
5
-
55
-
75
-
90
-
100
+
10
+
20
+
30
+
40
@@ -357,6 +357,15 @@
Delete Deploy
+
+
+
+
+
{% include 'includes/footer.html' %}
@@ -367,13 +376,76 @@
Delete Deploy
{% block javascripts %}
+
+ // Handle row per page selection
+ $(".dropdown-menu a").on("click", function(e) {
+ e.preventDefault();
+ var selectedValue = $(this).text().trim();
+ rowsPerPage = selectedValue.toLowerCase() === 'all' ? rows.length : parseInt(selectedValue);
+ currentPage = 1; // Reset to first page
+ setupPagination();
+ });
+
+ // Setup initial pagination
+ setupPagination();
+
+ // Previous and Next button logic
+ $("#previous-page").on('click', function(e) {
+ e.preventDefault();
+ if (currentPage > 1) {
+ currentPage--;
+ displayPage(currentPage);
+ }
+ });
+
+ $("#next-page").on('click', function(e) {
+ e.preventDefault();
+ if (currentPage < pagesCount) {
+ currentPage++;
+ displayPage(currentPage);
+ }
+ });
+ });
+
+
+
{% endblock javascripts %}
From 29bb2a023c433766010e070effdb0b50cd399b29 Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Sat, 11 Nov 2023 01:17:00 +0100
Subject: [PATCH 06/18] =?UTF-8?q?=F0=9F=94=A7refactor:=20add=20stack=20pag?=
=?UTF-8?q?ination=20and=20search?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/home/templates/stacks-list.html | 129 +++++++++++++-----
1 file changed, 92 insertions(+), 37 deletions(-)
diff --git a/sld-dashboard/app/home/templates/stacks-list.html b/sld-dashboard/app/home/templates/stacks-list.html
index 3b999a40..9d566051 100644
--- a/sld-dashboard/app/home/templates/stacks-list.html
+++ b/sld-dashboard/app/home/templates/stacks-list.html
@@ -161,27 +161,14 @@ Remove Repo
{% endfor %}
-
+
+
+
{% include 'includes/footer.html' %}
@@ -204,23 +191,91 @@
Remove Repo
+
{% endblock javascripts %}
From 2ce0c052bedbfef2b27d21c8c1480514119e82fe Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Sat, 11 Nov 2023 02:08:31 +0100
Subject: [PATCH 07/18] =?UTF-8?q?=F0=9F=94=A7refactor:=20add=20pagination?=
=?UTF-8?q?=20and=20search=20component=20js?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/base/static/assets/js/pagination.js | 69 +++++++++++++++++
.../app/home/templates/activity-logs.html | 20 +++--
.../app/home/templates/aws-list.html | 34 +++------
.../app/home/templates/azure-list.html | 36 +++------
.../home/templates/custom-provider-list.html | 35 +++------
.../app/home/templates/deploys-list.html | 75 +------------------
.../app/home/templates/gcp-list.html | 36 +++------
.../app/home/templates/tasks-logs.html | 21 +++---
8 files changed, 137 insertions(+), 189 deletions(-)
create mode 100644 sld-dashboard/app/base/static/assets/js/pagination.js
diff --git a/sld-dashboard/app/base/static/assets/js/pagination.js b/sld-dashboard/app/base/static/assets/js/pagination.js
new file mode 100644
index 00000000..8cfc8ba8
--- /dev/null
+++ b/sld-dashboard/app/base/static/assets/js/pagination.js
@@ -0,0 +1,69 @@
+ $(document).ready(function(){
+ var rowsPerPage = 10; // Valor inicial
+ var rows = $('#myTable tr');
+ var filteredRows = rows; // Inicialmente, todas las filas son el conjunto filtrado
+ var pagesCount;
+ var currentPage = 1;
+
+ function displayPage(page) {
+ var start = (page - 1) * rowsPerPage;
+ var end = start + rowsPerPage;
+ rows.hide();
+ filteredRows.slice(start, end).show();
+ }
+
+ function setupPagination() {
+ pagesCount = Math.ceil(filteredRows.length / rowsPerPage);
+ $('.pagination .number-page').remove(); // Remove old page numbers
+ for (var i = 1; i <= pagesCount; i++) {
+ $(' ' + i + ' ')
+ .insertBefore("#next-page")
+ .on('click', function(e) {
+ e.preventDefault();
+ currentPage = parseInt($(this).text());
+ displayPage(currentPage);
+ $(".pagination .number-page").removeClass('active');
+ $(this).addClass('active');
+ });
+ }
+ displayPage(1);
+ }
+
+ $("#myInput").on("keyup", function() {
+ var value = $(this).val().toLowerCase();
+ filteredRows = rows.filter(function() {
+ return $(this).text().toLowerCase().indexOf(value) > -1;
+ });
+ currentPage = 1; // Reset to first page
+ setupPagination();
+ });
+
+ // Handle row per page selection
+ $(".dropdown-menu a").on("click", function(e) {
+ e.preventDefault();
+ var selectedValue = $(this).text().trim();
+ rowsPerPage = selectedValue.toLowerCase() === 'all' ? rows.length : parseInt(selectedValue);
+ currentPage = 1; // Reset to first page
+ setupPagination();
+ });
+
+ // Setup initial pagination
+ setupPagination();
+
+ // Previous and Next button logic
+ $("#previous-page").on('click', function(e) {
+ e.preventDefault();
+ if (currentPage > 1) {
+ currentPage--;
+ displayPage(currentPage);
+ }
+ });
+
+ $("#next-page").on('click', function(e) {
+ e.preventDefault();
+ if (currentPage < pagesCount) {
+ currentPage++;
+ displayPage(currentPage);
+ }
+ });
+ });
\ No newline at end of file
diff --git a/sld-dashboard/app/home/templates/activity-logs.html b/sld-dashboard/app/home/templates/activity-logs.html
index 8acb6bf4..dd159fea 100644
--- a/sld-dashboard/app/home/templates/activity-logs.html
+++ b/sld-dashboard/app/home/templates/activity-logs.html
@@ -135,7 +135,14 @@
All Activity
-
+
+
+
+
{% include 'includes/footer.html' %}
@@ -143,14 +150,5 @@ All Activity
{% block javascripts %}
-
+
{% endblock javascripts %}
diff --git a/sld-dashboard/app/home/templates/aws-list.html b/sld-dashboard/app/home/templates/aws-list.html
index 88d3178c..a247d2ca 100644
--- a/sld-dashboard/app/home/templates/aws-list.html
+++ b/sld-dashboard/app/home/templates/aws-list.html
@@ -38,7 +38,7 @@ All aws accounts
@@ -76,7 +76,7 @@ All aws accounts
-
+
{% for aws_account in aws %}
@@ -132,7 +132,14 @@ All aws accounts
-
+
+
+
+
{% include 'includes/footer.html' %}
@@ -141,23 +148,6 @@ All aws accounts
{% block javascripts %}
-
+
{% endblock javascripts %}
+
diff --git a/sld-dashboard/app/home/templates/azure-list.html b/sld-dashboard/app/home/templates/azure-list.html
index 5c309bdf..0dedd943 100644
--- a/sld-dashboard/app/home/templates/azure-list.html
+++ b/sld-dashboard/app/home/templates/azure-list.html
@@ -38,7 +38,7 @@ All azure accounts
@@ -74,7 +74,7 @@ All azure accounts
-
+
{% for azure_account in azure %}
@@ -128,7 +128,14 @@ All azure accounts
-
+
+
+
+
{% include 'includes/footer.html' %}
@@ -137,24 +144,5 @@ All azure accounts
{% block javascripts %}
-
-{% endblock javascripts %}
+
+{% endblock javascripts %}
\ No newline at end of file
diff --git a/sld-dashboard/app/home/templates/custom-provider-list.html b/sld-dashboard/app/home/templates/custom-provider-list.html
index d6059940..cdb36f11 100644
--- a/sld-dashboard/app/home/templates/custom-provider-list.html
+++ b/sld-dashboard/app/home/templates/custom-provider-list.html
@@ -38,7 +38,7 @@ All custom providers accounts
@@ -72,7 +72,7 @@ All custom providers accounts
-
+
{% for custom_provider in custom_provider_content %}
@@ -124,6 +124,14 @@ All custom providers accounts
+
+
+
+
{% include 'includes/footer.html' %}
@@ -133,24 +141,5 @@ All custom providers accounts
{% block javascripts %}
-
-{% endblock javascripts %}
+
+{% endblock javascripts %}
\ No newline at end of file
diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html
index eeac0c9c..ba074594 100644
--- a/sld-dashboard/app/home/templates/deploys-list.html
+++ b/sld-dashboard/app/home/templates/deploys-list.html
@@ -373,79 +373,8 @@ Delete Deploy
{% endblock content %}
+
{% block javascripts %}
-
-
-
+
{% endblock javascripts %}
diff --git a/sld-dashboard/app/home/templates/gcp-list.html b/sld-dashboard/app/home/templates/gcp-list.html
index ca1f8909..46cd8954 100644
--- a/sld-dashboard/app/home/templates/gcp-list.html
+++ b/sld-dashboard/app/home/templates/gcp-list.html
@@ -38,7 +38,7 @@ All gcp accounts
@@ -72,7 +72,7 @@ All gcp accounts
-
+
{% for gcp_account in gcp %}
@@ -124,7 +124,14 @@ All gcp accounts
-
+
+
+
+
{% include 'includes/footer.html' %}
@@ -133,24 +140,5 @@ All gcp accounts
{% block javascripts %}
-
-{% endblock javascripts %}
+
+{% endblock javascripts %}
\ No newline at end of file
diff --git a/sld-dashboard/app/home/templates/tasks-logs.html b/sld-dashboard/app/home/templates/tasks-logs.html
index 44f55523..68e18839 100644
--- a/sld-dashboard/app/home/templates/tasks-logs.html
+++ b/sld-dashboard/app/home/templates/tasks-logs.html
@@ -129,23 +129,20 @@ All Tasks
-
+
+
+
+
{% include 'includes/footer.html' %}
{% endblock content %}
-
{% block javascripts %}
-
+
{% endblock javascripts %}
From 3245d4cac93aea14f917683251a63ba2116b87c3 Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Sat, 11 Nov 2023 03:02:08 +0100
Subject: [PATCH 08/18] =?UTF-8?q?=F0=9F=94=A7refactor:=20add=20pagination?=
=?UTF-8?q?=20and=20search=20component=20js=20for=20users?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/home/templates/deploys-list.html | 1 -
.../app/home/templates/users-list.html | 40 +++++++------------
2 files changed, 14 insertions(+), 27 deletions(-)
diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html
index ba074594..86e8acb1 100644
--- a/sld-dashboard/app/home/templates/deploys-list.html
+++ b/sld-dashboard/app/home/templates/deploys-list.html
@@ -373,7 +373,6 @@ Delete Deploy
{% endblock content %}
-
{% block javascripts %}
diff --git a/sld-dashboard/app/home/templates/users-list.html b/sld-dashboard/app/home/templates/users-list.html
index cffb9700..998cf7a5 100644
--- a/sld-dashboard/app/home/templates/users-list.html
+++ b/sld-dashboard/app/home/templates/users-list.html
@@ -36,7 +36,7 @@ All users
@@ -50,10 +50,9 @@
All users
@@ -74,7 +73,7 @@ All users
-
+
{% for user in users | sort(attribute='id') %}
@@ -140,31 +139,20 @@ All users
+
+
+
+
{% include 'includes/footer.html' %}
{% endblock content %}
-
{% block javascripts %}
-
+
{% endblock javascripts %}
From be74f1c9247c0e624ae9ebe77dc5457b34b3f1e1 Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Sat, 11 Nov 2023 04:31:09 +0100
Subject: [PATCH 09/18] =?UTF-8?q?=F0=9F=90=9Bfix:=20edit=20deploy?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/base/static/assets/js/pagination.js | 83 +++++++++--------
.../base/static/assets/js/pagination_edit.js | 85 ++++++++++++++++++
.../app/home/templates/deploys-list.html | 48 +++-------
.../app/home/templates/stacks-list.html | 89 +------------------
.../app/home/templates/users-list.html | 4 +-
5 files changed, 147 insertions(+), 162 deletions(-)
create mode 100644 sld-dashboard/app/base/static/assets/js/pagination_edit.js
diff --git a/sld-dashboard/app/base/static/assets/js/pagination.js b/sld-dashboard/app/base/static/assets/js/pagination.js
index 8cfc8ba8..3e2b19ff 100644
--- a/sld-dashboard/app/base/static/assets/js/pagination.js
+++ b/sld-dashboard/app/base/static/assets/js/pagination.js
@@ -1,69 +1,76 @@
- $(document).ready(function(){
- var rowsPerPage = 10; // Valor inicial
- var rows = $('#myTable tr');
- var filteredRows = rows; // Inicialmente, todas las filas son el conjunto filtrado
- var pagesCount;
- var currentPage = 1;
+$(document).ready(function(){
+ var rowsPerPage = 10; // Valor inicial
+ var rows = $('#myTable tr');
+ var filteredRows = rows; // Inicialmente, todas las filas son el conjunto filtrado
+ var pagesCount;
+ var currentPage = 1;
- function displayPage(page) {
+ function displayPage(page) {
var start = (page - 1) * rowsPerPage;
var end = start + rowsPerPage;
rows.hide();
filteredRows.slice(start, end).show();
- }
+ }
- function setupPagination() {
+ function setupPagination() {
pagesCount = Math.ceil(filteredRows.length / rowsPerPage);
$('.pagination .number-page').remove(); // Remove old page numbers
for (var i = 1; i <= pagesCount; i++) {
- $('' + i + ' ')
- .insertBefore("#next-page")
- .on('click', function(e) {
- e.preventDefault();
- currentPage = parseInt($(this).text());
- displayPage(currentPage);
- $(".pagination .number-page").removeClass('active');
- $(this).addClass('active');
- });
+ $('' + i + ' ')
+ .insertBefore("#next-page")
+ .on('click', function(e) {
+ e.preventDefault();
+ currentPage = parseInt($(this).text());
+ displayPage(currentPage);
+ $(".pagination .number-page").removeClass('active');
+ $(this).addClass('active');
+ });
}
displayPage(1);
- }
+ }
- $("#myInput").on("keyup", function() {
+ // Event Delegation for edit buttons and other interactive elements
+ $(document).on('click', '.edit-button', function() {
+ // Aquí iría el código para manejar la edición
+ });
+
+ // Existing search functionality
+ $("#myInput").on("keyup", function() {
var value = $(this).val().toLowerCase();
filteredRows = rows.filter(function() {
- return $(this).text().toLowerCase().indexOf(value) > -1;
+ return $(this).text().toLowerCase().indexOf(value) > -1;
});
- currentPage = 1; // Reset to first page
+ currentPage = 1;
setupPagination();
- });
+ });
- // Handle row per page selection
- $(".dropdown-menu a").on("click", function(e) {
+ // Existing dropdown functionality
+ $(".dropdown-menu a").on("click", function(e) {
e.preventDefault();
var selectedValue = $(this).text().trim();
rowsPerPage = selectedValue.toLowerCase() === 'all' ? rows.length : parseInt(selectedValue);
currentPage = 1; // Reset to first page
setupPagination();
- });
+ });
- // Setup initial pagination
- setupPagination();
+ // Initial setup
+ setupPagination();
- // Previous and Next button logic
- $("#previous-page").on('click', function(e) {
+ // Previous and Next button logic
+ $("#previous-page").on('click', function(e) {
e.preventDefault();
if (currentPage > 1) {
- currentPage--;
- displayPage(currentPage);
+ currentPage--;
+ displayPage(currentPage);
}
- });
+ });
- $("#next-page").on('click', function(e) {
+ $("#next-page").on('click', function(e) {
e.preventDefault();
if (currentPage < pagesCount) {
- currentPage++;
- displayPage(currentPage);
+ currentPage++;
+ displayPage(currentPage);
}
- });
- });
\ No newline at end of file
+ });
+});
+d
\ No newline at end of file
diff --git a/sld-dashboard/app/base/static/assets/js/pagination_edit.js b/sld-dashboard/app/base/static/assets/js/pagination_edit.js
new file mode 100644
index 00000000..8627070b
--- /dev/null
+++ b/sld-dashboard/app/base/static/assets/js/pagination_edit.js
@@ -0,0 +1,85 @@
+ document.addEventListener("DOMContentLoaded", function() {
+ var rowsPerPage = 10;
+ var table = document.getElementById("table");
+ var tbody = table.getElementsByTagName("tbody")[0];
+ var rows = Array.from(tbody.getElementsByTagName("tr"));
+ var pagination = document.querySelector(".pagination");
+ var currentPage = 1;
+
+ function displayPage(page, rowsToShow) {
+ var start = (page - 1) * rowsPerPage;
+ var end = start + rowsPerPage;
+ rows.forEach(row => row.style.display = "none");
+ rowsToShow.slice(start, end).forEach(row => row.style.display = "");
+ }
+
+ function setupPagination(rowsToShow) {
+ pagination.innerHTML = '';
+ var pagesCount = Math.ceil(rowsToShow.length / rowsPerPage);
+
+ // Previous page button
+ var prevPageItem = document.createElement("li");
+ prevPageItem.className = "page-item";
+ var prevPageLink = document.createElement("a");
+ prevPageLink.className = "page-link";
+ prevPageLink.href = "#";
+ prevPageLink.innerText = "Previous";
+ prevPageItem.appendChild(prevPageLink);
+ pagination.appendChild(prevPageItem);
+
+ // Page number buttons
+ for (var i = 1; i <= pagesCount; i++) {
+ var pageItem = document.createElement("li");
+ pageItem.className = "page-item";
+ var pageLink = document.createElement("a");
+ pageLink.className = "page-link";
+ pageLink.href = "#";
+ pageLink.innerText = i;
+ pageItem.appendChild(pageLink);
+ pagination.appendChild(pageItem);
+
+ pageLink.addEventListener("click", function(e) {
+ e.preventDefault();
+ currentPage = parseInt(this.innerText);
+ displayPage(currentPage, rowsToShow);
+ });
+ }
+
+ // Next page button
+ var nextPageItem = document.createElement("li");
+ nextPageItem.className = "page-item";
+ var nextPageLink = document.createElement("a");
+ nextPageLink.className = "page-link";
+ nextPageLink.href = "#";
+ nextPageLink.innerText = "Next";
+ nextPageItem.appendChild(nextPageLink);
+ pagination.appendChild(nextPageItem);
+
+ prevPageLink.addEventListener("click", function(e) {
+ e.preventDefault();
+ if (currentPage > 1) {
+ displayPage(--currentPage, rowsToShow);
+ }
+ });
+
+ nextPageLink.addEventListener("click", function(e) {
+ e.preventDefault();
+ if (currentPage < pagesCount) {
+ displayPage(++currentPage, rowsToShow);
+ }
+ });
+
+ displayPage(1, rowsToShow); // Display the first page
+ }
+
+ function updateSearchAndPagination() {
+ var filter = document.getElementById("search").value.toUpperCase();
+ var filteredRows = rows.filter(row => row.textContent.toUpperCase().indexOf(filter) > -1);
+ currentPage = 1;
+ setupPagination(filteredRows);
+ }
+
+ document.getElementById("search").addEventListener("keyup", updateSearchAndPagination);
+
+ setupPagination(rows); // Initial setup with all rows
+ });
\ No newline at end of file
diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html
index 86e8acb1..921249d8 100644
--- a/sld-dashboard/app/home/templates/deploys-list.html
+++ b/sld-dashboard/app/home/templates/deploys-list.html
@@ -52,7 +52,7 @@ All Deploys
@@ -62,6 +62,7 @@
All Deploys
+
@@ -110,7 +107,7 @@ All Deploys
-
+
{% for deploy in deploys| sort(attribute='id') %}
@@ -336,35 +333,18 @@ Delete Deploy
-
-
-
-
+
{% include 'includes/footer.html' %}
@@ -375,5 +355,5 @@ Delete Deploy
{% block javascripts %}
-
+
{% endblock javascripts %}
diff --git a/sld-dashboard/app/home/templates/stacks-list.html b/sld-dashboard/app/home/templates/stacks-list.html
index 9d566051..3376feee 100644
--- a/sld-dashboard/app/home/templates/stacks-list.html
+++ b/sld-dashboard/app/home/templates/stacks-list.html
@@ -190,92 +190,5 @@ Remove Repo
}
-
-
+
{% endblock javascripts %}
diff --git a/sld-dashboard/app/home/templates/users-list.html b/sld-dashboard/app/home/templates/users-list.html
index 998cf7a5..72f52548 100644
--- a/sld-dashboard/app/home/templates/users-list.html
+++ b/sld-dashboard/app/home/templates/users-list.html
@@ -36,7 +36,7 @@ All users
@@ -73,7 +73,7 @@
All users
-
+
{% for user in users | sort(attribute='id') %}
From 32a083ddf4cdb01b188da4b39d5c3c14fcc5b53b Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Sat, 11 Nov 2023 04:38:31 +0100
Subject: [PATCH 10/18] =?UTF-8?q?=F0=9F=90=9Bfix:=20edit=20users?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/home/templates/users-list.html | 39 ++++++-------------
1 file changed, 12 insertions(+), 27 deletions(-)
diff --git a/sld-dashboard/app/home/templates/users-list.html b/sld-dashboard/app/home/templates/users-list.html
index 72f52548..b5d7d270 100644
--- a/sld-dashboard/app/home/templates/users-list.html
+++ b/sld-dashboard/app/home/templates/users-list.html
@@ -40,6 +40,7 @@ All users
+
@@ -118,35 +120,18 @@ All users
-
-
-
-
+
{% include 'includes/footer.html' %}
@@ -154,5 +139,5 @@ All users
{% endblock content %}
{% block javascripts %}
-
+
{% endblock javascripts %}
From 1c1d9f7b30e11232cd11853cd8d3dd20b04a5476 Mon Sep 17 00:00:00 2001
From: d10s <79284025+D10S0VSkY-OSS@users.noreply.github.com>
Date: Sat, 11 Nov 2023 04:48:27 +0100
Subject: [PATCH 11/18] =?UTF-8?q?=F0=9F=90=9Bfix:=20add=20destroy=20for=20?=
=?UTF-8?q?plan=20UI?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sld-dashboard/app/home/templates/deploys-list.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html
index 921249d8..16e79588 100644
--- a/sld-dashboard/app/home/templates/deploys-list.html
+++ b/sld-dashboard/app/home/templates/deploys-list.html
@@ -152,7 +152,7 @@ All Deploys
Toggle Dropdown
- {% if deploy.action == "Plan"%}
+ {% if deploy.action == "Plan_disable"%}