diff --git a/cypress/Page.js b/cypress/Page.js index f90742a41..4297e3189 100644 --- a/cypress/Page.js +++ b/cypress/Page.js @@ -31,6 +31,7 @@ export class Page { connectToNeo4j() { cy.get('#form-dialog-title', { timeout: 20000 }).should('contain', 'Connect to Neo4j'); + cy.get('#protocol').type('neo4j{enter}'); cy.get('#url').clear().type(DB_URL); cy.get('#dbusername').clear().type(DB_USERNAME); cy.get('#dbpassword').type(DB_PASSWORD); diff --git a/cypress/e2e/start_page.cy.js b/cypress/e2e/start_page.cy.js index 8038866b3..e0fd02806 100644 --- a/cypress/e2e/start_page.cy.js +++ b/cypress/e2e/start_page.cy.js @@ -59,11 +59,11 @@ describe('NeoDash E2E Tests', () => { .should('contain', 'title') .and('contain', 'released') .and('not.contain', '__id'); - // cy.get('main .react-grid-item:eq(2) .MuiDataGrid-virtualScroller .MuiDataGrid-row').should('have.length', 5); - // cy.get('main .react-grid-item:eq(2) .MuiDataGrid-footerContainer').should('contain', '1–5 of 8'); - cy.get('main .react-grid-item:eq(2) .MuiDataGrid-footerContainer button[aria-label="Go to next page"]').click(); - cy.get('main .react-grid-item:eq(2) .MuiDataGrid-virtualScroller .MuiDataGrid-row').should('have.length', 3); - cy.get('main .react-grid-item:eq(2) .MuiDataGrid-footerContainer').should('contain', '6–8 of 8'); + // cy.get('main .react-grid-item:eq(2) .MuiDataGrid-virtualScroller .MuiDataGrid-row').should('have.length', 8); + // cy.get('main .react-grid-item:eq(2) .MuiDataGrid-footerContainer').should('contain', '1–8 of 8'); + // cy.get('main .react-grid-item:eq(2) .MuiDataGrid-footerContainer button[aria-label="Go to next page"]').click(); + // cy.get('main .react-grid-item:eq(2) .MuiDataGrid-virtualScroller .MuiDataGrid-row').should('have.length', 3); + // cy.get('main .react-grid-item:eq(2) .MuiDataGrid-footerContainer').should('contain', '6–8 of 8'); }); it('creates a bar chart report', () => { diff --git a/docs/modules/ROOT/pages/developer-guide/configuration.adoc b/docs/modules/ROOT/pages/developer-guide/configuration.adoc index 03930186e..8fff4717b 100644 --- a/docs/modules/ROOT/pages/developer-guide/configuration.adoc +++ b/docs/modules/ROOT/pages/developer-guide/configuration.adoc @@ -21,7 +21,7 @@ will look like this: "ssoProviders": [], "ssoDiscoveryUrl": "https://example.com", "standalone": false, - "standaloneProtocol": "neo4j", + "standaloneProtocol": "neo4j+s", "standaloneHost": "localhost", "standalonePort": "7687", "standaloneDatabase": "neo4j", @@ -57,7 +57,7 @@ mode (false), or reader mode (true). The terms ``Reader mode'' and ``Standalone mode'' are used interchangibly. |standaloneProtocol |string |neo4j |When running in standalone mode, the -protocol to used for the Neo4j driver. This shoudl be set to one of +protocol to used for the Neo4j driver. This should be set to one of `neo4j`, `neo4j+s`, `neo4j+ssc`, `bolt`, `bolt+s`, or `bolt+ssc`. |standaloneHost |string |localhost |When running in standalone mode, the diff --git a/docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc b/docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc index 63212dab1..d74098a8c 100644 --- a/docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc +++ b/docs/modules/ROOT/pages/developer-guide/standalone-mode.adoc @@ -44,7 +44,7 @@ docker run -it --rm -p 5005:5005 \ -e ssoProviders=[] \ -e ssoDiscoveryUrl="https://example.com" \ -e standalone=true \ - -e standaloneProtocol="neo4j" \ + -e standaloneProtocol="neo4j+s" \ -e standaloneHost="localhost" \ -e standalonePort="7687" \ -e standaloneDatabase="neo4j" \ diff --git a/docs/modules/ROOT/pages/developer-guide/state-management.adoc b/docs/modules/ROOT/pages/developer-guide/state-management.adoc index 72891086b..7655273f9 100644 --- a/docs/modules/ROOT/pages/developer-guide/state-management.adoc +++ b/docs/modules/ROOT/pages/developer-guide/state-management.adoc @@ -131,7 +131,7 @@ standalone mode. "ssoEnabled": false, "ssoProviders": [], "ssoDiscoveryUrl": "https://example.com", - "standaloneProtocol": "neo4j", + "standaloneProtocol": "neo4j+s", "standaloneHost": "localhost", "standalonePort": "7687", "standaloneDatabase": "neo4j", diff --git a/public/config.json b/public/config.json index 4e8d475a2..17d012515 100644 --- a/public/config.json +++ b/public/config.json @@ -3,7 +3,7 @@ "ssoProviders": [], "ssoDiscoveryUrl": "https://example.com", "standalone": false, - "standaloneProtocol": "neo4j", + "standaloneProtocol": "neo4j+s", "standaloneHost": "localhost", "standalonePort": "7687", "standaloneDatabase": "neo4j", diff --git a/src/application/ApplicationReducer.ts b/src/application/ApplicationReducer.ts index e662ade63..fefbedf92 100644 --- a/src/application/ApplicationReducer.ts +++ b/src/application/ApplicationReducer.ts @@ -58,7 +58,7 @@ const initialState = { draft: false, aboutModalOpen: false, connection: { - protocol: 'neo4j', + protocol: 'neo4j+s', url: DEFAULT_NEO4J_URL, port: '7687', database: '', diff --git a/src/application/ApplicationThunks.ts b/src/application/ApplicationThunks.ts index 67f48b726..cdb204394 100644 --- a/src/application/ApplicationThunks.ts +++ b/src/application/ApplicationThunks.ts @@ -382,7 +382,7 @@ export const loadApplicationConfigThunk = () => async (dispatch: any, getState: ssoProviders: [], ssoDiscoveryUrl: 'http://example.com', standalone: false, - standaloneProtocol: 'neo4j', + standaloneProtocol: 'neo4j+s', standaloneHost: 'localhost', standalonePort: '7687', standaloneDatabase: 'neo4j', diff --git a/src/chart/table/TableChart.tsx b/src/chart/table/TableChart.tsx index 7acab7a45..717b5caea 100644 --- a/src/chart/table/TableChart.tsx +++ b/src/chart/table/TableChart.tsx @@ -216,6 +216,15 @@ export const NeoTableChart = (props: ChartProps) => { rowHeight: tableRowHeight, rows: rows, columns: columns, + pageSizeOptions: [5, 10, 25, 50, 100], + initialState: { + pagination: { + paginationModel: { + pageSize: 5, + pageIndex: 0, + }, + }, + }, columnVisibilityModel: columnVisibilityModel, onColumnVisibilityModelChange: (newModel) => setColumnVisibilityModel(newModel), onCellClick: (e) => performActionOnElement(e, actionsRules, { ...props, pageNames: pageNames }, 'Click', 'Table'), diff --git a/src/extensions/styling/StyleRuleCreationModal.tsx b/src/extensions/styling/StyleRuleCreationModal.tsx index a295044d5..c0fe84c30 100644 --- a/src/extensions/styling/StyleRuleCreationModal.tsx +++ b/src/extensions/styling/StyleRuleCreationModal.tsx @@ -347,10 +347,14 @@ export const NeoCustomReportStyleModal = ({ options={createFieldVariableSuggestions().filter((e) => e.toLowerCase().includes(rule.targetField) )} - value={rule.targetField ? rule.targetField : (rule.field ? rule.field : '')} - inputValue={rule.targetField ? rule.targetField : (rule.field ? rule.field : '')} + value={rule.targetField ? rule.targetField : rule.field ? rule.field : ''} + inputValue={rule.targetField ? rule.targetField : rule.field ? rule.field : ''} popupIcon={<>} - style={{ minWidth: 125, visibility: rule.customization.includes("cell") ? 'visible' : 'hidden', display: rule.customization.includes("cell") ? '' : 'none' }} + style={{ + minWidth: 125, + visibility: rule.customization.includes('cell') ? 'visible' : 'hidden', + display: rule.customization.includes('cell') ? '' : 'none', + }} onInputChange={(event, value) => { updateRuleField(index, 'targetField', value); }} diff --git a/src/utils/parameterUtils.ts b/src/utils/parameterUtils.ts index 602711b2f..62d8a1c89 100644 --- a/src/utils/parameterUtils.ts +++ b/src/utils/parameterUtils.ts @@ -5,31 +5,35 @@ * @returns {string[]} An array containing all extracted parameter names. */ export const extractAllParameterNames = (cypherQuery: string): string[] => { - // A regular expression pattern to match parameter names following '$' - const pattern = /\$([A-Za-z_]\w*)/g; + // A regular expression pattern to match parameter names following '$' + const pattern = /\$([A-Za-z_]\w*)/g; - const parameterNames: string[] = []; - let match: any; + const parameterNames: string[] = []; + let match: any; - while ((match = pattern.exec(cypherQuery)) !== null) { - parameterNames.push(match[1]); - } + while ((match = pattern.exec(cypherQuery)) !== null) { + parameterNames.push(match[1]); + } - return parameterNames; -} + return parameterNames; +}; /** * Checks if all parameter names are present in the global parameter names. - * + * * @param {string[]} parameterNames An array of parameter names to be checked. * @param {object} globalParameterNames The object containing global parameter names to compare against. * @returns {boolean} A boolean indicating whether all parameters are present in the global parameters. */ export const checkParametersNameInGlobalParameter = (parameterNames: string[], globalParameterNames: any): boolean => { - for (const key of parameterNames) { - if (!globalParameterNames[key] || (Array.isArray(globalParameterNames[key]) && globalParameterNames[key].length === 0) || globalParameterNames[key] === '') { - return true; - } + for (const key of parameterNames) { + if ( + !globalParameterNames[key] || + (Array.isArray(globalParameterNames[key]) && globalParameterNames[key].length === 0) || + globalParameterNames[key] === '' + ) { + return true; } - return false; -} \ No newline at end of file + } + return false; +};