diff --git a/commons/commons-api/src/main/java/fr/gouv/vitamui/commons/api/domain/ServicesData.java b/commons/commons-api/src/main/java/fr/gouv/vitamui/commons/api/domain/ServicesData.java index 827cf36228d6326d59eb65123c81e78e15a8928a..b17b90add6102fbb90bc2f29ff4652e6db08e77d 100644 --- a/commons/commons-api/src/main/java/fr/gouv/vitamui/commons/api/domain/ServicesData.java +++ b/commons/commons-api/src/main/java/fr/gouv/vitamui/commons/api/domain/ServicesData.java @@ -326,13 +326,13 @@ public class ServicesData { public static final String ROLE_GET_ARCHIVE_PROFILES = ROLE_PREFIX + "GET_ARCHIVE_PROFILES"; - //------------------------------------ API SUPERVISION ----------------------------------------- + //------------------------------------ API LOGBOOK OPERATION ----------------------------------------- - public static final String SERVICE_API_SUPERVISION_ROLE = "SUPERVISION_API"; + public static final String SERVICE_API_LOGBOOK_OPERATION_ROLE = "LOGBOOK_OPERATION_API"; - public static final String ROLE_CREATE_SUPERVISION_ROLE = CREATE_ROLE_PREFIX + SERVICE_API_SUPERVISION_ROLE; - public static final String ROLE_GET_SUPERVISION_ROLE = GET_ROLE_PREFIX + SERVICE_API_SUPERVISION_ROLE; - public static final String ROLE_GET_ALL_SUPERVISION_ROLE = GET_ROLE_PREFIX + "ALL_" + SERVICE_API_SUPERVISION_ROLE; + public static final String ROLE_CREATE_LOGBOOK_OPERATION_ROLE = CREATE_ROLE_PREFIX + SERVICE_API_LOGBOOK_OPERATION_ROLE; + public static final String ROLE_GET_LOGBOOK_OPERATION_ROLE = GET_ROLE_PREFIX + SERVICE_API_LOGBOOK_OPERATION_ROLE; + public static final String ROLE_GET_ALL_LOGBOOK_OPERATION_ROLE = GET_ROLE_PREFIX + "ALL_" + SERVICE_API_LOGBOOK_OPERATION_ROLE; //@formatter:off @@ -414,9 +414,9 @@ public class ServicesData { ROLE_GET_OPERATIONS, ROLE_RUN_PROBATIVE_VALUE, - ROLE_CREATE_SUPERVISION_ROLE, - ROLE_GET_SUPERVISION_ROLE, - ROLE_GET_ALL_SUPERVISION_ROLE + ROLE_CREATE_LOGBOOK_OPERATION_ROLE, + ROLE_GET_LOGBOOK_OPERATION_ROLE, + ROLE_GET_ALL_LOGBOOK_OPERATION_ROLE ); @@ -521,9 +521,9 @@ public class ServicesData { ROLE_RUN_AUDITS, ROLE_RUN_PROBATIVE_VALUE, - ROLE_CREATE_SUPERVISION_ROLE, - ROLE_GET_SUPERVISION_ROLE, - ROLE_GET_ALL_SUPERVISION_ROLE + ROLE_CREATE_LOGBOOK_OPERATION_ROLE, + ROLE_GET_LOGBOOK_OPERATION_ROLE, + ROLE_GET_ALL_LOGBOOK_OPERATION_ROLE ); //@formatter:on diff --git a/deployment/scripts/mongod/1.0.0/101_iam_system_demo.js b/deployment/scripts/mongod/1.0.0/101_iam_system_demo.js index 850f4e85c29ecce6ca3cc466173427a60c31f3c7..4b9c5688362a159f980c189ddf3b1e10a1cb4b6f 100644 --- a/deployment/scripts/mongod/1.0.0/101_iam_system_demo.js +++ b/deployment/scripts/mongod/1.0.0/101_iam_system_demo.js @@ -200,7 +200,7 @@ db.groups.insert({ "system_secure", "system_dsl", "system_probative_value", - "system_supervision_api_profile" + "system_logbook_operation_profile" ], "readonly": false, "level": "", diff --git a/deployment/scripts/mongod/1.0.0/207_iam_ref.js.j2 b/deployment/scripts/mongod/1.0.0/207_iam_ref.js.j2 index 0f9a3c064fd65428f91635c9c113d186aba8ee63..5843cb4988b4df40052e9674a71170ffbe7c24c5 100644 --- a/deployment/scripts/mongod/1.0.0/207_iam_ref.js.j2 +++ b/deployment/scripts/mongod/1.0.0/207_iam_ref.js.j2 @@ -408,25 +408,25 @@ db.profiles.insert({ }); db.profiles.insert({ - "_id": "system_supervision_api_profile", + "_id": "system_logbook_operation_profile", "identifier" : NumberInt(maxIdProfile++), - "name": "Supervision API Profile", - "description": "Supervision Profile api", + "name": "Journal des Opérations", + "description": "Logbook Operation Profile api", "tenantIdentifier": NumberInt({{ vitamui_platform_informations.proof_tenant }}), - "applicationName": "SUPERVISION_API_APP", + "applicationName": "LOGBOOK_OPERATION_APP", "level": "", "enabled": true, "readonly": false, "customerId": "system_customer", "roles": [ { - "name": "ROLE_CREATE_SUPERVISION_API" + "name": "ROLE_CREATE_LOGBOOK_OPERATION_API" }, { - "name": "ROLE_GET_SUPERVISION_API" + "name": "ROLE_GET_LOGBOOK_OPERATION_API" }, { - "name": "ROLE_GET_ALL_SUPERVISION_API" + "name": "ROLE_GET_ALL_LOGBOOK_OPERATION_API" }, { "name": "ROLE_LOGBOOKS" @@ -464,7 +464,7 @@ db.groups.updateOne( { "system_secure", "system_dsl", "system_probative_value", - "system_supervision_api_profile" + "system_logbook_operation_profile" ] } } diff --git a/deployment/scripts/mongod/1.0.0/208_application_ref.js.j2 b/deployment/scripts/mongod/1.0.0/208_application_ref.js.j2 index 03bba5a243fdab130afc42e74fd532135b60e27c..e1fef1cafcb748f84de8079b7946c53399b25bd5 100644 --- a/deployment/scripts/mongod/1.0.0/208_application_ref.js.j2 +++ b/deployment/scripts/mongod/1.0.0/208_application_ref.js.j2 @@ -203,14 +203,14 @@ db.applications.insert({ }); db.applications.insert({ - "identifier" : "SUPERVISION_API_APP", + "identifier" : "LOGBOOK_OPERATION_APP", {% if vitamui.referential.base_url is defined %} - "url": "{{ vitamui.referential.base_url }}/supervision-api", + "url": "{{ vitamui.referential.base_url }}/logbook-operation", {% else %} - "url": "{{ url_prefix }}/referential/supervision-api", + "url": "{{ url_prefix }}/referential/logbook-operation", {% endif %} "icon": "vitamui-icon vitamui-icon-api-supervision", - "name": "Supervision des APIs", + "name": "Journal des Opérations", "category": "referential", "position": NumberInt(16), "hasCustomerList": false, diff --git a/deployment/scripts/mongod/1.0.0/210_security_ref.js.j2 b/deployment/scripts/mongod/1.0.0/210_security_ref.js.j2 index 10e7c5fd5af6424136898c14825e29637f27e960..906a74f65231b85b91fcb9c7d66ff6b1734cd970 100644 --- a/deployment/scripts/mongod/1.0.0/210_security_ref.js.j2 +++ b/deployment/scripts/mongod/1.0.0/210_security_ref.js.j2 @@ -25,7 +25,7 @@ db.contexts.insert({ "ROLE_GET_CONTEXTS", "ROLE_UPDATE_CONTEXTS", "ROLE_CREATE_CONTEXTS", "ROLE_GET_SECURITY_PROFILES", "ROLE_UPDATE_SECURITY_PROFILES", "ROLE_CREATE_SECURITY_PROFILES", "ROLE_DELETE_SECURITY_PROFILES", "ROLE_GET_OPERATIONS", "ROLE_RUN_AUDITS", "ROLE_RUN_PROBATIVE_VALUE", - "ROLE_CREATE_SUPERVISION_API", "ROLE_GET_SUPERVISION_API", "ROLE_GET_ALL_SUPERVISION_API", "ROLE_LOGBOOKS" + "ROLE_CREATE_LOGBOOK_OPERATION_API", "ROLE_GET_LOGBOOK_OPERATION_API", "ROLE_GET_ALL_LOGBOOK_OPERATION_API", "ROLE_LOGBOOKS" ] }); diff --git a/ui/ui-frontend/projects/referential/src/app/app-routing.module.ts b/ui/ui-frontend/projects/referential/src/app/app-routing.module.ts index b1ac9e5918b55316a642efbfcf0701c6f546403e..9d87eef88dc2fea424acc018f944fedc2ca7563b 100644 --- a/ui/ui-frontend/projects/referential/src/app/app-routing.module.ts +++ b/ui/ui-frontend/projects/referential/src/app/app-routing.module.ts @@ -111,13 +111,13 @@ const routes: Routes = [ data: {appId: 'PROBATIVE_VALUE_APP'} }, // ===================================================== - // SUPERVISION API + // LOGBOOK OPERATION API // ===================================================== { - path: 'supervision-api', - loadChildren: () => import('./supervision-api/api-supervision.module').then(m => m.ApiSupervisionModule), + path: 'logbook-operation', + loadChildren: () => import('./logbook-operation/logbook-operation.module').then(m => m.LogbookOperationModule), canActivate: [AuthGuard, AppGuard], - data: { appId: 'SUPERVISION_API_APP' } + data: { appId: 'LOGBOOK_OPERATION_APP' } }, // ===================================================== // DSL diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/event-filter.interface.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/event-filter.interface.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/event-filter.interface.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/event-filter.interface.ts diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.html b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.html similarity index 96% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.html rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.html index 4ea07567fefa29ad6a5777a5deb3eb5eaec99dfc..0e0d345f144b43a78be1100c64646a3fa22cc3c1 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.html +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.html @@ -8,7 +8,7 @@ <div class="header-container"> <div class="title"> <div class="status-badge-mini" [ngClass]="event | eventTypeBadgeClass"> - <i class="vitamui-icon vitamui-icon-box-hand no-margin"></i> + <i class="vitamui-icon vitamui-icon-api-supervision vitamui-row-icon status-badge"></i> </div> <h2>{{ event?.id }}</h2> </div> diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.scss b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.scss similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.scss rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.scss diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.spec.ts similarity index 81% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.spec.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.spec.ts index 99694f35c9e36d45438418a638684f3a0a9ea68d..cbf4fdae4fa4ac76393e4ffe7cb0cdfc6312f3fc 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.spec.ts @@ -40,17 +40,17 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ActivatedRoute } from '@angular/router'; -import { EventTypeBadgeClassPipe } from '../api-supervision-list/event-type-badge-class.pipe'; -import { LastEventPipe } from '../api-supervision-list/last-event.pipe'; -import { ApiSupervisionDetailComponent } from './api-supervision-detail.component'; +import { EventTypeBadgeClassPipe } from '../logbook-operation-list/event-type-badge-class.pipe'; +import { LastEventPipe } from '../logbook-operation-list/last-event.pipe'; +import { LogbookOperationDetailComponent } from './logbook-operation-detail.component'; -describe('ApiSupervisionDetailComponent', () => { - let component: ApiSupervisionDetailComponent; - let fixture: ComponentFixture<ApiSupervisionDetailComponent>; +describe('LogbookOperationDetailComponent', () => { + let component: LogbookOperationDetailComponent; + let fixture: ComponentFixture<LogbookOperationDetailComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ApiSupervisionDetailComponent, EventTypeBadgeClassPipe, LastEventPipe ], + declarations: [LogbookOperationDetailComponent, EventTypeBadgeClassPipe, LastEventPipe ], providers: [ { provide: LogbookService, useValue: {} }, { provide: AuthService, useValue: {} }, @@ -62,7 +62,7 @@ describe('ApiSupervisionDetailComponent', () => { })); beforeEach(() => { - fixture = TestBed.createComponent(ApiSupervisionDetailComponent); + fixture = TestBed.createComponent(LogbookOperationDetailComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.ts similarity index 90% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.ts index 8c21b4dcec75354fa9f9e3802d980d521a669c8a..0e4567997ce93fde07e1ecb1ab3bce91c964f31d 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-detail.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-detail.component.ts @@ -34,16 +34,16 @@ * 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 { animate, style, transition, trigger } from '@angular/animations'; import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { trigger, style, transition, animate } from '@angular/animations'; import { AuthService, Event, LogbookService } from 'ui-frontend-common'; @Component({ - selector: 'app-api-supervision-detail', - templateUrl: './api-supervision-detail.component.html', - styleUrls: ['./api-supervision-detail.component.scss'], + selector: 'app-logbook-operation-detail', + templateUrl: './logbook-operation-detail.component.html', + styleUrls: ['./logbook-operation-detail.component.scss'], animations: [ trigger('fadeInOut', [ transition(':enter', [ @@ -57,7 +57,7 @@ import { AuthService, Event, LogbookService } from 'ui-frontend-common'; ]) ] }) -export class ApiSupervisionDetailComponent implements OnInit, OnChanges { +export class LogbookOperationDetailComponent implements OnInit, OnChanges { @Input() eventId: string; @@ -82,7 +82,7 @@ export class ApiSupervisionDetailComponent implements OnInit, OnChanges { } openPopup() { - window.open('/api-supervision/tenant/' + this.tenantIdentifier + '/event/' + this.event.id, + window.open('/logbook-operation/tenant/' + this.tenantIdentifier + '/event/' + this.event.id, 'detailPopup', 'width=584, height=713, resizable=no, location=no'); this.emitClose(); } diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-popup.component.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-popup.component.ts similarity index 93% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-popup.component.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-popup.component.ts index 57c281ed65a6b1bff61790b30781e774f71a80cf..f9bdb24cc3405b9f95a767e3e4ce97ca2eb65420 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-detail/api-supervision-popup.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-detail/logbook-operation-popup.component.ts @@ -38,17 +38,17 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; @Component({ - selector: 'app-api-supervision-popup', + selector: 'app-logbook-operation-popup', template: ` - <app-api-supervision-detail + <app-logbook-operation-detail (closePanel)="closePopup()" [eventId]="eventId" [tenantIdentifier]="tenantIdentifier" [isPopup]="true" - ></app-api-supervision-detail> + ></app-logbook-operation-detail> ` }) -export class ApiSupervisionPopupComponent implements OnInit { +export class LogbookOperationPopupComponent implements OnInit { eventId: string; tenantIdentifier: number; diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/event-type-badge-class.pipe.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-badge-class.pipe.spec.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/event-type-badge-class.pipe.spec.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-badge-class.pipe.spec.ts diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/event-type-badge-class.pipe.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-badge-class.pipe.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/event-type-badge-class.pipe.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-badge-class.pipe.ts diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/event-type-color-class.pipe.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-color-class.pipe.spec.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/event-type-color-class.pipe.spec.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-color-class.pipe.spec.ts diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/event-type-color-class.pipe.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-color-class.pipe.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/event-type-color-class.pipe.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-color-class.pipe.ts diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/last-event.pipe.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/last-event.pipe.spec.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/last-event.pipe.spec.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/last-event.pipe.spec.ts diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/last-event.pipe.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/last-event.pipe.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/last-event.pipe.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/last-event.pipe.ts diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.html b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.html similarity index 96% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.html rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.html index 008526d351033f40e73661d4a8963809e2d2a800..334e844c00ff7a8a1b458af5ce71d858cb24b81c 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.html +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.html @@ -48,7 +48,7 @@ <td style="width:60px;" class="no-first-cell-padding"> <div class="vitamui-cell-icon aligned"> <div class="status-badge" [ngClass]="event | eventTypeBadgeClass"> - <i class="vitamui-icon vitamui-icon-ingest vitamui-row-icon status-badge"></i> + <i class="vitamui-icon vitamui-icon-api-supervision vitamui-row-icon status-badge"></i> </div> </div> </td> diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.scss b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.scss similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.scss rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.scss diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.spec.ts similarity index 86% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.spec.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.spec.ts index 10d14148c74ee8e24e936df1ad18473879857484..742a75d975db0afc252ea60be5fc2045d301143e 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.spec.ts @@ -40,18 +40,18 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { LogbookSearchService } from '../logbook-search.service'; -import { ApiSupervisionListComponent } from './api-supervision-list.component'; import { EventTypeBadgeClassPipe } from './event-type-badge-class.pipe'; import { EventTypeColorClassPipe } from './event-type-color-class.pipe'; import { LastEventPipe } from './last-event.pipe'; +import { LogbookOperationListComponent } from './logbook-operation-list.component'; -describe('ApiSupervisionListComponent', () => { - let component: ApiSupervisionListComponent; - let fixture: ComponentFixture<ApiSupervisionListComponent>; +describe('LogbookOperationListComponent', () => { + let component: LogbookOperationListComponent; + let fixture: ComponentFixture<LogbookOperationListComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ApiSupervisionListComponent, LastEventPipe, EventTypeColorClassPipe, EventTypeBadgeClassPipe ], + declarations: [LogbookOperationListComponent, LastEventPipe, EventTypeColorClassPipe, EventTypeBadgeClassPipe ], providers: [ { provide: LogbookSearchService, useValue: { search: () => EMPTY } }, ], @@ -61,7 +61,7 @@ describe('ApiSupervisionListComponent', () => { })); beforeEach(() => { - fixture = TestBed.createComponent(ApiSupervisionListComponent); + fixture = TestBed.createComponent(LogbookOperationListComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.ts similarity index 92% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.ts index 199a7e3c8d40fd8cfd9686671eb7cba4f312890d..5f64ca2cf8b3241780e848b412c7093a816f8ef7 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-list/api-supervision-list.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.ts @@ -44,11 +44,11 @@ import { EventFilter } from '../event-filter.interface'; import { LogbookSearchService } from '../logbook-search.service'; @Component({ - selector: 'app-api-supervision-list', - templateUrl: './api-supervision-list.component.html', - styleUrls: ['./api-supervision-list.component.scss'] + selector: 'app-logbook-operation-list', + templateUrl: './logbook-operation-list.component.html', + styleUrls: ['./logbook-operation-list.component.scss'] }) -export class ApiSupervisionListComponent extends InfiniteScrollTable<Event> implements OnInit, OnChanges { +export class LogbookOperationListComponent extends InfiniteScrollTable<Event> implements OnInit, OnChanges { @Input() tenantIdentifier: number; @Input() filters: Readonly<EventFilter>; diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-routing.module.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-routing.module.ts similarity index 90% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-routing.module.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-routing.module.ts index 899938a62b1bd2311868d344e49a31376331feeb..f5274571f06d312d2ae1ff20c9bd6a0b35691c96 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision-routing.module.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-routing.module.ts @@ -37,8 +37,8 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { Route, RouterModule } from '@angular/router'; -import { VitamUITenantSelectComponent, TenantSelectionGuard, ActiveTenantGuard } from 'ui-frontend-common'; -import { ApiSupervisionComponent } from './api-supervision.component'; +import { ActiveTenantGuard, TenantSelectionGuard, VitamUITenantSelectComponent } from 'ui-frontend-common'; +import { LogbookOperationComponent } from './logbook-operation.component'; const routes: Route[] = [ { @@ -54,7 +54,7 @@ const routes: Route[] = [ }, { path: 'tenant/:tenantIdentifier', - component: ApiSupervisionComponent, + component: LogbookOperationComponent, canActivate: [ActiveTenantGuard] } ]; @@ -70,4 +70,4 @@ const routes: Route[] = [ RouterModule ] }) -export class ApiSupervisionRoutingModule { } +export class LogbookOperationRoutingModule { } diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.html b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.html similarity index 90% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.html rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.html index b5773e24b07e3991eedaca7a88041e22f95c6bb2..7db7af663e78c0d4a65af1608e3bddc52e750ac9 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.html +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.html @@ -1,8 +1,8 @@ <mat-sidenav-container [autosize]="true" [hasBackdrop]="false"> <mat-sidenav #panel mode="side" position="end" [fixedInViewport]="true"> - <app-api-supervision-detail *ngIf="openedItem" [tenantIdentifier]="tenantIdentifier" [eventId]="openedItem?.id" - (closePanel)="closePanel()"></app-api-supervision-detail> + <app-logbook-operation-detail *ngIf="openedItem" [tenantIdentifier]="tenantIdentifier" [eventId]="openedItem?.id" + (closePanel)="closePanel()"></app-logbook-operation-detail> </mat-sidenav> <mat-sidenav-content> @@ -12,7 +12,7 @@ <vitamui-common-navbar [appId]="appId" [hideTenantMenu]="false" [hideCustomerMenu]="true" (tenantSelect)="changeTenant($event)"></vitamui-common-navbar> <div class="controls"> <h2 i18n="@@apiSupervisionPageTitle"> - <img src="assets/mini-logo-vitam.png"> Supervision des <strong>API</strong>s + <img src="assets/mini-logo-vitam.png"> Journal des Opérations </h2> <div class="actions"> @@ -80,7 +80,7 @@ </div> <div class="vitamui-body vitamui-container"> - <app-api-supervision-list [filters]="filters" [tenantIdentifier]="tenantIdentifier" (eventClick)="openPanel($event)"></app-api-supervision-list> + <app-logbook-operation-list [filters]="filters" [tenantIdentifier]="tenantIdentifier" (eventClick)="openPanel($event)"></app-logbook-operation-list> </div> </mat-sidenav-content> diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.scss b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.scss similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.scss rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.scss diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.spec.ts similarity index 88% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.spec.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.spec.ts index 0d10fca2f15432c3332b4540d2461ee05a7b1f3e..423487b6b6ea1c71af33e3519fc6d1aaae9d1b36 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.spec.ts @@ -35,7 +35,7 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ -import { GlobalEventService, ENVIRONMENT } from 'ui-frontend-common'; +import { ENVIRONMENT, GlobalEventService } from 'ui-frontend-common'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; @@ -43,14 +43,14 @@ import { ReactiveFormsModule } from '@angular/forms'; import { MatMenuModule } from '@angular/material'; import { ActivatedRoute, Router } from '@angular/router'; -import { ApiSupervisionComponent } from './api-supervision.component'; import { EMPTY } from 'rxjs'; -import { LogbookSearchService } from './logbook-search.service'; import { environment } from '../../environments/environment'; +import { LogbookOperationComponent } from './logbook-operation.component'; +import { LogbookSearchService } from './logbook-search.service'; -describe('ApiSupervisionComponent', () => { - let component: ApiSupervisionComponent; - let fixture: ComponentFixture<ApiSupervisionComponent>; +describe('LogbookOperationComponent', () => { + let component: LogbookOperationComponent; + let fixture: ComponentFixture<LogbookOperationComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ @@ -58,7 +58,7 @@ describe('ApiSupervisionComponent', () => { MatMenuModule, ReactiveFormsModule ], - declarations: [ApiSupervisionComponent], + declarations: [LogbookOperationComponent], providers: [ { provide: ActivatedRoute, useValue: { paramMap: EMPTY, data: EMPTY } }, { provide: LogbookSearchService, useValue: { search: () => EMPTY } }, @@ -72,7 +72,7 @@ describe('ApiSupervisionComponent', () => { })); beforeEach(() => { - fixture = TestBed.createComponent(ApiSupervisionComponent); + fixture = TestBed.createComponent(LogbookOperationComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.ts similarity index 88% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.ts index da8b33f7a51d7e6a17002a974b04a09446fed5b8..5f32f266f5ca24b068dad4b7132edbc61e985382 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.ts @@ -40,21 +40,21 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import { ApiSupervisionListComponent } from './api-supervision-list/api-supervision-list.component'; import { EventFilter } from './event-filter.interface'; +import { LogbookOperationListComponent } from './logbook-operation-list/logbook-operation-list.component'; @Component({ - selector: 'app-api-supervision', - templateUrl: './api-supervision.component.html', - styleUrls: ['./api-supervision.component.scss'] + selector: 'app-logbook-operation', + templateUrl: './logbook-operation.component.html', + styleUrls: ['./logbook-operation.component.scss'] }) -export class ApiSupervisionComponent extends SidenavPage<any> implements OnInit { +export class LogbookOperationComponent extends SidenavPage<any> implements OnInit { dateRangeFilterForm: FormGroup; tenantIdentifier: number; filters: Readonly<EventFilter> = {}; - @ViewChild(ApiSupervisionListComponent, { static: true }) list: ApiSupervisionListComponent; + @ViewChild(LogbookOperationListComponent, { static: true }) list: LogbookOperationListComponent; constructor( private route: ActivatedRoute, @@ -82,7 +82,7 @@ export class ApiSupervisionComponent extends SidenavPage<any> implements OnInit ngOnInit() { if (!this.list) { - console.error('ApiSupervisionComponent Error: no list in the template'); + console.error('LogbookOperationComponent Error: no list in the template'); } } diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.module.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.module.ts similarity index 69% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.module.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.module.ts index 8fa48390a5b7caf2f94128a78dac09a334fe3930..d832696232e10a70b8c589d35281ffc123b9c345 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/api-supervision.module.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.module.ts @@ -40,28 +40,28 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { ReactiveFormsModule } from '@angular/forms'; import { - MatDatepickerModule, MatMenuModule, MatProgressSpinnerModule, MatSidenavModule, MatTabsModule, MatNativeDateModule + MatDatepickerModule, MatMenuModule, MatNativeDateModule, MatProgressSpinnerModule, MatSidenavModule, MatTabsModule } from '@angular/material'; import { - ApiSupervisionDetailComponent -} from './api-supervision-detail/api-supervision-detail.component'; + LogbookOperationDetailComponent +} from './logbook-operation-detail/logbook-operation-detail.component'; import { - ApiSupervisionPopupComponent -} from './api-supervision-detail/api-supervision-popup.component'; -import { ApiSupervisionListComponent } from './api-supervision-list/api-supervision-list.component'; -import { EventTypeBadgeClassPipe } from './api-supervision-list/event-type-badge-class.pipe'; -import { EventTypeColorClassPipe } from './api-supervision-list/event-type-color-class.pipe'; -import { LastEventPipe } from './api-supervision-list/last-event.pipe'; -import { ApiSupervisionComponent } from './api-supervision.component'; -import { ApiSupervisionRoutingModule } from './api-supervision-routing.module'; + LogbookOperationPopupComponent +} from './logbook-operation-detail/logbook-operation-popup.component'; +import { EventTypeBadgeClassPipe } from './logbook-operation-list/event-type-badge-class.pipe'; +import { EventTypeColorClassPipe } from './logbook-operation-list/event-type-color-class.pipe'; +import { LastEventPipe } from './logbook-operation-list/last-event.pipe'; +import { LogbookOperationListComponent } from './logbook-operation-list/logbook-operation-list.component'; +import { LogbookOperationRoutingModule } from './logbook-operation-routing.module'; +import { LogbookOperationComponent } from './logbook-operation.component'; @NgModule({ declarations: [ - ApiSupervisionComponent, - ApiSupervisionListComponent, - ApiSupervisionDetailComponent, - ApiSupervisionPopupComponent, + LogbookOperationComponent, + LogbookOperationListComponent, + LogbookOperationDetailComponent, + LogbookOperationPopupComponent, LastEventPipe, EventTypeColorClassPipe, EventTypeBadgeClassPipe, @@ -75,8 +75,8 @@ import { ApiSupervisionRoutingModule } from './api-supervision-routing.module'; MatTabsModule, ReactiveFormsModule, VitamUICommonModule, - ApiSupervisionRoutingModule, + LogbookOperationRoutingModule, MatNativeDateModule ] }) -export class ApiSupervisionModule { } +export class LogbookOperationModule { } diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/logbook-search.service.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.spec.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/logbook-search.service.spec.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.spec.ts diff --git a/ui/ui-frontend/projects/referential/src/app/supervision-api/logbook-search.service.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.ts similarity index 100% rename from ui/ui-frontend/projects/referential/src/app/supervision-api/logbook-search.service.ts rename to ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.ts index 8d33ebb6e85d07e614b39fa1ba4ab09297bb921a..7d7cdb000268e370351731ef0112f89165c8ba97 100644 --- a/ui/ui-frontend/projects/referential/src/app/supervision-api/logbook-search.service.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-search.service.ts @@ -34,10 +34,10 @@ * 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 * as moment from 'moment'; import { Event, LogbookApiService, PageRequest, SearchService, VitamSelectOperator, VitamSelectQuery } from 'ui-frontend-common'; -import * as moment from 'moment'; import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core';