Skip to content

Commit

Permalink
Merge branch '2.11.0.release'
Browse files Browse the repository at this point in the history
  • Loading branch information
vlo-rte committed Oct 18, 2021
2 parents 677af10 + c349929 commit 032926f
Show file tree
Hide file tree
Showing 59 changed files with 757 additions and 669 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.10.0.RELEASE
2.11.0.RELEASE
4 changes: 2 additions & 2 deletions config/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- "89:8080"
- "90:9990"
web-ui:
image: "lfeoperatorfabric/of-web-ui:2.10.0.RELEASE"
image: "lfeoperatorfabric/of-web-ui:2.11.0.RELEASE"
#user: ${USER_ID}:${USER_GID}
ports:
- "2002:80"
Expand All @@ -36,6 +36,6 @@ services:
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
- "./loggingResults:/etc/nginx/html/logging"
ext-app:
image: "lfeoperatorfabric/of-external-app:2.10.0.RELEASE"
image: "lfeoperatorfabric/of-external-app:2.11.0.RELEASE"
ports:
- "8090:8090"
12 changes: 6 additions & 6 deletions config/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
# - "90:9990"
users:
container_name: users
image: "lfeoperatorfabric/of-users-business-service:2.10.0.RELEASE"
image: "lfeoperatorfabric/of-users-business-service:2.11.0.RELEASE"
depends_on:
- mongodb
- rabbitmq
Expand All @@ -46,7 +46,7 @@ services:
- ${CONFIG_PATH}:/external-config
businessconfig:
container_name: businessconfig
image: "lfeoperatorfabric/of-businessconfig-business-service:2.10.0.RELEASE"
image: "lfeoperatorfabric/of-businessconfig-business-service:2.11.0.RELEASE"
depends_on:
- mongodb
user: ${USER_ID}:${USER_GID}
Expand All @@ -64,7 +64,7 @@ services:
- ${CONFIG_PATH}:/external-config
cards-publication:
container_name: cards-publication
image: "lfeoperatorfabric/of-cards-publication-business-service:2.10.0.RELEASE"
image: "lfeoperatorfabric/of-cards-publication-business-service:2.11.0.RELEASE"
depends_on:
- mongodb
- rabbitmq
Expand All @@ -82,7 +82,7 @@ services:
- ${CONFIG_PATH}:/external-config
cards-consultation:
container_name: cards-consultation
image: "lfeoperatorfabric/of-cards-consultation-business-service:2.10.0.RELEASE"
image: "lfeoperatorfabric/of-cards-consultation-business-service:2.11.0.RELEASE"
depends_on:
- mongodb
- rabbitmq
Expand All @@ -99,7 +99,7 @@ services:
- "./cards-consultation-docker.yml:/config/application-docker.yml"
- ${CONFIG_PATH}:/external-config
web-ui:
image: "lfeoperatorfabric/of-web-ui:2.10.0.RELEASE"
image: "lfeoperatorfabric/of-web-ui:2.11.0.RELEASE"
ports:
- "2002:80"
depends_on:
Expand All @@ -111,6 +111,6 @@ services:
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
ext-app:
# External application example, must not be activated in production mode
image: "lfeoperatorfabric/of-external-app:2.10.0.RELEASE"
image: "lfeoperatorfabric/of-external-app:2.11.0.RELEASE"
ports:
- "8090:8090"
16 changes: 15 additions & 1 deletion config/docker/ui-config/web-ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"checkPerimeterForResponseCard": true,
"checkPerimeterForSearchFields": false,
"showUserEntitiesOnTopRightOfTheScreen": true,
"settings.replayInterval": 10,
"settings.replayEnabled": true,
"archive": {
"filters": {
"page": {
Expand All @@ -25,6 +27,18 @@
}
}
},
"logging": {
"filters": {
"tags": {
"list": [
{
"label": "Label for tag 1",
"value": "tag1"
}
]
}
}
},
"feed": {
"card": {
"hideTimeFilter": false,
Expand Down Expand Up @@ -121,7 +135,7 @@
"operatorfabric": {
"name": "OperatorFabric",
"rank": 0,
"version": "2.10.0.RELEASE"
"version": "2.11.0.RELEASE"
}
},
"infos": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
swagger: '2.0'
info:
description: IMPORTANT - The Try it Out button will generate curl requests for examples, but executing them through the UI will not work as authentication has not been set up. This page is for documentation only.
version: 2.10.0.RELEASE
version: 2.11.0.RELEASE
title: BusinessConfig Management
termsOfService: ''
contact:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
swagger: '2.0'
info:
description: IMPORTANT - The Try it Out button will generate curl requests for examples, but executing them through the UI will not work as authentication has not been set up. This page is for documentation only.
version: 2.10.0.RELEASE
version: 2.11.0.RELEASE
title: Card Management API
termsOfService: ''
contact:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public class UserSettingsData implements UserSettings {
private Boolean playSoundForAction;
private Boolean playSoundForCompliant;
private Boolean playSoundForInformation;
private Boolean replayEnabled;
private Integer replayInterval;

@Singular("processStatesNotNotified")
private Map<String, List<String>> processesStatesNotNotified;
Expand All @@ -54,6 +56,8 @@ public UserSettingsData(UserSettings settings) {
this.playSoundForAction = settings.getPlaySoundForAction();
this.playSoundForCompliant = settings.getPlaySoundForCompliant();
this.playSoundForInformation = settings.getPlaySoundForInformation();
this.replayEnabled = settings.getReplayEnabled();
this.replayInterval = settings.getReplayInterval();

if (settings.getProcessesStatesNotNotified() != null)
this.processesStatesNotNotified = new HashMap<>(settings.getProcessesStatesNotNotified());
Expand Down Expand Up @@ -118,6 +122,8 @@ else if (this.getDefaultTags() != null)
result.playSoundForAction = other.getPlaySoundForAction() != null ? other.getPlaySoundForAction() : this.getPlaySoundForAction();
result.playSoundForCompliant = other.getPlaySoundForCompliant() != null ? other.getPlaySoundForCompliant() : this.getPlaySoundForCompliant();
result.playSoundForInformation = other.getPlaySoundForInformation() != null ? other.getPlaySoundForInformation() : this.getPlaySoundForInformation();
result.replayEnabled = other.getReplayEnabled() != null ? other.getReplayEnabled() : this.getReplayEnabled();
result.replayInterval = other.getReplayInterval() != null ? other.getReplayInterval() : this.getReplayInterval();

if (other.getProcessesStatesNotNotified() != null)
result.processesStatesNotNotified = new HashMap<>(other.getProcessesStatesNotNotified());
Expand Down
11 changes: 10 additions & 1 deletion services/core/users/src/main/modeling/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
swagger: '2.0'
info:
description: IMPORTANT - The Try it Out button will generate curl requests for examples, but executing them through the UI will not work as authentication has not been set up. This page is for documentation only.
version: 2.10.0.RELEASE
version: 2.11.0.RELEASE
title: User Management
termsOfService: ''
contact:
Expand Down Expand Up @@ -194,6 +194,15 @@ definitions:
playSoundForInformation:
type: boolean
description: If this is set to true, a sound will be played for incoming cards with INFORMATION severity.
replayEnabled:
type: boolean
description: |-
If this is set to true, sounds for incoming cards or reminders will be replayed until the user clicks
anywhere on the screen.
replayInterval:
type: integer
description: |-
Interval (in seconds) between sound replays.
processesStatesNotNotified:
type: object
description: Filters on processes and states for user feed (exclusion filter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public void patch(){
.playSoundForAlarm(true)
.playSoundForAction(false)
//Not setting Compliant and Information to test patch on empty
.replayEnabled(true)
.replayInterval(123)
.processStatesNotNotified("processA", Arrays.asList("state1", "state2"))
.processStatesNotNotified("processB", Arrays.asList("state3", "state4"))
.build();
Expand Down Expand Up @@ -83,6 +85,14 @@ public void patch(){
assertThat(patched).isEqualToIgnoringGivenFields(userData,"playSoundForInformation");
assertThat(patched.getPlaySoundForInformation()).isEqualTo(true);

patched = userData.patch(UserSettingsData.builder().replayEnabled(false).build().clearTags().clearProcessesStatesNotNotified());
assertThat(patched).isEqualToIgnoringGivenFields(userData,"replayEnabled");
assertThat(patched.getReplayEnabled()).isEqualTo(false);

patched = userData.patch(UserSettingsData.builder().replayInterval(456).build().clearTags().clearProcessesStatesNotNotified());
assertThat(patched).isEqualToIgnoringGivenFields(userData,"replayInterval");
assertThat(patched.getReplayInterval()).isEqualTo(456);

Map<String, List<String>> newProcessesStatesNotNotified = new HashMap<String, List<String>>();
newProcessesStatesNotNotified.put("processC", Arrays.asList("state5", "state6"));
patched = userData.patch(UserSettingsData.builder().processesStatesNotNotified(newProcessesStatesNotNotified).build().clearTags());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,14 @@ a|card time display mode in the feed. Values :
|feed.card.maxNbOfCardsToDisplay|100|no| Max number of card visible in feed (This limit is used for performance reasons, setting the value too high can have consequences on browser response times)

|feed.timeline.domains|["TR", "J", "7D", "W", "M", "Y"]|no| List of domains to show on the timeline, possible domains are : "TR", "J", "7D", "W", "M", "Y".
|playSoundForAlarm|false|no|If set to true, a sound is played when Alarm cards are added or updated in the feed
|playSoundForAction|false|no|If set to true, a sound is played when Action cards are added or updated in the feed
|playSoundForCompliant|false|no|If set to true, a sound is played when Compliant cards are added or updated in the feed
|playSoundForInformation|false|no|If set to true, a sound is played when Information cards are added or updated in the feed
|i18n.supported.locales||no|List of supported locales (Only fr and en so far)
|i10n.supported.time-zones||no|List of supported time zones, for instance 'Europe/Paris'.
Values should be taken from the link:https://en.wikipedia.org/wiki/List_of_tz_database_time_zones[TZ database].

|archive.filters.page.size|10|no|The page size of archive filters
|archive.history.size|100|no|The maximum size of card history visible
|archive.filters.tags.list||no|List of tags to choose from in the corresponding filter in archives
|archive.filters.tags.list||no|List of tags to choose from in the corresponding filter in archives page
|logging.filters.tags.list||no|List of tags to choose from in the corresponding filter in logging page
|settings.tags.hide||no|Control if you want to show or hide the tags filter in feed page
|settings.styleWhenNightDayModeDesactivated||no|style to apply if not using day night mode, possible value are DAY or NIGHT
|settings.dateFormat|Value from the browser configuration|no|Format for date rendering (example : DD/MM/YYYY )
Expand All @@ -102,6 +99,12 @@ Values should be taken from the link:https://en.wikipedia.org/wiki/List_of_tz_da
|settings.infos.timezone|false|no|Control if we want to hide(true) or display(false or not specified) the timezone in the settings page
|settings.infos.tags|false|no|Control if we want to hide(true) or display(false or not specified) the tags in the settings page
|settings.infos.sounds|false|no|Control if we want to hide(true) or display(false or not specified) the checkboxes for sound notifications in the settings page
|settings.playSoundForAlarm|false|no|If set to true, a sound is played when Alarm cards are added or updated in the feed
|settings.playSoundForAction|false|no|If set to true, a sound is played when Action cards are added or updated in the feed
|settings.playSoundForCompliant|false|no|If set to true, a sound is played when Compliant cards are added or updated in the feed
|settings.playSoundForInformation|false|no|If set to true, a sound is played when Information cards are added or updated in the feed
|settings.replayEnabled|false|no|If set to true, sounds are replayed every `settings.replayInterval` seconds until the user interacts with the application
|settings.replayInterval|5|no|Interval between sound replays (see `settings.replayEnabled`)
|settings.about
a|none
a|no
Expand Down
2 changes: 1 addition & 1 deletion src/docs/asciidoc/dev_env/requirements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
= Requirements

This section describes the projects requirements regardless of installation options.
Please see AGU
Please see
ifdef::single-page-doc[<<setup_dev_env, Setting up your environment>>]
ifndef::single-page-doc[<</documentation/current/dev_env/index.adoc#setup_dev_env, Setting up your environment>>]
below for details on:
Expand Down
2 changes: 2 additions & 0 deletions src/docs/asciidoc/resources/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ include::migration_guide_to_2.7.adoc[leveloffset=+1]

include::migration_guide_to_2.8.adoc[leveloffset=+1]

include::migration_guide_to_2.11.adoc[leveloffset=+1]

37 changes: 37 additions & 0 deletions src/docs/asciidoc/resources/migration_guide_to_2.11.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright (c) 2021 RTE (http://www.rte-france.com)
// See AUTHORS.txt
// This document is subject to the terms of the Creative Commons Attribution 4.0 International license.
// If a copy of the license was not distributed with this
// file, You can obtain one at https://creativecommons.org/licenses/by/4.0/.
// SPDX-License-Identifier: CC-BY-4.0

= Migration Guide from release 2.10.0 to release 2.11.0

== Logging screen : Filter with tags list

As for archives screen, now you have to specify the list of tags you want to see in the filter of logging screen.
You have to set this list in the `web-ui.json` file, with the parameter `logging.filters.tags.list`. For example :

[source,json]
----
"logging": {
"filters": {
"tags": {
"list": [
{
"label": "Label for tag 1",
"value": "tag1"
}
]
}
}
}
----








9 changes: 8 additions & 1 deletion ui/main/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/


import {Component, OnInit} from '@angular/core';
import {Component, HostListener, OnInit} from '@angular/core';
import {Title} from '@angular/platform-browser';
import {Store} from '@ngrx/store';
import {AppState} from '@ofStore/index';
Expand All @@ -30,6 +30,7 @@ import {Actions, ofType} from '@ngrx/effects';
import {AlertActions, AlertActionTypes} from '@ofStore/actions/alert.actions';
import {Message, MessageLevel} from '@ofModel/message.model';
import {GroupsService} from '@ofServices/groups.service';
import {SoundNotificationService} from "@ofServices/sound-notification.service";

class Alert {
alert: Message;
Expand Down Expand Up @@ -67,6 +68,7 @@ export class AppComponent implements OnInit {
, private groupsService: GroupsService
, private processesService: ProcessesService
, private reminderService: ReminderService
, private soundNotificationService: SoundNotificationService
, private actions$: Actions) {
}

Expand All @@ -77,6 +79,11 @@ export class AppComponent implements OnInit {
this.subscribeToAlerts();
}

@HostListener('document:click', ['$event.target'])
public onPageClick() {
this.soundNotificationService.clearOutstandingNotifications();
}


private loadConfiguration() {

Expand Down
2 changes: 1 addition & 1 deletion ui/main/src/app/modules/archives/archives.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div style="display: flex;">

<of-archives-logging-filters [parentForm]="archiveForm" [visibleProcesses]="listOfProcesses"
[hideChildStates]=true #filters></of-archives-logging-filters>
[hideChildStates]=true [tags]="tags" #filters></of-archives-logging-filters>

<div class="opfab-vertical-bar"></div>
<div class="opfab-publish-date">
Expand Down
1 change: 1 addition & 0 deletions ui/main/src/app/modules/archives/archives.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export class ArchivesComponent implements OnDestroy, OnInit {

this.size = this.configService.getConfigValue('archive.filters.page.size', 10);
this.historySize = parseInt(this.configService.getConfigValue('archive.history.size', 100));
this.tags = this.configService.getConfigValue('archive.filters.tags.list');
this.results = [];
this.updatesByCardId = [];
this.dateTimeFilterChange.pipe(
Expand Down
11 changes: 6 additions & 5 deletions ui/main/src/app/modules/calendar/calendar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@


import {AppState} from '@ofStore/index';
import {select, Store} from '@ngrx/store';
import {Store} from '@ngrx/store';
import {debounceTime, distinctUntilChanged, takeUntil} from 'rxjs/operators';
import {Subject} from 'rxjs';
import * as feedSelectors from '@ofSelectors/feed.selectors';
import {AfterViewInit, Component, ElementRef, HostListener, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {AfterViewInit, Component, ElementRef,OnDestroy, OnInit, ViewChild} from '@angular/core';
import {FullCalendarComponent} from '@fullcalendar/angular';
import {EventInput} from '@fullcalendar/core';
import allLocales from '@fullcalendar/core/locales-all';
Expand All @@ -27,6 +26,7 @@ import {FilterType} from '@ofServices/filter.service';
import {HourAndMinutes} from '@ofModel/card.model';
import {ProcessesService} from '@ofServices/processes.service';
import {DisplayContext} from '@ofModel/templateGateway.model';
import {LightCardsStoreService} from '@ofServices/lightcards-store.service';

@Component({
selector: 'of-calendar',
Expand All @@ -38,7 +38,8 @@ export class CalendarComponent implements OnInit, OnDestroy, AfterViewInit {
constructor(private store: Store<AppState>,
private translate: TranslateService,
private modalService: NgbModal,
private processesService: ProcessesService) {
private processesService: ProcessesService,
private lightCardsStoreService: LightCardsStoreService) {
processesService.getAllProcesses().forEach(process => {
if (!!process.uiVisibility && !!process.uiVisibility.calendar)
this.mapOfProcesses.set(process.id, 1);
Expand Down Expand Up @@ -106,7 +107,7 @@ export class CalendarComponent implements OnInit, OnDestroy, AfterViewInit {
}

private initDataPipe(): void {
this.store.pipe(select((feedSelectors.selectFeed)))
this.lightCardsStoreService.getLightCards()
.pipe(takeUntil(this.unsubscribe$), debounceTime(200), distinctUntilChanged())
.subscribe(cards => this.processCards(cards));
}
Expand Down
Loading

0 comments on commit 032926f

Please sign in to comment.