From 60b6e42fccc2dc2181c4ff8e7c095b9759ff52c0 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Tue, 3 Mar 2020 16:20:21 +0100 Subject: [PATCH 01/21] skip unit tests in integration test stage --- Jenkinsfile | 2 +- pom.xml | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 010a583f6e..bd8cfd25ee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,7 +37,7 @@ node('docker') { } stage('Integration Test') { - mvn 'verify -Pit -pl :scm-webapp,:scm-it -Dmaven.test.failure.ignore=true' + mvn 'verify -Pit -DskipUnitTests -pl :scm-webapp,:scm-it -Dmaven.test.failure.ignore=true' } stage('SonarQube') { diff --git a/pom.xml b/pom.xml index a472742c11..f8952bbd6a 100644 --- a/pom.xml +++ b/pom.xml @@ -480,6 +480,13 @@ org.apache.maven.plugins maven-surefire-plugin 2.22.0 + + + ${skipUnitTests} + @@ -881,7 +888,9 @@ ./scm-ui/target/frontend/buildfrontend-node/node-v${nodejs.version}-linux-x64/bin/node - + + ${skipTests} From 6e1102dbd5e0d2357155c1aaf320c9af7d42c98a Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 4 Mar 2020 09:54:09 +0100 Subject: [PATCH 02/21] added more options to control which frontend scripts are executed durring build --- scm-ui/pom.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scm-ui/pom.xml b/scm-ui/pom.xml index 3525b79563..d4023998f6 100644 --- a/scm-ui/pom.xml +++ b/scm-ui/pom.xml @@ -18,8 +18,9 @@ build - false false + ${skipTests} + false typescript ui-extensions/src,ui-components/src,ui-webapp/src **/*.test.js,src/tests/** @@ -88,6 +89,7 @@ run + ${skipFrontendBuild} @@ -99,7 +101,7 @@ - ${skipTests} + ${skipFrontendTests} From bf15f7af7aca334f9bb3ce6e3a457c31e28c74d0 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 4 Mar 2020 09:54:42 +0100 Subject: [PATCH 03/21] skipt frontend build and scm-it in unit-test stage --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bd8cfd25ee..8364f77832 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ node('docker') { } stage('Unit Test') { - mvn 'test -Pcoverage -Dmaven.test.failure.ignore=true' + mvn 'test -DskipFrontendBuild -DskipTypecheck -Pcoverage -pl !scm-it -Dmaven.test.failure.ignore=true' } stage('Integration Test') { From 94d9c574a240c8380b954312c750ee7e39e0cd42 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 4 Mar 2020 10:14:59 +0100 Subject: [PATCH 04/21] execute unit tests and integration tests in parallel --- Jenkinsfile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8364f77832..d90856d619 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,13 +32,18 @@ node('docker') { mvn 'clean install -DskipTests' } - stage('Unit Test') { - mvn 'test -DskipFrontendBuild -DskipTypecheck -Pcoverage -pl !scm-it -Dmaven.test.failure.ignore=true' - } - - stage('Integration Test') { - mvn 'verify -Pit -DskipUnitTests -pl :scm-webapp,:scm-it -Dmaven.test.failure.ignore=true' - } + parallel( + unitTest: { + stage('Unit Test') { + mvn 'test -DskipFrontendBuild -DskipTypecheck -Pcoverage -pl !scm-it -Dmaven.test.failure.ignore=true' + } + }, + integrationTest: { + stage('Integration Test') { + mvn 'verify -Pit -DskipUnitTests -pl :scm-webapp,:scm-it -Dmaven.test.failure.ignore=true' + } + } + ) stage('SonarQube') { From c262d5daf4e85c56780e2c11e7eff57191f9fc00 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 4 Mar 2020 12:12:57 +0100 Subject: [PATCH 05/21] disable application logs durring ci build --- Jenkinsfile | 2 + scm-webapp/src/main/resources/logback.ci.xml | 39 ++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 scm-webapp/src/main/resources/logback.ci.xml diff --git a/Jenkinsfile b/Jenkinsfile index d90856d619..6c78155a85 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -109,6 +109,8 @@ String mainBranch Maven setupMavenBuild() { Maven mvn = new MavenWrapperInDocker(this, "scmmanager/java-build:11.0.6_10") + // disable logging durring the build + mvn.additionalArgs += ' -Dlogback.configurationFile=scm-webapp/src/main/resources/logback.ci.xml' if (isMainBranch()) { // Release starts javadoc, which takes very long, so do only for certain branches diff --git a/scm-webapp/src/main/resources/logback.ci.xml b/scm-webapp/src/main/resources/logback.ci.xml new file mode 100644 index 0000000000..428d3e1350 --- /dev/null +++ b/scm-webapp/src/main/resources/logback.ci.xml @@ -0,0 +1,39 @@ + + + + + + + + From 6e59a654a687c7b70ab2358f77d15f4fbc1106cd Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 4 Mar 2020 12:20:37 +0100 Subject: [PATCH 06/21] reduce massive webpack output --- scm-ui/ui-scripts/src/createPluginConfig.js | 1 + scm-ui/ui-scripts/src/webpack.config.js | 1 + 2 files changed, 2 insertions(+) diff --git a/scm-ui/ui-scripts/src/createPluginConfig.js b/scm-ui/ui-scripts/src/createPluginConfig.js index 3e210fa022..6057ccc997 100644 --- a/scm-ui/ui-scripts/src/createPluginConfig.js +++ b/scm-ui/ui-scripts/src/createPluginConfig.js @@ -19,6 +19,7 @@ module.exports = function(mode) { [name]: [path.resolve(__dirname, "webpack-public-path.js"), packageJSON.main || "src/main/js/index.js"] }, mode, + stats: "minimal", devtool: "source-map", target: "web", node: { diff --git a/scm-ui/ui-scripts/src/webpack.config.js b/scm-ui/ui-scripts/src/webpack.config.js index cf63c1da3c..e6cc362a67 100644 --- a/scm-ui/ui-scripts/src/webpack.config.js +++ b/scm-ui/ui-scripts/src/webpack.config.js @@ -25,6 +25,7 @@ console.log(`build ${mode} bundles`); module.exports = [ { mode, + stats: "minimal", context: root, entry: { webapp: [path.resolve(__dirname, "webpack-public-path.js"), "./ui-webapp/src/index.tsx"] From b8998b1dfff08f704a85a37af7a30ac843e7397e Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 4 Mar 2020 12:49:30 +0100 Subject: [PATCH 07/21] reove duplicated jaxb implementation --- pom.xml | 6 ------ scm-core/pom.xml | 5 ----- 2 files changed, 11 deletions(-) diff --git a/pom.xml b/pom.xml index f8952bbd6a..f936b8890d 100644 --- a/pom.xml +++ b/pom.xml @@ -399,12 +399,6 @@ ${jaxb.version} - - com.sun.xml.bind - jaxb-impl - ${jaxb.version} - - org.glassfish.jaxb jaxb-runtime diff --git a/scm-core/pom.xml b/scm-core/pom.xml index ec3b884fd6..3c7d67c2d8 100644 --- a/scm-core/pom.xml +++ b/scm-core/pom.xml @@ -152,11 +152,6 @@ jaxb-api - - com.sun.xml.bind - jaxb-impl - - org.glassfish.jaxb jaxb-runtime From 52fb900cf3677e842f66adbc95769ec6acd25a5a Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 4 Mar 2020 12:56:38 +0100 Subject: [PATCH 08/21] reduce logging of scm-it test instance --- Jenkinsfile | 4 +++- scm-it/pom.xml | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6c78155a85..6257958546 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -110,7 +110,9 @@ String mainBranch Maven setupMavenBuild() { Maven mvn = new MavenWrapperInDocker(this, "scmmanager/java-build:11.0.6_10") // disable logging durring the build - mvn.additionalArgs += ' -Dlogback.configurationFile=scm-webapp/src/main/resources/logback.ci.xml' + def logConf = "scm-webapp/src/main/resources/logback.ci.xml" + mvn.additionalArgs += " -Dlogback.configurationFile=${logConf}" + mvn.additionalArgs += " -Dscm-it.logbackConfiguration=${logConf}" if (isMainBranch()) { // Release starts javadoc, which takes very long, so do only for certain branches diff --git a/scm-it/pom.xml b/scm-it/pom.xml index 9064a39fc1..8cc56d332f 100644 --- a/scm-it/pom.xml +++ b/scm-it/pom.xml @@ -204,6 +204,10 @@ sonia.scm.classloading.lifecycle simple + + logback.configurationFile + ${scm-it.logbackConfiguration} + /scm @@ -237,10 +241,10 @@ DEVELOPMENT target/scm-it + ${project.basedir}/../scm-webapp/src/main/resources/logback.default.xml - From b3fe97309624f729d4bfc3155a330aff71288e29 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Mon, 16 Mar 2020 22:15:39 +0000 Subject: [PATCH 09/21] fix: upgrade com.fasterxml.jackson.core:jackson-core from 2.10.0 to 2.10.2 Snyk has created this PR to upgrade com.fasterxml.jackson.core:jackson-core from 2.10.0 to 2.10.2. See this package in NPM: https://www.npmjs.com/package/com.fasterxml.jackson.core:jackson-core See this project in Snyk: https://app.snyk.io/org/scm-manager/project/0397d943-538d-483e-9c87-a3f7e7665d7b?utm_source=github&utm_medium=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3301168cb..6104fd2f1f 100644 --- a/pom.xml +++ b/pom.xml @@ -838,7 +838,7 @@ 2.1.1 4.4.2.Final 1.19.4 - 2.10.0 + 2.10.2 4.2.2 2.3.0 6.1.0.Final From 2114923932cd7e086094fd6d8613e444f470f2c1 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Mon, 16 Mar 2020 22:15:45 +0000 Subject: [PATCH 10/21] fix: upgrade org.mapstruct:mapstruct-jdk8 from 1.2.0.Final to 1.3.1.Final Snyk has created this PR to upgrade org.mapstruct:mapstruct-jdk8 from 1.2.0.Final to 1.3.1.Final. See this package in NPM: https://www.npmjs.com/package/org.mapstruct:mapstruct-jdk8 See this project in Snyk: https://app.snyk.io/org/scm-manager/project/0397d943-538d-483e-9c87-a3f7e7665d7b?utm_source=github&utm_medium=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3301168cb..18459d371d 100644 --- a/pom.xml +++ b/pom.xml @@ -871,7 +871,7 @@ UTF-8 SCM-BSD - 1.2.0.Final + 1.3.1.Final From 4d4ceeb6273653a060788acf3263f9d15217cd72 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Tue, 17 Mar 2020 01:00:33 +0000 Subject: [PATCH 11/21] fix: upgrade org.junit.jupiter:junit-jupiter-params from 5.2.0 to 5.6.0 Snyk has created this PR to upgrade org.junit.jupiter:junit-jupiter-params from 5.2.0 to 5.6.0. See this package in NPM: https://www.npmjs.com/package/org.junit.jupiter:junit-jupiter-params See this project in Snyk: https://app.snyk.io/org/scm-manager/project/4ac22872-f5a6-4220-bfe8-e6e5bf4c5fcb?utm_source=github&utm_medium=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3301168cb..ae2abd7a70 100644 --- a/pom.xml +++ b/pom.xml @@ -828,7 +828,7 @@ 2.28.2 1.3 - 5.2.0 + 5.6.0 1.7.30 From f73a383362643febed8cb833e12ba5aee3a7c1cb Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Tue, 17 Mar 2020 01:40:37 +0000 Subject: [PATCH 12/21] fix: upgrade bulma from 0.7.5 to 0.8.0 Snyk has created this PR to upgrade bulma from 0.7.5 to 0.8.0. See this package in NPM: https://www.npmjs.com/package/bulma See this project in Snyk: https://app.snyk.io/org/scm-manager/project/b494e382-e614-456b-8015-0be5a5d07674?utm_source=github&utm_medium=upgrade-pr --- scm-ui/ui-styles/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scm-ui/ui-styles/package.json b/scm-ui/ui-styles/package.json index d4f160f2d7..b4fffb547e 100644 --- a/scm-ui/ui-styles/package.json +++ b/scm-ui/ui-styles/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^5.11.2", - "bulma": "^0.7.5", + "bulma": "^0.8.0", "bulma-popover": "^1.0.0", "bulma-tooltip": "^3.0.0", "react-diff-view": "^2.4.1" From 49cc3ebbda89c4edbb3ed662f051439eed8b1ac3 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 18 Mar 2020 21:39:17 +0100 Subject: [PATCH 13/21] #1049 fix ui build on windows --- scm-ui/ui-scripts/src/lerna.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scm-ui/ui-scripts/src/lerna.js b/scm-ui/ui-scripts/src/lerna.js index b5404fbd62..6479b112fb 100644 --- a/scm-ui/ui-scripts/src/lerna.js +++ b/scm-ui/ui-scripts/src/lerna.js @@ -1,7 +1,10 @@ const { spawnSync } = require("child_process"); +const os = require("os"); + +const yarnCmd = os.platform() === "win32" ? "yarn.cmd" : "yarn"; const yarn = args => { - const result = spawnSync("yarn", args, { stdio: "inherit" }); + const result = spawnSync(yarnCmd, args, { stdio: "inherit" }); if (result.error) { console.log("could not start yarn command:", result.error); process.exit(2); From 5c9a03a3847be36838a5957444048ed192d617a7 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 19 Mar 2020 02:37:59 +0000 Subject: [PATCH 14/21] fix: upgrade org.glassfish:javax.json from 1.0.4 to 1.1.4 Snyk has created this PR to upgrade org.glassfish:javax.json from 1.0.4 to 1.1.4. See this package in NPM: https://www.npmjs.com/package/org.glassfish:javax.json See this project in Snyk: https://app.snyk.io/org/scm-manager/project/19b9a56b-d5b5-4d36-a7e8-665c853bc716?utm_source=github&utm_medium=upgrade-pr --- scm-it/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scm-it/pom.xml b/scm-it/pom.xml index efcc59d212..e2038e2816 100644 --- a/scm-it/pom.xml +++ b/scm-it/pom.xml @@ -84,7 +84,7 @@ org.glassfish javax.json - 1.0.4 + 1.1.4 runtime From 19ce54d202c129112ef03d0426b1908e33ef7337 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Thu, 19 Mar 2020 07:18:17 +0100 Subject: [PATCH 15/21] update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd6ceb194b..8de0a1ae51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Extension point to add links to the repository cards from plug ins ([#1041](https://github.com/scm-manager/scm-manager/pull/1041)) +### Fixed +- Build on windows ([#1048](https://github.com/scm-manager/scm-manager/issues/1048), [#1049](https://github.com/scm-manager/scm-manager/issues/1049), [#1056](https://github.com/scm-manager/scm-manager/pull/1056)) + ## 2.0.0-rc5 - 2020-03-12 ### Added - Added footer extension points for links and avatar From 70149865a891ee73340eeaed0f13e8f0ccfa7f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Pfeuffer?= Date: Thu, 19 Mar 2020 08:19:12 +0100 Subject: [PATCH 16/21] Fix unnecessary stubbing --- .../java/sonia/scm/web/WireProtocolRequestMockFactory.java | 5 ++--- .../src/test/java/sonia/scm/web/WireProtocolTest.java | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolRequestMockFactory.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolRequestMockFactory.java index d1f5124b3a..e319b07608 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolRequestMockFactory.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolRequestMockFactory.java @@ -3,12 +3,12 @@ package sonia.scm.web; import com.google.common.collect.Lists; import javax.servlet.http.HttpServletRequest; - import java.util.Collections; import java.util.List; import java.util.Locale; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; public class WireProtocolRequestMockFactory { @@ -88,7 +88,6 @@ public class WireProtocolRequestMockFactory { private HttpServletRequest base(String method, String queryStringValue) { HttpServletRequest request = mock(HttpServletRequest.class); - when(request.getRequestURI()).thenReturn(repositoryPath); when(request.getMethod()).thenReturn(method); queryString(request, queryStringValue); diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolTest.java index 9237127c88..40af1acfeb 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolTest.java @@ -47,7 +47,10 @@ import java.util.Collections; import java.util.List; import static org.hamcrest.Matchers.contains; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; /** @@ -98,7 +101,6 @@ public class WireProtocolTest { @Test public void testGetCommandsOfWithHgArgsPost() throws IOException { - when(request.getMethod()).thenReturn("POST"); when(request.getQueryString()).thenReturn("cmd=batch"); when(request.getIntHeader("X-HgArgs-Post")).thenReturn(29); when(request.getHeaderNames()).thenReturn(Collections.enumeration(Lists.newArrayList("X-HgArgs-Post"))); From 99e2781d93b793e0a395544412e0203cbbb83e75 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Thu, 19 Mar 2020 10:06:54 +0100 Subject: [PATCH 17/21] show specific notification for each plugin action --- scm-ui/ui-webapp/public/locales/de/admin.json | 5 ++++- scm-ui/ui-webapp/public/locales/en/admin.json | 5 ++++- .../admin/plugins/components/PluginModal.tsx | 4 ++-- .../components/SuccessNotification.tsx | 21 +++++++++++++++++-- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/scm-ui/ui-webapp/public/locales/de/admin.json b/scm-ui/ui-webapp/public/locales/de/admin.json index 2bfc2d6b5b..e65a10eb85 100644 --- a/scm-ui/ui-webapp/public/locales/de/admin.json +++ b/scm-ui/ui-webapp/public/locales/de/admin.json @@ -61,7 +61,10 @@ "newVersion": "Neue Version", "dependencyNotification": "Mit diesem Plugin werden folgende Abhängigkeiten mit installiert, wenn sie noch nicht vorhanden sind!", "dependencies": "Abhängigkeiten", - "successNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", + "installedNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", + "updatedNotification": "Das Plugin wurde erfolgreich aktualisiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", + "uninstalledNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", + "executedChangesNotification": "Die Plugin Änderungen wurden erfolgreich durchgeführt. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", "reload": "jetzt neu laden", "restartNotification": "Der SCM-Manager Kontext sollte nur neu gestartet werden, wenn aktuell niemand damit arbeitet.", "executePending": "Die folgenden Plugin-Änderungen werden ausgeführt. Anschließend wird der SCM-Manager Kontext neu gestartet.", diff --git a/scm-ui/ui-webapp/public/locales/en/admin.json b/scm-ui/ui-webapp/public/locales/en/admin.json index b061901df2..5e7e44dcd2 100644 --- a/scm-ui/ui-webapp/public/locales/en/admin.json +++ b/scm-ui/ui-webapp/public/locales/en/admin.json @@ -61,7 +61,10 @@ "newVersion": "New version", "dependencyNotification": "With this plugin, the following dependencies will be installed if they are not available yet!", "dependencies": "Dependencies", - "successNotification": "Successful installed plugin. You have to reload the page, to see ui changes:", + "installedNotification": "Successfully installed plugin. You have to reload the page, to see ui changes:", + "updatedNotification": "Successfully updated plugin. You have to reload the page, to see ui changes:", + "uninstalledNotification": "Successfully uninstalled plugin. You have to reload the page, to see ui changes:", + "executedChangesNotification": "Successfully executed plugin changes. You have to reload the page, to see ui changes:", "reload": "reload now", "restartNotification": "You should only restart the scm-manager context if no one else is currently working with it.", "executePending": "The following plugin changes will be executed and after that the scm-manager context will be restarted.", diff --git a/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx b/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx index 1863ce0843..d8dd1bdd9c 100644 --- a/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx +++ b/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx @@ -161,7 +161,7 @@ class PluginModal extends React.Component { } renderNotifications = () => { - const { t } = this.props; + const { t, pluginAction } = this.props; const { restart, error, success } = this.state; if (error) { return ( @@ -172,7 +172,7 @@ class PluginModal extends React.Component { } else if (success) { return (
- +
); } else if (restart) { diff --git a/scm-ui/ui-webapp/src/admin/plugins/components/SuccessNotification.tsx b/scm-ui/ui-webapp/src/admin/plugins/components/SuccessNotification.tsx index 8e01e84bbd..cbee8e3e15 100644 --- a/scm-ui/ui-webapp/src/admin/plugins/components/SuccessNotification.tsx +++ b/scm-ui/ui-webapp/src/admin/plugins/components/SuccessNotification.tsx @@ -1,13 +1,30 @@ import React from "react"; import { WithTranslation, withTranslation } from "react-i18next"; import { Notification } from "@scm-manager/ui-components"; +import { PluginAction } from "./PluginEntry"; + +type Props = WithTranslation & { + pluginAction?: string; +}; + +class InstallSuccessNotification extends React.Component { + createMessageForPluginAction = () => { + const { pluginAction, t } = this.props; + if (pluginAction === PluginAction.INSTALL) { + return t("plugins.modal.installedNotification"); + } else if (pluginAction === PluginAction.UPDATE) { + return t("plugins.modal.updatedNotification"); + } else if (pluginAction === PluginAction.UNINSTALL) { + return t("plugins.modal.uninstalledNotification"); + } + return t("plugins.modal.executedChangesNotification"); + }; -class InstallSuccessNotification extends React.Component { render() { const { t } = this.props; return ( - {t("plugins.modal.successNotification")}{" "} + {this.createMessageForPluginAction()}{" "} window.location.reload(true)}>{t("plugins.modal.reload")} ); From e30bbcfc6c50016076d451eb1eef868435e58910 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Thu, 19 Mar 2020 10:11:13 +0100 Subject: [PATCH 18/21] update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd6ceb194b..c3f417e570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Extension point to add links to the repository cards from plug ins ([#1041](https://github.com/scm-manager/scm-manager/pull/1041)) +### Fixed +- Show specific notification for plugin actions on plugin administration ([#1057](https://github.com/scm-manager/scm-manager/pull/1057)) + ## 2.0.0-rc5 - 2020-03-12 ### Added - Added footer extension points for links and avatar From 882f2f074411e2a0052217011d3f206905ebe917 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 19 Mar 2020 22:15:57 +0000 Subject: [PATCH 19/21] fix: upgrade org.apache.shiro:shiro-core from 1.4.1 to 1.5.1 Snyk has created this PR to upgrade org.apache.shiro:shiro-core from 1.4.1 to 1.5.1. See this package in NPM: https://www.npmjs.com/package/org.apache.shiro:shiro-core See this project in Snyk: https://app.snyk.io/org/scm-manager/project/0397d943-538d-483e-9c87-a3f7e7665d7b?utm_source=github&utm_medium=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9143814968..77773a2f54 100644 --- a/pom.xml +++ b/pom.xml @@ -852,7 +852,7 @@ 1.2.0 - 1.4.1 + 1.5.1 5.6.1.202002131546-r-scm1 From 4d88765ea57c96c53af543b6e4dbf64905adaee2 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 19 Mar 2020 22:16:07 +0000 Subject: [PATCH 20/21] fix: upgrade org.hibernate.validator:hibernate-validator from 6.1.0.Final to 6.1.2.Final Snyk has created this PR to upgrade org.hibernate.validator:hibernate-validator from 6.1.0.Final to 6.1.2.Final. See this package in NPM: https://www.npmjs.com/package/org.hibernate.validator:hibernate-validator See this project in Snyk: https://app.snyk.io/org/scm-manager/project/0397d943-538d-483e-9c87-a3f7e7665d7b?utm_source=github&utm_medium=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9143814968..4d0ec84f9f 100644 --- a/pom.xml +++ b/pom.xml @@ -841,7 +841,7 @@ 2.10.2 4.2.2 2.3.0 - 6.1.0.Final + 6.1.2.Final 1.6.2 From 00f99eb603586edb3bd28bdf2ad7a788c2c3e778 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 19 Mar 2020 22:16:11 +0000 Subject: [PATCH 21/21] fix: upgrade de.otto.edison:edison-hal from 2.0.1 to 2.1.0 Snyk has created this PR to upgrade de.otto.edison:edison-hal from 2.0.1 to 2.1.0. See this package in NPM: https://www.npmjs.com/package/de.otto.edison:edison-hal See this project in Snyk: https://app.snyk.io/org/scm-manager/project/0397d943-538d-483e-9c87-a3f7e7665d7b?utm_source=github&utm_medium=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9143814968..43900ce51e 100644 --- a/pom.xml +++ b/pom.xml @@ -200,7 +200,7 @@ de.otto.edison edison-hal - 2.0.1 + 2.1.0