Skip to content

Commit e07db25

Browse files
committed
app-catalog: Show if delete and update request were accepted
Earlier we were just waiting on the editor to receive a success operation, but we should instead replace this with notifying the user that the request has been accepted and close the editor immediately.
1 parent f73a215 commit e07db25

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

app-catalog/src/components/releases/Detail.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ export default function ReleaseDetail() {
106106
onClick={() => {
107107
deleteRelease(namespace, releaseName).then(() => {
108108
setIsDeleting(true);
109+
enqueueSnackbar(`Delete request for release ${releaseName} accepted`, {
110+
variant: 'info'
111+
})
112+
setOpenDeleteAlert(false);
109113
checkDeleteReleaseStatus(releaseName);
110114
});
111115
}}

app-catalog/src/components/releases/EditorDialog.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ export function EditorDialog(props: {
171171
selectedVersion.version
172172
)
173173
.then(() => {
174+
enqueueSnackbar(`Upgrade request for release ${releaseName} sent successfully`, {
175+
variant: 'info'
176+
})
177+
handleEditor(false);
174178
checkUpgradeStatus();
175179
})
176180
.catch(() => {
@@ -257,7 +261,7 @@ export function EditorDialog(props: {
257261
</Box>
258262
<DialogContent>
259263
<Box pt={2} height="100%" my={1} p={1}>
260-
<MonacoEditor
264+
{openEditor && <MonacoEditor
261265
value={jsonToYAML(valuesToShow)}
262266
language="yaml"
263267
height="400px"
@@ -277,6 +281,7 @@ export function EditorDialog(props: {
277281
}
278282
}}
279283
/>
284+
}
280285
</Box>
281286
</DialogContent>
282287
<DialogActions

0 commit comments

Comments
 (0)