diff --git a/scm-ui-components/packages/ui-types/src/Plugin.js b/scm-ui-components/packages/ui-types/src/Plugin.js index 0114716757..f7175fc209 100644 --- a/scm-ui-components/packages/ui-types/src/Plugin.js +++ b/scm-ui-components/packages/ui-types/src/Plugin.js @@ -4,6 +4,7 @@ import type {Collection, Links} from "./hal"; export type Plugin = { name: string, version: string, + newVersion: string, displayName: string, description?: string, author: string, @@ -24,3 +25,11 @@ export type PluginGroup = { name: string, plugins: Plugin[] }; + +export type PendingPlugins = { + _links: Links, + _embedded: { + new: [], + update: [], + } +} diff --git a/scm-ui-components/packages/ui-types/src/index.js b/scm-ui-components/packages/ui-types/src/index.js index ba2b9f5481..9207868a73 100644 --- a/scm-ui-components/packages/ui-types/src/index.js +++ b/scm-ui-components/packages/ui-types/src/index.js @@ -25,7 +25,7 @@ export type { SubRepository, File } from "./Sources"; export type { SelectValue, AutocompleteObject } from "./Autocomplete"; -export type { Plugin, PluginCollection, PluginGroup } from "./Plugin"; +export type { Plugin, PluginCollection, PluginGroup, PendingPlugins } from "./Plugin"; export type { RepositoryRole } from "./RepositoryRole"; diff --git a/scm-ui/public/locales/de/admin.json b/scm-ui/public/locales/de/admin.json index 8d9c876537..d2cd2c6640 100644 --- a/scm-ui/public/locales/de/admin.json +++ b/scm-ui/public/locales/de/admin.json @@ -29,22 +29,32 @@ "installedNavLink": "Installiert", "availableNavLink": "Verfügbar" }, - "installPending": "Austehende Plugins installieren", + "executePending": "Austehende Plugin-Änderungen ausführen", "noPlugins": "Keine Plugins gefunden.", "modal": { - "title": "{{name}} Plugin installieren", + "title": { + "install": "{{name}} Plugin installieren", + "update": "{{name}} Plugin aktualisieren" + }, "restart": "Neustarten um Plugin zu aktivieren", "install": "Installieren", + "update": "Aktualisieren", + "installQueue": "Werden installiert:", + "updateQueue": "Werden aktualisiert:", "installAndRestart": "Installieren und Neustarten", + "updateAndRestart": "Aktualisieren und Neustarten", + "executeAndRestart": "Ausführen und Neustarten", "abort": "Abbrechen", "author": "Autor", "version": "Version", + "currentVersion": "Installierte Version", + "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:", "reload": "jetzt neu laden", "restartNotification": "Der SCM-Manager Kontext sollte nur neu gestartet werden, wenn aktuell niemand damit arbeitet.", - "installPending": "Die folgenden Plugins werden installiert. Anschließend wird der SCM-Manager Kontext neu gestartet." + "executePending": "Die folgenden Plugin-Änderungen werden ausgeführt. Anschließend wird der SCM-Manager Kontext neu gestartet." } }, "repositoryRole": { diff --git a/scm-ui/public/locales/en/admin.json b/scm-ui/public/locales/en/admin.json index 99febb68fc..63f6089b09 100644 --- a/scm-ui/public/locales/en/admin.json +++ b/scm-ui/public/locales/en/admin.json @@ -29,22 +29,32 @@ "installedNavLink": "Installed", "availableNavLink": "Available" }, - "installPending": "Install pending plugins", + "executePending": "Execute pending plugin changes", "noPlugins": "No plugins found.", "modal": { - "title": "Install {{name}} Plugin", + "title": { + "install": "Install {{name}} Plugin", + "update": "Update {{name}} Plugin" + }, "restart": "Restart to activate", "install": "Install", + "update": "Update", + "installQueue": "Will be installed:", + "updateQueue": "Will be updated:", "installAndRestart": "Install and Restart", + "updateAndRestart": "Update and Restart", + "executeAndRestart": "Execute and Restart", "abort": "Abort", "author": "Author", "version": "Version", + "currentVersion": "Installed version", + "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:", "reload": "reload now", "restartNotification": "You should only restart the scm-manager context if no one else is currently working with it.", - "installPending": "The following plugins will be installed and after installation the scm-manager context will be restarted." + "executePending": "The following plugin changes will be executed and after that the scm-manager context will be restarted." } }, "repositoryRole": { diff --git a/scm-ui/src/admin/plugins/components/InstallPendingAction.js b/scm-ui/src/admin/plugins/components/ExecutePendingAction.js similarity index 67% rename from scm-ui/src/admin/plugins/components/InstallPendingAction.js rename to scm-ui/src/admin/plugins/components/ExecutePendingAction.js index 49a444de11..6c8d407205 100644 --- a/scm-ui/src/admin/plugins/components/InstallPendingAction.js +++ b/scm-ui/src/admin/plugins/components/ExecutePendingAction.js @@ -1,12 +1,12 @@ // @flow import React from "react"; import { Button } from "@scm-manager/ui-components"; -import type { PluginCollection } from "@scm-manager/ui-types"; +import type { PendingPlugins } from "@scm-manager/ui-types"; import { translate } from "react-i18next"; -import InstallPendingModal from "./InstallPendingModal"; +import ExecutePendingModal from "./ExecutePendingModal"; type Props = { - collection: PluginCollection, + pendingPlugins: PendingPlugins, // context props t: string => string @@ -16,7 +16,7 @@ type State = { showModal: boolean }; -class InstallPendingAction extends React.Component { +class ExecutePendingAction extends React.Component { constructor(props: Props) { super(props); this.state = { @@ -38,11 +38,11 @@ class InstallPendingAction extends React.Component { renderModal = () => { const { showModal } = this.state; - const { collection } = this.props; + const { pendingPlugins } = this.props; if (showModal) { return ( - ); @@ -57,7 +57,7 @@ class InstallPendingAction extends React.Component { {this.renderModal()}