neodash
neodash copied to clipboard
standaloneDashboardURL not working
I am trying to use standaloneDashboardURL, have been digging deep and I am stuck now. Perhaps this is not a bug but, wow, I have no idea what the misconfiguration could be. Can someone verify that standaloneDashboardURL works for them?
Setup/steps to recreate:
- NeoDash version: 2.1.2
- Neo4J Database version: 4.4.8. (Community)
- use docker images for both pieces of software
- this host machine has an arbitrary IP, DNS is not involved, say:
IP=10.101.202.44
- use compose-file to run (see Files)
- NeoDash (standalone configuration)
- Neo4J
- create a dashboard using http://neodash.graphapp.io OR editor deployment (different config), download it, name it
custom-dashboard.json
, place it on the machine where NeoDash an Neo4J are. -
compose-file
: use volume to make dashboard availabe to the neodash container at/usr/share/nginx/html/custom-dashboard.json
- set NeoDash environment variable standaloneDashboardURL to
http://10.101.202.44:5005/custom-dashboard.json
- run deployment (
docker-compose up -d
).
Expected behavior
- visit NeoDash
http://10.101.202.44:5005/
- NeoDash loads dashboard from json description
- get config.json
http://10.101.202.44:5005/config.json
- contains value for
standaloneDashboardURL
, no values forstandaloneDashboardName
andstandaloneDashboardDatabase
- contains value for
Actual behavior
- visit NeoDash
http://10.101.202.44:5005/
- NeoDash loads blank dashboard; fails to load configured Dashboard from URL
- get config.json
http://10.101.202.44:5005/config.json
-
does not contain
standaloneDashboardURL
(see Files)
-
does not contain
Investigation
- Visit
http://10.101.202.44:5005/custom-dashboard.json
from an external browser- file is accessible and retrieved.
-
docker exec -i --tty neodash sh
-
cat /usr/share/nginx/html/custom-dashboard.json
- exists
-
curl http://10.101.202.44:5005/custom-dashboard.json
inside container - works
-
- changed
standaloneDashboardURL
instandalone.env
to- include/not include
http://
- put value in single quotes
'10.101.202.44:5005/custom-dashboard.json'
- put value in double quotes
"10.101.202.44:5005/custom-dashboard.json"
- and combinations of these
- checked for typos
- include/not include
- inspect (F12 in Chrome) reveals error-message in console:
DashboardThunks.ts:160 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0')
at DashboardThunks.ts:160:22
at ReportQueryRunner.ts:137:13
-
DashboardThunks.ts:160:22
belongs toloadDashboardFromNeo4jByNameThunk
, which is the wrong function- 🤷
- Tried to host dashboard.json on a different container, spinning up two containers simultaneously the same way, different ports, didn't work.
Files
neodash.env
#Standalone Environment
standalone=true
ssoEnabled=false
standaloneProtocol=bolt
standaloneUsername=neo4j
standalonePassword=neo4j
#
standaloneHost=10.101.202.44
standalonePort=7687
standaloneDatabase=neo4j
#standaloneDashboardName=
#standaloneDashboardDatabase=neo4j
# If you do not save a dashboard inside Neo4j and would like to run a standalone mode deployment with
# a dashboard from a URL, set this parameter to the complete URL pointing to the dashboard JSON.
standaloneDashboardURL=10.101.202.44:5005/custom-dashboard.json
docker-compose.yml - left out bloating information: hostname, restart, volumes (Neo4J) [...]
version: '3'
services:
neo4j:
container_name: neo4j
image: docker.io/library/neo4j:4.4.8-community
[...]
ports:
- 7687:7687
environment:
[...]
neodash:
container_name: neodash
image: docker.io/nielsdejong/neodash:2.1.2
depends_on: neo4j
volumes:
- ./custom-dashboard.json:/usr/share/nginx/html/custom-dashboard.json
env_file:
- ./neodash.env
[...]
ports:
- 5005:5005
config.json
as retrieved by curl/visiting 10.101.202.44:5005/config.json
; formatting by me for readabilty
{"ssoEnabled": false , "ssoDiscoveryUrl": "'https://example.com'",
"standalone": true, "standaloneProtocol": "bolt ",
"standaloneHost": "10.101.202.44", "standalonePort": 7687,
"standaloneDatabase": "neo4j", "standaloneUsername": "neo4j",
"standalonePassword": "neo4j",
"standaloneDashboardName": "'My Dashboard'", "standaloneDashboardDatabase": "'neo4j'" }
blank dashboard in standalone mode
lmk if you need more information, or if someone got it working!