Skip to content

Commit 8c7f9bd

Browse files
nielsdejongJipSogetiNiels de JongNiels de Jong
authored
2.0.6 (#65)
* Updated version number * Expandable charts when not in edit mode * Apply global parameter value to selection chart All other charts apply the current global parameter value in their Cypher queries. To keep consistent also apply the state to the parameter selection chart. * Get parameter value earlier to apply as default state * Minor fixes to chart interface, reorganized code to be able to avoid uninitialized variables * Added example on how to use maps when returning dictionaries * Made connection modal dismissable when connected to Neo4j * Made fullscreen reports work for maps and lines, now optionally available through dashboard settings * Fixed load dashboard functionality to automatically pick up the selection stored in the dashboard * Added button for returning to main menu screen * Fixed z-index for fullscreen mode * Revert some changes and add more comments * Resolved rendering issues when loading parameter selection reports with prepopulated parameters * Show placeholder when no query is specified * Reset extra parameters on page load for parameter select report * Pass Parameter Select value via hash to iframe without re-rendering (#49) * Pass Parameter Select value via hash to iframe without re-rendering * Pass all global variables to iframe via hash parameter Configurable via advanced settings on iframe chart. * Added example iFrame to documentation modal Co-authored-by: Niels de Jong <[email protected]> * Cleanup of global dashboard settings menu * Improved user interface and examples * Graph modal (#51) * Show modal when clicking node/relation in graph with its properties * Made node property hover & inspection of elements optional through advanced report settings Co-authored-by: Niels de Jong <[email protected]> * Resolved bug in rendering graphs with node pairs that have relationships in two directions between them * Added option to manually specify node labels/property names in selection reports (for large databases) * Updated release notes * Added debug report button. Fixed table size issues by upgrading to latest datagrid version * Fixed custom column width issue * Fixed example documentation with new styling * Support rendering native and custom types in Data Grid (#54) * Support rendering native and custom types in Data Grid * Update TableChart.tsx * Resolved error with slow queries for single value reports * Graph nodes stick after dragging, added option to store fixed graph layouts in dashboards * Added experimental graph layouts * Started adding manual timeout config, property selection for rel types, fixed alignment for graph inspect modal * Finalized config for custom timeouts * Fixed invalid lowercasing of share URL generation * Added new types of parameter selection reports (relationship/free text) * Updated all dependencies to latest version, made project work with node 17 * Fixed typo * Updated README * Clean up of dependencies, removed merge artifacts * Default fullscreen option for reports, graphs fit to canvas automatically, saving dashboards is now checked * Added tiny report sizes * Fixed graph hover to match other app styling * Resolved merge artifacts * Added maximizing of card settings * Added transposing option for tables * Optimized cypher editor * Updated dockerfile and bash scripts * Fixed incorrect pagesizes for tables * Added pie charts. Improved styling for graph inspection modals * Updated release notes and README. Fixed deploy to AWS script Co-authored-by: JipSogeti <[email protected]> Co-authored-by: Niels de Jong <[email protected]> Co-authored-by: Niels de Jong <[email protected]>
1 parent 5eeb1f0 commit 8c7f9bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1351
-399
lines changed

.npmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ tsconfig.json
77
yarn.lock
88
node_modules
99
*.tgz
10-
10+
desktop.passphrase
1111
*.config.js
1212
desktop-signer.sh

README.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,18 @@ There are three ways to run the application:
1515

1616

1717
# Developer Guide
18-
## Run & Build
18+
## Run locally with Docker
19+
Pull the latest image from Docker Hub to run the application locally:
20+
```
21+
# Run the application on http://localhost:8080
22+
docker pull nielsdejong/neodash:latest
23+
docker run -it --rm -p 8080:80 nielsdejong/neodash
24+
```
25+
26+
## Run & Build using npm
1927
NeoDash is built with React. You'll need `npm` installed to run the web app.
2028

21-
> Note - node V12 is currently required to build the application.
29+
> Use a recent version of `npm` and `node` to build NeoDash. The application has been tested with npm 8.3.1 & node v17.4.0.
2230
2331
To run the application in development mode:
2432
- clone this repository.
@@ -33,17 +41,18 @@ To build the app for production:
3341
- execute `npm run build`. This will create a `build` folder in your project directory.
3442
- deploy the contents of the build folder to a web server. You should then be able to run the web app.
3543

36-
### Build and run Docker image
44+
45+
### Build Docker image
3746
Make sure you have a recent version of `docker` installed.
38-
On Unix-like system you can run `./tools/neodash-build-run_unix.bash` to build the multi-stage NeoDash image & access it with nginx:
47+
On a Unix-like system you can run `./tools/docker-build-run_unix.bash` to build the multi-stage NeoDash image & access it with nginx:
3948
```
4049
$ cd tools/
41-
$ ./neodash-build-run_unix.bash --port=$YOUR_PORT
50+
$ ./docker-build-run_unix.bash --port=$YOUR_PORT
4251
```
4352
If you use Windows, you should have installed WSL. In WSL, you can run the script as follows:
4453
```
4554
$ cd tools/
46-
$ ./neodash-build-run_windows.bash --port=$YOUR_PORT
55+
$ ./docker-build-run_windows.bash --port=$YOUR_PORT
4756
```
4857
Then visit localhost with the chosen port in your browser.
4958

package.json

+42-62
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neodash",
3-
"version": "2.0.5",
3+
"version": "2.0.6",
44
"description": "NeoDash - Neo4j Dashboard Builder",
55
"neo4jDesktop": {
66
"apiVersion": "^1.2.0"
@@ -23,83 +23,63 @@
2323
],
2424
"scripts": {
2525
"dev": "npx webpack-dev-server --mode development",
26-
"build": "npx webpack --mode production && rm -rf build && mkdir build && cp -r public/* build/ && mkdir build/dist && mv dist/ build/",
26+
"build": "npx webpack --mode production && cp -r public/* dist/",
2727
"sync": "aws s3 sync --acl public-read build s3://neodash.graphapp.io/preview",
2828
"test": "ts-mocha \"src/**/*.test.tsx\" --require @babel/register --recursive"
2929
},
3030
"keywords": [],
3131
"author": "Niels de Jong",
32-
"devDependencies": {
33-
"@babel/cli": "^7.8.3",
34-
"@babel/core": "^7.8.3",
35-
"@babel/plugin-transform-runtime": "^7.14.5",
36-
"@babel/preset-env": "^7.16.0",
37-
"@babel/preset-react": "^7.16.0",
38-
"@babel/preset-typescript": "^7.14.5",
39-
"@babel/register": "^7.14.5",
40-
"@graphapps/charts": "github:nielsdejong/charts#cd8bf3707d48f2c34ec6a1ad126cfd28b5ac3065",
41-
"@types/chai": "^4.2.21",
42-
"@types/expect": "^24.3.0",
43-
"@types/leaflet": "^1.7.5",
44-
"@types/mocha": "^8.2.3",
45-
"@types/react-dom": "^17.0.9",
46-
"@types/sinon": "^10.0.2",
47-
"@types/styled-components": "^5.1.11",
48-
"babel-loader": "^8.0.6",
49-
"chai": "^4.3.4",
50-
"css-loader": "^3.4.2",
51-
"fetch-mock": "^9.11.0",
52-
"mocha": "^9.0.2",
53-
"node-fetch": "^2.6.1",
54-
"react-hot-loader": "^4.12.19",
55-
"sinon": "^11.1.1",
56-
"style-loader": "^1.1.3",
57-
"styled-components": "^5.3.0",
58-
"ts-loader": "^9.2.3",
59-
"ts-mocha": "^8.0.0",
60-
"typescript": "^4.3.5",
61-
"webpack": "^4.46.0",
62-
"webpack-cli": "^3.3.12",
63-
"webpack-dev-server": "3.7.1"
64-
},
6532
"dependencies": {
6633
"@babel/runtime": "^7.14.6",
67-
"@emotion/react": "^11.7.1",
68-
"@emotion/styled": "^11.6.0",
6934
"@material-ui/core": "^4.12.3",
7035
"@material-ui/icons": "^4.11.2",
7136
"@material-ui/lab": "^4.0.0-alpha.60",
72-
"@material-ui/styles": "^4.11.4",
73-
"@material-ui/system": "^4.12.1",
74-
"@material-ui/utils": "^4.11.2",
75-
"@mui/material": "^5.2.7",
76-
"@mui/x-data-grid": "^5.2.1",
77-
"@react-leaflet/core": "1.0.2",
78-
"codemirror": "^5.63.3",
79-
"cypher-codemirror": "^1.1.7",
37+
"@mui/material": "^5.3.0",
38+
"@mui/x-data-grid": "^5.2.2",
39+
"@nivo/bar": "^0.79.1",
40+
"@nivo/core": "^0.79.0",
41+
"@nivo/line": "^0.79.1",
42+
"@nivo/pie": "^0.79.1",
43+
"babel-runtime": "^6.26.0",
44+
"classnames": "^2.3.1",
45+
"codemirror": "^5.65.1",
46+
"cypher-codemirror": "github:nielsdejong/cypher-editor#c0eff97fc97f22355e60b57fb6f8dc26b16f9a5f",
8047
"d3-scale-chromatic": "^3.0.0",
81-
"file-loader": "^6.2.0",
82-
"graph-app-kit": "https://neo.jfrog.io/neo/api/npm/npm/graph-app-kit/-/graph-app-kit-1.0.4.tgz",
8348
"leaflet": "^1.7.1",
84-
"loader-utils": "^2.0.0",
85-
"neo4j-driver": "^4.3.2",
86-
"react": "^17.0.1",
49+
"react": "^17.0.2",
8750
"react-cool-dimensions": "^2.0.7",
88-
"react-dom": "^16.12.0",
51+
"react-dom": "^17.0.2",
8952
"react-force-graph-2d": "^1.23.8",
90-
"react-highlight.js": "^1.0.7",
91-
"react-leaflet": "3.1.0",
92-
"react-leaflet-enhanced-marker": "^1.0.21",
93-
"react-markdown": "^7.1.0",
94-
"react-redux": "^7.2.4",
95-
"react-use": "^17.2.4",
96-
"redux": "^4.1.0",
53+
"react-leaflet": "^3.2.5",
54+
"react-leaflet-enhanced-marker": "github:nielsdejong/react-leaflet-enhanced-marker#603a7d73dc9b13a31ab1e8abfd932d63263b4af0",
55+
"react-markdown": "^8.0.0",
56+
"react-redux": "^7.2.6",
9757
"redux-devtools-extension": "^2.13.9",
9858
"redux-persist": "^6.0.0",
99-
"redux-thunk": "^2.3.0",
100-
"remark-gfm": "^3.0.0",
101-
"reselect": "^4.0.0",
102-
"source-map-loader": "^1.0.0",
59+
"redux-thunk": "^2.4.1",
60+
"remark-gfm": "^3.0.1",
61+
"reselect": "^4.1.5",
10362
"use-neo4j": "^0.3.6"
63+
},
64+
"devDependencies": {
65+
"@babel/cli": "^7.16.8",
66+
"@babel/core": "^7.16.12",
67+
"@babel/plugin-transform-runtime": "^7.16.10",
68+
"@babel/preset-env": "^7.16.11",
69+
"@babel/preset-react": "^7.16.7",
70+
"@babel/preset-typescript": "^7.16.7",
71+
"@babel/register": "^7.16.9",
72+
"@emotion/react": "^11.7.1",
73+
"@emotion/styled": "^11.6.0",
74+
"babel-loader": "^8.2.3",
75+
"css-loader": "^3.6.0",
76+
"file-loader": "^6.2.0",
77+
"react-hot-loader": "^4.13.0",
78+
"source-map-loader": "^1.1.3",
79+
"style-loader": "^1.1.3",
80+
"styled-components": "^5.3.3",
81+
"webpack": "^5.67.0",
82+
"webpack-cli": "^4.9.1",
83+
"webpack-dev-server": "^4.7.3"
10484
}
10585
}

public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<body>
3333
<div id="root"></div>
3434
<noscript>Please enable JavaScript to view this site.</noscript>
35-
<script src="dist/bundle.js"></script>
35+
<script src="bundle.js"></script>
3636
</body>
3737

3838
</html>

public/style.css

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
.no-underline .MuiInput-underline::before {
1212
border-bottom: none;
1313
}
14-
14+
.MuiContainer-root{
15+
padding-left: 10px !important;
16+
padding-right: 10px !important;
17+
}
1518
.large input {
1619
font-size: 20px;
1720
margin-top: -6px;
@@ -133,4 +136,9 @@
133136
bottom: 0;
134137
background: white;
135138
z-index: 1299;
139+
}
140+
141+
.force-graph-container .graph-tooltip {
142+
color: black !important;
143+
background: none !important;
136144
}

release-notes.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## NeoDash 2.0.6
2+
Major version updates to all internal dependencies.
3+
NeoDash 2.0.6 uses Node 17+, react 17+ and recent versions of all visualization libraries.
4+
5+
Visualizations:
6+
- Added pie charts (Including examples and new demo dashboard).
7+
- Added setting to transpose table rows and columns.
8+
- Improved styling on graph pop-up windows.
9+
- Graph visualizations now auto-fit to the report size.
10+
- Added button to reset the zoom on a graph report.
11+
12+
Parameter selection:
13+
- Added relationship property / free text selection options.
14+
15+
Editor:
16+
- Improved performance of inbuilt Cypher editor.
17+
- Added button to maximize cards while in edit-mode.
18+
- All reports are now maximizable by default.
19+
- Added tiny report sizes.
20+
- Added option to override the default query timeout of twenty seconds.
21+
22+
Other:
23+
- Updated docker image build scripts.
24+
- Fixed share link geneneration incorrectly removing capitals from usernames/passwords.
125

226
## NeoDash 2.0.5
327
Graph report:

src/card/Card.tsx

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Card from '@material-ui/core/Card';
22
import Collapse from '@material-ui/core/Collapse';
3-
import React, { useCallback, useEffect } from 'react';
3+
import React, { useCallback, useEffect, useState } from 'react';
44
import NeoCardSettings from './settings/CardSettings';
55
import NeoCardView from './view/CardView';
66
import { connect } from 'react-redux';
@@ -46,6 +46,11 @@ const NeoCard = ({
4646
);
4747
const [collapseTimeout, setCollapseTimeout] = React.useState(report.collapseTimeout);
4848

49+
const [expanded, setExpanded] = useState(false);
50+
const onToggleCardExpand = () => {
51+
setExpanded(!expanded);
52+
}
53+
4954
useEffect(() => {
5055
setSettingsOpen(report.settingsOpen);
5156
}, [report.settingsOpen])
@@ -76,6 +81,8 @@ const NeoCard = ({
7681
width={report.width}
7782
height={report.height}
7883
title={report.title}
84+
expanded={expanded}
85+
onToggleCardExpand={onToggleCardExpand}
7986
onGlobalParameterUpdate={onGlobalParameterUpdate}
8087
onSelectionUpdate={(selectable, field) => onSelectionUpdate(index, selectable, field)}
8188
onTitleUpdate={(title) => onTitleUpdate(index, title)}
@@ -99,6 +106,9 @@ const NeoCard = ({
99106
type={report.type}
100107
refreshRate={report.refreshRate}
101108
cypherParameters={report.parameters}
109+
expanded={expanded}
110+
dashboardSettings={dashboardSettings}
111+
onToggleCardExpand={onToggleCardExpand}
102112
reportSettings={report.settings}
103113
reportSettingsOpen={report.advancedSettingsOpen}
104114
onQueryUpdate={(query) => onQueryUpdate(index, query)}

src/card/CardReducer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const cardReducer = (state = CARD_INITIAL_STATE, action: { type: any; pay
9191
const settings = (state.settings) ? (state.settings) : {};
9292

9393
// Javascript is amazing, so "" == 0. Instead we check if the string length is zero...
94-
if (value.toString().length == 0) {
94+
if (value == undefined || value.toString().length == 0) {
9595
delete settings[setting];
9696
update(state, { settings: settings });
9797
return state;

src/card/settings/CardSettings.tsx

+7-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ import { CardContent } from '@material-ui/core';
77

88
const NeoCardSettings = ({ settingsOpen, query, database, refreshRate, cypherParameters, width, height, type, reportSettings, reportSettingsOpen,
99
onQueryUpdate, onSizeUpdate, onRefreshRateUpdate, onCypherParametersUpdate, onRemovePressed, onReportSettingUpdate,
10-
onShiftLeftPressed, onShiftRightPressed, onToggleCardSettings, onTypeUpdate, onToggleReportSettings }) => {
10+
onShiftLeftPressed, onShiftRightPressed, onToggleCardSettings, onTypeUpdate,
11+
onToggleReportSettings, dashboardSettings, expanded, onToggleCardExpand }) => {
1112

1213

1314
const cardHeight = 10 + (120 * height) + (78 * Math.floor((height - 1) / 3)) + "px";
1415

1516
const cardSettingsHeader = <NeoCardSettingsHeader
17+
expanded={expanded}
18+
onToggleCardExpand={onToggleCardExpand}
1619
onRemovePressed={onRemovePressed}
1720
onShiftLeftPressed={onShiftLeftPressed}
1821
onShiftRightPressed={onShiftRightPressed}
22+
fullscreenEnabled={dashboardSettings.fullscreenEnabled}
1923
onToggleCardSettings={onToggleCardSettings} />
2024

2125
// TODO - instead of hiding everything based on settingsopen, only hide the components that slow down render (cypher editor)
@@ -30,6 +34,7 @@ const NeoCardSettings = ({ settingsOpen, query, database, refreshRate, cypherPar
3034
type={type}
3135
onQueryUpdate={onQueryUpdate}
3236
onSizeUpdate={onSizeUpdate}
37+
onReportSettingUpdate={onReportSettingUpdate}
3338
onRefreshRateUpdate={onRefreshRateUpdate}
3439
onCypherParametersUpdate={onCypherParametersUpdate}
3540
onTypeUpdate={onTypeUpdate}></NeoCardSettingsContent> : <CardContent style={{ paddingTop: "10px", paddingBottom: "10px" }}/>;
@@ -41,9 +46,8 @@ const NeoCardSettings = ({ settingsOpen, query, database, refreshRate, cypherPar
4146
onToggleReportSettings={onToggleReportSettings}
4247
onReportSettingUpdate={onReportSettingUpdate}></NeoCardSettingsFooter> : <div></div>;
4348

44-
4549
return (
46-
<div style={{ overflowY: "auto" }}>
50+
<div className={`card-view ${expanded ? "expanded" : ""}`} style={{ overflowY: "auto" }}>
4751
{cardSettingsHeader}
4852
<ReportItemContainer style={{ height: cardHeight, marginTop: "-20px" }} >
4953
{cardSettingsContent}

src/card/settings/CardSettingsContent.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { CARD_SIZES } from '../../config/CardConfig';
1010

1111

1212
const NeoCardSettingsContent = ({ query, database, reportSettings, refreshRate, cypherParameters, width, height, type,
13-
onQueryUpdate, onSizeUpdate, onRefreshRateUpdate, onCypherParametersUpdate, onTypeUpdate }) => {
13+
onQueryUpdate, onSizeUpdate, onRefreshRateUpdate, onReportSettingUpdate, onCypherParametersUpdate, onTypeUpdate }) => {
1414

1515

1616
// Ensure that we only trigger a text update event after the user has stopped typing.
@@ -54,7 +54,7 @@ const NeoCardSettingsContent = ({ query, database, reportSettings, refreshRate,
5454

5555

5656
const SettingsComponent = REPORT_TYPES[type].settingsComponent;
57-
const settings = REPORT_TYPES[type]["settingsComponent"] ? <SettingsComponent type={type} settings={reportSettings} database={database} query={query} onQueryUpdate={onQueryUpdate} /> :
57+
const settings = REPORT_TYPES[type]["settingsComponent"] ? <SettingsComponent type={type} onReportSettingUpdate={onReportSettingUpdate} settings={reportSettings} database={database} query={query} onQueryUpdate={onQueryUpdate} /> :
5858
<>
5959
<NeoCodeField value={queryText}
6060
language={REPORT_TYPES[type]["inputMode"] ? REPORT_TYPES[type]["inputMode"] : "cypher"}

src/card/settings/CardSettingsHeader.tsx

+18-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,21 @@ import SaveIcon from '@material-ui/icons/Save';
77
import DeleteIcon from '@material-ui/icons/Delete';
88
import ChevronLeft from '@material-ui/icons/ChevronLeft';
99
import ChevronRight from '@material-ui/icons/ChevronRight';
10+
import FullscreenIcon from '@material-ui/icons/Fullscreen';
11+
import { FullscreenExit } from '@material-ui/icons';
12+
13+
const NeoCardSettingsHeader = ({ onRemovePressed, onShiftLeftPressed, onShiftRightPressed,
14+
onToggleCardSettings, onToggleCardExpand, expanded, fullscreenEnabled }) => {
15+
const maximizeButton = <IconButton aria-label="maximize"
16+
onClick={onToggleCardExpand}>
17+
<FullscreenIcon />
18+
</IconButton>
19+
20+
const unMaximizeButton = <IconButton aria-label="un-maximize"
21+
onClick={onToggleCardExpand}>
22+
<FullscreenExit />
23+
</IconButton>
1024

11-
const NeoCardSettingsHeader = ({ onRemovePressed, onShiftLeftPressed, onShiftRightPressed, onToggleCardSettings }) => {
1225
return (
1326
<CardHeader
1427
avatar={<div style={{ marginTop: "-8px" }}>
@@ -25,7 +38,10 @@ const NeoCardSettingsHeader = ({ onRemovePressed, onShiftLeftPressed, onShiftRig
2538
<ChevronRight />
2639
</IconButton>
2740
</div>}
28-
action={<IconButton aria-label="save" onClick={(e) => {e.preventDefault(); onToggleCardSettings()}}><SaveIcon /></IconButton>}
41+
action={<>
42+
{fullscreenEnabled ? (expanded ? unMaximizeButton : maximizeButton) : <></>}
43+
{!expanded ? <IconButton aria-label="save" onClick={(e) => { e.preventDefault(); onToggleCardSettings() }}><SaveIcon /></IconButton> : <></>}
44+
</>}
2945
title=""
3046
subheader="" />
3147
);

0 commit comments

Comments
 (0)