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

Context menu popout & Report definitions Toast fixes #295

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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