Skip to content
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
1 change: 1 addition & 0 deletions cypress/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/start_page.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/developer-guide/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ standalone mode.
"ssoEnabled": false,
"ssoProviders": [],
"ssoDiscoveryUrl": "https://example.com",
"standaloneProtocol": "neo4j",
"standaloneProtocol": "neo4j+s",
"standaloneHost": "localhost",
"standalonePort": "7687",
"standaloneDatabase": "neo4j",
Expand Down
2 changes: 1 addition & 1 deletion public/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"ssoProviders": [],
"ssoDiscoveryUrl": "https://example.com",
"standalone": false,
"standaloneProtocol": "neo4j",
"standaloneProtocol": "neo4j+s",
"standaloneHost": "localhost",
"standalonePort": "7687",
"standaloneDatabase": "neo4j",
Expand Down
2 changes: 1 addition & 1 deletion src/application/ApplicationReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const initialState = {
draft: false,
aboutModalOpen: false,
connection: {
protocol: 'neo4j',
protocol: 'neo4j+s',
url: DEFAULT_NEO4J_URL,
port: '7687',
database: '',
Expand Down
2 changes: 1 addition & 1 deletion src/application/ApplicationThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@
if (urlParams.get('credentials')) {
setWelcomeScreenOpen(false);
const connection = decodeURIComponent(urlParams.get('credentials'));
const protocol = connection.split('://')[0];

Check warning on line 267 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const username = connection.split('://')[1].split(':')[0];

Check warning on line 268 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const password = connection.split('://')[1].split(':')[1].split('@')[0];

Check warning on line 269 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const database = connection.split('@')[1].split(':')[0];

Check warning on line 270 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const url = connection.split('@')[1].split(':')[1];

Check warning on line 271 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring
const port = connection.split('@')[1].split(':')[2];

Check warning on line 272 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Use array destructuring

dispatch(setConnectionModalOpen(false));
dispatch(
Expand Down Expand Up @@ -382,7 +382,7 @@
ssoProviders: [],
ssoDiscoveryUrl: 'http://example.com',
standalone: false,
standaloneProtocol: 'neo4j',
standaloneProtocol: 'neo4j+s',
standaloneHost: 'localhost',
standalonePort: '7687',
standaloneDatabase: 'neo4j',
Expand Down Expand Up @@ -569,7 +569,7 @@
dispatch(initializeApplicationAsEditorThunk(config, paramsToSetAfterConnecting));
}
} catch (e) {
console.log(e);

Check warning on line 572 in src/application/ApplicationThunks.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Unexpected console statement
dispatch(setWelcomeScreenOpen(false));
dispatch(
createNotificationThunk(
Expand Down
9 changes: 9 additions & 0 deletions src/chart/table/TableChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
10 changes: 7 additions & 3 deletions src/extensions/styling/StyleRuleCreationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}}
Expand Down
36 changes: 20 additions & 16 deletions src/utils/parameterUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
return false;
};
Loading