Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Hotfix for broken map visualization #184

Merged
merged 1 commit into from
Aug 14, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/master-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.1.3
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.1.4
build-npm:
needs: build-test
runs-on: ubuntu-latest
Expand Down
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.3"
LABEL version="2.1.4"
13 changes: 13 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## NeoDash 2.1.3
The 2.1.3 release contains updates to the map visualization, as well as a new Choropleth map report type.
Several usability improvements were also added, including fixing all links into the new documentation pages.

- Extended the map visualization with a heatmap mode & marker clustering.
- Added a Choropleth map visualization report type.
- Added support for auto-linking into a predefined database from https://tools.neo4jlabs.com/.
- Added optional background color setting for reports.
- Added a new 'resize mode' for page layout creation.
- Added support for drawing dates on a time chart (in addition to existing datetime types).
- Fixed broken links in the documentation portal, all in-app links now point to this portal as well.


## NeoDash 2.1.2
The 2.1.2 release contains some bug fixes and minor improvements to the application.

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.3",
"version": "2.1.4",
"description": "NeoDash - Neo4j Dashboard Builder",
"neo4jDesktop": {
"apiVersion": "^1.2.0"
Expand Down
13 changes: 13 additions & 0 deletions release-notes.history.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## NeoDash 2.1.3
The 2.1.3 release contains updates to the map visualization, as well as a new Choropleth map report type.
Several usability improvements were also added, including fixing all links into the new documentation pages.

- Extended the map visualization with a heatmap mode & marker clustering.
- Added a Choropleth map visualization report type.
- Added support for auto-linking into a predefined database from https://tools.neo4jlabs.com/.
- Added optional background color setting for reports.
- Added a new 'resize mode' for page layout creation.
- Added support for drawing dates on a time chart (in addition to existing datetime types).
- Fixed broken links in the documentation portal, all in-app links now point to this portal as well.


## NeoDash 2.1.2
The 2.1.2 release contains some bug fixes and minor improvements to the application.

Expand Down
3 changes: 3 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## NeoDash 2.1.4
Added hotfix for missing function in map visualization (https://github.com/neo4j-labs/neodash/issues/183).

## NeoDash 2.1.3
The 2.1.3 release contains updates to the map visualization, as well as a new Choropleth map report type.
Several usability improvements were also added, including fixing all links into the new documentation pages.
Expand Down
30 changes: 16 additions & 14 deletions src/chart/MapChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,7 @@ const NeoMapChart = (props: ChartProps) => {

if (layerType == "markers") {
// Render a node label tooltip
const renderNodeLabel = (node) => {
const selectedProp = props.selection && props.selection[node.firstLabel];
if (selectedProp == "(id)") {
return node.id;
}
if (selectedProp == "(label)") {
return node.labels;
}
if (selectedProp == "(no label)") {
return "";
}
return node.properties[selectedProp] ? node.properties[selectedProp].toString() : "";
}


var markerMarginTop = "6px";
switch (defaultNodeSize) {
case "large":
Expand All @@ -245,6 +232,21 @@ const NeoMapChart = (props: ChartProps) => {
}
}

const renderNodeLabel = (node) => {
const selectedProp = props.selection && props.selection[node.firstLabel];
if (selectedProp == "(id)") {
return node.id;
}
if (selectedProp == "(label)") {
return node.labels;
}
if (selectedProp == "(no label)") {
return "";
}
return node.properties[selectedProp] ? node.properties[selectedProp].toString() : "";
}


function createMarkers() {
// Create markers to plot on the map
let markers = data.nodes.filter(node => node.pos && !isNaN(node.pos[0]) && !isNaN(node.pos[1])).map((node, i) =>
Expand Down
2 changes: 1 addition & 1 deletion src/modal/AboutModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import BugReportIcon from '@material-ui/icons/BugReport';
export const NeoAboutModal = ({ open, handleClose, getDebugState }) => {
const app = "NeoDash - Neo4j Dashboard Builder";
const email = "[email protected]";
const version = "2.1.3";
const version = "2.1.4";

const downloadDebugFile = () => {
const element = document.createElement("a");
Expand Down