Compare commits

...

74 Commits
eole ... master

Author SHA1 Message Date
Arnaud Fornerot db0e67b04e correction docker
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2023-09-14 22:44:53 +02:00
afornerot cad2babda5 correction on local mercure
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2023-09-13 17:44:04 +02:00
afornerot 66fd7e275d gestion footeré
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2023-09-13 17:21:06 +02:00
Arnaud Fornerot 3908287e78 maj make & dockerfile
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2023-09-12 22:17:10 +02:00
afornerot e7f2b7185a svg
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2023-07-23 15:46:26 +02:00
afornerot dc0e331414 kubernites
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2023-06-26 09:20:23 +02:00
afornerot c7c1f9caa7 maj nineskeletor
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2023-01-10 16:11:12 +01:00
afornerot cedd6bfcec merge
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2023-01-05 20:12:59 +01:00
afornerot be78875030 fixevalidator
Cadoles/nineskeletor/pipeline/head Build started... Details
Cadoles/nineskeletor/pipeline/pr-master There was a failure building this commit Details
2023-01-05 20:07:17 +01:00
afornerot e52fdd9083 fix: validator (#8)
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
Co-authored-by: Arnaud Fornerot <afornerot@cadoles.com>
Reviewed-on: #8
2022-10-26 09:19:16 +02:00
Arnaud Fornerot c6678e8e02 fix: validator
Cadoles/nineskeletor/pipeline/pr-master There was a failure building this commit Details
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2022-10-25 15:42:31 +02:00
afornerot 19fa75e2eb fix: isActive (#7)
Cadoles/nineskeletor/pipeline/head Something is wrong with the build of this commit Details
Co-authored-by: Arnaud Fornerot <afornerot@cadoles.com>
Reviewed-on: #7
2022-10-24 13:48:45 +02:00
afornerot 928109fdf5 fix(fixminio): stream image from minio (#6)
Cadoles/nineskeletor/pipeline/head Something is wrong with the build of this commit Details
fix load image from minio

Co-authored-by: Arnaud Fornerot <afornerot@cadoles.com>
Reviewed-on: #6
2022-10-24 13:47:43 +02:00
afornerot cb766ee2f9 Merge pull request 'fix(fixtureavatar): fixcture auto avatar & timesession & font & menu & redirect' (#5) from fixtureavatar into master
Cadoles/nineskeletor/pipeline/head Something is wrong with the build of this commit Details
Reviewed-on: #5
2022-10-04 16:53:58 +02:00
Arnaud Fornerot 7d8ec5d8c5 fix(fixtureavatar): resolution csfixer
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-10-04 15:58:21 +02:00
Arnaud Fornerot 3af16b4c8b fix(fixtureavatar): resolution exceptionlistener
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-10-04 15:33:15 +02:00
Arnaud Fornerot 35e59f2e51 fix(fixtureavatar): resolution crop
Cadoles/nineskeletor/pipeline/pr-master There was a failure building this commit Details
2022-10-04 15:09:08 +02:00
Arnaud Fornerot ffe8f2f722 fix(fixtureavatar): fixcture auto avatar & timesession & font & menu & redirect
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
Cadoles/nineskeletor/pipeline/pr-master There was a failure building this commit Details
2022-10-04 13:46:14 +02:00
afornerot 3d1c5a2159 Merge pull request 'manager' (#4) from manager into master
Cadoles/nineskeletor/pipeline/head This commit looks good Details
Reviewed-on: #4
2022-10-04 12:04:45 +02:00
Arnaud Fornerot 6c720ed62a fix(manager): phpstan
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-10-04 12:00:24 +02:00
Arnaud Fornerot 681b2f6547 fix(manager): cs fixer
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-10-04 11:55:50 +02:00
Arnaud Fornerot 58518ec70d fix(manager): manager access && flag isvisible
Cadoles/nineskeletor/pipeline/head This commit looks good Details
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-10-04 11:32:05 +02:00
Arnaud Fornerot 5fa52efe9f fix(manager): add doctrine fixtures 2022-10-04 09:47:41 +02:00
afornerot f29fc43c8a Merge pull request 'activeuser' (#3) from activeuser into master
Cadoles/nineskeletor/pipeline/head This commit looks good Details
Reviewed-on: #3
2022-10-02 15:14:32 +02:00
Arnaud Fornerot 1c644f8dca fix(activeuser): composer update
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-10-02 15:09:30 +02:00
Arnaud Fornerot 84230eb347 fix(activeuser): user isactive & adress niveau & route all
Cadoles/nineskeletor/pipeline/head This commit is unstable Details
Cadoles/nineskeletor/pipeline/pr-master This commit is unstable Details
2022-10-02 14:50:48 +02:00
Arnaud Fornerot 2cad98ca86 fix(activeuser): reset structure bdd
Cadoles/nineskeletor/pipeline/head This commit is unstable Details
2022-09-29 16:53:21 +02:00
afornerot ca5f9fef2d Merge pull request 'Gestion de niveau 3 & 4' (#2) from morelevel into master
Cadoles/nineskeletor/pipeline/head This commit is unstable Details
Reviewed-on: #2
2022-09-29 16:05:30 +02:00
Arnaud Fornerot b9bb605ad2 fix(morelevel): level mandatory in proil
Cadoles/nineskeletor/pipeline/pr-master There was a failure building this commit Details
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
2022-09-27 16:48:57 +02:00
Arnaud Fornerot ea31b7255d fix(morelevel): perte de la conf redis
Cadoles/nineskeletor/pipeline/head This commit looks good Details
2022-09-27 11:58:18 +02:00
Arnaud Fornerot d1431bcce4 fix(morelevel): ajout de niveau03 et niveau04
Cadoles/nineskeletor/pipeline/head This commit looks good Details
2022-09-27 11:52:49 +02:00
afornerot 89cb0433c0 Merge pull request 'Intégration d'outils de validation de qualité et pipeline Jenkins' (#1) from continuous-integration into master
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
Reviewed-on: #1
2022-09-26 09:44:29 +02:00
Arnaud Fornerot b78f54b76c fix(continuous-integration): correction php-cs-fixer
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-09-23 16:14:15 +02:00
Arnaud Fornerot 5f3cc51f5c fix(continuous-integration): correction point phpstan de level 1
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-09-23 15:34:07 +02:00
Arnaud Fornerot 86b11372e7 fix(continuous-integration): correction point phpstan
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-09-23 14:53:47 +02:00
wpetit 0ddb71006f chore: add jenkins validation pipeline
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
Cadoles/nineskeletor/pipeline/pr-master This commit looks good Details
2022-09-21 12:17:13 +02:00
wpetit 44e6e012fd chore: add code quality tools 2022-09-21 12:16:42 +02:00
Arnaud Fornerot af5c6f9626 renforcer par un uuid la génération auto d'un password 2022-09-15 14:54:34 +02:00
Arnaud Fornerot 87c9d362f2 suppression de variable d'environnement inutile 2022-09-15 14:48:36 +02:00
Arnaud Fornerot 50322de0ff use cache for minio 2022-08-31 12:05:06 +02:00
Arnaud Fornerot d539a2a740 adaptation pour minio 2022-08-31 11:20:22 +02:00
Arnaud Fornerot d2fde8a871 reset test no unlink upload minio 2022-08-30 20:41:50 +02:00
Arnaud Fornerot 296252e7fb test no unlink upload minio 2022-08-30 20:39:12 +02:00
Arnaud Fornerot 7a3faf4b31 upload init move to media 2022-08-30 20:00:41 +02:00
Arnaud Fornerot 270bbfceb4 reglage css 2022-08-29 12:09:22 +02:00
Arnaud Fornerot 5f07c26693 updgrade yarn & composer 2022-08-29 10:39:58 +02:00
Arnaud Fornerot 84bcecb9dc cron on reconfigure 2022-08-28 15:13:09 +02:00
Arnaud Fornerot 12463fe1b2 login app hydra 2022-08-28 13:25:20 +02:00
Arnaud Fornerot c3328a1ba0 integration hydra apps 2022-08-27 18:24:56 +02:00
Arnaud Fornerot 21fb28a6f0 hydra passwordless 2022-08-26 15:13:22 +02:00
Arnaud Fornerot 7962e2ca9a correctifs 2022-08-26 11:46:17 +02:00
Arnaud Fornerot 10b93e9873 correctifs 2022-08-26 11:39:12 +02:00
Arnaud Fornerot 9cf7ff655b correctifs 2022-08-25 19:25:45 +02:00
Arnaud Fornerot 953cee63eb mise en place de minio 2022-08-24 14:40:10 +02:00
Arnaud Fornerot f97bac6e5e redis session 2022-08-22 16:24:02 +02:00
Arnaud Fornerot 7fdf41aac8 erreur sur ldapadd organisation 2022-08-22 13:13:10 +02:00
Arnaud Fornerot 4922fb1c89 maj reconfigure 2022-07-29 14:44:52 +02:00
Arnaud Fornerot b6cb6ca57a revue start migration 2022-07-29 09:38:04 +02:00
Arnaud Fornerot 93f238ff60 enlever l'init de l'apps du composer install 2022-07-28 16:13:01 +02:00
Arnaud Fornerot df9e7a3e69 first commit symfony 6 2022-07-26 16:03:53 +02:00
Arnaud Fornerot 8181ca1c39 first commit symfony 6 2022-07-25 17:16:08 +02:00
Arnaud Fornerot 2bba3d5695 first commit symfony 6 2022-07-25 09:34:16 +02:00
Arnaud Fornerot 52736bc3f8 first commit symfony 6 2022-07-22 14:06:35 +00:00
Arnaud Fornerot dd85dcd74a first commit symfony 6 2022-07-22 13:35:04 +00:00
Arnaud Fornerot 4cdabaa4e3 first commit symfony 6 2022-07-21 16:33:00 +02:00
Arnaud Fornerot 7d0a07816c first commit symfony 6 2022-07-21 16:21:21 +02:00
Arnaud Fornerot c26e1e64ca first commit symfony 6 2022-07-21 16:20:16 +02:00
Arnaud Fornerot 5c4961748b first commit symfony 6 2022-07-21 16:15:47 +02:00
Arnaud Fornerot d9bfbb6b3c la master va devenir la branch symfony 6 2022-07-21 16:07:13 +02:00
Arnaud Fornerot d58efd8841 Synchronisation scribe niveaux + eleves classes + profs classes (ref #34132) 2022-05-10 09:23:38 +02:00
Arnaud Fornerot 691e0bd00f first commit 2022-05-09 15:55:05 +02:00
Arnaud Fornerot 27f797dac3 synchro modif 2022-05-09 15:25:57 +02:00
Arnaud Fornerot d24cb0f5e3 svg 2022-03-21 10:20:02 +01:00
Arnaud Fornerot d00a4e5a12 svg 2022-03-20 21:13:59 +01:00
3651 changed files with 58356 additions and 195403 deletions

176
.env Executable file
View File

@ -0,0 +1,176 @@
# Symfony
APP_ENV=prod
APP_SECRET=changeme
APP_SESSIONTIME=1440
# Messenger
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# Database
DATABASE_URL="postgresql://symfony:changeme@postgres:5432/app?serverVersion=13&charset=utf8"
# Redis Sentiel Session
REDIS_HOST='redis-sentinel'
REDIS_PORT=26379 # 6379 | 26379
REDIS_SERVICE=redismaster # master sentinel name
# Mailer
MAILER_METHOD=smtp
MAILER_DSN=smtp://mailer:1025
MAILER_NOREPLY=noreply@noreply.fr
# Basic
APP_WEBURL=localhost:8080
APP_MASTERIDENTITY=SQL # SQL | SSO | LDAP
APP_AUTH=SQL # SQL | CAS | LDAP | OPENID | à faire SAML
APP_ALIAS=/
APP_NAME=Nineskeletor
APP_MODEREGISTRATION= # null | BYADMIN | BYUSER
APP_ADMINS='["admin"]'
# Structure Organisationnelle
APP_NIVEAUUPDATABLE=0 # Quel degres de niveau est modifiable par les utilisateurs seule les admin et modo via console peuvent outre passer ce param
APP_NIVEAU01LABEL="Niveau 01"
APP_NIVEAU01LABELS="Niveaux 01"
APP_NIVEAU02USE=1
APP_NIVEAU02LABEL="Niveau 02"
APP_NIVEAU02LABELS="Niveaux 02"
APP_NIVEAU02MANDATORY='[""]'
APP_NIVEAU03USE=1
APP_NIVEAU03LABEL="Niveau 03"
APP_NIVEAU03LABELS="Niveaux 03"
APP_NIVEAU03MANDATORY='[""]'
APP_NIVEAU04USE=0
APP_NIVEAU04LABEL="Niveau 04"
APP_NIVEAU04LABELS="Niveaux 04"
APP_NIVEAU04MANDATORY='[""]'
APP_GROUPUSE=1
APP_GROUPSUBMITER='["ALL"]'
APP_ANNUSCOPEADMIN=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_ANNUSCOPEMODO=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_ANNUSCOPEMASTER=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_ANNUSCOPEMANAGER=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_ANNUSCOPEUSER=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_USERVIEWISVISIBLE=1 # Profil user with isvisible field
# Synchronisation
APP_SYNCHRO= # Synchronisation null | LDAP2NINE | NINE2LDAP | NINE2NINE
APP_SYNDCHROPURGENIVEAU01=1 # Purger les niveau01s obsolète en cas de synchronisation
APP_SYNDCHROPURGENIVEAU02=1 # Purger les niveau02s obsolète en cas de synchronisation
APP_SYNDCHROPURGENIVEAU03=1 # Purger les niveau03s obsolète en cas de synchronisation
APP_SYNDCHROPURGENIVEAU04=1 # Purger les niveau04s obsolète en cas de synchronisation
APP_SYNDCHROPURGEGROUP=1 # Purger les groups obsolète en cas de synchronisation
APP_SYNDCHROPURGEUSER=1 # Purger les users obsolète en cas de synchronisation
# LDAP
LDAP_HOST=openldap # host du serveur ldap
LDAP_PORT=389 # port du serveur ldap
LDAP_USETLS=0 # connection TLS 0/1
LDAP_USERWRITER=0 # LDAP_USER compte writer ? 0/1
LDAP_USER= # DN compte access ldap admin or reader
LDAP_PASSWORD= # Password compte access ldap admin or reader
LDAP_BASEDN= # Base DN ex:dc=nine,dc=fr
LDAP_BASEORGANISATION= # Base Organisation ex:ou=nineskeletor,dc=nine,dc=fr
LDAP_BASENIVEAU01= # Base Niveau01 ex:ou=niveau01,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASENIVEAU02= # Base Niveau02 ex:ou=niveau02,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASENIVEAU03= # Base Niveau03 ex:ou=niveau03,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASENIVEAU04= # Base Niveau04 ex:ou=niveau04,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASEGROUP= # Base Group ex:ou=groups,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASEUSER= # Base User ex:ou=users,ou=nineskeletor,dc=nine,dc=fr
LDAP_USERNAME=uid # Attribut id d'un user
LDAP_FIRSTNAME=givenname # Attribut firstname d'un user
LDAP_LASTNAME=sn # Attribut lastname d'un user
LDAP_EMAIL=mail # Attribut email d'un user
LDAP_AVATAR= # Attribut avatar d'un user
LDAP_MEMBEROF=memberof # Attribut memberof d'un user
LDAP_GROUPGID=gidnumber # Attribut gid d'un groupe
LDAP_GROUPNAME=cn # Attribut name d'un groupe
LDAP_GROUPMEMBER=memberuid # Attribut stockant les membres d'un groupe
LDAP_GROUPMEMBERISDN=0 # LDAP_GROUPMEMBER stocke un uid ou un dn ? 0/1
LDAP_FILTERGROUP=(cn=*) # requete ldap pour rechercher les groupes
LDAP_FILTERUSER=(uid=*) # requete ldap pour rechercher les users
LDAP_AUTOSUBMIT=1 # if APP_AUTH = LDAP autocréer les users non existant
LDAP_AUTOUPDATE=1 # if APP_AUTH = LDAP automodifier les users existant
# If APP_AUTH = CAS
CAS_HOST=
CAS_PORT=
CAS_PATH=
CAS_USERNAME=username
CAS_EMAIL=email
CAS_LASTNAME=lastname
CAS_FIRSTNAME=firstname
CAS_AVATAR=
CAS_NIVEAU01=
CAS_GROUP=
CAS_AUTOSUBMIT=1 # if APP_AUTH = CAS autocréer les users non existant
CAS_AUTOUPDATE=1 # if APP_AUTH = CAS automodifier les users existant
# If APP_AUTH = OPENID
OAUTH_CLIENTID=nineskeletor
OAUTH_CLIENTSECRET="changeme"
OAUTH_LOGINURL=http://localhost:7080/oauth2/auth
OAUTH_LOGOUTURL=http://localhost:7080/oauth2/sessions/logout
OAUTH_TOKENURL=http://hydra:4444/oauth2/token
OAUTH_USERINFO=http://hydra:4444/userinfo
OAUTH_USERNAME=username
OAUTH_EMAIL=email
OAUTH_LASTNAME=lastname
OAUTH_FIRSTNAME=firstname
OAUTH_AVATAR=
OAUTH_NIVEAU01=
OAUTH_GROUP=
OAUTH_AUTOSUBMIT=0 # if APP_AUTH = OPENID autocréer les users non existant
OAUTH_AUTOUPDATE=1 # if APP_AUTH = OPENID automodifier les users existant
# IF APP_SYNCHRO=NINE2NINE
NINE_URL=
NINE_SECRET=
# If APP_MODEREGISTRATION != NULL
APP_MODEREGISTRATIONTERM=6 # Temps en heure de la durée de validité de l'inscription
# Proxy
PROXY_USE=0
PROXY_HOST=
PROXY_PORT=
# Audit
AUDIT_USE=0
# Sonde statistic
SONDE_USE=0
SONDE_URL=
# Mercure
MERCURE_URL=http://mercure/.well-known/mercure
MERCURE_PUBLIC_URL=http://localhost:8081/.well-known/mercure
MERCURE_JWT_SECRET="!changeme!changeme!changeme!changeme!changeme!changeme!"
# Minio
MINIO_URL=http://nginx:9000
MINIO_KEY=minio
MINIO_SECRET=changeme
MINIO_BUCKET=nine
MINIO_ROOT=
MINIO_PATH_STYLE=1
MINIO_SECURE=0
# Hydra apps
HYDRA_LOGINCHALLENGE="http://hydra:4445/oauth2/auth/requests/login?login_challenge="
HYDRA_LOGINCHALLENGEACCEPT="http://hydra:4445/oauth2/auth/requests/login/accept?login_challenge="
HYDRA_CONSENTCHALLENGE="http://hydra:4445/oauth2/auth/requests/consent?consent_challenge="
HYDRA_CONSENTCHALLENGEACCEPT="http://hydra:4445/oauth2/auth/requests/consent/accept?consent_challenge="
# Lock
LOCK_DSN="postgresql://symfony:changeme@postgres:5432/app?serverVersion=13&charset=utf8"
# Sentry
SENTRY_DSN=

174
.env.local.dist Executable file
View File

@ -0,0 +1,174 @@
# Symfony
APP_ENV=dev
APP_SECRET=changeme
APP_SESSIONTIME=1440
# Messenger
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# Database
DATABASE_URL="postgresql://symfony:ChangeMe@127.0.0.1:5432/ninegate?serverVersion=13&charset=utf8"
# Redis Session
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
# Mailer
MAILER_METHOD=smtp
MAILER_DSN=smtp://127.0.0.1:1025
MAILER_NOREPLY=noreply@noreply.fr
# Basic
APP_WEBURL=127.0.0.1:8000
APP_MASTERIDENTITY=SQL # SQL | SSO | LDAP
APP_AUTH=OPENID # SQL | CAS| LDAP | OPENID | à faire SAML
APP_ALIAS=/
APP_NAME=ninegate
APP_MODEREGISTRATION=BYADMIN # null | BYADMIN | BYUSER
APP_ADMINS='["admin"]'
# Structure Organisationnelle
APP_NIVEAUUPDATABLE=4
APP_NIVEAU01LABEL="Niveau 01"
APP_NIVEAU01LABELS="Niveaux 01"
APP_NIVEAU02USE=1
APP_NIVEAU02LABEL="Niveau 02"
APP_NIVEAU02LABELS="Niveaux 02"
APP_NIVEAU02MANDATORY='[""]'
APP_NIVEAU03USE=1
APP_NIVEAU03LABEL="Niveau 03"
APP_NIVEAU03LABELS="Niveaux 03"
APP_NIVEAU03MANDATORY='[""]'
APP_NIVEAU04USE=1
APP_NIVEAU04LABEL="Niveau 04"
APP_NIVEAU04LABELS="Niveaux 04"
APP_NIVEAU04MANDATORY='[""]'
APP_GROUPUSE=1
APP_GROUPSUBMITER='["ROLE_ADMIN"]'
APP_ANNUSCOPEADMIN=1
APP_ANNUSCOPEMODO=1
APP_ANNUSCOPEMASTER=2
APP_ANNUSCOPEMANAGER=3
APP_ANNUSCOPEUSER=3
APP_USERVIEWISVISIBLE=1
# Synchronisation
APP_SYNCHRO=NINE2LDAP # Synchronisation null | LDAP2NINE | NINE2LDAP | NINE2NINE
APP_SYNDCHROPURGENIVEAU01=1 # Purger les niveau01s obsolète en cas de synchronisation
APP_SYNDCHROPURGENIVEAU02=1 # Purger les niveau02s obsolète en cas de synchronisation
APP_SYNDCHROPURGEGROUP=1 # Purger les groups obsolète en cas de synchronisation
APP_SYNDCHROPURGEUSER=1 # Purger les users obsolète en cas de synchronisation
# LDAP
LDAP_HOST=127.0.0.1
LDAP_PORT=389
LDAP_USETLS=0
LDAP_USERWRITER=1
LDAP_USER="cn=admin,dc=nine,dc=fr"
LDAP_PASSWORD=changeme
LDAP_BASEDN="dc=nine,dc=fr"
LDAP_BASEORGANISATION="ou=ninegate,dc=nine,dc=fr"
LDAP_BASENIVEAU01="ou=niveau01,ou=ninegate,dc=nine,dc=fr"
LDAP_BASENIVEAU02="ou=niveau02,ou=ninegate,dc=nine,dc=fr"
LDAP_BASENIVEAU03="ou=niveau03,ou=ninegate,dc=nine,dc=fr"
LDAP_BASENIVEAU04="ou=niveau04,ou=ninegate,dc=nine,dc=fr"
LDAP_BASEGROUP="ou=groups,ou=ninegate,dc=nine,dc=fr"
LDAP_BASEUSER="ou=users,ou=ninegate,dc=nine,dc=fr"
LDAP_USERNAME=uid # Attribut id d'un user
LDAP_FIRSTNAME=givenname # Attribut firstname d'un user
LDAP_LASTNAME=sn # Attribut lastname d'un user
LDAP_EMAIL=mail # Attribut email d'un user
LDAP_AVATAR= # Attribut avatar d'un user
LDAP_MEMBEROF=memberof # Attribut memberof d'un user
LDAP_GROUPGID=gidnumber # Attribut gid d'un groupe
LDAP_GROUPNAME=cn # Attribut name d'un groupe
LDAP_GROUPMEMBER=memberuid # Attribut stockant les membres d'un groupe
LDAP_GROUPMEMBERISDN=0 # LDAP_GROUPMEMBER stocke un uid ou un dn ? 0/1
LDAP_FILTERGROUP=(cn=*) # requete ldap pour rechercher les groupes
LDAP_FILTERUSER=(uid=*) # requete ldap pour rechercher les users
LDAP_AUTOSUBMIT=1 # if APP_AUTH = LDAP autocréer les users non existant
LDAP_AUTOUPDATE=1 # if APP_AUTH = LDAP automodifier les users existant
# If APP_AUTH = CAS
CAS_HOST=
CAS_PORT=
CAS_PATH=
CAS_USERNAME=username
CAS_EMAIL=email
CAS_LASTNAME=lastname
CAS_FIRSTNAME=firstname
CAS_AVATAR=
CAS_NIVEAU01=
CAS_GROUP=
CAS_AUTOSUBMIT=1 # if APP_AUTH = CAS autocréer les users non existant
CAS_AUTOUPDATE=1 # if APP_AUTH = CAS automodifier les users existant
# If APP_AUTH = OPENID
OAUTH_CLIENTID=ninegate
OAUTH_CLIENTSECRET="changeme"
OAUTH_LOGINURL=http://127.0.0.1:7080/oauth2/auth
OAUTH_LOGOUTURL=http://127.0.0.1:7080/oauth2/sessions/logout
OAUTH_TOKENURL=http://127.0.0.1:7080/oauth2/token
OAUTH_USERINFO=http://127.0.0.1:7080/userinfo
OAUTH_USERNAME=username
OAUTH_EMAIL=email
OAUTH_LASTNAME=lastname
OAUTH_FIRSTNAME=firstname
OAUTH_AVATAR=
OAUTH_NIVEAU01=
OAUTH_GROUP=
OAUTH_AUTOSUBMIT=0 # if APP_AUTH = OPENID autocréer les users non existant
OAUTH_AUTOUPDATE=1 # if APP_AUTH = OPENID automodifier les users existant
# IF APP_SYNCHRO=NINE2NINE
NINE_URL=
NINE_SECRET=
# If APP_MODEREGISTRATION != NULL
APP_MODEREGISTRATIONTERM=6 # Temps en heure de la durée de validité de l'inscription
# Proxy
PROXY_USE=0
PROXY_HOST=
PROXY_PORT=
# Audit
AUDIT_USE=1
# Sonde statistic
SONDE_USE=0
SONDE_URL=
# Mercure
MERCURE_URL=https://127.0.0.1/.well-known/mercure
MERCURE_PUBLIC_URL=https://127.0.0.1/.well-known/mercure
MERCURE_JWT_SECRET="!changeme!changeme!changeme!changeme!changeme!changeme!"
# Minio
MINIO_URL=http://127.0.0.1:9000
MINIO_KEY=minio
MINIO_SECRET=changeme
MINIO_BUCKET=ninegate
MINIO_ROOT=
MINIO_PATH_STYLE=1
MINIO_SECURE=0
# Hydra apps
HYDRA_LOGINCHALLENGE="http://127.0.0.1:4445/oauth2/auth/requests/login?login_challenge="
HYDRA_LOGINCHALLENGEACCEPT="http://127.0.0.1:4445/oauth2/auth/requests/login/accept?login_challenge="
HYDRA_CONSENTCHALLENGE="http://127.0.0.1:4445/oauth2/auth/requests/consent?consent_challenge="
HYDRA_CONSENTCHALLENGEACCEPT="http://127.0.0.1:4445/oauth2/auth/requests/consent/accept?consent_challenge="
# Lock
LOCK_DSN="postgresql://symfony:ChangeMe@127.0.0.1:5432/ninegate?serverVersion=13&charset=utf8"
# Sentry
SENTRY_DSN=

18
.githooks/commit-msg Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -eo pipefail
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
export PATH="${PATH}:${DIR}/../node_modules/.bin"
function lint_commit_message {
local commit_message_file="$1"
cat "$commit_message_file" | commitlint
}
function main {
local commit_message_file="$1"
lint_commit_message "$commit_message_file"
}
main $@

32
.gitignore vendored Executable file
View File

@ -0,0 +1,32 @@
/docker-compose.override.yml
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/.data
/var/
/vendor/
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
/phpunit.xml
.phpunit.result.cache
.phpunit.result.cache
/phpunit.xml
/uploads
!/public/uploads/avatar
/public/uploads/avatar/*
!/public/uploads/avatar/admin.jpg
!/public/uploads/avatar/noavatar.jpg
!/public/uploads/avatar/system.jpg
!/public/uploads/avatar
/public/uploads/logo/*
!/public/uploads/logo/logo.png
/public/uploads/ckeditor
.php-cs-fixer.cache

View File

@ -0,0 +1,15 @@
def exec() {
String dockerfile = readFile(file:'Dockerfile')
dockerfile = """
${dockerfile}
RUN apt update && apt install -y php-gd php-curl php-zip curl
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
RUN npm install -g yarn
""".stripIndent()
writeFile(file:'Dockerfile', text: dockerfile)
}
return this

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
lts/hydrogen

12
.php-cs-fixer.dist.php Executable file
View File

@ -0,0 +1,12 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src');
$config = new PhpCsFixer\Config();
return $config->setRules([
'@Symfony' => true,
'full_opening_tag' => false,
])
->setFinder($finder)
;

1
.php-version Executable file
View File

@ -0,0 +1 @@
8.1

3
.vscode/settings.json vendored Executable file
View File

@ -0,0 +1,3 @@
{
"esbonio.sphinx.confDir": ""
}

3
Jenkinsfile vendored Executable file
View File

@ -0,0 +1,3 @@
@Library('cadoles') _
symfonyAppPipeline('ubuntu:22.04')

85
Makefile Normal file → Executable file
View File

@ -1,26 +1,69 @@
################################
# Makefile
################################
SHELL := /bin/bash
SOURCE=nineskeletor
VERSION=1.0
EOLE_VERSION=2.7
EOLE_RELEASE=2.7.1
PKGAPPS=web
ENGINE=kind
HARBOR_USER_NAME=afornerot
CLUSTER_NAME=nineskeletor
NAMESPACE=app-dev
POD=$(shell kubectl get pods --namespace=${NAMESPACE} --no-headers -o custom-columns=":metadata.name" | grep ^${CLUSTER_NAME}-${PODNAME})
PODTOOLS=$(shell kubectl get pods --namespace=${NAMESPACE} --no-headers -o custom-columns=":metadata.name" | grep ^${CLUSTER_NAME}-adminer)
################################
# Début de zone à ne pas éditer
################################
include eole.mk
include apps.mk
dockercomposebuild:
docker-compose build --no-cache
################################
# Fin de zone à ne pas éditer
################################
dockercomposeup:
make dockercomposedown
docker-compose up -d
docker-compose exec app bin/console d:s:u --force --complete
docker-compose exec app bin/console app:Init
# Makefile rules dedicated to application
# if exists
ifneq (, $(strip $(wildcard $(SOURCE).mk)))
include $(SOURCE).mk
endif
dockercomposedown:
docker-compose stop
docker-compose rm -f redis-sentinel
dockercomposeinit:
docker-compose exec app bin/console d:f:l
dockercomposesh:
docker-compose exec app /bin/sh
deletecluster:
${ENGINE} delete cluster --name=${CLUSTER_NAME}
createcluster:
${ENGINE} delete cluster --name=${CLUSTER_NAME}
${ENGINE} create cluster --config misc/k8s/${ENGINE}/${ENGINE}-cluster.yaml
atachcluster:
docker login reg.cadoles.com
mkdir -p misc/k8s/kustomization/base/secrets/dockerconfig
docker --config misc/k8s/kustomization/base/secrets/dockerconfig login reg.cadoles.com
mv misc/k8s/kustomization/base/secrets/dockerconfig/config.json misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson
mkdir -p misc/k8s/kustomization/overlays/dev/secrets/dockerconfig
cp misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson misc/k8s/kustomization/overlays/dev/secrets/dockerconfig/.dockerconfigjson
applycluster:
kubectl apply -k misc/k8s/${ENGINE}/cluster --server-side
applylbcluster:
kubectl apply -k misc/k8s/${ENGINE}/cluster/lb --server-side
watchcluster:
skaffold dev -p dev --cleanup=false --default-repo reg.cadoles.com/${HARBOR_USER_NAME}
sh:
kubectl exec --namespace=${NAMESPACE} ${POD} -it -- sh
deletenamespace:
kubectl delete all --all --namespace ${NAMESPACE}
getpods:
kubectl get pods --namespace ${NAMESPACE}
getservices:
kubectl get services --namespace ${NAMESPACE}
ldapsearch:
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- apk update
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- apk add openldap
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- ldapsearch -x -H ldap://nineskeletor-openldap:389 -D cn=admin,dc=nine,dc=fr -w openldap

371
README.md Normal file → Executable file
View File

@ -1,231 +1,154 @@
# Renommer le squelette
## Dupliquer nineskeletor et renommer en nineXXXX
Puis effectuer les changement suivants
- Renommer db/nineskeletor-create-0.sql en db/nineXXXX-create-0.sql
- Modifier db/nineXXXX-create-0.sql et changer le nom de la base de données en nineXXXX
- Renommer dicos/90_nineskeletor.xml en dicos/90_nineXXXX.xml
- Modifier dicos/nineXXXX-nineXXXX.xml et remplacer tout les nineskeletor en nineXXXX
- Renommer logrotate/nineskeletor en logrotate/nineXXXX
- Modifier logrotate/nineXXXX et remplacer tout les nineskeletor en nineXXXX
- Renommer postservice/90-nineskeletor en postservice/90-nineXXXX
- Modifier postservice/90-nineXXXX et remplacer tout les nineskeletor en nineXXXX
- Renommer pretemplate/25-nineskeletor en pretemplate/25-nineXXXX
- Modifier pretemplate/25-nineXXXX et remplacer tout les nineskeletor en nineXXXX
- Renommer src/nineskeletor-1.0 en src/nineXXXX-1.0
- Modifier src/nineXXXX-1.0/webpack.config.js et remplacer tout les nineskeletor en nineXXXX
- Renommer sso/filtres/nineskeletor.ini en sso/filtres/nineXXXX.ini
- Renommer sso/filtres/nineskeletor_apps.ini en sso/filtres/nineXXXX_apps.ini
- Modifier sso/filtres/nineXXXX_apps.ini et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor.cron en tmpl/nineXXXX.cron
- Modifier tmpl/nineXXXX.cron et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor-apache.conf en tmpl/nineXXXX-apache.conf
- Modifier tmpl/nineXXXX-apache.conf et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor-db.yml en tmpl/nineXXXX-db.yml
- Modifier tmpl/nineXXXX-db.yml et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor-env.local en tmpl/nineXXXX-env.local
- Modifier tmpl/nineXXXX-env.local et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor-proxy.sh en tmpl/nineXXXX-proxy.sh
- Modifier Makefile et remplacer tout les nineskeletor en nineXXXX
- Remplacer logo public/uploads/logo/logo.png
# NINESKELETOR
## Compilier les asset
- apt-get install npm
- si proxy
- npm config set proxy "http://monproxyurl:monproxyport"
- npm config set https-proxy "http://monproxyurl:monproxyport"
- npm install -g yarn
- yarn install
- yarn encore dev
- yarn encore prod
Squelette applicatif symfony
# Description du squelette
## Installation for local dev
```
curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | sudo -E bash
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install git docker-compose composer symfony-cli php php-xml php-zip php-gd php-curl php-pgsql yarn
git clone https://forge.cadoles.com/Cadoles/nineskeletor.git
cd nineskeletor
symfony server:ca:install
cp .env .env.local
```
Change in .env.local APP_SECRET variabile
This secret is the init password for admin user
## Bundle
- DebugBundle
- DoctrineBundle
- DoctrineMigrationsBundle
- FOSCKEditorBundle
- FOSRestBundle
- FrameworkBundle
- KnpSnappyBundle
- MakerBundle
- MonologBundle
- NelmioApiDocBundle
- OneupUploaderBundle
- SecurityBundle
- SensioFrameworkExtraBundle
- SwiftmailerBundle
- TetranzSelect2EntityBundle
- TwigBundle
- TwigExtraBundle
- WebProfilerBundle
- WebpackEncoreBundle
- ramsey/uuid
- cboden/ratchet
## Asset
### Tag app
- jQuery = https://www.npmjs.com/package/jquery
- jqueryui = https://www.npmjs.com/package/jqueryui
- bootstrap = https://www.npmjs.com/package/bootstrap
- timepicki = https://www.npmjs.com/package/timepicki
- datatables.net-bs4 = https://www.npmjs.com/package/datatables.net-bs4
- fontawsome-free = https://www.npmjs.com/package/@fortawesome/fontawesome-free
- bs-stepper = https://www.npmjs.com/package/bs-stepper
- masonry-layout = https://www.npmjs.com/package/masonry-layout
- react-slick = https://www.npmjs.com/package/react-slick
- image-loaded = https://www.npmjs.com/package/image-loaded
- moment = https://www.npmjs.com/package/moment
- select2 = https://www.npmjs.com/package/select2
- crop-select-js = https://www.npmjs.com/package/crop-select-js
- spectrum-colorpicker2 = https://www.npmjs.com/package/spectrum-colorpicker2
Change in .env.local MERCURE_JWT_SECRET variable
And report this secret in docker-compose.yml MERCURE_PUBLISHER_JWT_KEY and MERCURE_SUBSCRIBER_JWT_KEY
And finish with
```
bin/reconfigure.sh
```
## Run for local
```
symfony server:start
```
## Installation for apache
exec installation for local dev except /bin/reconfigure.sh
Between
Change in .env.local APP_WEBURL variable
For sample
```
APP_WEBURL=MyDomaine
```
Change in .env.local MERCURE variable like
The /hub alias must be the same on Apache configuration ProxyPass and ProxyPassReverse
```
MERCURE_URL=http://MyDomaine/hub/.well-known/mercure
MERCURE_PUBLIC_URL=http://MyDomaine/hub/.well-known/mercure
```
Create the file docker-compose.override.yml like
The port 9090 must be the same in the apache configuration ProxyPass and ProxyPassReverse
```
version: '3'
services:
mercure:
ports:
- "9090:80"
environment:
SERVER_NAME: ':80'
MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!'
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!'
MERCURE_EXTRA_DIRECTIVES: |
cors_origins http://MyDomaine
```
And finish with
```
bin/reconfigure.sh
```
After install and configure apache
```
apt-get install apache libmodapache2
a2enmod rewrite proxy_http
service apache2 restart
```
sample apache configuration in /etc/apache2/site-available/000-
```
<VirtualHost *:80>
DocumentRoot /var/www/html/nineskeletor/public
CustomLog /var/log/apache2/access.log common
ErrorLog /var/log/apache2/error.log
<Directory /var/www/html/nineskeletor/public>
DirectoryIndex index.php
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
RewriteRule .* - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 307 ^/$ /index.php/
</IfModule>
</IfModule>
</Directory>
# For mercure server
ProxyPass /hub/ http://localhost:9090/
ProxyPassReverse /hub/ http://localhost:9090/
</VirtualHost>
<VirtualHost *:1080>
# For mailer server
ProxyPass / http://localhost:1080/
ProxyPassReverse / http://localhost:1080/
</VirtualHost>
```
## Cron Job
Make sure the cron job is running all the minute
You can copy this bin/nineskeletor.cron in your crontab
```
cp /var/www/html/nineskeletor/bin/nineskeletor.cron /etc/cron.d/nineskeletor
```
## Messenger worker
Make sure the messenger consume the bus
Needed to send mail
You can copy this bin/nineskeletor.service in your systemd
```
cp /var/www/html/nineskeletor/bin/nineskeletor.service /etc/systemd/system/
systemctl enable nineskeletor.service
systemctl start nineskeletor.service
```
### Tag fullcalendar
- @fullcalendar/core = https://www.npmjs.com/package/@fullcalendar/core
- @fullcalendar/interaction = https://www.npmjs.com/package/@fullcalendar/interaction
- @fullcalendar/daygrid = https://www.npmjs.com/package/@fullcalendar/daygrid
### Tag dropzone
- dropzone = https://www.npmjs.com/package/dropzone
## Parameters
Provient du template env.local
- appEnv = PROD
- appSecret = valeur du fichier .key autogénéré au premier reconfigure
- appWeburl = Valeur du dicos web_url
- appAuth = Valeur du dicos = CAS / SQL
- appAlias = En dur l'alias web
- appName = Nom de l'application
- appCron = En dur à true pour activer le système de cron
- appMasteridentity = Valeur du dicos = Ninegate / LDAP / SQL
- appMasterurl = Si appMasteridentity la valeur du dicos correspondant à l'url du Ninegate maître
- appMasterkey = Si appMasteridentity la valeur du dicos correspondant à la clé d'API du Ninegate maître
- databaseName = En dur le nom de la base
- databaseUser = En dur le user de la base
- databasePassword = Autogénéré par le reconfigure
- databaseHost = Valeur du dicos pour le host de la base
- appMailmethod = Valeur du dicos soit sendmail soit smtp. sendmail par défaut si exim est activé sur le serveur
- appMailurl = Si smtp url calculé combinant smtphost smtpport smtpencryption smtpauthmode smtpuser smtppwd
- appMailnoreply = Valeur du dicos du noreplay
- ldapModel = si masteridentity à LDAP soit open soit scribe
- ldapHost = Valeur dicos Host LDAP
- ldapPort = Valeur dicos Port LDAP
- ldapUser = Valeur dicos User LDAP
- ldapPassword = Valeur dicos Password LDAP
- ldapBasedn = Valeur dicos Basedn LDAP
- ldapUsername = si Scribe en dur sinon valeur du dicos champs annuaire utilisé comme username
- ldapFirstname = si Scribe en dur sinon valeur du dicos champs annuaire utilisé comme firstname
- ldapLastname = si Scribe en dur sinon valeur du dicos champs annuaire utilisé comme lastname
- ldapEmail = si Scribe en dur sinon valeur du dicos champs annuaire utilisé comme email
- ldapFiltergroup = si Scribe en dur sinon valeur du dicos filtre ldap de recherche des groupes
- ldapFilteruser = si Scribe en dur sinon valeur du dicos filtre ldap des groupes
- ldapAdmins = Liste des admins obligatoire = Admin + valeur dicos
- casHost = Valeur dicos du host SSO
- casPort = Valeur dicos du Porst SSO
- casPath = Valeur dicos du Path SSO
- casUsername = Valeur en dur correspondant au filtre sso du username
- casEmail = Valeur en dur correspondant au filtre sso du email
- casLastname = Valeur en dur correspondant au filtre sso du lastname
- casFirstname = Valeur en dur correspondant au filtre sso du fistname
- proxyUse = Valeur dicos utiliser oui/non un proxy
- proxyHost = Si oui valeurs du dicos du host proxy
- proxyPort = Si oui valeurs du dicos du post proxy
- sondeUse = Valeur dicos utiliser oui/non une sonde statistique
- sondeUrl = Si oui url de la sonde statistique
## Sécurité
4 rôles possibles
- ROLE_ADMIN
- ROLE_MODO
- ROLE_MASTER
- ROLE_USER
4 routes protégés
- /user = accèssible à ROLE_USER / ROLE_MASTER / ROLE_MODO / ROLE_ADMIN
- /master = accèssible à ROLE_MASTER / ROLE_MODO / ROLE_ADMIN
- /modo = = accèssible à ROLE_MODO / ROLE_ADMIN
- /admin = = accèssible à ROLE_ADMIN
## Job
Nineskeletor intègre un système de job.
Ce système va exécuter des commandes symfony à interval régulier.
De base les jobs suivants sont livrés :
- app:sendMail = toutes les minutes = Execution du spool de mail en attente
- app:dumpBdd = toutes les nuits à 2h00 = Dump de la base
- app:purgeFile = toutes les nuits à 3h00 = Suppresion des fichiers obsolètes
- app:synchroUsers = toutes les nuites à 3h00 = Synchronisation des comptes utilisateurs soit via LDAP soit via Ninegate
Pour ajouter un job à la listes, modifier la commande app:initCron qui sera exécutée à chaque reconfigure
## Service
- app.password.encoder = encodage password sur la methode que l'annuaire
- app.upload.listener = action à réaliser sur upload via oneupload
- app.upload.samename = permet d'uploader un fichier et préserver le nom de fichier via oneupload
- app.ldap.service = fonction ldap
- app.sendmail.transport = executuion du spool de mail via sendmail
- app.mail.service = fonction envoit de mail
- app.twig.extension = extention twig
## Twig
### Twig Constantes
Variables globales twig reprises des parametres symfony
- appAlias
- appAuth
- appName
- appCron
- appMasteridentity
- sondeUse
- sondeUrl
### Twig Extention
App\Twig\AppExtension
- filtre = urlAvatar à placer avec user.avatar afin de définir l'url complète de l'avatar du user
### Twig Template de base
#### templates/base.html.twig
Deux paramétres non obligatoire
- useheader = permet d'afficher ou non la bannière dans la page = false par défaut
- usesidebar = permet d'afficher oun non la sidebar dans la page = false par défaut
- usemonocolor = afin de placer uniquement la couleur dark sur la page
Block
- block encorelinktags = pour déclarer des encore_link_tags spécifique à la page (encorelinktags app est intégré de base)
- block localstyle = pour déclarer des propriétés css spécifique à page (Include/style.css.twig est intégré de base)
- block body = le corps de la page
- block encorescripttags pour déclarer des encore_script_tags spécifique à la page (encorescripttags app est intégré de base)
- block localjavascript = pour déclarer du js spécifique à la page (Include/javascript.js.twig est intégré de base)
#### templates/Include/style.css.twig
Style de l'applicaiton en surcouche de bootstrap
#### templates/Include/sidebar.html.twig
La sidebar de l'application quand elle est affichée
#### templates/Include/javascript.js.twig
Librairie js de l'application
- object a et button s'ils ont un attribut data-method et data_confirm proposeront une confirmation à l'utilisateur avant de poursuivre l'action
- ModalLoad(idmodal,titre,url) = permet d'afficher en modal l'url indiqué en parametre. Par défaut on dispose de la modal #mymodal
#### templates/Form/fields.htms.twig
Mise en forme de champs de formulaire

64
apps.mk
View File

@ -1,64 +0,0 @@
#
# NE PAS EDITER CE FICHIER
#
# Voir Makefile
##########################
# Application web envole #
##########################
ifneq (, $(filter oui web, $(PKGAPPS)))
#
# Sanity check
#
ifeq (, $(filter-out X.X, $(strip $(VERSION))))
$(error $$(VERSION) variable has incorrect value '$(VERSION)')
endif
# Where to store web application files
WEB_PATH := $(DESTDIR)/var/www/html
# Envole
sharenvole_PROG_DIR := $(DESTDIR)/usr/share/envole/$(SOURCE)
src_$(SOURCE)-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)
src_plugins-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/plugin
src_lang-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/lang
endif
##########################
# Application EOLE flask #
##########################
ifneq (, $(filter flask, $(PKGAPPS)))
#
# Sanity check
#
ifeq (, $(filter-out XXX, $(strip $(FLASK_MODULE))))
$(error $$(FLASK_MODULE) variable has incorrect value '$(FLASK_MODULE)')
endif
ifeq (, $(strip $(wildcard src/$(FLASK_MODULE).conf)))
$(error missing eoleflask configuration file 'src/$(FLASK_MODULE).conf')
endif
# Everything is related to mount point
APPS_MOUNT_POINT := $(shell sed -ne 's|^"MOUNT_POINT"[[:space:]]*:[[:space:]]*"/\([^"]*\)",|\1|p' \
src/$(FLASK_MODULE).conf)
ifeq (, $(strip $(APPS_MOUNT_POINT)))
$(error no "MOUNT_POINT" in eoleflask configuration file 'src/$(FLASK_MODULE).conf')
endif
# eole-flask configuration
src_DATA_DIR := $(DESTDIR)/etc/eole/flask/available
# Where to store flask application files
FLASK_PATH := $(eole_DIR)/flask/$(APPS_MOUNT_POINT)
# static files
src_$(FLASK_MODULE)_static_REC_DIR := $(FLASK_PATH)/static
src_$(FLASK_MODULE)_templates_REC_DIR := $(FLASK_PATH)/templates
src_$(FLASK_MODULE)_instance_REC_DIR := $(FLASK_PATH)/resources
endif

51
assets/app.js Executable file
View File

@ -0,0 +1,51 @@
// JQuery
window.$ = window.jQuery = require('jquery');
// JQueryui
require('jquery-ui');
// Bootstrap
require('bootstrap');
require('bootstrap/dist/css/bootstrap.css');
// Fontawesome
require('@fortawesome/fontawesome-free/css/all.css');
// Datatables
require('datatables.net-bs4');
require('datatables.net-bs4/css/dataTables.bootstrap4.min.css');
require('./js/datatables.init.js');
// Select2
require('select2');
require('select2/dist/js/i18n/fr.js');
require('select2/dist/css/select2.css');
require('@ttskch/select2-bootstrap4-theme/dist/select2-bootstrap4.css');
$(() => {
$('.select2entity').select2(
{
theme: 'bootstrap4',
language: "fr"
}
);
});
// Spectrum-colorpicker2
require('spectrum-colorpicker2/dist/spectrum.min.js');
require('spectrum-colorpicker2/dist/spectrum.min.css');
// CropSelectJs
require('crop-select-js/crop-select-js.min.css');
window.CropSelectJs = require('crop-select-js/crop-select-js.min.js');
// Start the Stimulus application
import './bootstrap';
// App sytle
import './styles/font.css';
import './styles/app.css';
// App js
require('./js/app.js');

11
assets/bootstrap.js vendored Executable file
View File

@ -0,0 +1,11 @@
import { startStimulusApp } from '@symfony/stimulus-bridge';
// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp(require.context(
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
true,
/\.[jt]sx?$/
));
// register any custom, 3rd party controllers here
// app.register('some_controller_name', SomeImportedController);

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

4
assets/controllers.json Executable file
View File

@ -0,0 +1,4 @@
{
"controllers": [],
"entrypoints": []
}

View File

@ -0,0 +1,16 @@
import { Controller } from '@hotwired/stimulus';
/*
* This is an example Stimulus controller!
*
* Any element with a data-controller="hello" attribute will cause
* this controller to be executed. The name "hello" comes from the filename:
* hello_controller.js -> "hello"
*
* Delete this file or adapt it for your use!
*/
export default class extends Controller {
connect() {
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
}
}

19
assets/dropzone.js Executable file
View File

@ -0,0 +1,19 @@
require('dropzone/dist/dropzone.css');
/*
window.Dropzone = require('dropzone/dist/dropzone.js');
*/
const { Dropzone } = require("dropzone");
document.addEventListener('DOMContentLoaded', function() {
var elt = document.getElementById('mydropzone');
console.log($(elt).data("maxfiles"))
var mydropzone = new Dropzone(elt, {
acceptedMimeTypes: $(elt).data("acceptedMimeTypes"),
maxFiles: $(elt).data("maxFiles"),
success: function( file, response ){
dropzonesuccess(file,response);
},
});
global.mydropzone=mydropzone;
});

Binary file not shown.

BIN
assets/fonts/theboldfont.ttf Executable file

Binary file not shown.

69
assets/js/app.js Executable file
View File

@ -0,0 +1,69 @@
$(document).ready(function() {
// Color
$(".pick-a-color").spectrum(
{
type: "text",
showAlpha: false
}
);
$(".pick-a-color").attr("autocomplete","off");
// method confirm
var doit = true;
$("a[data-method]").on('click',function(){
if($(this).data('confirm')){
doit = confirm($(this).data('confirm'));
if(!doit) return false;
}
});
$("button[data-method]").on('click',function(){
if($(this).data('confirm')){
doit = confirm($(this).data('confirm'));
if(!doit) return false;
}
});
// Modal
$(".btn-modal").click(function() {
$("#"+$(this).data("modalid")+" .modal-title").text($(this).data("modaltitle"));
$("#"+$(this).data("modalid")+" iframe").attr("src",$(this).data("modalurl"));
$("#"+$(this).data("modalid")).modal("show");
});
// Resize
resize();
// Focus
$("#page").focus();
});
$( window ).resize(function() {
resize();
});
function resize() {
console.log("resize");
if($("#header").is(":visible")){
$(".navbar-logo").hide();
$("#menulink").hide();
$("#header").hide();
}
else {
$(".navbar-logo").show();
$("#menulink").show();
$("#header").show();
}
var footerheight=$("footer").height();
if(footerheight) footerheight=footerheight+10;
else footerheight=0;
console.log(footerheight);
$("main").css("height",$(window).height()-$(".header").height()-footerheight);
$("#page").css("height",$(window).height()-$(".header").height()-footerheight);
$("#sidebar").css("min-height",$("body").height()-$(".header").height());
}

31
assets/js/datatables.init.js Executable file
View File

@ -0,0 +1,31 @@
$(document).ready(function() {
$.extend( $.fn.dataTable.defaults, {
responsive: true,
"iDisplayLength": 1000,
"scrollX": true,
"oLanguage": {
"sThousands": " ",
"sProcessing": "Traitement en cours...",
"sSearch": "Rechercher&nbsp;:",
"sLengthMenu": "Afficher _MENU_ &eacute;l&eacute;ments",
"sInfo": "Affichage de l'&eacute;lement _START_ &agrave; _END_ sur _TOTAL_ &eacute;l&eacute;ments",
"sInfoEmpty": "Affichage de l'&eacute;lement 0 &agrave; 0 sur 0 &eacute;l&eacute;ments",
"sInfoFiltered": "(filtr&eacute; de _MAX_ &eacute;l&eacute;ments au total)",
"sInfoPostFix": "",
"sLoadingRecords": "Chargement en cours...",
"sZeroRecords": "Aucun &eacute;l&eacute;ment &agrave; afficher",
"sEmptyTable": "Aucune donnée disponible dans le tableau",
"oPaginate": {
"sFirst": "Premier",
"sPrevious": "Pr&eacute;c&eacute;dent",
"sNext": "Suivant",
"sLast": "Dernier"
},
"oAria": {
"sSortAscending": ": activer pour trier la colonne par ordre croissant",
"sSortDescending": ": activer pour trier la colonne par ordre décroissant"
}
},
//"stateSave": true
});
});

Some files were not shown because too many files have changed in this diff Show More