Skip to content

Commit

Permalink
Merge pull request #246 from neo4j-labs/develop
Browse files Browse the repository at this point in the history
2.1.10 Release
  • Loading branch information
BennuFire authored Oct 28, 2022
2 parents 5c64c35 + 5992216 commit 63372b6
Show file tree
Hide file tree
Showing 25 changed files with 313 additions and 114 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/develop-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ jobs:
build: yarn run build
start: yarn run dev
wait-on: 'http://localhost:3000'
deploy-docs:
needs: build-test
runs-on: ubuntu-latest
steps:
- name: Trigger Developer Event
uses: peter-evans/repository-dispatch@main
with:
token: ${{ secrets.DOCS_REFRESH_TOKEN }}
repository: neo4j-documentation/docs-refresh
event-type: labs
build-s3:
needs: build-test
runs-on: ubuntu-latest
Expand All @@ -63,23 +53,3 @@ jobs:
aws-region: us-west-1
- run: curl ${{ secrets.INDEX_HTML_DEPLOYMENT_URL }} > dist/index.html
- run: aws s3 rm s3://neodash-test.graphapp.io/ --recursive && aws s3 sync dist s3://neodash-test.graphapp.io/ --acl public-read
deploy-gallery:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: cd gallery && yarn install
- run: cd gallery && CI=false yarn run build
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- run: aws s3 rm s3://neodash-gallery.graphapp.io/ --recursive && aws s3 sync gallery/build s3://neodash-gallery.graphapp.io/ --acl public-read
32 changes: 31 additions & 1 deletion .github/workflows/master-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.1.9
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.1.10
build-npm:
needs: build-test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -116,3 +116,33 @@ jobs:
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Publish package to NPM 📦
run: npm publish --access public neodash*.tgz
deploy-gallery:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: cd gallery && yarn install
- run: cd gallery && CI=false yarn run build
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- run: aws s3 rm s3://neodash-gallery.graphapp.io/ --recursive && aws s3 sync gallery/build s3://neodash-gallery.graphapp.io/ --acl public-read
deploy-docs:
needs: build-test
runs-on: ubuntu-latest
steps:
- name: Trigger Developer Event
uses: peter-evans/repository-dispatch@main
with:
token: ${{ secrets.DOCS_REFRESH_TOKEN }}
repository: neo4j-documentation/docs-refresh
event-type: labs
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ RUN chown -R nginx:nginx /usr/share/nginx/html/
USER nginx
EXPOSE 5005
HEALTHCHECK cmd curl --fail http://localhost:5005 || exit 1
LABEL version="2.1.9"
LABEL version="2.1.10"
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## NeoDash 2.1.10
This is a minor update which adds some operational/styling improvements, and a bug fix for line charts.

Changes:
- Added customizable label positions for bar charts.
- Fixed bug where datetimes were not handled correctly by line charts. (https://github.com/neo4j-labs/neodash/issues/243)
- Added **session parameters**, set automatically and available to Cypher queries ([Documentation](https://neo4j.com/labs/neodash/2.1/user-guide/reports/)).
- Added option to restore debug reports in recovery mode.
- Added option to share dashboards from self-hosted deployments.

## NeoDash 2.1.8 & 2.1.9
New features:
- Added the [Dashboard Gallery](https://neodash-gallery.graphapp.io), a live gallery of example NeoDash dashboards.
Expand Down
2 changes: 2 additions & 0 deletions docs/modules/ROOT/pages/user-guide/dashboards.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ When using Neo4j multi-database, you will be given the choice of which
database to save the dashboard in.
3. Copy-paste the JSON file directly.

> Keep in mind that your currently active dashboard is stored in the browser cache. If you clear your cache (cookies), the dashboard is gone.

=== Load a Dashboard

Just like in the save screen, a dashboard can be loaded in one of three
Expand Down
7 changes: 7 additions & 0 deletions docs/modules/ROOT/pages/user-guide/reports/bar-chart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ groups returned by the Cypher query.
|Show Values on Bars |on/off |off |If enabled, shows the category value
inside the respective bar.

|Skip label on width (px) |number |0 |Skip label if bar width is lower than provided value, ignored if 0.

|Skip label on height (px) |number |0 |Skip label if bar height is lower than provided value, ignored if 0.

|Custom label position |off/top/bottom |off | Allow user to place label out of the bar. This will override any other
label configuration.

|Label Rotation (degrees) |number |45 |the angle at which the bar labels
are rotated.

Expand Down
14 changes: 14 additions & 0 deletions docs/modules/ROOT/pages/user-guide/reports/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ Ultimately, it is important to understand that the order of the rules is
important. If a node matches multiple rules, the first rule that matches
will be used. If no rules are matched, the default style will be used.

== Parameters
...

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.

In addition, **session parameters** are available based on the currently active database connection.

|===
|Parameter | Description
| $session_uri | The URI of the current active database connection.
| $session_database | The Neo4j database that was connected to when the user logged in.
| $session_username | The username used to authenticate to Neo4j.
|===

== Report Types

To learn more about a specific report type, see one of the following
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/user-guide/reports/line-chart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Colors are assigned automatically to the different fields selected in
the report footer.

|X Scale |List |linear |How to scale the values on the x-axis. Can be
either linear or logarithmic.
either linear, logarithmic or point. Use point for categorical data.

|Y Scale |List |linear |How to scale the values on the y-axis. Can be
either linear or logarithmic.
Expand Down
2 changes: 1 addition & 1 deletion gallery/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function App() {
filteredList.map(item => {
return <div className='m-4 n-bg-neutral-10 n-shadow-l4'>
<div className="">
<h4 className="p-3 float-right opacity-50">{item['language']}</h4>
<h4 className="p-3 float-right">{item['language']}{item['logo'] ? <a target="_blank" href={item['authorURL']}><img style={{width: 30}} src={item['logo']}></img></a> : <></>}</h4>
<h4 className="p-3">{item['title']}</h4>
<p className="p-3">
{item['description']}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neodash",
"version": "2.1.9",
"version": "2.1.10",
"description": "NeoDash - Neo4j Dashboard Builder",
"neo4jDesktop": {
"apiVersion": "^1.2.0"
Expand Down
22 changes: 8 additions & 14 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
## NeoDash 2.1.8 & 2.1.9
New features:
- Added the [Dashboard Gallery](https://neodash-gallery.graphapp.io), a live gallery of example NeoDash dashboards.
- Added **Gauge Charts**, a contribution of the [BlueHound](https://github.com/zeronetworks/BlueHound) fork.
- Updated testing pipeline to work as an independent procedure.
- Added option to select a different Neo4j database for each report. ([#188](https://github.com/neo4j-labs/neodash/issues/118))
- 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))

Bug fixes:
- Fixed issue preventing dashboards to be shared with a non-standard database name.
- Fixed table chart breaking when returning a property called 'id' with a null value.
- Fixed bug not allowing users to select a different database when loading/saving a dashboard.
- **Added error handler for database list race condition in Neo4j Desktop**.
## NeoDash 2.1.10
This is a minor update which adds some operational/styling improvements, and a bug fix for line charts.

For a complete version history, see the [Changelog](https://github.com/neo4j-labs/neodash/blob/master/changelog.md).
Changes:
- Added customizable label positions for bar charts.
- Fixed bug where datetimes were not handled correctly by line charts. (https://github.com/neo4j-labs/neodash/issues/243)
- Added **session parameters**, set automatically and available to Cypher queries ([Documentation](https://neo4j.com/labs/neodash/2.1/user-guide/reports/)).
- Added option to restore debug reports in recovery mode.
- Added option to share dashboards from self-hosted deployments.
7 changes: 7 additions & 0 deletions src/application/ApplicationActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ export const setWaitForSSO = (wait: boolean ) => ({
payload: { wait },
});

export const SET_SESSION_PARAMETERS = 'APPLICATION/SET_SESSION_PARAMETERS';
export const setSessionParameters = ( parameters: any ) => ({
type: SET_SESSION_PARAMETERS,
payload: { parameters },
});


export const SET_DASHBOARD_TO_LOAD_AFTER_CONNECTING = 'APPLICATION/SET_DASHBOARD_TO_LOAD_AFTER_CONNECTING';
export const setDashboardToLoadAfterConnecting = (id: any) => ({
type: SET_DASHBOARD_TO_LOAD_AFTER_CONNECTING,
Expand Down
7 changes: 6 additions & 1 deletion src/application/ApplicationReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
SET_DASHBOARD_TO_LOAD_AFTER_CONNECTING, SET_DESKTOP_CONNECTION_PROPERTIES, SET_OLD_DASHBOARD,
SET_PARAMETERS_TO_LOAD_AFTER_CONNECTING,
SET_REPORT_HELP_MODAL_OPEN,
SET_SESSION_PARAMETERS,
SET_SHARE_DETAILS_FROM_URL, SET_SSO_ENABLED, SET_STANDALONE_DASHBOARD_DATEBASE, SET_STANDALONE_ENABLED,
SET_STANDALONE_MODE, SET_WAIT_FOR_SSO, SET_WELCOME_SCREEN_OPEN
} from "./ApplicationActions";
Expand Down Expand Up @@ -101,7 +102,11 @@ export const applicationReducer = (state = initialState, action: { type: any; pa
state = update(state, { waitForSSO: wait })
return state;
}

case SET_SESSION_PARAMETERS: {
const { parameters } = payload;
state = update(state, { sessionParameters: parameters })
return state;
}
case SET_STANDALONE_ENABLED: {
const { standalone, standaloneProtocol, standaloneHost, standalonePort, standaloneDatabase, standaloneDashboardName, standaloneDashboardDatabase, standaloneDashboardURL, standaloneUsername, standalonePassword } = payload;
state = update(state, {
Expand Down
10 changes: 8 additions & 2 deletions src/application/ApplicationThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { NEODASH_VERSION } from "../dashboard/DashboardReducer";
import { loadDashboardFromNeo4jByNameThunk, loadDashboardFromNeo4jByUUIDThunk, loadDashboardThunk, upgradeDashboardVersion } from "../dashboard/DashboardThunks";
import { createNotificationThunk } from "../page/PageThunks";
import { QueryStatus, runCypherQuery } from "../report/ReportQueryRunner";
import { setPageNumberThunk, updateGlobalParametersThunk, updateGlobalParameterThunk } from "../settings/SettingsThunks";
import {
setPageNumberThunk,
updateGlobalParametersThunk,
updateSessionParameterThunk
} from "../settings/SettingsThunks";
import {
setConnected, setConnectionModalOpen, setConnectionProperties, setDesktopConnectionProperties,
resetShareDetails, setShareDetailsFromUrl, setWelcomeScreenOpen, setDashboardToLoadAfterConnecting,
Expand Down Expand Up @@ -40,7 +44,9 @@ export const createConnectionThunk = (protocol, url, port, database, username, p
dispatch(setConnectionProperties(protocol, url, port, database, username, password));
dispatch(setConnectionModalOpen(false));
dispatch(setConnected(true));

dispatch(updateSessionParameterThunk("session_uri", protocol + "://" + url + ":" + port));
dispatch(updateSessionParameterThunk("session_database", database));
dispatch(updateSessionParameterThunk("session_username", username));
// If we have remembered to load a specific dashboard after connecting to the database, take care of it here.
const application = getState().application;
if (application.dashboardToLoadAfterConnecting && (application.dashboardToLoadAfterConnecting.startsWith("http") || application.dashboardToLoadAfterConnecting.startsWith("./") || application.dashboardToLoadAfterConnecting.startsWith("/"))) {
Expand Down
4 changes: 2 additions & 2 deletions src/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import {toggleReportSettings} from './CardActions';
import {getReportState} from './CardSelectors';
import {debounce, Dialog, DialogContent} from '@material-ui/core';
import {getDashboardIsEditable, getDatabase, getGlobalParameters} from '../settings/SettingsSelectors';
import {getDashboardIsEditable, getDatabase, getGlobalParameters, getSessionParameters} from '../settings/SettingsSelectors';
import {updateGlobalParameterThunk} from '../settings/SettingsThunks';
import {createNotificationThunk} from '../page/PageThunks';
import useDimensions from 'react-cool-dimensions';
Expand Down Expand Up @@ -209,7 +209,7 @@ const mapStateToProps = (state, ownProps) => ({
report: getReportState(state, ownProps.index),
editable: getDashboardIsEditable(state),
database: getDatabase(state, ownProps && ownProps.dashboardSettings ? ownProps.dashboardSettings.pagenumber : undefined, ownProps.index),
globalParameters: getGlobalParameters(state)
globalParameters: {...getGlobalParameters(state), ...getSessionParameters(state)}
});

const mapDispatchToProps = dispatch => ({
Expand Down
Loading

0 comments on commit 63372b6

Please sign in to comment.