@eeacms/volto-tableau 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,70 +4,70 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- #### [1.2.4](https://github.com/eea/volto-tableau/compare/1.2.3...1.2.4)
7
+ ### [1.2.5](https://github.com/eea/volto-tableau/compare/1.2.4...1.2.5) - 2 September 2022
8
8
 
9
- - Use latest tableau-api-js [`dc9798b`](https://github.com/eea/volto-tableau/commit/dc9798b48adb5356bd7e054ec3418352d30a412a)
9
+ #### :hammer_and_wrench: Others
10
10
 
11
- #### [1.2.3](https://github.com/eea/volto-tableau/compare/1.2.2...1.2.3)
11
+ - Use volto 16 alpha 14 [Miu Razvan - [`93641be`](https://github.com/eea/volto-tableau/commit/93641be4c2393f49008aff789400cf7c947949fd)]
12
+ - Fix filter update [Miu Razvan - [`d613762`](https://github.com/eea/volto-tableau/commit/d613762734bbba2460ad8e8860d95197fc86786b)]
13
+ - Revert volto-tableau group to common [Andrei Grigore - [`9d24c6d`](https://github.com/eea/volto-tableau/commit/9d24c6d2767fed6a840cddaee55dbd5cecb544b5)]
14
+ - Tableaugroup typo fix [Andrei Grigore - [`b0b5378`](https://github.com/eea/volto-tableau/commit/b0b5378a437043120a96c9e5e8802584145daa22)]
15
+ - Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`d237e1c`](https://github.com/eea/volto-tableau/commit/d237e1c72817d7e68a3eb698563674d1514db24f)]
16
+ ### [1.2.4](https://github.com/eea/volto-tableau/compare/1.2.3...1.2.4) - 25 October 2021
12
17
 
13
- > 14 June 2021
18
+ #### :hammer_and_wrench: Others
14
19
 
15
- - pin volto-resize-helper to latest [`#5`](https://github.com/eea/volto-tableau/pull/5)
16
- - Width of undefined [`12e09a7`](https://github.com/eea/volto-tableau/commit/12e09a7d9f996ba6bb6a3536389caa293f52ce66)
17
- - Updated volto-resize [`1414ec0`](https://github.com/eea/volto-tableau/commit/1414ec0d932d7eba13f5656fb4b7ee9fe192d163)
20
+ ### [1.2.3](https://github.com/eea/volto-tableau/compare/1.2.2...1.2.3) - 14 June 2021
18
21
 
19
- #### [1.2.2](https://github.com/eea/volto-tableau/compare/1.2.1...1.2.2)
22
+ #### :hammer_and_wrench: Others
20
23
 
21
- > 8 June 2021
24
+ - Width of undefined [razvanMiu - [`12e09a7`](https://github.com/eea/volto-tableau/commit/12e09a7d9f996ba6bb6a3536389caa293f52ce66)]
25
+ - Updated volto-resize [razvanMiu - [`1414ec0`](https://github.com/eea/volto-tableau/commit/1414ec0d932d7eba13f5656fb4b7ee9fe192d163)]
26
+ ### [1.2.2](https://github.com/eea/volto-tableau/compare/1.2.1...1.2.2) - 8 June 2021
22
27
 
23
- - Setting the device to desktop forcefully when scale enabled [`#4`](https://github.com/eea/volto-tableau/pull/4)
24
- - Updated volto-resize [`2723c26`](https://github.com/eea/volto-tableau/commit/2723c26f811b904197bd25d71e0da64a8fbfc184)
25
- - setting the device to desktop forcefully when scale enabled [`2782cb6`](https://github.com/eea/volto-tableau/commit/2782cb627fcebd36af7b6aa299b6c89943a453ad)
28
+ #### :hammer_and_wrench: Others
26
29
 
27
- #### [1.2.1](https://github.com/eea/volto-tableau/compare/1.2.0...1.2.1)
30
+ - Updated volto-resize [razvanMiu - [`2723c26`](https://github.com/eea/volto-tableau/commit/2723c26f811b904197bd25d71e0da64a8fbfc184)]
31
+ - setting the device to desktop forcefully when scale enabled [nileshgulia1 - [`2782cb6`](https://github.com/eea/volto-tableau/commit/2782cb627fcebd36af7b6aa299b6c89943a453ad)]
32
+ ### [1.2.1](https://github.com/eea/volto-tableau/compare/1.2.0...1.2.1) - 31 May 2021
28
33
 
29
- > 31 May 2021
34
+ #### :hammer_and_wrench: Others
30
35
 
31
- - Scale tableau correctly with width of the container. [`#3`](https://github.com/eea/volto-tableau/pull/3)
32
- - auto Scale tableau according to viewport width [`#2`](https://github.com/eea/volto-tableau/pull/2)
33
- - Clean up + update volto-resize-helper [`f5f3fae`](https://github.com/eea/volto-tableau/commit/f5f3fae6d331c71ec03a0eb5398229b9bbb75b3d)
34
- - Removed static width [`1796972`](https://github.com/eea/volto-tableau/commit/17969723531d95dd108936ccdf50a5438922aeff)
35
- - Updated autoscale [`a7f8465`](https://github.com/eea/volto-tableau/commit/a7f8465ed9388f28ea58d097a49dfe73b31d66ad)
36
- - give fixed width [`b4e44ac`](https://github.com/eea/volto-tableau/commit/b4e44ac6a1baa3d24d6ae130f4bf27f97b67120f)
37
- - finalize: scale on full content with iframe load [`e223298`](https://github.com/eea/volto-tableau/commit/e2232988e30b199b0cb12e97ae6161fff3f2a866)
38
- - set proper container width values onLoad [`ac7809b`](https://github.com/eea/volto-tableau/commit/ac7809be99098550e79406a8044d79eb33aed786)
39
- - fix initial loading of tableau [`7a062ba`](https://github.com/eea/volto-tableau/commit/7a062baf2e710e1f045071c1e2b6c2fb849ac80b)
40
- - remove lib and code docs [`f6a5fcd`](https://github.com/eea/volto-tableau/commit/f6a5fcdfda01cf45e0061af78f2a9c3c6d268a32)
41
- - scale tableau correctly wrt to width of the container [`0d5fca9`](https://github.com/eea/volto-tableau/commit/0d5fca91722a49290c065a146c2bf20dda61f0d4)
42
- - Cypress coverage [`1d935cf`](https://github.com/eea/volto-tableau/commit/1d935cfe934a3c7c61c5017d0e6a7a2307da4f8c)
43
- - scale tableau flag based [`48c0dde`](https://github.com/eea/volto-tableau/commit/48c0ddea176a2337fa9353ac136f3f65870d5c50)
44
- - Fix overwrite of storeExtenders [`b69a0d2`](https://github.com/eea/volto-tableau/commit/b69a0d2537310bb3de40c5262eadee64f46f8fea)
36
+ - Clean up + update volto-resize-helper [razvanMiu - [`f5f3fae`](https://github.com/eea/volto-tableau/commit/f5f3fae6d331c71ec03a0eb5398229b9bbb75b3d)]
37
+ - Removed static width [razvanMiu - [`1796972`](https://github.com/eea/volto-tableau/commit/17969723531d95dd108936ccdf50a5438922aeff)]
38
+ - Updated autoscale [razvanMiu - [`a7f8465`](https://github.com/eea/volto-tableau/commit/a7f8465ed9388f28ea58d097a49dfe73b31d66ad)]
39
+ - give fixed width [nileshgulia1 - [`b4e44ac`](https://github.com/eea/volto-tableau/commit/b4e44ac6a1baa3d24d6ae130f4bf27f97b67120f)]
40
+ - finalize: scale on full content with iframe load [nileshgulia1 - [`e223298`](https://github.com/eea/volto-tableau/commit/e2232988e30b199b0cb12e97ae6161fff3f2a866)]
41
+ - set proper container width values onLoad [nileshgulia1 - [`ac7809b`](https://github.com/eea/volto-tableau/commit/ac7809be99098550e79406a8044d79eb33aed786)]
42
+ - fix initial loading of tableau [nileshgulia1 - [`7a062ba`](https://github.com/eea/volto-tableau/commit/7a062baf2e710e1f045071c1e2b6c2fb849ac80b)]
43
+ - remove lib and code docs [nileshgulia1 - [`f6a5fcd`](https://github.com/eea/volto-tableau/commit/f6a5fcdfda01cf45e0061af78f2a9c3c6d268a32)]
44
+ - scale tableau correctly wrt to width of the container [nileshgulia1 - [`0d5fca9`](https://github.com/eea/volto-tableau/commit/0d5fca91722a49290c065a146c2bf20dda61f0d4)]
45
+ - Cypress coverage [valentinab25 - [`1d935cf`](https://github.com/eea/volto-tableau/commit/1d935cfe934a3c7c61c5017d0e6a7a2307da4f8c)]
46
+ - scale tableau flag based [nileshgulia1 - [`48c0dde`](https://github.com/eea/volto-tableau/commit/48c0ddea176a2337fa9353ac136f3f65870d5c50)]
47
+ - Fix overwrite of storeExtenders [razvanMiu - [`b69a0d2`](https://github.com/eea/volto-tableau/commit/b69a0d2537310bb3de40c5262eadee64f46f8fea)]
48
+ ### [1.2.0](https://github.com/eea/volto-tableau/compare/1.1.0...1.2.0) - 11 May 2021
45
49
 
46
- #### [1.2.0](https://github.com/eea/volto-tableau/compare/1.1.0...1.2.0)
50
+ #### :hammer_and_wrench: Others
47
51
 
48
- > 11 May 2021
52
+ - Release 1.2.0 [razvanMiu - [`648a592`](https://github.com/eea/volto-tableau/commit/648a5927f6a02314936bb54a1cd6dfe6320ce62e)]
53
+ - Implemented middleware [razvanMiu - [`b5ea549`](https://github.com/eea/volto-tableau/commit/b5ea5490c22d7f982538894803229e3fbadd3f3e)]
54
+ ### [1.1.0](https://github.com/eea/volto-tableau/compare/1.0.0...1.1.0) - 4 May 2021
49
55
 
50
- - Release 1.2.0 [`648a592`](https://github.com/eea/volto-tableau/commit/648a5927f6a02314936bb54a1cd6dfe6320ce62e)
51
- - Implemented middleware [`b5ea549`](https://github.com/eea/volto-tableau/commit/b5ea5490c22d7f982538894803229e3fbadd3f3e)
56
+ #### :hammer_and_wrench: Others
52
57
 
53
- #### [1.1.0](https://github.com/eea/volto-tableau/compare/1.0.0...1.1.0)
58
+ - Release 1.1.0 [razvanMiu - [`5434b30`](https://github.com/eea/volto-tableau/commit/5434b30c0aadd046eaad27fa9cbcc21a1166cc69)]
59
+ - Use tableau-api-js package; Clean up [razvanMiu - [`c3e1942`](https://github.com/eea/volto-tableau/commit/c3e1942963794dfe1373f86a022cc2b6d3855b6b)]
60
+ - Demo code for changing the active sheet on resize [razvanMiu - [`1c258db`](https://github.com/eea/volto-tableau/commit/1c258db7be06f9cb6fc3ffc6257674344e22ba30)]
61
+ - Try & Catch Viz initialization [razvanMiu - [`ce59344`](https://github.com/eea/volto-tableau/commit/ce59344a153ec49d2e04a3f92c55a6ba0e18fd63)]
62
+ ### 1.0.0 - 28 April 2021
54
63
 
55
- > 4 May 2021
64
+ #### :hammer_and_wrench: Others
56
65
 
57
- - Release 1.1.0 [`5434b30`](https://github.com/eea/volto-tableau/commit/5434b30c0aadd046eaad27fa9cbcc21a1166cc69)
58
- - Use tableau-api-js package; Clean up [`c3e1942`](https://github.com/eea/volto-tableau/commit/c3e1942963794dfe1373f86a022cc2b6d3855b6b)
59
- - Demo code for changing the active sheet on resize [`1c258db`](https://github.com/eea/volto-tableau/commit/1c258db7be06f9cb6fc3ffc6257674344e22ba30)
60
- - Try & Catch Viz initialization [`ce59344`](https://github.com/eea/volto-tableau/commit/ce59344a153ec49d2e04a3f92c55a6ba0e18fd63)
61
-
62
- #### 1.0.0
63
-
64
- > 28 April 2021
65
-
66
- - Release 1.0.0 [`6b392ae`](https://github.com/eea/volto-tableau/commit/6b392aeec6ef7a12bfed360b3b4838ed5c185933)
67
- - Prettier [`3b9849f`](https://github.com/eea/volto-tableau/commit/3b9849f7a1de7cfda2f8577bb3c1665ada54e29c)
68
- - Update [`111b495`](https://github.com/eea/volto-tableau/commit/111b4959117568b72e1d9ca24fb9e93356a0f954)
69
- - Render tableau after extraFilters is initialized on mount [`3bb82a2`](https://github.com/eea/volto-tableau/commit/3bb82a251a3d161c02982643a93d005e5aeac53c)
70
- - fix bug [`6c0cace`](https://github.com/eea/volto-tableau/commit/6c0caceb3ce61bf08e2aa64a6bc659867a108e39)
71
- - Update [`cb03c13`](https://github.com/eea/volto-tableau/commit/cb03c134d905596bb120e6a368f46a8b4ec9e5cb)
72
- - Implemented Tableau [`ff32ca6`](https://github.com/eea/volto-tableau/commit/ff32ca6e68a8e18023a92fce386cc79fb2210045)
73
- - Initial commit [`efac3b6`](https://github.com/eea/volto-tableau/commit/efac3b6b184cbffaba9bebe1477ced203f7c1c79)
66
+ - Release 1.0.0 [razvanMiu - [`6b392ae`](https://github.com/eea/volto-tableau/commit/6b392aeec6ef7a12bfed360b3b4838ed5c185933)]
67
+ - Prettier [razvanMiu - [`3b9849f`](https://github.com/eea/volto-tableau/commit/3b9849f7a1de7cfda2f8577bb3c1665ada54e29c)]
68
+ - Update [razvanMiu - [`111b495`](https://github.com/eea/volto-tableau/commit/111b4959117568b72e1d9ca24fb9e93356a0f954)]
69
+ - Render tableau after extraFilters is initialized on mount [razvanMiu - [`3bb82a2`](https://github.com/eea/volto-tableau/commit/3bb82a251a3d161c02982643a93d005e5aeac53c)]
70
+ - fix bug [nileshgulia1 - [`6c0cace`](https://github.com/eea/volto-tableau/commit/6c0caceb3ce61bf08e2aa64a6bc659867a108e39)]
71
+ - Update [razvanMiu - [`cb03c13`](https://github.com/eea/volto-tableau/commit/cb03c134d905596bb120e6a368f46a8b4ec9e5cb)]
72
+ - Implemented Tableau [razvanMiu - [`ff32ca6`](https://github.com/eea/volto-tableau/commit/ff32ca6e68a8e18023a92fce386cc79fb2210045)]
73
+ - Initial commit [Miu Razvan - [`efac3b6`](https://github.com/eea/volto-tableau/commit/efac3b6b184cbffaba9bebe1477ced203f7c1c79)]
package/Jenkinsfile CHANGED
@@ -4,13 +4,38 @@ pipeline {
4
4
  environment {
5
5
  GIT_NAME = "volto-tableau"
6
6
  NAMESPACE = "@eeacms"
7
- SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu"
7
+ SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,water.europa.eu-freshwater"
8
8
  DEPENDENCIES = ""
9
+ VOLTO = "16.0.0-alpha.14"
9
10
  }
10
11
 
11
12
  stages {
12
13
 
14
+ stage('Release') {
15
+ when {
16
+ allOf {
17
+ environment name: 'CHANGE_ID', value: ''
18
+ branch 'master'
19
+ }
20
+ }
21
+ steps {
22
+ node(label: 'docker') {
23
+ withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
24
+ sh '''docker pull eeacms/gitflow'''
25
+ sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
26
+ }
27
+ }
28
+ }
29
+ }
30
+
13
31
  stage('Code') {
32
+ when {
33
+ allOf {
34
+ environment name: 'CHANGE_ID', value: ''
35
+ not { changelog '.*^Automated release [0-9\\.]+$' }
36
+ not { branch 'master' }
37
+ }
38
+ }
14
39
  steps {
15
40
  parallel(
16
41
 
@@ -36,6 +61,15 @@ pipeline {
36
61
  }
37
62
 
38
63
  stage('Tests') {
64
+ when {
65
+ allOf {
66
+ environment name: 'CHANGE_ID', value: ''
67
+ anyOf {
68
+ not { changelog '.*^Automated release [0-9\\.]+$' }
69
+ branch 'master'
70
+ }
71
+ }
72
+ }
39
73
  steps {
40
74
  parallel(
41
75
 
@@ -75,6 +109,15 @@ pipeline {
75
109
  }
76
110
 
77
111
  stage('Integration tests') {
112
+ when {
113
+ allOf {
114
+ environment name: 'CHANGE_ID', value: ''
115
+ anyOf {
116
+ not { changelog '.*^Automated release [0-9\\.]+$' }
117
+ branch 'master'
118
+ }
119
+ }
120
+ }
78
121
  steps {
79
122
  parallel(
80
123
 
@@ -82,8 +125,8 @@ pipeline {
82
125
  node(label: 'docker') {
83
126
  script {
84
127
  try {
85
- sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
86
- sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
128
+ sh '''docker pull eeacms/plone-backend; docker run -d --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend'''
129
+ sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e NODE_ENV=development -e VOLTO="$VOLTO" plone/volto-addon-ci cypress'''
87
130
  } finally {
88
131
  try {
89
132
  sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
@@ -100,7 +143,8 @@ pipeline {
100
143
  reportName: 'CypressCoverage',
101
144
  reportTitles: 'Integration Tests Code Coverage'])
102
145
  }
103
- archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
146
+ sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
147
+ archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
104
148
  stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true
105
149
  }
106
150
  finally {
@@ -122,10 +166,16 @@ pipeline {
122
166
  }
123
167
 
124
168
  stage('Report to SonarQube') {
125
- // Exclude Pull-Requests
126
169
  when {
127
170
  allOf {
128
171
  environment name: 'CHANGE_ID', value: ''
172
+ anyOf {
173
+ branch 'master'
174
+ allOf {
175
+ branch 'develop'
176
+ not { changelog '.*^Automated release [0-9\\.]+$' }
177
+ }
178
+ }
129
179
  }
130
180
  }
131
181
  steps {
@@ -135,10 +185,10 @@ pipeline {
135
185
  unstash "xunit-reports"
136
186
  unstash "cypress-coverage"
137
187
  def scannerHome = tool 'SonarQubeScanner';
138
- def nodeJS = tool 'NodeJS11';
188
+ def nodeJS = tool 'NodeJS';
139
189
  withSonarQubeEnv('Sonarqube') {
140
190
  sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
141
- sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
191
+ sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
142
192
  sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done'''
143
193
  }
144
194
  }
@@ -156,8 +206,8 @@ pipeline {
156
206
  steps {
157
207
  node(label: 'docker') {
158
208
  script {
159
- if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) {
160
- error "Pipeline aborted due to PR not made from develop or hotfix branch"
209
+ if ( env.CHANGE_BRANCH != "develop" ) {
210
+ error "Pipeline aborted due to PR not made from develop branch"
161
211
  }
162
212
  withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
163
213
  sh '''docker pull eeacms/gitflow'''
@@ -168,23 +218,6 @@ pipeline {
168
218
  }
169
219
  }
170
220
 
171
- stage('Release') {
172
- when {
173
- allOf {
174
- environment name: 'CHANGE_ID', value: ''
175
- branch 'master'
176
- }
177
- }
178
- steps {
179
- node(label: 'docker') {
180
- withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
181
- sh '''docker pull eeacms/gitflow'''
182
- sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
183
- }
184
- }
185
- }
186
- }
187
-
188
221
  }
189
222
 
190
223
  post {
package/README.md CHANGED
@@ -1,7 +1,18 @@
1
1
  # volto-tableau
2
+
2
3
  [![Releases](https://img.shields.io/github/v/release/eea/volto-tableau)](https://github.com/eea/volto-tableau/releases)
4
+
3
5
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-tableau%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-tableau/job/master/display/redirect)
6
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau-master&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau-master)
7
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau-master&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau-master)
8
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau-master&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau-master)
9
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau-master&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau-master)
10
+
4
11
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-tableau%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-tableau/job/develop/display/redirect)
12
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau-develop&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau-develop)
13
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau-develop&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau-develop)
14
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau-develop)
15
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau-develop)
5
16
 
6
17
  [Volto](https://github.com/plone/volto) add-on
7
18
 
@@ -70,6 +81,81 @@ Demo GIF
70
81
 
71
82
  1. Happy editing!
72
83
 
84
+ ## Release
85
+
86
+ ### Automatic release using Jenkins
87
+
88
+ * The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
89
+ * It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
90
+ * The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
91
+ * Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
92
+ * As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
93
+ * The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
94
+ * You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
95
+ * Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
96
+
97
+ ### Manual release from the develop branch ( beta release )
98
+
99
+ #### Installation and configuration of release-it
100
+
101
+ You need to first install the [release-it](https://github.com/release-it/release-it) client.
102
+
103
+ ```
104
+ npm install -g release-it
105
+ ```
106
+
107
+ Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
108
+
109
+ Release-it is a tool that automates 4 important steps in the release process:
110
+
111
+ 1. Version increase in `package.json` ( increased from the current version in `package.json`)
112
+ 2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
113
+ 3. GitHub release on the commit with the changelog and package.json modification on the develop branch
114
+ 4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
115
+
116
+ To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
117
+
118
+ ```
119
+ export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
120
+ ```
121
+
122
+ To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
123
+
124
+ ```
125
+ echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
126
+ ```
127
+
128
+ #### Using release-it tool
129
+
130
+ There are 3 yarn scripts that can be run to do the release
131
+
132
+ ##### yarn release-beta
133
+
134
+ Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
135
+
136
+ ```
137
+ ? Select increment (next version):
138
+ ❯ prepatch (0.1.1-beta.0)
139
+ preminor (0.2.0-beta.0)
140
+ premajor (1.0.0-beta.0)
141
+ Other, please specify...
142
+ ```
143
+
144
+ ##### yarn release-major-beta
145
+
146
+ Same as `yarn release-beta`, but with premajor version pre-selected.
147
+
148
+ ##### yarn release
149
+
150
+ Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
151
+
152
+ #### Important notes
153
+
154
+ > Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
155
+
156
+ > Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
157
+
158
+
73
159
  ## How to contribute
74
160
 
75
161
  See [DEVELOP.md](https://github.com/eea/volto-tableau/blob/master/DEVELOP.md).
@@ -27,7 +27,7 @@ coverage-end */
27
27
  export const setupBeforeEach = () => {
28
28
  cy.autologin();
29
29
  cy.createContent({
30
- contentType: 'Folder',
30
+ contentType: 'Document',
31
31
  contentId: 'cypress',
32
32
  contentTitle: 'Cypress',
33
33
  });
package/cypress.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "baseUrl": "http://localhost:3000",
3
3
  "viewportWidth": 1280,
4
- "defaultCommandTimeout": 15000,
4
+ "defaultCommandTimeout": 8888,
5
5
  "reporter": "junit",
6
6
  "video": true,
7
7
  "reporterOptions": {
8
8
  "mochaFile": "cypress/reports/cypress-[hash].xml",
9
9
  "jenkinsMode": true,
10
10
  "toConsole": true
11
+ },
12
+ "chromeWebSecurity": false,
13
+ "retries": {
14
+ "runMode": 8,
15
+ "openMode": 0
11
16
  }
12
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-tableau",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "@eeacms/volto-tableau: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -29,6 +29,8 @@
29
29
  },
30
30
  "scripts": {
31
31
  "release": "release-it",
32
+ "release-major-beta": "release-it major --preRelease=beta",
33
+ "release-beta": "release-it --preRelease=beta",
32
34
  "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
33
35
  "stylelint": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'",
34
36
  "stylelint:overrides": "../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'",
@@ -9,6 +9,7 @@ import cx from 'classnames';
9
9
 
10
10
  const Tableau = (props) => {
11
11
  const ref = React.useRef(null);
12
+ const filters = React.useRef(props.data.filters || {});
12
13
  const mounted = React.useRef(false);
13
14
  const [viz, setViz] = React.useState(null);
14
15
  const {
@@ -26,7 +27,6 @@ const Tableau = (props) => {
26
27
  } = props;
27
28
  const {
28
29
  autoScale = false,
29
- filters = {},
30
30
  hideTabs = false,
31
31
  hideToolbar = false,
32
32
  sheetname = '',
@@ -37,17 +37,12 @@ const Tableau = (props) => {
37
37
  const tableau = props.tableau[version];
38
38
 
39
39
  const onFilterChange = (filter) => {
40
- const newFilters = { ...filters };
40
+ const newFilters = { ...filters.current };
41
41
  const fieldName = filter.getFieldName();
42
- const allSelected = filter.getIsAllSelected();
43
42
  const values = filter
44
43
  .getAppliedValues()
45
44
  .map((appliedValue) => appliedValue.value);
46
- if (allSelected) {
47
- delete newFilters[fieldName];
48
- } else {
49
- newFilters[fieldName] = values;
50
- }
45
+ newFilters[fieldName] = values;
51
46
  if (JSON.stringify(newFilters) !== JSON.stringify(filters)) {
52
47
  props.onChangeBlock(props.block, {
53
48
  ...data,
@@ -55,6 +50,7 @@ const Tableau = (props) => {
55
50
  ...newFilters,
56
51
  },
57
52
  });
53
+ filters.current = { ...newFilters };
58
54
  }
59
55
  };
60
56
 
@@ -78,7 +74,7 @@ const Tableau = (props) => {
78
74
  hideToolbar,
79
75
  sheetname,
80
76
  toolbarPosition,
81
- ...filters,
77
+ ...data.filters,
82
78
  ...extraFilters,
83
79
  ...extraOptions,
84
80
  onFirstInteractive: () => {