From 817e44253fe7fa207d7d67a2fb3d36db6935b6dc Mon Sep 17 00:00:00 2001 From: andriacap <111564663+andriacap@users.noreply.github.com> Date: Mon, 12 Dec 2022 11:25:24 +0100 Subject: [PATCH] feat: [6.2] Page d'accueil module monitoring layout et config title et description #2 (#15) * feat: [6.2] Page d'accueil modul monitoring layout et config title et description #2 * chore(config): applied black & removed imports --- .../gn_module_monitoring/conf_schema_toml.py | 9 ++- .../components/modules/modules.component.css | 26 ++++---- .../components/modules/modules.component.html | 59 ++++++++++++++----- .../components/modules/modules.component.ts | 29 +++++++-- frontend/app/services/config.service.ts | 6 ++ monitorings_config.toml.example | 4 ++ 6 files changed, 98 insertions(+), 35 deletions(-) diff --git a/backend/gn_module_monitoring/conf_schema_toml.py b/backend/gn_module_monitoring/conf_schema_toml.py index 3c27b1173..68963a0f8 100644 --- a/backend/gn_module_monitoring/conf_schema_toml.py +++ b/backend/gn_module_monitoring/conf_schema_toml.py @@ -4,7 +4,7 @@ Fichier à ne pas modifier. Paramètres surcouchables dans config/config_gn_module.tml """ -from marshmallow import Schema, fields, validates_schema, ValidationError +from marshmallow import Schema, fields # Permissions associés à chaque objet monitoring @@ -22,7 +22,14 @@ class GnModuleSchemaConf(Schema): PERMISSION_LEVEL = fields.Dict( keys=fields.Str(), values=fields.Str(), load_default=PERMISSION_LEVEL_DEFAULT ) + DESCRIPTION_MODULE = fields.String(missing="Vous trouverez ici la liste des modules") + TITLE_MODULE = fields.String(missing="Module de suivi") + PERMISSION_LEVEL = fields.Dict( + keys=fields.Str(), values=fields.Str(), load_default=PERMISSION_LEVEL_DEFAULT + ) + DESCRIPTION_MODULE = fields.String(missing="Vous trouverez ici la liste des modules") + TITLE_MODULE = fields.String(missing="Module de suivi") # AREA_TYPE = fields.List(fields.String(), missing=["COM", "M1", "M5", "M10"]) # BORNE_OBS = fields.List(fields.Integer(), missing=[1, 20, 40, 60, 80, 100, 120]) diff --git a/frontend/app/components/modules/modules.component.css b/frontend/app/components/modules/modules.component.css index 5ce13655f..5036d2eb9 100644 --- a/frontend/app/components/modules/modules.component.css +++ b/frontend/app/components/modules/modules.component.css @@ -38,14 +38,14 @@ h2 { } a { - text-decoration:none; - color:initial; + text-decoration: none; + color: initial; } .flex-item:hover { - opacity: 1; - box-shadow: 0px 0px 10px black; - transition: opacity 0.2s, box-shadow 0.2s; + opacity: 1; + box-shadow: 0px 0px 10px black; + transition: opacity 0.2s, box-shadow 0.2s; } .module h2 { @@ -53,17 +53,15 @@ a { } -.module-card:hover -{ - border: 1px solid #303030; - padding: 5px; - color:gray; - transition: 1s ease; +.module-card:hover { + border: 1px solid #303030; + padding: 5px; + color: gray; + transition: 1s ease; } -.module-card -{ - background-color:#71717129; +.module-card { + background-color: #71717129; transition: 1s ease; } diff --git a/frontend/app/components/modules/modules.component.html b/frontend/app/components/modules/modules.component.html index 207e94f5e..3519e09b6 100644 --- a/frontend/app/components/modules/modules.component.html +++ b/frontend/app/components/modules/modules.component.html @@ -1,18 +1,27 @@ -