Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
download modal disappears after response of any kind is received, com…
Browse files Browse the repository at this point in the history
…ment out report definition toasts
  • Loading branch information
davidcui1225 committed Jan 8, 2021
1 parent 31249c9 commit 132c54c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ const generateInContextReport = (
}
)
.then((response) => {
$('#reportGenerationProgressModal').remove();
if (response.status === 200) {
$('#reportGenerationProgressModal').remove();
addSuccessOrFailureToast('success');
} else {
if (response.status === 403) {
Expand Down
10 changes: 5 additions & 5 deletions kibana-reports/public/components/main/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,27 +191,27 @@ export function Main(props) {
},
]);
refreshReportsTable();
refreshReportsDefinitionsTable();
// refreshReportsDefinitionsTable();

if (window.location.href.includes('create=success')) {
handleCreateReportDefinitionSuccessToast();
// refresh might not fetch the latest changes when coming from create or edit page
// workaround to wait 1 second and refresh again
setTimeout(() => {
refreshReportsTable();
refreshReportsDefinitionsTable();
// refreshReportsDefinitionsTable();
}, 1000);
} else if (window.location.href.includes('edit=success')) {
handleEditReportDefinitionSuccessToast();
setTimeout(() => {
refreshReportsTable();
refreshReportsDefinitionsTable();
// refreshReportsDefinitionsTable();
}, 1000);
} else if (window.location.href.includes('delete=success')) {
handleDeleteReportDefinitionSuccessToast();
// handleDeleteReportDefinitionSuccessToast();
setTimeout(() => {
refreshReportsTable();
refreshReportsDefinitionsTable();
// refreshReportsDefinitionsTable();
}, 1000);
}
window.location.href = 'opendistro_kibana_reports#/';
Expand Down

0 comments on commit 132c54c

Please sign in to comment.