Skip to content

Commit

Permalink
Use withAppEvents in order to show the successMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
doracretu3pillar committed Oct 31, 2023
1 parent 954ac04 commit 03d5653
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion public/app/percona/pmm-dump/PMMDump.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const PMMDump = () => {
const logs = await dispatch(
getDumpLogsAction({ artifactId: selectedDump?.dumpId || '', startingChunk, offset, token })
).unwrap();
console.log(logs);
return logs;
},
[selectedDump, dispatch]
Expand Down
16 changes: 3 additions & 13 deletions public/app/percona/shared/core/reducers/pmmDump/pmmDump.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import { createSlice } from '@reduxjs/toolkit';

import {
deleteNamespace,
deleteRulerRulesGroup,
fetchRulerRules,
setRulerRuleGroup,
} from 'app/features/alerting/unified/api/ruler';
import { fetchRulerRulesAction } from 'app/features/alerting/unified/state/actions';
import { withAppEvents, withSerializedError } from 'app/features/alerting/unified/utils/redux';
import { PMMDumpService } from 'app/percona/pmm-dump/PMMDump.service';
import {
Expand Down Expand Up @@ -74,13 +67,10 @@ export const sendToSupportAction = createAsyncThunk(
'percona/sendToSupport',
async (body: SendToSupportRequestBody): Promise<void> =>
withAppEvents(
withSerializedError(
(async () => {
await PMMDumpService.sendToSupport(body);
})()
),
(async () => {
await PMMDumpService.sendToSupport(body);
})(),
{
errorMessage: 'Failed to send the message',
successMessage: 'The message was send successfully!',
}
)
Expand Down

0 comments on commit 03d5653

Please sign in to comment.