Skip to content

Commit daa3107

Browse files
Added support for session parameters. Fixed release pipelines, added release notes. (#235)
* Username on Params * Updated session parameter template * Added support for session parameters * Added session parameter documentation, changelog, and bumped version number * Added warning about cookies * Updated release notes Co-authored-by: Niels de Jong <[email protected]>
1 parent c6a4e95 commit daa3107

File tree

16 files changed

+113
-58
lines changed

16 files changed

+113
-58
lines changed

.github/workflows/develop-deployment.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ jobs:
3131
build: yarn run build
3232
start: yarn run dev
3333
wait-on: 'http://localhost:3000'
34-
deploy-docs:
35-
needs: build-test
36-
runs-on: ubuntu-latest
37-
steps:
38-
- name: Trigger Developer Event
39-
uses: peter-evans/repository-dispatch@main
40-
with:
41-
token: ${{ secrets.DOCS_REFRESH_TOKEN }}
42-
repository: neo4j-documentation/docs-refresh
43-
event-type: labs
4434
build-s3:
4535
needs: build-test
4636
runs-on: ubuntu-latest
@@ -63,23 +53,3 @@ jobs:
6353
aws-region: us-west-1
6454
- run: curl ${{ secrets.INDEX_HTML_DEPLOYMENT_URL }} > dist/index.html
6555
- run: aws s3 rm s3://neodash-test.graphapp.io/ --recursive && aws s3 sync dist s3://neodash-test.graphapp.io/ --acl public-read
66-
deploy-gallery:
67-
runs-on: ubuntu-latest
68-
strategy:
69-
matrix:
70-
node-version: [18.x]
71-
steps:
72-
- uses: actions/checkout@v2
73-
- name: Use Node.js ${{ matrix.node-version }}
74-
uses: actions/setup-node@v1
75-
with:
76-
node-version: ${{ matrix.node-version }}
77-
- run: cd gallery && yarn install
78-
- run: cd gallery && CI=false yarn run build
79-
- name: Set AWS credentials
80-
uses: aws-actions/configure-aws-credentials@v1
81-
with:
82-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
83-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
84-
aws-region: us-west-1
85-
- run: aws s3 rm s3://neodash-gallery.graphapp.io/ --recursive && aws s3 sync gallery/build s3://neodash-gallery.graphapp.io/ --acl public-read

.github/workflows/master-deployment.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
context: .
7979
file: ./Dockerfile
8080
push: true
81-
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.1.9
81+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.1.10
8282
build-npm:
8383
needs: build-test
8484
runs-on: ubuntu-latest
@@ -116,3 +116,33 @@ jobs:
116116
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
117117
- name: Publish package to NPM 📦
118118
run: npm publish --access public neodash*.tgz
119+
deploy-gallery:
120+
runs-on: ubuntu-latest
121+
strategy:
122+
matrix:
123+
node-version: [18.x]
124+
steps:
125+
- uses: actions/checkout@v2
126+
- name: Use Node.js ${{ matrix.node-version }}
127+
uses: actions/setup-node@v1
128+
with:
129+
node-version: ${{ matrix.node-version }}
130+
- run: cd gallery && yarn install
131+
- run: cd gallery && CI=false yarn run build
132+
- name: Set AWS credentials
133+
uses: aws-actions/configure-aws-credentials@v1
134+
with:
135+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
136+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
137+
aws-region: us-west-1
138+
- run: aws s3 rm s3://neodash-gallery.graphapp.io/ --recursive && aws s3 sync gallery/build s3://neodash-gallery.graphapp.io/ --acl public-read
139+
deploy-docs:
140+
needs: build-test
141+
runs-on: ubuntu-latest
142+
steps:
143+
- name: Trigger Developer Event
144+
uses: peter-evans/repository-dispatch@main
145+
with:
146+
token: ${{ secrets.DOCS_REFRESH_TOKEN }}
147+
repository: neo4j-documentation/docs-refresh
148+
event-type: labs

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ RUN chown -R nginx:nginx /usr/share/nginx/html/
3838
USER nginx
3939
EXPOSE 5005
4040
HEALTHCHECK cmd curl --fail http://localhost:5005 || exit 1
41-
LABEL version="2.1.9"
41+
LABEL version="2.1.10"

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## NeoDash 2.1.10
2+
This is a minor update which adds some operational/styling improvements, and a bug fix for line charts.
3+
4+
Changes:
5+
- Added customizable label positions for bar charts.
6+
- Fixed bug where datetimes were not handled correctly by line charts. (https://github.com/neo4j-labs/neodash/issues/243)\
7+
- Added **session parameters**, set automatically and available to Cypher queries ([Documentation](https://neo4j.com/labs/neodash/2.1/user-guide/reports/)).
8+
- Added option to restore debug reports in recovery mode.
9+
10+
111
## NeoDash 2.1.8 & 2.1.9
212
New features:
313
- Added the [Dashboard Gallery](https://neodash-gallery.graphapp.io), a live gallery of example NeoDash dashboards.

docs/modules/ROOT/pages/user-guide/dashboards.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ When using Neo4j multi-database, you will be given the choice of which
8282
database to save the dashboard in.
8383
3. Copy-paste the JSON file directly.
8484

85+
> Keep in mind that your currently active dashboard is stored in the browser cache. If you clear your cache (cookies), the dashboard is gone.
86+
8587
=== Load a Dashboard
8688

8789
Just like in the save screen, a dashboard can be loaded in one of three

docs/modules/ROOT/pages/user-guide/reports/index.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,20 @@ Ultimately, it is important to understand that the order of the rules is
9999
important. If a node matches multiple rules, the first rule that matches
100100
will be used. If no rules are matched, the default style will be used.
101101

102+
== Parameters
103+
...
104+
105+
Parameters can be set in a dashboard by using a link:parameter-select[Parameter Select] report. Set parameters are then available in any Cypher query across the dashboard.
106+
107+
In addition, **session parameters** are available based on the currently active database connection.
108+
109+
|===
110+
|Parameter | Description
111+
| $session_uri | The URI of the current active database connection.
112+
| $session_database | The Neo4j database that was connected to when the user logged in.
113+
| $session_username | The username used to authenticate to Neo4j.
114+
|===
115+
102116
== Report Types
103117

104118
To learn more about a specific report type, see one of the following

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neodash",
3-
"version": "2.1.9",
3+
"version": "2.1.10",
44
"description": "NeoDash - Neo4j Dashboard Builder",
55
"neo4jDesktop": {
66
"apiVersion": "^1.2.0"

release-notes.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
## NeoDash 2.1.8 & 2.1.9
2-
New features:
3-
- Added the [Dashboard Gallery](https://neodash-gallery.graphapp.io), a live gallery of example NeoDash dashboards.
4-
- Added **Gauge Charts**, a contribution of the [BlueHound](https://github.com/zeronetworks/BlueHound) fork.
5-
- Updated testing pipeline to work as an independent procedure.
6-
- Added option to select a different Neo4j database for each report. ([#188](https://github.com/neo4j-labs/neodash/issues/118))
7-
- Added **Report Actions**, a neodash extension (available in beta) only on [https://neodash.graphapp.io](https://neodash.graphapp.io). ([#27](https://github.com/neo4j-labs/neodash/issues/27))
8-
9-
Bug fixes:
10-
- Fixed issue preventing dashboards to be shared with a non-standard database name.
11-
- Fixed table chart breaking when returning a property called 'id' with a null value.
12-
- Fixed bug not allowing users to select a different database when loading/saving a dashboard.
13-
- **Added error handler for database list race condition in Neo4j Desktop**.
1+
## NeoDash 2.1.10
2+
This is a minor update which adds some operational/styling improvements, and a bug fix for line charts.
143

15-
For a complete version history, see the [Changelog](https://github.com/neo4j-labs/neodash/blob/master/changelog.md).
4+
Changes:
5+
- Added customizable label positions for bar charts.
6+
- Fixed bug where datetimes were not handled correctly by line charts. (https://github.com/neo4j-labs/neodash/issues/243)\
7+
- Added **session parameters**, set automatically and available to Cypher queries ([Documentation](https://neo4j.com/labs/neodash/2.1/user-guide/reports/)).
8+
- Added option to restore debug reports in recovery mode.

src/application/ApplicationActions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ export const setWaitForSSO = (wait: boolean ) => ({
117117
payload: { wait },
118118
});
119119

120+
export const SET_SESSION_PARAMETERS = 'APPLICATION/SET_SESSION_PARAMETERS';
121+
export const setSessionParameters = ( parameters: any ) => ({
122+
type: SET_SESSION_PARAMETERS,
123+
payload: { parameters },
124+
});
125+
126+
120127
export const SET_DASHBOARD_TO_LOAD_AFTER_CONNECTING = 'APPLICATION/SET_DASHBOARD_TO_LOAD_AFTER_CONNECTING';
121128
export const setDashboardToLoadAfterConnecting = (id: any) => ({
122129
type: SET_DASHBOARD_TO_LOAD_AFTER_CONNECTING,

src/application/ApplicationReducer.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
SET_DASHBOARD_TO_LOAD_AFTER_CONNECTING, SET_DESKTOP_CONNECTION_PROPERTIES, SET_OLD_DASHBOARD,
1010
SET_PARAMETERS_TO_LOAD_AFTER_CONNECTING,
1111
SET_REPORT_HELP_MODAL_OPEN,
12+
SET_SESSION_PARAMETERS,
1213
SET_SHARE_DETAILS_FROM_URL, SET_SSO_ENABLED, SET_STANDALONE_DASHBOARD_DATEBASE, SET_STANDALONE_ENABLED,
1314
SET_STANDALONE_MODE, SET_WAIT_FOR_SSO, SET_WELCOME_SCREEN_OPEN
1415
} from "./ApplicationActions";
@@ -101,7 +102,11 @@ export const applicationReducer = (state = initialState, action: { type: any; pa
101102
state = update(state, { waitForSSO: wait })
102103
return state;
103104
}
104-
105+
case SET_SESSION_PARAMETERS: {
106+
const { parameters } = payload;
107+
state = update(state, { sessionParameters: parameters })
108+
return state;
109+
}
105110
case SET_STANDALONE_ENABLED: {
106111
const { standalone, standaloneProtocol, standaloneHost, standalonePort, standaloneDatabase, standaloneDashboardName, standaloneDashboardDatabase, standaloneDashboardURL, standaloneUsername, standalonePassword } = payload;
107112
state = update(state, {

0 commit comments

Comments
 (0)