Skip to content
Snippets Groups Projects
user avatar
Makhtar DIAGNE authored
* [TECH] Nginx add referential apps

* [DLAB-4154] Improve the management of mongo scripts

- Mutualize scripts between dev environment and deployment
- Add versioning on scripts executed on a given environment

* [DLAB-4154] Add Mitogen in order to improve performance (mongo deployment in local)

* First step: Update main color + customer collection

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Get colors from serveur (mock) + apply color conversion and default/overriden values

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Get colors form application and AuthDTO + make specific colors (transparent, light, dark)

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Quick push

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Push for test

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* WIP themes colors

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Fix colors

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Export colors function in colors.util.ts

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Add Colors in graphical identity for Customer Creation

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Update create/view customer page + add edit colors for customers

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Add app logo configuration

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* Fix some features

Signed-off-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>

* [TECH] Fix frontend issues

* [DLAB-4011] temp commit

* [DLAB-4011] Fix initial values in color inputs

* [DLAB-4011] create, update theme colors

* [DLAB-4011] Color picker for theme inputs

* [DLAB-4011] Fix custom graphic identity validation

* [DLAB-4011] Fix inputs behavior and appearance

* [Theme] Create primary & secondary variables

* [DLAB-4011]  Add custom theme to cas, identity and portal

* Version upgrade to 1.0.2-SNAPSHOT

* [DEVOPS] Fix unknown variable vitamui_services.x.dir.assets

* [DEVOPS] Update scripts for deployment

* [DEVOPS] Add README and update cleanup method for certificates

* [DLAB-4011] Add IT scenario & primary-dark color

* [DLAB-4011] Set dlab theme config

* [DLAB-4011] Set dlab colors on cas, identity & portal

* [TECH] FIX vitamui input component

* [FIX DLAB-3306] Sort subrogations

* [ELCA-27] Expose NavbarComponent and childs to permit customizing

* [TECH] Frontend : Some cleaning & optimization

optimisation

* [TECH] Fix theme default logo

* [TECH] Fix recette configuration

* [TECH] Frontend Optimization

* [TECH] Fix front tests

* [TECH] Frontend Optimization (bis)

* [FIX RABB-585] Add animation in progress bar

* [FIX RABB-577] Add space above title

* [FIX RABB-581] Fix VITAMUI_AUTHENTICATION Logbook code

* [TECH] Fix console error on ICU comment

Keys EXT_VITAMUI_AUTHENTIFICATION_USER and EXT_VITAMUI_AUTHENTIFICATION_OTP_USER defined in file event-tyoe-label.component.html are kept only for Legacy code and existing data

* [RABB-626] Frontend Optimization : fix font

* [FIX RABB-37] Accept Timeout parameter as Http header

* [TECH] Frontend use assets from ui-frontend-common & update branding

* [TECH] Nginx : Add favicon link

* [TECH] UI Frontend rewrite links in SCSS files with base-ref, deploy-url

* [TECH] Theme : getAsset, normalize path for security issues

* [FIX RABB-664] Show secondary color instead of primary for valid-check password

* [TECH] Frontend use assets from ui-frontend-common & update branding : fix tests

* [FIX RABB-577] Add space below group profile pop-in title

* [TECH] Remove default UI page title name

* [DEVOPS] Update theme values in deployment

* [TECH] Update package-lock files

* [TECH] Rollback versions update

* [TECH] Fix wrong URL

* [TECH] First Fixes after review

* Update typos in deployment/README.rst

Co-authored-by: default avatarCouzinieAtCines <62284459+CouzinieAtCines@users.noreply.github.com>

* [TECH] Fixes from PR review

* [TECH] Changes in ui-referential for theme engine

* [TECH] Strange fixes for ui-referential (why was it working)

* [TECH] Fix PR review : display error message during colors validating

* Update ui/ui-frontend/projects/identity/src/locale/messages.xlf

Co-authored-by: default avatarCouzinieAtCines <62284459+CouzinieAtCines@users.noreply.github.com>

* Update ui/ui-frontend/projects/identity/src/locale/messages.xlf

Co-authored-by: default avatarCouzinieAtCines <62284459+CouzinieAtCines@users.noreply.github.com>

* Update ui/ui-frontend/projects/identity/src/locale/messages.xlf

Co-authored-by: default avatarCouzinieAtCines <62284459+CouzinieAtCines@users.noreply.github.com>

* [TECH] Merge fixes

* Revert [TECH] Strange fixes for ui-referential (why was it working)

Co-authored-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>
Co-authored-by: default avatarMathieu Leguay <mathieu.leguay@ouidou.fr>
Co-authored-by: default avatarBLANCHET Ludovic <ludovic.blanchet.ext@culture.gouv.fr>
Co-authored-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamvitamui.com>
Co-authored-by: default avatarMaël AUDEON <mael.audeon@teamdlab.com>
Co-authored-by: default avatarMathieu Leguay <mathieu.leguay@teamdlab.com>
Co-authored-by: default avatarAmine FILALI <amine.filali@xelians.fr>
Co-authored-by: default avatarCouzinieAtCines <62284459+CouzinieAtCines@users.noreply.github.com>
8aca1e4d

VitamUI

VitamUI project.

Prerequisites

  • Install Java at least version 8
  • Install Maven
  • Install Git
  • Install NodeJs
  • Configure default registry: npm config set registry https://registry.npmjs.org/
  • Environment variable :
    • Vitam developer
      • Specify the environment variables : SERVICE_NEXUS_URL and SERVICE_REPOSITORY_URL
      • The maven command. Params between {} are optional: mvn clean install {-Ddependency-check.skip=true} -Denv.SERVICE_NEXUS_URL=... -Denv.SERVICE_REPOSITORY_URL=... {-DskipTests} -Pvitam
    • Non vitam developer

Clone

Execute this command to clone the project from the bitbucket repo:

git clone https://github.com/vitam-prg/vitamUI.git

Global Maven profiles

Without a profile, only Java projects are build. In order to build and package UI projects (i.e. Java backend & Angular frontend altogether), we use the plugin frontend-maven-plugin provided by com.github.eirslett.

dev

This profile is used to build the entire project for dev purposes, backend & frontend included.

  • UI modules are packaged with both Java & Angular.
  • Angular projects are build without optimization in order to reduce global build time.
  • Jasmine Karma tests are launched with the headless chrome.

prod

This profile is used to build the entire project for prod purposes, backend/frontend included.

  • UI modules are packaged with both Java & Angular.
  • Angular projects are build with optimization.
  • Jasmine Karma tests are launched with the headless chrome.

npm-publish

This profile is used to build, test & push npm packages to the npm repository.

  • It should be used in ui/ui-frontend-common to push the npm package of the common UI library.

rpm

This profile is used to build rpm packages. Only Maven modules with rpm.skip = false in their properties are eligible.

rpm-publish

This profile is used to push the generated rpm package. Only Maven modules with rpm.skip = false in their properties are eligible.

skipTestsRun

This profile is automatically activated if the option -DskipTests is used during Maven execution in order to disable Jasmine Karma tests execution.

sonar

This profile is used to update sonar informations.

webpack

This profile is used to build the entire project, backend & frontend included.

  • Angular projects are build without optimization in order to reduce global build time.
  • Jasmine Karma tests are launched with the headless chrome.
  • Jenkins can use this profile.

swagger

This profile is used to generate the swagger.json draft file for swagger documentation. It's only needed for API modules.

swagger-docs

This profile is used to generate .html & .pdf swagger documentation in tools/swagger/docs/.

  • Only Maven modules with 'rpm.skip = false' in their properties are eligible.

vitam

Profile to use for all Vitam internal developers

Integration Tests Maven profiles

No integration test is launched during the “normal” build of the project. Integration tests need a full running environnement in order to launch API tests & few UI tests also.

integration

This profile should be used to launch integration tests in Jenkins. The configuration used for the tests is available in integration-tests/src/test/resources/application-integration.yml

dev-it

This profile should be used to launch integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml

iam

This profile should be used to launch API IAM integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml

security

This profile should be used to launch API Security integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml

front

This profile should be used to launch UI integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml

Build (first build)

Publish ui-frontend-common package. It's needed for angular projects ui-portal & ui-identity to compile. Execute this command to build the project with unit tests and without building our angular projects:

cd ui/ui-frontend-common;
mvn clean install -Pnpm-publish

Build (only Java)

Execute this command to build the project with unit tests and without building our angular projects:

mvn clean install

Build (only Java) without test

Execute this command to build the project without unit tests and without building our angular projects:

mvn clean install -DskipTests

Build with IHM (JS) in dev mode

Use the dev maven profile to build the project with our angular projects. For our angular projects, the build doesn't generate the sourcemap and doesn't optimize the build. For the karma tests, we don't generate the code coverage and use the headless chrome.

mvn clean install -Pdev

Build with IHM (JS) for our Jenkins

Use the webpack maven profile to build the project with our angular projects. For our angular projects, the build generate the sourcemap and doesn't optimize the build. For the karma tests, we don't generate the code coverage and use the headless chrome.

mvn clean install -Pwebpack

Build with IHM (JS) for our Production environment

Use the webpack maven profile to build the project with our angular projects. For our angular projects, the build generate the sourcemap and optimize the build. For the karma tests, we don't generate the code coverage and use the headless chrome.

mvn clean install -Pprod

If -DskipTests id added during the build of dev, webpack or prod, unit tests and karma tests are both ignored.

Integration tests

Use the integration-tests maven profile to build the project with unit tests and integration tests

mvn clean verify -Pdev-it

For more details see README in integration-tests module.

Package to RPM

Use the RPM maven profile to build the project and package to RPM:

mvn clean package -Prpm,webpack

Execute Integration tests

mvn clean verify -Pintegration

Execute sonar report

mvn clean verify -Psonar

You can specify properties to change URL and login to sonar:

mvn clean verify -Psonar \
    -Dsonar.host.url=http://localhost:9000 \
    -Dsonar.login=<TOKEN AUTHENTICATION>

Deploy artifact

To build all artifacts and deploy to NEXUS use:

mvn clean deploy -Prpm,webpack

Swagger

To generate swagger.json use:

mvn test -Pswagger

To edit swagger.json you can use this website:

https://editor.swagger.io/

To generate index.pdf and index.html from swagger.json:

 mvn generate-resources -Pswagger-docs

Lancement de VITAMUI des versions

Current version of VITAMUI depends on Ansible version 2.7.0.

In order not to interfere with more recent Ansible version, deploy a Python VirtualEnv in which you install Ansible 2.7.0:

  • Check that VirtualEnv executable is installed: apt-get install python-virtualenv
  • In a directory of your choice, create the virtual environment: virtualenv vitamUI-ansible
  • Activate the environment . virtamUI-ansible/bin/activate
  • Install Ansible 2.7.0: pip install ansible==2.7.0
  • Check the version of ansible: ansible --version

Autre possibilité, Ansible version 2.7.0 doit être installé pour lancer le script mongo:

  • Si une version d'ansible à été installé via apt-get install, il est nécessaire de la sésinstaller apt-get remove ansible
  • Installer pip apt-get install -y python-pip
  • Installer ansible via pip pip install ansible==2.7.0
  • Vérifier que l'installation c'est bien déroulée ansible --version
  • Il est possible que l'ajout du lien vers ansible dans le PATH et/ou qu'un redémarage soit nécessaire

1 - Démarrage du Mongo VITAMUI

├── tools
│   ├── docker
│   │   ├── mongo: './restart_dev.sh'

2 - Lancement de l'application SpringBoot Security-Internal

│   ├── api-security
│   │   ├── security-internal: 'mvn clean spring-boot:run' ou './run.sh'

3 - Lancement de l'application SpringBoot IAM-Internal

├── api
│   ├── api-iam
│   │   ├── iam-internal: 'mvn clean spring-boot:run' ou './run.sh'

4 - Lancement de l'application SpringBoot IAM-External

├── api
│   ├── api-iam
│   │   ├── iam-external: 'mvn clean spring-boot:run'
                        ou './run.sh'

5 - Lancement de l'application CAS Server. La surcharge faite sur CAS nous empêche de lancer avec le plugin spring-boot

CAS-Server dépend de security-internal, iam-internal & iam-external

├── cas
│   ├── cas-server: './run.sh'

Scénario 1 : utilisation en dev

6a - Lancement de l'application SpringBoot correspondant au back de UI-Portal

└── ui
    └── ui-portal: 'mvn clean spring-boot:run'

6b - Lancement de l'application Angular UI-Portal

└── ui
    ├── ui-frontend: 'npm run start:portal'

7a - Lancement de l'application SpringBoot correspondant au back de UI-Identity

└── ui
    └── ui-identity: 'mvn clean spring-boot:run'

7b - Lancement de l'application Angular UI-Identity

└── ui
    ├── ui-frontend: 'npm run start:identity'

Scénario 2 : utilisation en mode recette : Une compilation avec -Pwebpack a été effectuée.

Attention les JAR doivent contenir les pages et scripts de la partie UI Frontend généré avec ng build.

6 - Lancement de l'application SpringBoot correspondant au back de UI-Portal

└── ui
    └── ui-portal: './run.sh'

7 - Lancement de l'application SpringBoot correspondant au back de UI-Identity

└── ui
    └── ui-identity : './run.sh'

8. Les certificats sont auso-signés, il faut accepter les certificats dans le navigateur pour :

Attention : sans cette étape, le logout sur toutes les applications par CAS ne fonctionne pas

UI-Frontend

Ui-Back

9. Se connecter sur le portail via