Commit 17b3974c authored by cazenave's avatar cazenave
Browse files

ajout du code pastis back et front

parent 62cd45f4
......@@ -12,7 +12,7 @@ spring:
register: false
data:
mongodb:
uri: mongodb://mongod_dbuser_iam:mongod_dbpwd_iam@localhost:27018/iam?connectTimeoutMS=2000
uri: mongodb://mongod_dbuser_iam:mongod_dbpwd_iam@dev.vitamui.com:27018/iam?connectTimeoutMS=2000
server-identity:
identityName: vitamui-dev
......
......@@ -9,6 +9,9 @@ filter_plugins = ./filter_plugins/
# This is 2 hours
fact_caching_timeout = 7200
gather_subset = !all
gather_timeout = 20
# Mitogen
host_key_checking = False
strategy_plugins = ./lib/mitogen-0.2.9/ansible_mitogen/plugins/strategy
......
......@@ -123,3 +123,35 @@ db.applications.insert({
"tooltip": "Consulter mes informations, Choisir la langue de l'interface",
"target": "_self"
});
// -------- PASTIS -----
db.applications.insert({
"identifier" : "PASTIS_APP",
"url" : "https://{{ vitamui_services.ui_pastis.server_name }}",
"icon" : "vitamui-icon vitamui-icon-ontologie",
"name" : "PASTIS",
"category" : "referential",
"position" : NumberInt(51),
"hasCustomerList" : false,
"hasTenantList" : true,
"hasHighlight" : false,
"tooltip" : "Accéder, créer et modifier les profils d'archivage",
"target" : "_self"
});
db.applications.insert({
"_id" : ObjectId("5f02f30ed792810b68782526"),
"identifier" : "SEDA_APP",
"url" : "https://{{ vitamui_services.ui_pastis.server_name }}/sedaview",
"icon" : "vitamui-icon vitamui-icon-ontologie",
"name" : "SEDA View poste de DEV",
"category" : "referential",
"position" : NumberInt(51),
"hasCustomerList" : false,
"hasTenantList" : true,
"hasHighlight" : false,
"tooltip" : "Visualisation du SEDA en graph",
"target" : "_self"
});
......@@ -1353,6 +1353,12 @@
<angular.build.profile>:dev</angular.build.profile>
<angular.test.profile>:conf-ci</angular.test.profile>
</properties>
<repositories>
<repository>
<id>vitam</id>
<url>http://download.programmevitam.fr/vitam_repository/${vitam.version}/mvn_repo/</url>
</repository>
</repositories>
<build>
<resources>
<resource>
......
......@@ -8,6 +8,7 @@ filter_plugins = ./../../../deployment/filter_plugins/
# The timeout is defined in seconds
# This is 2 hours
fact_caching_timeout = 7200
gather_subset = !all
gather_timeout = 20
[ssh_connection]
pipelining = True
......@@ -5,8 +5,8 @@
- hosts: localhost
gather_facts: true
roles:
- {
role: mongo_init,
- {
role: mongo_init,
mongod_source_template_dir: "{{lookup('env','PWD')}}/../../../deployment/scripts/mongod/"
}
......
......@@ -19,6 +19,7 @@
<module>ui-portal</module>
<module>ui-identity</module>
<module>ui-referential</module>
<module>ui-pastis</module>
</modules>
</project>
......@@ -498,6 +498,128 @@
}
}
}
},
"pastis": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "sass"
}
},
"root": "projects/pastis",
"sourceRoot": "projects/pastis/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/pastis",
"index": "projects/pastis/src/index.html",
"main": "projects/pastis/src/main.ts",
"polyfills": "projects/pastis/src/polyfills.ts",
"tsConfig": "projects/pastis/tsconfig.app.json",
"aot": false,
"assets": [
"projects/pastis/src/favicon.ico",
"projects/pastis/src/assets"
],
"styles": [
"projects/pastis/src/styles.scss"
],
"scripts": [
"projects/pastis/src/assets/js/class-diagram.js",
"projects/pastis/src/assets/js/multiline-text.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "projects/pastis/src/environments/environment.ts",
"with": "projects/pastis/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "pastis:build",
"host": "dev.vitamui.com",
"port": 4251
},
"configurations": {
"production": {
"browserTarget": "pastis:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "pastis:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/pastis/src/test.ts",
"polyfills": "projects/pastis/src/polyfills.ts",
"tsConfig": "projects/pastis/tsconfig.spec.json",
"karmaConfig": "projects/pastis/karma.conf.js",
"assets": [
"projects/pastis/src/assets",
"projects/pastis/src/favicon.ico"
],
"styles": [
"projects/pastis/src/assets/css/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/pastis/tsconfig.app.json",
"projects/pastis/tsconfig.spec.json",
"projects/pastis/e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "projects/pastis/e2e/protractor.conf.js",
"devServerTarget": "pastis:serve"
},
"configurations": {
"production": {
"devServerTarget": "pastis:serve:production"
}
}
}
}
}
},
"defaultProject": "portal",
......
This diff is collapsed.
......@@ -15,6 +15,7 @@
"start:portal": "ng serve portal --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:identity": "ng serve identity --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:referential": "ng serve referential --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:pastis": "ng serve pastis --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key dev-ssl/server.key --ssl-cert dev-ssl/server.crt",
"build": "ng build --prod --i18n-locale fr --build-optimizer=false --optimization=false",
"postinstall": "npm run build:vitamui-library",
"build:prod": "export NODE_OPTIONS=--max_old_space_size=4096; ng build --prod --i18n-locale fr --output-path ../../../target/www",
......@@ -26,6 +27,7 @@
"build:portal": "export NODE_OPTIONS=--max_old_space_size=4096; ng build portal --prod --i18n-locale fr",
"build:identity": "export NODE_OPTIONS=--max_old_space_size=4096; ng build identity --prod --i18n-locale fr",
"build:referential": "export NODE_OPTIONS=--max_old_space_size=4096; ng build referential --prod --i18n-locale fr",
"build:pastis": "export NODE_OPTIONS=--max_old_space_size=4096 ; ng build pastis --prod --i18n-locale fr ",
"analyze-portal": "ng build portal --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/portal/stats-es2015.json",
"analyze-identity": "ng build identity --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/identity/stats-es2015.json",
"analyze-referential": "ng build referential --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/referential/stats-es2015.json",
......@@ -88,7 +90,22 @@
"utf-8-validate": "^5.0.2",
"uuid": "^7.0.2",
"web-animations-js": "^2.3.2",
"zone.js": "~0.9.1"
"zone.js": "~0.9.1",
"ng2-date-picker": "^8.0.0",
"ng2-file-upload": "^1.4.0",
"ng2-nvd3": "^2.0.0",
"ng2-tooltip-directive": "^2.9.20",
"ngx-spinner": "8.1.0",
"ngx-toastr": "^11.3.3",
"ngx-ui-loader": "^8.0.0",
"d3": "^3.5.17",
"d3-svg-legend": "^1.13.0",
"generate-schema": "^2.6.0",
"serialize-javascript": "^5.0.1",
"remove": "^0.1.5",
"@babel/compat-data": "^7.8.0",
"@types/d3": "^3.5.43",
"autoprefixer": "^9.7.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.26",
......@@ -113,12 +130,14 @@
"ng-packagr": "^9.0.0",
"ngx-i18nsupport": "^0.17.1",
"node-sass": "^4.14.1",
"protractor": "^7.0.0",
"protractor": "7.0.0",
"puppeteer": "^1.2.0",
"ts-node": "~7.0.1",
"tsickle": "^0.37.0",
"tslint": "~5.11.0",
"typescript": "~3.5.3",
"webpack-bundle-analyzer": "^3.8.0"
"webpack-bundle-analyzer": "^3.8.0",
"cucumber": "^6.0.5",
"protractor-cucumber-framework": "^6.2.1"
}
}
# LocationLayout
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.4.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
\ No newline at end of file
/*
Copyright © CINES - Centre Informatique National pour l'Enseignement Supérieur (2020)
[dad@cines.fr]
This software is a computer program whose purpose is to provide
a web application to create, edit, import and export archive
profiles based on the french SEDA standard
(https://redirect.francearchives.fr/seda/).
This software is governed by the CeCILL-C license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL-C
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL-C license and that you accept its terms.
*/
export default class AsyncUtils {
public static map<T1, T2>(
array: T1[],
callback: (value: T1, index: number, array: T1[]) => Promise<T2>,
): Promise<T2[]> {
return Promise.all(array.map(callback));
}
public static async forEach<T>(
array: T[],
callback: (value: T, index: number, array: T[]) => void,
) {
await Promise.all(array.map(callback));
}
public static async filter<T>(
array: T[],
callback: (value: T, index: number, array: T[]) => Promise<boolean>,
): Promise<T[]> {
const filterMap = await AsyncUtils.map(array, callback);
return array.filter((_, index) => filterMap[index]);
}
public static async find<T>(
array: T[],
callback: (value: T, index: number, array: T[]) => Promise<boolean>,
): Promise<T> {
const results = await AsyncUtils.map(array,callback);
const index = results.findIndex(result => result);
return array[index];
}
}
\ No newline at end of file
Feature: Export profile
Scenario: Open Pastis and Export default profile
Given The user goes to the homepage
Then The user clicks on the export button
Then The RNG file is downloaded
\ No newline at end of file
Feature: Navigate Profile
Scenario: Open Pastis and Click stuff around..
Given The user goes to the homepage
Then The user clicks on "ARBORESCENCE" tab
Then The user navigates to "ArchiveUnit,Content"
Then The user writes "YAHOOO" in the field "valeurFixe" of the metadata "Title"
Then The user writes "Fonds" in the field "valeurFixe" of the metadata "DescriptionLevel"
Then The user writes "1" in the field "cardinalite" of the metadata "DescriptionLevel"
Then Verify that the value of the field "valeurFixe" of the metadata "Title" is "YAHOOO"
Then Verify that the value of the field "cardinalite" of the metadata "DescriptionLevel" is "1"
Then Verify that the list of options of the field "valeurFixe" of the metadata "DescriptionLevel" is ",Fonds,Subfonds,Class,Collection,Series,Subseries,RecordGrp,SubGrp,File,Item,OtherLevel"
Then The user clicks on "ENTÊTE" tab
Then The user navigates to "ArchivalAgency,Identifier"
Then The user writes "Super commentaire" in the field "commentaire" of the metadata "Identifier"
Then The user navigates to "ArchivalAgency"
Then The user clicks on Ajouter une métadonnée
Then The user adds the metadata "OrganizationDescriptiveMetadata"
Then The user validates the popup
Then Verify that the list of nodes of "ArchivalAgency" is "Identifier,OrganizationDescriptiveMetadata"
Then The user clicks on "OBJETS" tab
Then The user navigates to "DataObjectGroup"
Then The user clicks on Ajouter une métadonnée
Then The user adds the metadata "PhysicalDataObject"
Then The user validates the popup
Then The user navigates to "DataObjectGroup,PhysicalDataObject"
Then The user clicks on Ajouter une métadonnée
Then The user adds the metadata "PhysicalDimensions"
Then The user validates the popup
Then The user navigates to "DataObjectGroup,PhysicalDataObject,PhysicalDimensions"
Then The user clicks on Ajouter une métadonnée
Then The user adds the metadata "Width"
Then The user adds the metadata "Height"
Then The user adds the metadata "Depth"
Then The user validates the popup
Then Verify that the list of nodes of "DataObjectGroup,PhysicalDataObject,PhysicalDimensions" is "Width,Height,Depth"
Then Open the menu of the metadata "Width"
Then Verify that the list of options in the context menu of the metadata "Width" is "Dupliquer,Attributs de métadonnée,Supprimer"
Then The user clicks on the item "Attributs de métadonnée" of the context menu
Then Verify that the list of options of the field "valeurFixe" of the attribute "unit" is ",micrometre,4H,millimetre,MMT,centimetre,CMT,metre,inch,INH,foot,FOT"
Then The user writes "metre" in the field "valeurFixe" of the attribute "unit"
Then The user writes "Yahoo" in the field "commentaire" of the attribute "unit"
Then The user selects the attributes "unit"
Then The user validates the popup
Then Open the menu of the metadata "Width"
Then The user clicks on the item "Attributs de métadonnée" of the context menu
Then Verify that the list of attributes is "unit"
Then Verify that the selected attributes are "unit"
Then Verify that the value of the field "valeurFixe" of the attribute "unit" is "metre"
Then Verify that the value of the field "commentaire" of the attribute "unit" is "Yahoo"
Then Close the popup
Then The user clicks on "ENTÊTE" tab
Then Open the menu of the metadata "MessageIdentifier"
Then Verify that the list of options in the context menu of the metadata "MessageIdentifier" is "Dupliquer,Attributs de métadonnée"
Then The user clicks on the item "Attributs de métadonnée" of the context menu
Then Verify that the list of attributes is "schemeID,schemeName,schemeAgencyID,schemeAgencyName,schemeVersionID,schemeDataURI,schemeURI"
Then Verify that the selected attributes are ""
Then The user selects the attributes "schemeID"
Then The user writes "YAHOOO" in the field "valeurFixe" of the attribute "schemeID"
Then Verify that the value of the field "valeurFixe" of the attribute "schemeID" is "YAHOOO"
Then Verify that the selected attributes are "schemeID"
Then The user clicks on Tout sélectionner
Then Verify that the selected attributes are "schemeID,schemeName,schemeAgencyID,schemeAgencyName,schemeVersionID,schemeDataURI,schemeURI"
Then The user validates the popup
Then Open the menu of the metadata "MessageIdentifier"
Then The user clicks on the item "Attributs de métadonnée" of the context menu
Then Verify that the list of attributes is "schemeID,schemeName,schemeAgencyID,schemeAgencyName,schemeVersionID,schemeDataURI,schemeURI"
Then Verify that the selected attributes are "schemeID,schemeName,schemeAgencyID,schemeAgencyName,schemeVersionID,schemeDataURI,schemeURI"
Then The user clicks on Tout sélectionner
Then The user selects the attributes "schemeName"
Then Verify that the selected attributes are "schemeName"
Then The user validates the popup
Then Open the menu of the metadata "MessageIdentifier"
Then The user clicks on the item "Attributs de métadonnée" of the context menu
Then Verify that the selected attributes are "schemeName"
Then Close the popup
\ No newline at end of file
Feature: TEST POC
Scenario: Pastis 51
Given The user goes to the homepage
Then The user clicks on "Arborescence" tab
Then The user should see the "Arborescence" tab
This diff is collapsed.
{
"name": "protractor",
"version": "0.0.0-development",
"private": true,
"type": "module",
"devDependencies": {
"chai": "^4.2.0",
"chai-as-promised": "7.1.1",
"@types/chai": "^4.2.14",
"@types/chai-as-promised": "^7.1.3",
"@types/cucumber": "^6.0.1",
"@types/node": "^8.10.59",
"cucumber": "^6.0.5",
"protractor": "7.0.0",
"protractor-cucumber-framework": "^6.2.1",
"protractor-firefox-support": "1.5.0",
"ts-node": "^9.0.0",
"typescript": "~3.4.3"
}
}
/*
Copyright © CINES - Centre Informatique National pour l'Enseignement Supérieur (2020)
[dad@cines.fr]
This software is a computer program whose purpose is to provide
a web application to create, edit, import and export archive
profiles based on the french SEDA standard
(https://redirect.francearchives.fr/seda/).
This software is governed by the CeCILL-C license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL-C
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL-C license and that you accept its terms.
*/
import { ElementFinder, element, by, browser } from 'protractor';
import { AttributesTableHeader } from './attributes-table-header.po';
import { Field, FieldsName } from './field.po';
import { FieldValeurFixe } from './field-valeur-fixe.po';
import { FieldCardinalite } from './field-cardinalite.po';
import { FieldCommentaire } from './field-commentaire.po';
export class Attribute {
constructor(public container: ElementFinder){}
public async getName(): Promise<string> {
return await this.container.element(by.css('td.mat-column-nomDuChamp')).getText();
}
public get valeurFixe(): Field {
return new FieldValeurFixe(this.container.element(by.css('td.mat-column-valeurFixe > :first-child')));
}
public get cardinalite(): Field {
return new FieldCardinalite(this.container.element(by.css('td.mat-column-cardinalite > :first-child')));
}
public get commentaire(): Field {
return new FieldCommentaire(this.container.element(by.css('td.mat-column-commentaire > :first-child')));
}
public getfieldByName(name: string): Field{
switch(name){
case FieldsName.valeurFixe: return this.valeurFixe;
case FieldsName.cardinalite: return this.cardinalite;
case FieldsName.commentaire: return this.commentaire;
}
}
public get checkbox(): ElementFinder {
return this.container.element(by.css('mat-checkbox'));
}
}
\ No newline at end of file
/*
Copyright © CINES - Centre Informatique National pour l'Enseignement Supérieur (2020)
[dad@cines.fr]
This software is a computer program whose purpose is to provide
a web application to create, edit, import and export archive
profiles based on the french SEDA standard
(https://redirect.francearchives.fr/seda/).