Skip to content

Commit 9847fac

Browse files
committed
added restart alert in the installed packages tab
1 parent 7edf875 commit 9847fac

File tree

16 files changed

+649
-162
lines changed

16 files changed

+649
-162
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
'@red-hat-developer-hub/backstage-plugin-marketplace-backend': patch
33
'@red-hat-developer-hub/backstage-plugin-marketplace': patch
4+
'@red-hat-developer-hub/backstage-plugin-marketplace-common': patch
45
---
56

67
added row actions to the installed packages
8+
updated disablePackage Client API to make PATCH call instead of POST

workspaces/marketplace/.changeset/rotten-days-lie.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

workspaces/marketplace/plugins/marketplace/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
"@red-hat-developer-hub/backstage-plugin-marketplace-common": "workspace:^",
6464
"@scalprum/react-core": "0.9.5",
6565
"@tanstack/react-query": "^5.60.5",
66-
"js-yaml": "^4.1.0",
6766
"monaco-editor": "^0.53.0",
6867
"react-use": "^17.6.0",
6968
"yaml": "^2.7.0"

workspaces/marketplace/plugins/marketplace/report-alpha.api.md

Lines changed: 83 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -9,65 +9,42 @@ import { TranslationResource } from '@backstage/core-plugin-api/alpha';
99

1010
// @alpha
1111
export const marketplaceTranslationRef: TranslationRef<"plugin.marketplace", {
12-
readonly "button.update": string;
12+
readonly "header.title": string;
13+
readonly "header.extensions": string;
14+
readonly "header.catalog": string;
15+
readonly "header.installedPackages": string;
16+
readonly "header.installedPackagesWithCount": string;
17+
readonly "header.pluginsPage": string;
18+
readonly "header.packagesPage": string;
19+
readonly "header.collectionsPage": string;
20+
readonly "installedPackages.table.title": string;
21+
readonly "installedPackages.table.searchPlaceholder": string;
22+
readonly "installedPackages.table.columns.role": string;
23+
readonly "installedPackages.table.columns.version": string;
24+
readonly "installedPackages.table.columns.name": string;
25+
readonly "installedPackages.table.columns.packageName": string;
26+
readonly "installedPackages.table.columns.actions": string;
27+
readonly "installedPackages.table.tooltips.enableActions": string;
28+
readonly "installedPackages.table.tooltips.noDownloadPermissions": string;
29+
readonly "installedPackages.table.tooltips.noEditPermissions": string;
30+
readonly "installedPackages.table.tooltips.noTogglePermissions": string;
31+
readonly "installedPackages.table.tooltips.editPackage": string;
32+
readonly "installedPackages.table.tooltips.downloadPackage": string;
33+
readonly "installedPackages.table.tooltips.enablePackage": string;
34+
readonly "installedPackages.table.tooltips.disablePackage": string;
35+
readonly "installedPackages.table.emptyMessages.noResults": string;
36+
readonly "installedPackages.table.emptyMessages.noRecords": string;
1337
readonly "button.install": string;
1438
readonly "button.uninstall": string;
1539
readonly "button.enable": string;
1640
readonly "button.disable": string;
41+
readonly "button.update": string;
1742
readonly "button.save": string;
1843
readonly "button.close": string;
1944
readonly "button.viewAll": string;
2045
readonly "button.viewDocumentation": string;
2146
readonly "button.viewInstalledPlugins": string;
2247
readonly "button.restart": string;
23-
readonly "dialog.backendRestartRequired": string;
24-
readonly "dialog.restartMessage": string;
25-
readonly "header.title": string;
26-
readonly "header.extensions": string;
27-
readonly "header.catalog": string;
28-
readonly "header.installedPackages": string;
29-
readonly "header.installedPackagesWithCount": string;
30-
readonly "header.pluginsPage": string;
31-
readonly "header.packagesPage": string;
32-
readonly "header.collectionsPage": string;
33-
readonly "search.filter": string;
34-
readonly "search.author": string;
35-
readonly "search.placeholder": string;
36-
readonly "search.clear": string;
37-
readonly "search.clearFilter": string;
38-
readonly "search.category": string;
39-
readonly "search.supportType": string;
40-
readonly "search.noResults": string;
41-
readonly "search.filterBy": string;
42-
readonly "search.clearFilters": string;
43-
readonly "search.noResultsFound": string;
44-
readonly "table.plugins": string;
45-
readonly "table.packageName": string;
46-
readonly "table.version": string;
47-
readonly "table.role": string;
48-
readonly "table.name": string;
49-
readonly "table.packages": string;
50-
readonly "table.description": string;
51-
readonly "table.status": string;
52-
readonly "table.supportedVersion": string;
53-
readonly "table.action": string;
54-
readonly "table.versions": string;
55-
readonly "table.pluginsCount": string;
56-
readonly "table.packagesCount": string;
57-
readonly "table.pluginsTable": string;
58-
readonly "metadata.about": string;
59-
readonly "metadata.highlights": string;
60-
readonly "metadata.category": string;
61-
readonly "metadata.by": string;
62-
readonly "metadata.versions": string;
63-
readonly "metadata.pluginNotFound": string;
64-
readonly "metadata.publisher": string;
65-
readonly "metadata.supportProvider": string;
66-
readonly "metadata.entryName": string;
67-
readonly "metadata.bySomeone": string;
68-
readonly "role.backend": string;
69-
readonly "role.backendModule": string;
70-
readonly "role.frontend": string;
7148
readonly "install.title": string;
7249
readonly "install.configurationRequired": string;
7350
readonly "install.optional": string;
@@ -95,28 +72,20 @@ readonly "install.instructions": string;
9572
readonly "install.editInstructions": string;
9673
readonly "install.back": string;
9774
readonly "install.packageUpdated": string;
75+
readonly "install.packageEnabled": string;
76+
readonly "install.packageDisabled": string;
9877
readonly "install.errors.missingPluginsList": string;
9978
readonly "install.errors.missingPackageItem": string;
10079
readonly "install.errors.missingPackageField": string;
10180
readonly "install.errors.failedToSave": string;
102-
readonly "installedPackages.table.title": string;
103-
readonly "installedPackages.table.searchPlaceholder": string;
104-
readonly "installedPackages.table.columns.packageName": string;
105-
readonly "installedPackages.table.columns.version": string;
106-
readonly "installedPackages.table.columns.role": string;
107-
readonly "installedPackages.table.columns.name": string;
108-
readonly "installedPackages.table.columns.actions": string;
109-
readonly "installedPackages.table.tooltips.enableActions": string;
110-
readonly "installedPackages.table.tooltips.noDownloadPermissions": string;
111-
readonly "installedPackages.table.tooltips.noEditPermissions": string;
112-
readonly "installedPackages.table.tooltips.noTogglePermissions": string;
113-
readonly "installedPackages.table.emptyMessages.noResults": string;
114-
readonly "installedPackages.table.emptyMessages.noRecords": string;
11581
readonly "status.notInstalled": string;
11682
readonly "status.installed": string;
11783
readonly "status.disabled": string;
11884
readonly "status.partiallyInstalled": string;
11985
readonly "status.updateAvailable": string;
86+
readonly "role.backend": string;
87+
readonly "role.backendModule": string;
88+
readonly "role.frontend": string;
12089
readonly "emptyState.noPluginsFound": string;
12190
readonly "emptyState.mustEnableBackend": string;
12291
readonly "emptyState.noPluginsDescription": string;
@@ -126,10 +95,23 @@ readonly "alert.installationDisabled": string;
12695
readonly "alert.extensionsExample": string;
12796
readonly "alert.singlePluginRestart": string;
12897
readonly "alert.multiplePluginRestart": string;
98+
readonly "alert.singlePackageRestart": string;
99+
readonly "alert.multiplePackageRestart": string;
129100
readonly "alert.restartRequired": string;
130101
readonly "alert.backendRestartRequired": string;
131-
readonly "alert.backendRestartMessage": string;
132102
readonly "alert.viewPlugins": string;
103+
readonly "alert.viewPackages": string;
104+
readonly "search.placeholder": string;
105+
readonly "search.clear": string;
106+
readonly "search.filter": string;
107+
readonly "search.clearFilter": string;
108+
readonly "search.category": string;
109+
readonly "search.author": string;
110+
readonly "search.supportType": string;
111+
readonly "search.noResults": string;
112+
readonly "search.filterBy": string;
113+
readonly "search.clearFilters": string;
114+
readonly "search.noResultsFound": string;
133115
readonly "common.close": string;
134116
readonly "common.links": string;
135117
readonly "common.by": string;
@@ -138,33 +120,50 @@ readonly "common.noDescriptionAvailable": string;
138120
readonly "common.readMore": string;
139121
readonly "common.apply": string;
140122
readonly "common.couldNotApplyYaml": string;
141-
readonly "plugin.version": string;
123+
readonly "dialog.backendRestartRequired": string;
124+
readonly "dialog.packageRestartMessage": string;
125+
readonly "dialog.pluginRestartMessage": string;
142126
readonly "plugin.author": string;
143-
readonly "plugin.installation": string;
144-
readonly "plugin.configuration": string;
145-
readonly "plugin.authors": string;
146127
readonly "plugin.description": string;
147128
readonly "plugin.documentation": string;
148129
readonly "plugin.repository": string;
149130
readonly "plugin.license": string;
131+
readonly "plugin.version": string;
132+
readonly "plugin.authors": string;
150133
readonly "plugin.tags": string;
151134
readonly "plugin.dependencies": string;
152-
readonly "package.version": string;
135+
readonly "plugin.configuration": string;
136+
readonly "plugin.installation": string;
153137
readonly "package.author": string;
154-
readonly "package.support": string;
155-
readonly "package.lifecycle": string;
156-
readonly "package.supportedVersions": string;
157-
readonly "package.about": string;
138+
readonly "package.version": string;
158139
readonly "package.name": string;
159-
readonly "package.highlights": string;
160140
readonly "package.dynamicPluginPath": string;
161141
readonly "package.backstageRole": string;
142+
readonly "package.supportedVersions": string;
143+
readonly "package.support": string;
144+
readonly "package.lifecycle": string;
145+
readonly "package.highlights": string;
146+
readonly "package.about": string;
162147
readonly "package.notFound": string;
163-
readonly "actions.view": string;
148+
readonly "table.status": string;
149+
readonly "table.role": string;
150+
readonly "table.description": string;
151+
readonly "table.version": string;
152+
readonly "table.name": string;
153+
readonly "table.packageName": string;
154+
readonly "table.supportedVersion": string;
155+
readonly "table.action": string;
156+
readonly "table.versions": string;
157+
readonly "table.plugins": string;
158+
readonly "table.packages": string;
159+
readonly "table.pluginsCount": string;
160+
readonly "table.packagesCount": string;
161+
readonly "table.pluginsTable": string;
164162
readonly "actions.install": string;
165163
readonly "actions.enable": string;
166164
readonly "actions.disable": string;
167165
readonly "actions.actions": string;
166+
readonly "actions.view": string;
168167
readonly "actions.edit": string;
169168
readonly "actions.editConfiguration": string;
170169
readonly "actions.pluginConfigurations": string;
@@ -178,6 +177,16 @@ readonly "actions.editTitle": string;
178177
readonly "tooltips.productionDisabled": string;
179178
readonly "tooltips.extensionsDisabled": string;
180179
readonly "tooltips.noPermissions": string;
180+
readonly "metadata.category": string;
181+
readonly "metadata.by": string;
182+
readonly "metadata.highlights": string;
183+
readonly "metadata.about": string;
184+
readonly "metadata.versions": string;
185+
readonly "metadata.pluginNotFound": string;
186+
readonly "metadata.publisher": string;
187+
readonly "metadata.supportProvider": string;
188+
readonly "metadata.entryName": string;
189+
readonly "metadata.bySomeone": string;
181190
readonly "supportTypes.certifiedBy": string;
182191
readonly "supportTypes.verifiedBy": string;
183192
readonly "supportTypes.customPlugins": string;

workspaces/marketplace/plugins/marketplace/src/components/InstallationContext.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ export type InstallationType = { [pluginName: string]: string };
1919

2020
type InstallationContextType = {
2121
installedPlugins: InstallationType;
22+
installedPackages: InstallationType;
23+
setInstalledPackages: (plugins: InstallationType) => void;
2224
setInstalledPlugins: (plugins: InstallationType) => void;
2325
};
2426

2527
export const InstallationContext = createContext<InstallationContextType>({
2628
installedPlugins: {},
29+
installedPackages: {},
30+
setInstalledPackages: () => {},
2731
setInstalledPlugins: () => {},
2832
});
2933

@@ -37,13 +41,23 @@ export const InstallationContextProvider = ({
3741
const [installedPlugins, setInstalledPlugins] = useState<InstallationType>(
3842
{},
3943
);
44+
const [installedPackages, setInstalledPackages] = useState<InstallationType>(
45+
{},
46+
);
4047

4148
const installationContexttProviderValue = useMemo(
4249
() => ({
4350
installedPlugins,
51+
installedPackages,
52+
setInstalledPackages,
4453
setInstalledPlugins,
4554
}),
46-
[installedPlugins, setInstalledPlugins],
55+
[
56+
installedPlugins,
57+
installedPackages,
58+
setInstalledPlugins,
59+
setInstalledPackages,
60+
],
4761
);
4862
return (
4963
<InstallationContext.Provider value={installationContexttProviderValue}>

0 commit comments

Comments
 (0)