diff --git a/scm-ui/ui-types/src/Plugin.ts b/scm-ui/ui-types/src/Plugin.ts index 66cb8b994f..635f277f9f 100644 --- a/scm-ui/ui-types/src/Plugin.ts +++ b/scm-ui/ui-types/src/Plugin.ts @@ -36,6 +36,7 @@ export type Plugin = { pending: boolean; markedForUninstall?: boolean; dependencies: string[]; + optionalDependencies: string[]; _links: Links; }; diff --git a/scm-ui/ui-webapp/public/locales/de/admin.json b/scm-ui/ui-webapp/public/locales/de/admin.json index db096832eb..620228df0b 100644 --- a/scm-ui/ui-webapp/public/locales/de/admin.json +++ b/scm-ui/ui-webapp/public/locales/de/admin.json @@ -62,6 +62,7 @@ "currentVersion": "Installierte Version", "newVersion": "Neue Version", "dependencyNotification": "Mit diesem Plugin werden folgende Abhängigkeiten mit installiert bzw. aktualisiert, wenn sie noch nicht in der aktuellen Version vorhanden sind!", + "optionalDependencyNotification": "Mit diesem Plugin werden folgende optionale Abhängigkeiten mit aktualisiert, falls sie installiert sind!", "dependencies": "Abhängigkeiten", "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:", diff --git a/scm-ui/ui-webapp/public/locales/en/admin.json b/scm-ui/ui-webapp/public/locales/en/admin.json index 829aecf3d4..eae79e3a9c 100644 --- a/scm-ui/ui-webapp/public/locales/en/admin.json +++ b/scm-ui/ui-webapp/public/locales/en/admin.json @@ -62,6 +62,7 @@ "currentVersion": "Installed version", "newVersion": "New version", "dependencyNotification": "With this plugin, the following dependencies will be installed/updated if their latest versions are not installed yet!", + "optionalDependencyNotification": "With this plugin, the following optional dependencies will be updated if they are installed!", "dependencies": "Dependencies", "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:", 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 05ddf1f848..8a76a0d7e3 100644 --- a/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx +++ b/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx @@ -183,6 +183,27 @@ class PluginModal extends React.Component { return dependencies; } + renderOptionalDependencies() { + const { plugin, t } = this.props; + + let optionalDependencies = null; + if (plugin.optionalDependencies && plugin.optionalDependencies.length > 0) { + optionalDependencies = ( +
+ + {t("plugins.modal.optionalDependencyNotification")} +
    + {plugin.optionalDependencies.map((optionalDependency, index) => { + return
  • {optionalDependency}
  • ; + })} +
+
+
+ ); + } + return optionalDependencies; + } + renderNotifications = () => { const { t, pluginAction } = this.props; const { restart, error, success } = this.state; @@ -275,6 +296,7 @@ class PluginModal extends React.Component { )} {this.renderDependencies()} + {this.renderOptionalDependencies()}