The recommended steps to generate a configuration are described below:
Please ensure that your Neo4 server is running.
Set the configuration for your server and run a test to check that the REST API is accessible.
The test will just try to access the service root and return the neo4j_version.
See Securing access to the Neo4j Server documentation for more info.
In case of error, only the "ERROR" status is displayed, to get more details you can look in the browser console for network messages.
Click on the "Load labels from server" button to retrieve the list of labels defined on your Neo4j server.
A request is sent to the databse to get the labels and the list of attributes.
Depending on the server level two different strategies are used:
For version 2.2 and upper the following query is run to retrieve all the labels and their attribute:
match (n) unwind(labels(n)) as labels unwind(keys(n)) as keys return distinct(labels) as labels, collect(distinct keys) as keys
For older versions a first request is sent to the REST API to get the list of labels, then for each label the list of attributes is based on the first node instance found.
This option can run faster on big database but can miss some attributes as only one instance object for a given label is used to get the attribute list. Use "Force old version" option to use this method on recent servers.
Once the labels have been loaded you can change the default settings:
Defines whether or not this label is required.
If set to Hide, the label is ignored and nothing will be generated in the source file for the label.
Defines the attribute used to identify a node. This attribute is used in generated Cypher query to match the selected value.
In most case an ID or a unique value should be used here, but any attribute can be used.
For example if you use person last_name all the person with the same last name will be considered as the same value and the node is displayed only once in graph.
Defines the list of attributes available for this labels.
Defines the attribute to use to display a label for nodes in graph.
Defines the rendering type for the nodes in graph.
It can be one of the following types: Text, Image or SVG.
Depending on this type a full working example will be generated in source code you can customize and modify to fit your application.
The Source code section contains two buttons, one to test the application with the current configuration and one to Generate the full index.html file you can copy and paste in your Popoto.js instance.