Skip to content

Commit

Permalink
Merge branch '2.0.0.release' ci_latest
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGuironnetRTE committed Feb 1, 2021
2 parents 72c9bbc + fffed07 commit f87dd74
Show file tree
Hide file tree
Showing 431 changed files with 9,069 additions and 6,437 deletions.
42 changes: 21 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
os: linux
dist: trusty
dist: xenial
addons:
sonarcloud:
organization: "opfab"
Expand All @@ -15,41 +15,39 @@ if: tag IS blank
before_install:
- export OF_VERSION=$(<VERSION)
- export GRADLE_OPTS="-XX:MaxMetaspaceSize=512m -Xmx1024m"
- export SDKMAN_CONFIG_FILE=${HOME}/.sdkman/etc/config
- ./CICD/travis/check_version.sh --branch $TRAVIS_BRANCH --version $OF_VERSION
- nvm install $NODE_VERSION
install:
# first install needs to remove ~/.sdkman (empty in our case because created by cache step) otherwise SdkMan is not installed
# then install sdkman
# configures by default SdkMan to use new installed java directly and updates itself if needed.
- if [ -z "$(ls -A $HOME/.sdkman)" ]; then
rm -fr $HOME/.sdkman ;
- if [ -z "$(ls -A ${HOME}/.sdkman)" ]; then
rm -fr ${HOME}/.sdkman ;
curl -s "https://get.sdkman.io" | bash ;
echo sdkman_auto_answer=true > ~/.sdkman/etc/config ;
echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config ;
echo sdkman_auto_answer=true > ${SDKMAN_CONFIG_FILE} ;
echo sdkman_auto_selfupdate=true >> ${SDKMAN_CONFIG_FILE} ;
fi
# needed in order to have sdk available into the current environment
- source "$HOME/.sdkman/bin/sdkman-init.sh" ;
- source "${HOME}/.sdkman/bin/sdkman-init.sh" ;
- EXPECTED_NPM_VERSION="6.4.1"
- CurrentNpmVersion="$(npm -version)"
- if [ "${CurrentNpmVersion}" != "${EXPECTED_NPM_VERSION}" ] ; then npm i -g npm@${EXPECTED_NPM_VERSION} ; fi
# Should be synch with ${OF_HOME}/bin/load_environment_light.sh. It's the first part of the sdk reference without vendor name
# for example the current configured in sdk has the following reference `8.0.265-zulu`
# the value of the following variable is `8.0.265` and its vendor name part is `-zulu`
# Uses JAVA_VERSION file content to be synchronised with ${OF_HOME}/bin/load_environment_light.sh.
# It's the first part of the sdk reference without vendor name
- CURRENT_JDK_VERSION="$(<JAVA_VERSION)"
# need to substitute last dot by an underscore. Example value for the following: "1.8.0_265"
# need to substitute last dot by an underscore. Example value for the following: "1.8.0_272"
# for java version higher than 8 the prefix `1.` should be removed
- FULL_JDK_VERSION="1.${CURRENT_JDK_VERSION%.*}${CURRENT_JDK_VERSION/*./_}"
# example value for the following: "8.0.265-zulu"
- JDK_VERSION_4_SDKMAN="${CURRENT_JDK_VERSION}-zulu"
# Use javac because the prompt is simpler than the java one
# skips the beginning should return 1.8.0_265. Here redirection '2>&1' needed to load prompt value otherwise variable is empty
# skips the beginning should return the java version. Here redirection '2>&1' needed to load prompt value otherwise variable is empty
- CurrentJavacVersionNumber="$(javac -version 2>&1 | cut -d ' ' -f 2)"
# if javac version is different than expected then asks sdkman to use expected java version or install it if necessary
# if sdkman can't use the expected java version then asks sdkman to install it. Sdkman is configured to use it as default (line 26)
# if sdkman can't use the expected java version then asks sdkman to install it.
- if [ "${CurrentJavacVersionNumber}" != "${FULL_JDK_VERSION}" ] ;
then
if ! sdk use java "${JDK_VERSION_4_SDKMAN}" ;
then
if ! sdk use java "${JDK_VERSION_4_SDKMAN}" ; then
sdk install java "${JDK_VERSION_4_SDKMAN}" ;
fi ;
fi
Expand All @@ -62,11 +60,13 @@ jobs:
include:
- stage: test
script:
- docker login --username ${DOCKER_CLOUD_USER} --password ${DOCKER_CLOUD_PWD}
- docker-compose -f src/main/docker/test-environment/docker-compose.yml up -d
- ./gradlew --build-cache copyDependencies test
- docker-compose -f src/main/docker/test-environment/docker-compose.yml down
- stage: test-sonar
script:
- docker login --username ${DOCKER_CLOUD_USER} --password ${DOCKER_CLOUD_PWD}
- docker-compose -f src/main/docker/test-environment/docker-compose.yml up -d
- ./gradlew --build-cache copyDependencies test jacocoTestReport
# [OC-865] Dropping dependency messing with typescript version as a workaround until sonar bug is fixed
Expand Down Expand Up @@ -117,15 +117,15 @@ stages:
if: (branch =~ .+release$) OR (NOT (branch IN (master,develop)) AND commit_message =~ ci_docker)
before_cache:
# cleanup gradle caches
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -f ${HOME}/.gradle/caches/modules-2/modules-2.lock
- rm -fr ${HOME}/.gradle/caches/*/plugin-resolution/
cache:
bundler: true
directories:
# caches gradle caches
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.gradle/dependency-check-data/
- ${HOME}/.gradle/caches/
- ${HOME}/.gradle/wrapper/
- ${HOME}/.gradle/dependency-check-data/
# cache ui dependencies
- ui/main/nodes_modules
- $HOME/.sdkman
- ${HOME}/.sdkman
4 changes: 3 additions & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ HanaeSafiRTE
jeandemanded
JeroenGommans
JulienBapt
rlg-rte
quinarygio
rlg-pro
rte-amal
samichehade
sjoerdadema
taoufikbermaki
vitorg
vlo-rte
Expand Down
2 changes: 1 addition & 1 deletion JAVA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.272
11.0.9
43 changes: 29 additions & 14 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2020 RTE (http://www.rte-france.com)
// Copyright (c) 2018-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
Expand All @@ -16,8 +16,8 @@

image:https://img.shields.io/badge/license-MPL_2.0-blue.svg[MPL-2.0
License,link=https://www.mozilla.org/en-US/MPL/2.0/]
image:https://travis-ci.org/opfab/operatorfabric-core.svg?branch=develop[Build
Status,link=https://travis-ci.org/opfab/operatorfabric-core]
image:https://travis-ci.com/opfab/operatorfabric-core.svg?branch=develop[Build
Status,link=https://travis-ci.com/opfab/operatorfabric-core]
image:https://sonarcloud.io/api/project_badges/measure?project=org.lfenergy.operatorfabric%3Aoperatorfabric-core&metric=alert_status[Quality
Gate,link=https://sonarcloud.io/dashboard?id=org.lfenergy.operatorfabric%3Aoperatorfabric-core]
image:https://sonarcloud.io/api/project_badges/measure?project=org.lfenergy.operatorfabric%3Aoperatorfabric-core&metric=coverage[Coverage,link=https://sonarcloud.io/component_measures?id=org.lfenergy.operatorfabric%3Aoperatorfabric-core&metric=Coverage]
Expand All @@ -31,24 +31,39 @@ us on Spectrum,link=https://spectrum.chat/opfab]
== Introduction

//tag::short_description[]
OperatorFabric is a modular, extensible, industrial-strength and field-tested
platform for use in electricity, water, and other utility operations.
OperatorFabric is a modular, extensible, industrial-strength platform for use in electricity, water, and other utility operations.

* System visualization and console integration
* Precise alerting
* Workflow scheduling
* Historian
* Scripting (ex: Python, JavaScript)
It aims to facilitate operational activities for utilities in two ways :

* Centralize real time business events in a single place to avoid having multiple screens/software. To do so, OperatorFabric provides
** event notifications named "cards" with filtering features (severity , date , process ... )
** event dispatching rules on a per user basis (based on groups, organizational entities, processes... )
** event-sending endpoints for business applications
** a mechanism of templating to customize events rendering (using HTML5 )
** a view of the events on a timeline and agenda view
** storage of all the events (archive feature)
** notifications via sounds
** possibilities to integrate screen form other applications


* Facilitate interactions between operational control centers:
** Share information in real time, as pre-formatted cards that can be sent either manually by operators or automatically by external solutions.
** Introduce pre-formatted question/response exchanges between control centers. This can be used to implement operational processes (with the notion of "last time to respond").
** Share events in calendar (also allowing repeating events)

In addition, the following features are available : internationalization, time-zone management, light/dark mode for the UI, authorization mechanism.

Integration with existing IT systems is an overarching concern: support of Firefox and Chromium-based browsers, docker deployment, communication with business applications via REST API or Kafka, integration with external authentication systems (via OAuth2), monitoring via Prometheus endpoints.

NOTE: Workflow Scheduling could be addressed either as an internal module or
through simplified and standardized (BPMN) integration with external workflow
engines, we're still weighing the pros and cons of the two options._

OperatorFabric is part of the https://www.lfenergy.org/[LF Energy] coalition, a project of The Linux Foundation that
supports open source innovation projects within the energy and electricity sectors.

OpFab is an open source platform licensed under https://www.mozilla.org/en-US/MPL/2.0/[Mozilla Public License V2].
The source code is hosted on GitHub in this repository : https://github.com/opfab/operatorfabric-core[operatorfabric-core].

Documentation is available at https://opfab.github.io/

//end::short_description[]

image::feed_screenshot.png[UI screenshot]
Expand Down Expand Up @@ -99,7 +114,7 @@ image:https://img.shields.io/badge/Using-Swagger-%237473C0.svg?style=for-the-bad
OperatorFabric is built and integrated using battle-tested tools and (open) platforms.

image:https://img.shields.io/badge/Built%20with-Gradle-%23410099.svg?style=for-the-badge[Built with Gradle,link=https://gradle.org/]
image:https://img.shields.io/badge/Using-Travis%20CI-%23FF647D.svg?style=for-the-badge[Using Travis CI,link=https://travis-ci.org/opfab/operatorfabric-core]
image:https://img.shields.io/badge/Using-Travis%20CI-%23FF647D.svg?style=for-the-badge[Using Travis CI,link=https://travis-ci.com/opfab/operatorfabric-core]
image:https://img.shields.io/badge/Using-SonarCloud-%23FF647D.svg?style=for-the-badge[Using SonarCloud,link=https://sonarcloud.io/dashboard?id=org.lfenergy.operatorfabric%3Aoperatorfabric-core]

== Licensing
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.0.RELEASE
2.0.0.RELEASE
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ext {
misc = [
slf4j : "org.slf4j:slf4j-api:${versions['log.sl4j']}",
lombok : "org.projectlombok:lombok:${versions['lombok']}",
palantir : "gradle.plugin.com.palantir.gradle.docker:gradle-docker:${versions['gradle.docker']}",
palantir : "com.palantir.gradle.docker:gradle-docker:${versions['gradle.docker']}",
compress : "org.apache.commons:commons-compress:${versions['apache.commons.compress']}",
feignMock : "io.github.openfeign:feign-mock:${versions['feign']}",
feignJackson : "io.github.openfeign:feign-jackson:${versions['feign']}",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com)
* See AUTHORS.txt
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* SPDX-License-Identifier: MPL-2.0
* This file is part of the OperatorFabric project.
*/

package org.lfenergy.operatorfabric.businessconfig.model;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* Response associated button color
* <dl>
* <dt>ALWAYS</dt><dd>Acknowledgment always allowed</dd>
* <dt>NEVER</dt><dd>Acknowledgment not allowed</dd>
* <dt>ONLY_WHEN_RESPONSE_DISABLED_FOR_USER</dt><dd>Acknowledgment allowed only if response is disabled for the user</dd>
* </dl>
* Note : This enum is created by hand because Swagger can't handle enums. It should match the corresponding
* enum definition in the Cards API.
*
*
*/
@Getter
@AllArgsConstructor
public enum AcknowledgmentAllowedEnum {
ALWAYS("Always"),
NEVER("Never"),
ONLY_WHEN_RESPONSE_DISABLED_FOR_USER("OnlyWhenResponseDisabledForUser");

String value;
}
1 change: 1 addition & 0 deletions client/businessconfig/src/main/modeling/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"delegatePattern": true,
"singleContentTypes": false,
"importMappings" : {
"AcknowledgmentAllowedEnum": "org.lfenergy.operatorfabric.businessconfig.model.AcknowledgmentAllowedEnum",
"ActionEnum": "org.lfenergy.operatorfabric.businessconfig.model.ActionEnum",
"ResponseBtnColorEnum": "org.lfenergy.operatorfabric.businessconfig.model.ResponseBtnColorEnum",
"LinkTypeEnum": "org.lfenergy.operatorfabric.businessconfig.model.LinkTypeEnum",
Expand Down
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:1.8.0.RELEASE"
image: "lfeoperatorfabric/of-web-ui:2.0.0.RELEASE"
#user: ${USER_ID}:${USER_GID}
ports:
- "2002:80"
Expand All @@ -38,6 +38,6 @@ services:
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
- "./loggingResults:/etc/nginx/html/logging"
ext-app:
image: "lfeoperatorfabric/of-external-app:1.8.0.RELEASE"
image: "lfeoperatorfabric/of-external-app:2.0.0.RELEASE"
ports:
- "8090:8090"
35 changes: 33 additions & 2 deletions config/dev/ui-menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,28 @@
"id": "uid_test_1",
"url": "https://opfab.github.io/",
"label": "entry.entry1",
"linkType": "BOTH"
"linkType": "BOTH",
"showOnlyForGroups": ["ReadOnly","Planner"]
},
{
"id": "uid_test_2",
"url": "https://www.wikipedia.org/",
"label": "entry.entry2",
"linkType": "BOTH"
"linkType": "BOTH",
"showOnlyForGroups": ["Dispatcher"]
}
]
},
{
"id": "adminmenu",
"label": "title.admin",
"entries": [
{
"id": "uid_test_3",
"url": "https://opfab.github.io/",
"label": "entry.admin",
"linkType": "BOTH",
"showOnlyForGroups": ["ADMIN"]
}
]
}
Expand All @@ -51,6 +66,14 @@
"entry1": "First menu entry",
"entry2": "Second menu entry"
}
},
"adminmenu": {
"title": {
"admin": "Admin menu"
},
"entry": {
"admin": "Admin menu entry"
}
}
}
},
Expand All @@ -73,6 +96,14 @@
"entry1": "Premiere menu entry",
"entry2": "Deuxieme menu entry"
}
},
"adminmenu": {
"title": {
"admin": "Admin menu"
},
"entry": {
"admin": "Admin menu entry"
}
}
}
}
Expand Down
13 changes: 4 additions & 9 deletions config/dev/web-ui-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
"5"
]
},
"process": {
"list": [
"process1",
"process2",
"process3"
]
},
"tags": {
"list": [
{
Expand Down Expand Up @@ -124,11 +117,13 @@
"description": true
},
"locale": "en",
"nightDayMode": false,
"styleWhenNightDayModeDesactivated" : "LEGACY"
"nightDayMode": false
},
"navbar": {
"hidden": [],
"businessmenus" : {"type":"IFRAME"}
},
"feedConfiguration": {
"hidden": false
}
}
9 changes: 3 additions & 6 deletions config/dev/web-ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"10"
]
},
"process": {
"list": [
"process",
"someOtherProcess"
]
},
"tags": {
"list": [
{
Expand Down Expand Up @@ -139,5 +133,8 @@
},
"admin": {
"hidden": false
},
"feedConfiguration": {
"hidden": false
}
}
Loading

0 comments on commit f87dd74

Please sign in to comment.