Commit a72fabf5 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Merge branch 'connor-trigger' into connor

parents 3dbfb596 d2b55808
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ oscar-update.output.txt
OSCAR-UPDATE-RUNNING
OSCAR-UPDATE-ERROR

## Interface Graphique
## Vite > Interface Graphique
public/js/oscar/vite
public/js/oscar/vite/*
public/js/oscar/vite/dist
@@ -167,6 +167,9 @@ public/js/oscar/vite/dist/*
public/js/oscar/vite/dist/assets
public/js/oscar/vite/dist/assets/*

## Vite > Erreur
ui/ERROR

## Textes personnalisés
config/autoload/oscar.text.custom.json
#################################
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Pour activer cette fonctionnalité, vous devez vous rendre dans l'interface d'ad

## Gérer les accès

L'inferface de gestion permet de voir les différentes clef d'accès disponibles dans Oscar : 
L'interface de gestion permet de voir les différentes clefs d'accès disponibles dans Oscar : 

![Configuration de l'API oscar](../images/oscar-api-list.png)

+17 −3
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@ return [

## Script d'envoi


### Envoi des notifications par email

La commande `php bin/oscar.php notifications:mails:persons` permet de déclencher la procédure d'envoi des mails : 

```bash
@@ -37,11 +40,19 @@ $ php bin/oscar.php notifications:mails:persons
etc...
```

La procédure d'envoi se base sur l'heure pour déterminer si des mails doivent être envoyés ou pas. 
> La procédure d'envoi se base sur l'heure pour déterminer si des mails doivent être envoyés ou pas.

### Jalons en retard (Version *CONNOR*)

```bash
$ php bin/oscar.php notifications:mail-milestones
```

> Ce script est journalié

## CRON

Vous pouvez utiliser **crontab** pour déclencher cette procédure automatiquement en ajoutant par exemple cette configuration : 
Vous pouvez utiliser **crontab** pour déclencher ces procédure automatiquement en ajoutant par exemple cette configuration : 

```bash
# Edition du crontab
@@ -51,9 +62,12 @@ $ crontab -e
```cron
# Déclenchement de la procédure toutes les heures
00 */1 * * * php /path/to/oscar/public/index.php oscar notifications:mails:persons

# Déclenchement 1 fois par jour à 8 heure
00 8 * * * php /path/to/oscar/public/index.php oscar notifications:mail:milestones
```

## A FAIRE (Accueil)
## TODO / A FAIRE (Accueil)

La page d'accueil propose aux utilisateurs une liste de *tâches* à faire : Jalons à compléter et versements en retard.

+5 −0
Original line number Diff line number Diff line
# OSCAR 2.16.x "Connor"

## Contenu de cette mise à jour
 - Mail template
 - API (Liste des conventions / PUSH)
 - Jalon : Déclencheurs
 - Avenants : Fichiers optionnels
 - Champs libres
 - Mail de jalon : Les jalons proposent une option pour envoyer un mail dédié aux personnes concernées
 - Jalon (modèle) : Enregistrement de "lots" de jalon préenregistrés permettant d'ajouter plusieurs jalons sur une activité en fonction d'une date de référence 
 - Refonte UI
+21 −7
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ networks:
    driver: bridge

volumes:
  elastic_data:
  connor_elastic_data:
    driver: local

services:
@@ -18,7 +18,7 @@ services:
    restart: always

    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U ${POSGRESQL_USER} -d ${POSGRESQL_BASE}" ]
      test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} && psql -U $${POSTGRES_USER} -d $${POSTGRES_DB} -c 'SELECT 1;'" ]
      interval: 10s
      timeout: 5s
      retries: 5
@@ -40,7 +40,7 @@ services:
      - .env

    volumes:
      - ${VOLUMES_POSTGRESQL_DATAS}:/var/lib/postgresql/data
      - ${VOLUMES_POSTGRESQL_DATAS}:/var/lib/postgresql
      - ${VOLUMES_POSTGRESQL_INIT}:/docker-entrypoint-initdb.d

    build:
@@ -92,7 +92,8 @@ services:
    container_name: connor-gearman
    image: artefactual/gearmand:1.1.21.2-alpine
    depends_on:
      - connor-postgres
      connor-postgres:
        condition: service_healthy
    environment:
      http_proxy: ${HTTP_PROXY}
      no_proxy: ${NO_PROXY}
@@ -108,11 +109,19 @@ services:
  ### ELASTICSEARCH
  connor-elasticsearch:
    container_name: connor-elasticsearch
    image: elasticsearch:7.17.28
    image: elasticsearch:8.19.17
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=false
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms${ELASTICSEARCH_MEMORY} -Xmx${ELASTICSEARCH_MEMORY}"
    healthcheck:
      # Test l'API d'Elasticsearch sur le port 9200 pour valider qu'il répond vert (green/yellow)
      test: [ "CMD-SHELL", "curl -s http://localhost:9200/_cluster/health?local=true | grep -E '\"status\":\"(green|yellow)\"'" ]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 20s
    depends_on:
      connor-postgres:
        condition: service_healthy
@@ -123,7 +132,7 @@ services:
    volumes:
      - ./docker/es_elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      - ./docker/es_log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties
      - elastic_data:/usr/share/elasticsearch/data
      - connor_elastic_data:/usr/share/elasticsearch/data
    user: "1000:1000"
    networks:
      - connor-network
@@ -158,6 +167,8 @@ services:
      - ${VOLUMES_CONFIG}/unicaen-app.local.php:/var/application/config/autoload/unicaen-app.local.php
      - ${VOLUMES_CONFIG}/unicaen-auth.local.php:/var/application/config/autoload/unicaen-auth.local.php
      - ${VOLUMES_CONFIG}/unicaen-signature.local.php:/var/application/config/autoload/unicaen-signature.local.php
      - ${VOLUMES_CONFIG}/person_db.yml:/var/application/config/connectors/person_db.yml
      - ${VOLUMES_CONFIG}/organization_db.yml:/var/application/config/connectors/organization_db.yml
      # Templates
      - ${VOLUMES_TEMPLATES}/mail.phtml:/var/application/data/templates/mail.phtml
      - ${VOLUMES_TEMPLATES}/logo.png:/var/application/data/templates/logo.png
@@ -190,7 +201,8 @@ services:
    container_name: connor-worker
    restart: unless-stopped
    depends_on:
      - connor-elasticsearch
      connor-elasticsearch:
        condition: service_healthy
    volumes:
      - ./:/var/application
      # Dossiers
@@ -207,6 +219,8 @@ services:
      - ${VOLUMES_CONFIG}/unicaen-app.local.php:/var/application/config/autoload/unicaen-app.local.php
      - ${VOLUMES_CONFIG}/unicaen-auth.local.php:/var/application/config/autoload/unicaen-auth.local.php
      - ${VOLUMES_CONFIG}/unicaen-signature.local.php:/var/application/config/autoload/unicaen-signature.local.php
      - ${VOLUMES_CONFIG}/person_db.yml:/var/application/config/connectors/person_db.yml
      - ${VOLUMES_CONFIG}/organization_db.yml:/var/application/config/connectors/organization_db.yml
      # Fichiers de configuration (PHP)
      - ${VOLUMES_CONFIG}/php/95-cli.ini:/usr/local/etc/php/conf.d/95-cli.ini
    networks:
Loading