Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Release 37 #141

Merged
merged 4 commits into from
Sep 27, 2024
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
8 changes: 4 additions & 4 deletions src/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const NeoCard = ({
extensions, // A set of enabled extensions.
globalParameters, // Query parameters that are globally set for the entire dashboard.
dashboardSettings, // Dictionary of settings for the entire dashboard.
onRemovePressed, // action to take when the card is removed. (passed from parent)
onClonePressed, // action to take when user presses the clone button
onRemovePressed, // action to take when the card is removed. (passed from parent).
onClonePressed, // action to take when user presses the clone button.
onReportHelpButtonPressed, // action to take when someone clicks the 'help' button in the report settings.
onTitleUpdate, // action to take when the card title is updated.
onTypeUpdate, // action to take when the card report type is updated.
Expand All @@ -51,8 +51,8 @@ const NeoCard = ({
onGlobalParameterUpdate, // action to take when a report updates a dashboard parameter.
onToggleCardSettings, // action to take when the card settings button is clicked.
onToggleReportSettings, // action to take when the report settings (advanced settings) button is clicked.
onDatabaseChanged, // action to take when the user changes the database related to the card
loadDatabaseListFromNeo4j, // Thunk to get the list of databases
onDatabaseChanged, // action to take when the user changes the database related to the card.
loadDatabaseListFromNeo4j, // Thunk to get the list of databases.
createNotification, // Thunk to create a global notification pop-up.
onPutItem, // Method to remove report from ui and move it to toolbox
}) => {
Expand Down
2 changes: 2 additions & 0 deletions src/report/Report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ export const NeoReport = ({
);
} else if (status == QueryStatus.OVER_LOAD) {
return <NeoCodeViewerComponent value={`Loading took too long. Please reload report or complete page.`} />;
} else if (status == QueryStatus.INACTIVE) {
return <NeoCodeViewerComponent value={`Access token timed out. Please reload report or complete page.`} />;
}
return (
<NeoCodeViewerComponent
Expand Down
8 changes: 8 additions & 0 deletions src/report/ReportQueryRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export enum QueryStatus {
COMPLETE, // There is data returned, and we can visualize it all.
COMPLETE_TRUNCATED, // There is data returned, but it's too much so we truncate it.
ERROR, // Something broke, likely the cypher query is invalid.
INACTIVE, // If dashboard is inactive for too long and we use a custom message instead of error message from backend. (VULCAN-819)
}

// TODO: create a readOnly version of this method or inject a property
Expand Down Expand Up @@ -151,6 +152,13 @@ export async function runCypherQuery(
return 'Loading took too long. Please reload page.';
}

if (e.message.startsWith('WebSocket connection failure.')) {
setStatus(QueryStatus.INACTIVE);
setRecords([{ error: 'Access token timed out. Please reload report or complete page.' }]);
transaction.rollback();
return 'Access token timed out. Please reload report or complete page.';
}

setStatus(QueryStatus.ERROR);
// Process other errors.
if (setRecords) {
Expand Down
Loading