Skip to content
Snippets Groups Projects
user avatar
pyXelians authored
* [FIX RABB-1123] filter owner's events on his identifier

* [TECH] Init default authnRequestBinding

* [FIX TRTL-753] Init graphic identity

* [TECH] Fix referential TU

* [US TRTL-750] update progress bar message

* [US TRTL-648] update elevations

* [TECH] Update frontend-common version to 2.1.6

* [US TRTL-738] display ken when missing translate

* [US TRTL-734] update system customer

* [US TRTL-751] REDESIGN - button fil ariane

* [TECH] Update frontend-common version to 2.1.7

* [FIX TRTL-716] avoid calling service to get profiles already loaded

* [FIX TRTL-737] keep separator only on top of last child

* [US TRTL-743] Fix the app engine search with translation

* [US TRTL-754] Fix portal title & message translation

* [US TRTL-754 TRTL-733] Create langage service & code refactoring

* [US TRTL-646] Allow opening application with contextual menu

* [TS TRTL-760][TRTL-759] Get app tenant in selection

* [TECH] Update frontend-common to 2.1.8

* [TECH] Fix exception when application service dont found the app

* [FIX TRTL-761] fix level input focus and fix javascripts errors

* [US TRTL-768] Fix button uppercase

* [FIX TRTL-648] - remove elevation 0 at app launcher

* [FIX TRTL-772] redesign of menu button

* [FIX TRTL-642] Fix pattern label position

* [FIX TRTL-773] fix breadcrumb style

* [US TRTL-731] Add responsive design

* [TECH] update frontend-common version to 2.1.9

* [US RABB-1080] Add reporting app

* [FIX RABB-1119-1120] Review some labels in the organizations app

* [TS TRTL-749] Fix design on R3 component

* [FIX TRTL-778] Fix sidenav y scrollbar

* [FIX TRTL-787] Fix application engine

* [FIX TRTL-791] Fix app engine click

* [US TRTL-776] Activate lang selection from header

* [US TRTL-776] Remove disable feature from item select

* [FIX TRTL-780] Fix starter kit

* [FIX TRTL-780] Fix portal scroll

* [TECH] update frontend-common version to 2.1.10

* [US RABB-1063] use the same date format as VITAM for external events

* [US TRTL-770] add translation

* FIX - mock domain input on parent tests

* [US TRTL-793] fix vitamui-date style (and shadow on disabled items)

* [TECH] update frontend-common to 2.1.1

* [TECH] fix referential tests cause by domain input not mocked

* [US TRTL-811] delete casGetResponseView page

* [US TRTL-770] fix breadcrumb translation

* [TECH] update frontend-common to 2.1.12

* [US TRTL-764] [TRTL-720] managing a country service

* [TECH] update frontend common version

* [TS TRTL-819] Add translation to starter-kit

* [US TRTL-600] Add users app new icon

* [US TRTL-599] Add app customers new icon

* [US TRTL-822] fix logout page

* [FIX TRTL-665] Ignore translation json

Fix redirection on translation json

* [TECH] Improve starter-kit breadcrumb

* [US TRTL-799] add disable option on vitamui menu button component

* fix secondary spinner

* [US TRTL-601] add profile user new icon

* [US TRTL-747] REDESIGN loading  connection page

* [US TRTL-770] add missing translations

* [TECH] update ui-frontend-common to 2.1.15

* [US TRTL-817] fix css more action button

* [US TRTL-822]  fix  logout connection

* [US  TRTL-810] fix open app with arrow key enter

* [FIX TRTL-785] Fix infinite scroll due to responsive design

* [FIX TRTL-809] improve vitamui-autocomplete

* [FIX TRTL-770]  traduction on user tab

* [TECH] upgrade to version 5.2.0-SNAPSHOT

* [TS TRTL-748] Do not cache translation files

* [FIX TRTL-851] Set internalCode in authUser

* [FIX TRTL-838] fix countries display on starter kit

* [FIX TRTL-831] Fix scroll top

* [US TRTL-844] add missing translations

* [TECH] update ui-frontend-common to 2.1.18

* [US TRTL-755] update fr/en.json to meet format rules

* [TECH] update ui-frontend-common to version 2.1.19

* [US TRTL-865] [TRTL-834] improve responsive : overflow of tabs

* [TECH] FIX rebase

* [TECH] fix rebase

* [TECH] FIX categories

* [TECH] handle conflict

Co-authored-by: default avatarmsayad <mahmoud.sayad@teamdlab.com>
Co-authored-by: default avatarDelphine <delphine.coursier@teamdlab.com>
Co-authored-by: default avatarCindy <cindy.nacibide@teamdlab.com>
Co-authored-by: default avatarNOUMANE <ahmed.noumane@xelians.fr>
Co-authored-by: default avatarFadil <Fadil.zemmari@xelians.fr>
Co-authored-by: default avatarHicham Barhoumi <hicham.barhoumi@archiveco.fr>
Co-authored-by: default avatarAmine FILALI <amine.filali@xelians.fr>
af850b00

VitamUI

Prerequisites

Tools

  • Install JDK version >= 8
  • Install Maven
  • Install Git
  • Install Node.js and npm (with nvm)
    • Configure default registry: npm config set registry https://registry.npmjs.org/
  • Python version 2.7 + pip for Python 2
  • Install Ansible (see Ansible)

Ansible

Current version of VitamUI depends on Ansible version 2.7.0 in order to run installation scripts.

With VirtualEnv

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: vitamUI-ansible/bin/activate

Without VirtualEnv

  • First remove older versions of Ansible before re-installing it: pip uninstall ansible.
  • Si une version d'ansible à été installée via apt-get install, il est nécessaire de la désinstaller : apt-get remove ansible

Common steps

  • Install Ansible 2.7.0: pip install ansible==2.7.0
  • Check the version of ansible: ansible --version

Il est possible que l'ajout du lien vers ansible dans le PATH et/ou qu'un redémarage soit nécessaire

Configuration

  • Clone project and change ownership: sudo chown -R $USER vitam-ui/
  • Build project using the "right" profile (see Maven profiles and Build)

For Vitam internal developers

  • Build project using vitam profile (see Build for Vitam developers )
  • Set up environment variables : SERVICE_NEXUS_URL and SERVICE_REPOSITORY_URL
  • Copy files: access-external-client.conf, ingest-external-client.conf, keystore_ihm-demo.p12 and truststore_ihm-demo.jks into api/api-(iam|referential)/(iam|referential)-internal/src/main/config/dev-vitam/
  • Redirect dev.vitamui.com URL defined in code to localhost : add this line 127.0.0.1 dev.vitamui.com to your hosts (/etc/hosts) file

For non Vitam developers

Common errors

/bin/sh: 1: /usr/bin/python: not found => Create symlink, for instance: sudo ln -s /usr/bin/python2.7 /usr/bin/python

Maven profiles

Without a profile, only Java projects are build.

Global Maven profiles

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 built 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 built 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 information.

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

This is the 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 environment 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

Build (first build) // DEPRECATED?

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 for Vitam internal developers

mvn clean install [-Ddependency-check.skip=true] -Denv.SERVICE_NEXUS_URL=... -Denv.SERVICE_REPOSITORY_URL=... [-DskipTests] -Pvitam

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 prod 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.

Build with integration tests for development environment

Use the dev-it 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.

Build with integration tests for Jenkins

mvn clean verify -Pintegration

Package to RPM

Use the rpm and webpack maven profiles to build the project and package to RPM:

mvn clean package -Prpm,webpack

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

Use the rpm and webpack maven profiles to build all artifacts and deploy to NEXUS use:

mvn clean deploy -Prpm,webpack

Swagger

To generate swagger.json:

mvn test -Pswagger
ATTENTION :

In case you change the model part of an object or an entity in one of the projects, it is not essential to regenerate the swagger.json file, you just have to modify it manually by adding the necessary information on the modifications we made on the model part.

To edit the file you can use this website.

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

 mvn generate-resources -Pswagger-docs

Run

Pour lancer VITAM en mode développement et permettre à VITAMUI d'accéder à ces APIs, voir la configuration suivante.

1 - Démarrage du Mongo VitamUI

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

2 - Démarrage du docker smpt4dev (facultatif)

├── tools
│   ├── docker
│   │   ├── mail: './start.sh'

3 - Lancement de l'application SpringBoot Security-Internal

├── api
│   ├── api-security
│   │   ├── security-internal: 'mvn clean spring-boot:run [-Puse-profile-here]' ou './run.sh'

4 - Lancement de l'application SpringBoot IAM-Internal

├── api
│   ├── api-iam
│   │   ├── iam-internal: 'mvn clean spring-boot:run [-Puse-profile-here]' ou './run.sh'

5 - Lancement de l'application SpringBoot IAM-External

├── api
│   ├── api-iam
│   │   ├── iam-external: 'mvn clean spring-boot:run [-Puse-profile-here]' ou './run.sh'

6 - Lancement de l'application SpringBoot Ingest-Internal

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

7 - Lancement de l'application SpringBoot Ingest-External

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

8 - 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

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

└── ui
    └── ui-portal: 'mvn clean spring-boot:run [-Puse-profile-here]'

NB: Profile should be vitam for Vitam internal developers to resolve dependency issues.

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

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

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

└── ui
    └── ui-identity: 'mvn clean spring-boot:run [-Puse-profile-here]'

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

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

11a - Lancement de l'application SpringBoot correspondant au back de UI-Ingest

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

11b - Lancement de l'application Angular UI-Ingest

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

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és avec ng build.

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

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

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

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

11 - Lancement de l'application SpringBoot correspondant au back de UI-Ingest

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

12 - Les certificats sont auto-signés, il faut les accepter dans le navigateur pour :

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

13 - Se connecter sur le portail via :

14 - Se connecter sur la page de réception des mails smpt4dev via :