Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Jul 26, 2021
2 parents 0c04cd9 + 09bb2ad commit 4be3fba
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 898 deletions.
46 changes: 32 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pipeline {
RANCHER_ENVID = "1a332957"
dockerImage = ''
tagName = ''
SONARQUBE_TAG = ""
}

stages {
Expand Down Expand Up @@ -84,6 +85,25 @@ pipeline {
}
}

stage('Update SonarQube Tags') {
when {
not {
environment name: 'SONARQUBE_TAG', value: ''
}
buildingTag()
}
steps{
node(label: 'docker') {
withSonarQubeEnv('Sonarqube') {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GIT_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="${BUILD_TAG}-sonar" -e GIT_NAME=${GIT_NAME} -e GIT_TOKEN="${GIT_TOKEN}" -e SONARQUBE_TAG=${SONARQUBE_TAG} -e SONARQUBE_TOKEN=${SONAR_AUTH_TOKEN} -e SONAR_HOST_URL=${SONAR_HOST_URL} eeacms/gitflow /update_sonarqube_tags.sh'''
}
}
}
}
}

stage('Upgrade demo') {
when {
buildingTag()
Expand All @@ -102,23 +122,21 @@ pipeline {
}

post {
always {
cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
}
changed {
script {
def url = "${env.BUILD_URL}/display/redirect"
def status = currentBuild.currentResult
def subject = "${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'"
def summary = "${subject} (${url})"
def details = """<h1>${env.JOB_NAME} - Build #${env.BUILD_NUMBER} - ${status}</h1>
<p>Check console output at <a href="${url}">${env.JOB_BASE_NAME} - #${env.BUILD_NUMBER}</a></p>
def details = """<h1>${env.JOB_NAME} - Build #${env.BUILD_NUMBER} - ${currentBuild.currentResult}</h1>
<p>Check console output at <a href="${env.BUILD_URL}/display/redirect">${env.JOB_BASE_NAME} - #${env.BUILD_NUMBER}</a></p>
"""

def color = '#FFFF00'
if (status == 'SUCCESS') {
color = '#00FF00'
} else if (status == 'FAILURE') {
color = '#FF0000'
}
emailext (subject: '$DEFAULT_SUBJECT', to: '$DEFAULT_RECIPIENTS', body: details)
emailext(
subject: '$DEFAULT_SUBJECT',
body: details,
attachLog: true,
compressLog: true,
recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'CulpritsRecipientProvider']]
)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EPRTR: Volto Frontend

[![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=eprtr.eea.europa.eu%2Feprtr_frontend%2Fmaster&subject=pipeline)](https://ci.eionet.europa.eu/view/Github/job/eprtr.eea.europa.eu/job/eprtr_frontend/job/master/display/redirect)
[![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Feprtr_frontend%2Fmaster&subject=pipeline)](https://ci.eionet.europa.eu/view/Github/job/volto/job/eprtr_frontend/job/master/display/redirect)
[![Release](https://img.shields.io/github/v/release/eea/eprtr_frontend?sort=semver)](https://github.com/eea/eprtr_frontend/releases)

## Documentation
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ const View = (props) => {
{facilities[0]?.facilityMainActivity}
</span>
</p>
<p className="address light-blue">Facility address</p>
<p className="info">
<span>{facilities[0]?.facilityAddress}</span>
</p>
</>
) : (
''
Expand Down
5 changes: 5 additions & 0 deletions src/components/manage/Blocks/SiteBlocks/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ h3.orange {
margin-bottom: 0;
}

.site-block > .address {
font-weight: bold;
margin-bottom: 0;
}

.site-block .ui.grid {
margin-top: 0;
margin-bottom: 0;
Expand Down
99 changes: 61 additions & 38 deletions src/components/manage/Blocks/SiteLocationMap/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,26 @@ import { getSiteLocationURL } from './index';
import qs from 'querystring';
import './style.css';

// SVGs
import mapPlaceholder from '~/components/manage/Blocks/DiscodataOpenlayersMapBlock/map_placeholder.png';
// Privacy Protection VOLTO
import PrivacyProtection from '~/components/manage/Blocks/DiscodataOpenlayersMapBlock/PrivacyProtection';

const View = (props) => {
const [options, setOptions] = React.useState({});
const [vectorSource, setVectorSource] = useState(null);
const { format, proj, source, style } = openlayers;
const { siteInspireId } = { ...props.query, ...props.discodata_query };

const dataprotection = {
enabled: true,
privacy_statement:
'This map is hosted by a third party [Environmental Systems Research Institute, INC: "ESRI"]. By showing th external content you accept the terms and conditions of www.esri.com. This includes their cookie policies, which e have no control over.',
privacy_cookie_key: 'site-location-map',
placeholder_image: mapPlaceholder,
type: props.data.privacy?.value || 'big',
};

React.useState(() => {
if (__SERVER__) return;
const vs = vectorSource || new source.Vector();
Expand Down Expand Up @@ -54,47 +68,56 @@ const View = (props) => {

return (
<div className="site-location-map-wrapper">
<Container className="site-location-map">
<Map
view={{
center: proj.fromLonLat([20, 50]),
showFullExtent: true,
maxZoom: 12,
minZoom: 12,
zoom: 12,
<Container id="site-location-map" className="site-location-map">
<PrivacyProtection
data={{ dataprotection }}
style={{
backgroundImage: `url(${mapPlaceholder})`,
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover',
}}
renderer="webgl"
{...options}
>
<Layers>
<Layer.Tile
source={
new source.XYZ({
url:
'https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
})
}
zIndex={0}
/>
<Layer.VectorImage
source={vectorSource}
style={siteStyle}
title="1.Sites"
zIndex={1}
<Map
view={{
center: proj.fromLonLat([20, 50]),
showFullExtent: true,
maxZoom: 12,
minZoom: 12,
zoom: 12,
}}
renderer="webgl"
{...options}
>
<Layers>
<Layer.Tile
source={
new source.XYZ({
url:
'https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
})
}
zIndex={0}
/>
<Layer.VectorImage
source={vectorSource}
style={siteStyle}
title="1.Sites"
zIndex={1}
/>
</Layers>
<Controls attribution={false} zoom={false} />
<Interactions
doubleClickZoom={false}
dragAndDrop={false}
dragPan={false}
keyboardPan={false}
keyboardZoom={false}
mouseWheelZoom={false}
pointer={false}
select={false}
/>
</Layers>
<Controls attribution={false} zoom={false} />
<Interactions
doubleClickZoom={false}
dragAndDrop={false}
dragPan={false}
keyboardPan={false}
keyboardZoom={false}
mouseWheelZoom={false}
pointer={false}
select={false}
/>
</Map>
</Map>
</PrivacyProtection>
</Container>
</div>
);
Expand Down
46 changes: 44 additions & 2 deletions src/components/manage/Blocks/SiteLocationMap/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,55 @@ div#view .ui.container > .site-location-map {
display: flex;
justify-content: center;
margin-bottom: 1rem;
height: 400px;
}

.site-location-map.visible.transition {
display: flex !important;
}

.site-location-map .ol-map {
height: 300px;
min-height: 300px;
height: 400px;
min-height: 400px;
}

.privacy-protection {
padding: 0;
background: transparent;
}

.privacy-protection .overlay {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.35);
}

.privacy-protection .background {
opacity: 0.8;
}

.privacy-protection .wrapped {
position: absolute;
top: 50%;
left: 50%;
width: 400px;
background: #ffffff;
border-radius: 10px;
transform: translate(-50%, -50%);
}

.privacy-protection .wrapped .ui.message {
background: #ffffff;
border-radius: 10px;
}

.privacy-protection .wrapped p.discreet {
padding: 1.5em 1.5em;
}

.privacy-protection .privacy-button {
display: flex;
flex-flow: row;
align-items: center;
justify-content: center;
}
Loading

0 comments on commit 4be3fba

Please sign in to comment.