Giter Site home page Giter Site logo

neo4j / neo4j-browser Goto Github PK

View Code? Open in Web Editor NEW
654.0 79.0 337.0 249.63 MB

Neo4j Browser is the general purpose user interface for working with Neo4j. Query, visualize, administrate and monitor the database.

Home Page: https://neo4j.com

License: GNU General Public License v3.0

HTML 1.72% JavaScript 1.28% CSS 3.10% Shell 0.03% TypeScript 92.44% Less 0.30% Cypher 1.12%
neo4j graph-app

neo4j-browser's Introduction

Neo4j Browser

Neo4j Browser is the general purpose graphical user interface for Neo4j. Query, visualize, administer and monitor the database with modern and easy-to-use tools.

neo4j browser screenshot

Demo

You can try out the latest (unreleased) version of Neo4j Browser at http://browser-canary.graphapp.io/.

Keep in mind that you will need to connect to an instance of Neo4j (the database) for most operations in Neo4j Browser. A simple way to get started is through Neo4j Desktop. Once you've started a database it's by default available for Neo4j Browser to connect to on localhost:7687.

Feedback & Contributing

Found a bug or some other problem with Neo4j Browser? Please open an issue.

Have an idea for a new feature? You're welcome to leave suggestions and ideas here.

Contributions welcome! More information in our CONTRIBUTING.md.

Project structure

Browser has a subproject of re-usable components bundled together and exposed as neo4j-arc. Rather than set up mono-repo tooling the we've set up eslint to isolate neo4j-arc and given it a seperate build step. Code in browser can only to import code from neo4j-arc through neo4j-arc aliases (as if it was a seperate project) and neo4j-arc is not allowed to import any code from outside it's own folder.

Development

Running Neo4j Browser locally requires Node.js (^12.4.0) and for dependencies we use yarn (npm install -g yarn). To install dependencies and then start the development server at http://localhost:8080:

yarn install
yarn start

Or to run in production mode:

yarn start-prod

Testing overview

Neo4j Browser has both unit and end to end tests running automatically on every pull request. To run the tests locally:

yarn test-unit runs a linter and then our unit tests.

yarn test-e2e runs our Cypress end to end tests in the easiest, slowest way. Running them with this command requires docker installed and that nothing else runs on ports 7687 and 8080.

Cypress e2e test suite in depth

yarn e2e-open to open the Cypress test runner (requires a fresh installation of Neo4j to run against, expects neo4j 3.5 by default). See details below on how to configure database version.

yarn e2e-local-open to run against an existing server (with a password already set). We use newpassword as the default password here, make sure to pass your password: yarn e2e-local-open --env browser-password=<your-password-here>

To avoid opening the Cypress test runner and just run the tests in the terminal, remove the "-open" suffix from the previous two commands (so yarn e2e and yarn e2e-local respectively).

So to run tests on your existing 4.2 database with the password "hunter2" without opening the Cypress visual test runner: yarn e2e-local --env browser-password=hunter2,server=4.2

All the available options for --env are:

server=3.5|4.0|4.1|4.2|4.3 (default 4.3)
edition=enterprise|community|aura (default enterprise)
browser-password=<your-pw> (default 'newpassword')
include-import-tests=true|false (default false)
bolt-url=<bolt url excluding the protocol> (default localhost:7687)

There are some additional options that can only be set as system environmental variables (meaning they cannot be set using the --env flag as the ones above). These needs to be set before the test command is run.

CYPRESS_E2E_TEST_ENV=local|null (if the initial set of pw should run or not) (default undefined)
CYPRESS_BASE_URL=<url to reach the browser to test> (default http://localhost:8080)

Example: CYPRESS_E2E_TEST_ENV="local" CYPRESS_BASE_URL=http://localhost:30000 cypress open --env server=4.2

neo4j-browser's People

Contributors

akollegger avatar alexicawright avatar apcj avatar benbc avatar bjornmagn-neo4j avatar davidegrohmann avatar eijawerner avatar eve-bright avatar fylmtm avatar herremil avatar huboneo avatar irfannuri avatar jakewins avatar jchen042 avatar jharris4 avatar joknelid avatar jsoref avatar linuslundahl avatar martin-neotech avatar nglgzz avatar noahmay avatar oskardamkjaer avatar oskarhane avatar pe4cey avatar recrwplay avatar renetapopova avatar shkirando avatar systay avatar tinwelint avatar wallin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neo4j-browser's Issues

Bug: In single-line mode up/down key recalls history when not expected

In single-line mode, the typed command can wrap into multiple lines (it is still single-line mode because pressing Enter will execute the command, and the prompt shows $, not 1 2 3).

It is natural to use the up/down arrows to move up and down the wrapped multiple lines (works fine and is an expected behavior in any normal text box). But in Neo4j browser, this recalls previously executed commands instead.

It wouldn't be so bad, if the browser saved the command I was editing (not yet executed), and I could recall the draft command by pressing the arrow in the opposite direction. But this is not the case. Often I have been really frustrated because I am editing a draft command and I (naturally) press an up/down key to move the cursor from line to line, but suddenly the whole command is gone and replaced with a previously executed command.

And the draft command is really gone, there's no way to get it back. I have to type out the command all over again. It's really frustrating especially when I had done a lot of edits, and suddenly they are all lost.

Ideally:

  1. Drafted commands must be saved automatically and we should be able to recall them by moving past the end of history.
  2. Moving cursor between lines in wrapped single-command mode must be supported. Only when I'm at the top line, and I press Up should it recall history. Otherwise, no! I don't expect history. I expect to be able to move the cursor around.
  3. Adding to last point, being at the bottom line and pressing Down should not clear the text box.

Guides: play-topic URLs converted to all lowercase

I've created a guide that contains the following HTML:

<a play-topic="http://neo4j.het.io/guides/rep/DB00341/DOID_2841.html">Does Cetirizine treat asthma?</a>

In Neo4j 3.0.2, when I click to play, the following command is executed:

:play http://neo4j.het.io/guides/rep/db00341/doid_2841.html

This fails with a HTTP Status: 404 - Not Found / No such topic to play. error. The issue is that the URL is invalid since it was converted to lowercase.

I suspect the to lowercase functionality makes sense for making builtin guides, such as :play cyPhER, case agnostic. However, it's problematic if the guide is a URL where case is critical.

Setting AUTO-COMPLETE to OFF by default

I have created several guides that help users explore my network from the Neo4j Browser. However, the queries are designed to render with AUTO-COMPLETE set to OFF (only relationships that were queried get displayed). Is there a query- or database-level setting to turn the default AUTO-COMPLETE behavior to OFF?

I would also like to raise some arguments in favor of defaulting to OFF in future releases:

  • it's confusing to get relationships that were not queried.
  • the browser can get bogged down by excessive relationships in a dense graph.

AUTO-COMPLETE is a great feature, but I think it makes the most sense as an option that the user explicitly enables upon request.

Save state of graph layout in neo4j web interface.

From @pumplerod on December 14, 2012 17:54

It would be a HUGE help to be able to save the positional state of nodes in the visualization graph.

I often write queries to change parameter values and because the values do not update I have to refresh the graph which causes everything to scramble again.

What I'd love is to assemble nodes into a layout that works for me and then lock those nodes down so that when I refresh the only thing to change would be the label and parameter values.

Copied from original issue: neo4j/neo4j#371

websocket port can not change

websocket port defaults to 7687, I can not change it.

neo4j.conf

dbms.connector.bolt.address=0.0.0.0:8687

console log

WebSocket connection to 'ws://x.x.x.x:7687/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

Playing guides from URL fails despite CORS being enabled

I am trying to play guides from URLs in the Neo4j 3.0.1 Community browser.

The specific browser command I am using to troubleshoot is:

:play https://gist.githubusercontent.com/dhimmel/83829c940d1b118af775c8e9ac6746a1/raw/81c93e06b168f70da8511b9109a170ee636ed23d/clofarabine-MS.html

Prior to setting browser.remote_content_hostname_whitelist=* in conf/neo4j.conf, I was getting the following error as expected:

Requested host is not whitelisted in browser.remote_content_hostname_whitelist.

However, now that I have whitelisted all remote content hosts, I get the following error:

No 'Access-Control-Allow-Origin' header is present on the requested resource and can therefore not be played.

However, the URL I'm playing the guide from appears to include Access-Control-Allow-Origin:* in its response header. Hence, I think we may have a bug on our hands.

CCing @jexp who first mentioned guides to me.


Note: I originally posted this issue on the neo4j/neo4j but am now moving it here. Hence, this post closes neo4j/neo4j#7227.

Feature request: Create connections in the console using the mouse

From @Joshfindit on October 23, 2015 2:55

If drag-and-drop is functional:

  • Clicking on a node, then dragging to another node shows an indicator that there will be a connection (for example, a low-opacity connection arrow)
  • On mouse release, a dialog comes up for a label.
  • When enter is pressed in the dialog, the connection is made with the dialog entry as the label

If drag-and-drop is not functional:

  • Clicking on a node selects it
  • Clicking on a node while pressing a modifier key brings up a dialog that asks for a label
  • When enter is pressed in the dialog, the connection is made with the dialog entry as the label

In both cases, the user would expect that the connection is one-way starting with the first node, and directed at the second node.

Copied from original issue: neo4j/neo4j#5713

(feature request) Browser: import/export queries

From @mindrones on February 5, 2015 19:14

Import

  • Instead of dragging files from the file explorer/finder, it would be more practical to have a button "Import" that opens a classical file selector. This would avoid finding the Finder window, move it a bit, then drag the files.
  • It would be nice to import a whole folder, maybe constraining the permitted files to a certain extension? (.cql?)

Export

  • It would be useful to be able to export single queries to file just by pressing a export button, which would open a file selector where we can navigate a folder and set a name for this export file.

  • if this gets implemented, it would also be useful to export a favorites "folder" as:

    • a single .cql containing all queries, OR
    • a file per query

    In this second case, a convention could be that if queries start with a comment then we use that as file title.

    Example

    Query:
    // find all animals
    match (n:animal) return n

    Automatic filename:
    find_all_animals.cql

Copied from original issue: neo4j/neo4j#3947

Export self contained interactive html page of result set.

From @chrisgogreen on December 25, 2013 17:27

I want to send the results of a Cypher query in visual form to a team member. If in addition to the current csv export we could download a zip archive with the files: index.html, styles.css, scripts.js, data.json all tied together so the user can just open the index.html and explore the data with a subset of features from the browser. Currently I just screen-print the graph results which doesn't allow viewing properties or changing the css.

Copied from original issue: neo4j/neo4j#1761

populate data browser query field from url

From @collin on January 22, 2015 20:5

For debugging purposes it'd be great to be able to log out a url like...

http://neo4jhost:7474/browser/?query=MATCH (n:Label)-[:relationship]->(m:label {property:'value'} return n, m

And be able to just open that url in a browser and have the data browser automatically run that query.
Would that be easy to implement in the data browser?

Copied from original issue: neo4j/neo4j#3861

Feature request: Allow parameterization in browser

A Neo4j browser query might look like this:

CREATE (n:person {name: "Joe Smith"})

However, Neo4j queries sent through the API usually look like this, because of the advantages of parameterization:

CREATE (n:person {name: {x}}) {x: "Joe Smith"}

I don't think the neo4j browser supports this format, so queries from an application have to be rewritten for the browser. Could support for parameterized queries be added? Thanks.

Saved Scripts in Web UI Issue

From @edschembor on July 22, 2014 0:29

So I'm not sure if this would could as a feature request or an issue.

If you run a saved script in the Web UI and then cntrl-up to grab it from your history of searches, it no longer appears as a saved search. ie) the star is no longer gold and saving it creates a copy as opposed to overwriting.

Pretty new to Neo4j, but I want to get involved with development so I'll try to look into the issue myself

Copied from original issue: neo4j/neo4j#2713

Backticks not escaped in auto-generated statements

Sometimes node labels or relationship names may contain characters which need to be escaped before being sent to the server. Browser automatically creates queries when I click on the label name or relationship type in the "Database Infromation" drawer. Looks like all the characters in the auto-generated queries are being escaped properly except backticks.

URI as CSS class doesn't work

From @zazi on April 10, 2015 14:26

In our project we write RDF into neo4j. We utilise RDF types as labels in neo4j. All RDF types are URIs. Since neo4j 2.2.0 the graph rendering in the web interface changed a bit, i.e., now you are fully utilising the labels as CSS classes, but, e.g.,

node.http://d-nb.info/standards/elementset/gnd#Gods

doesn't work, i.e., now I cannot manipulate the displaying node caption anymore, since I do not produce valid CSS with URIs as CSS classes. The URI grammar (syntax; https://tools.ietf.org/html/rfc3986) is not valid to the CSS class grammar (syntax; http://dev.w3.org/csswg/css2/syndata.html).

Copied from original issue: neo4j/neo4j#4413

Query returns lots of nodes but no relationships - nothing visible

From @kenahoo-windlogics on December 29, 2014 22:55

In the neo4j browser, the following query returns "797 nodes, 796 relationships", and all are visible in the graphical output:

MATCH (a {id:"08363_A"}) WITH a MATCH a-[:CONNECTS_TO*..28]->b RETURN a, b;

However, the same query with 1 more degree of separation allowed returns "804 nodes, 0 relationships" and nothing at all is visible in the output:

MATCH (a {id:"08363_A"}) WITH a MATCH a-[:CONNECTS_TO*..29]->b RETURN a, b;

Both queries return quite fast.

Is this a known bug? I'm using Neo4j Community edition, v2.1.6, and Chrome 39.0.2171.95 (64-bit), both on a single Ubuntu 14.10 machine.

Copied from original issue: neo4j/neo4j#3735

Browser: Ability to export saved scripts

From @edschembor on January 11, 2015 4:24

If I understand correctly, the saved scripts in the browser are saved locally on the clients web browser. Are there any plans for a method to export selected saved scripts so that a bunch of them could be easily imported to another web browser? Or is the main method for doing so still manually moving them? (see http://stackoverflow.com/questions/23966160/neo4j-export-cypher-scripts-from-localhost7474-frontend-how-to)

Thanks!

Copied from original issue: neo4j/neo4j#3781

Browser: GRASS can get rearranged if the Label hierarchy is changed after style changes have been made in the Browser

From @Joshfindit on February 10, 2016 19:17

To reproduce:

  1. Start with each node type having it's own label (3-4 is helpful).
  2. Populate the database and return the graph.
  3. Change the styles for each node.
  4. Dump the database.
  5. Change the nodes to be Subclasses. Add a root class.
  6. Populate the database and return the graph.
  7. Change the style for the root class. Notice that it's subclassed nodes have changed style.
  8. Change the style for the subclassed nodes: they are now overridden.

GRASS can get rearranged.example.md.txt

Copied from original issue: neo4j/neo4j#6402

Create relationship between nodes via the neo4j web browser

From @thomasfr on February 25, 2014 15:42

At the moment it is not possible to create a single relationship from one node to another from within the neo4j web browser without cypher.
One possibility to do this would be to add marker when one hovers over a node. When clicking on this marker, all other visible nodes also get this marker added. after clicking on one of these markers the relationship type has to be entered. After pressing enter the relationship gets created and the corresponding cypher query gets displayed in the browser console.

Copied from original issue: neo4j/neo4j#2045

Graph Visualization Styles: Support {propertyName} template in Icon URL

From @lassewesth on November 12, 2012 13:23

@ceefour: 'Thank you for adding Graph Visualization to Neo4j Web Admin !

Most of our graph nodes contain information about picture/photo of the node.

It would be great if we can specify Icon URL just like title, e.g.

http://dav.berbatik.com/person/t/{photoId}_t.jpg

Which would take the Icon URL from the URL specified by the template including the photoId property of the node.'

Copied from original issue: neo4j/neo4j#91

Configuring a Neo4j Browser with a default custom GRASS style

I've created a public read-only instance of our Neo4j database at http://neo4j.het.io/ (thanks @jexp for the help). I'd like to have a custom GRASS style applied to every browser instance by default.

On StackOverflow @ikwattro mentioned that:

The style is set in the browser local storage, I'm afraid all users will have to issue the :style command.

So I could always instruct users to run:

:style https://raw.githubusercontent.com/dhimmel/hetionet/383152be2c07f8f5427dd7069535c82b0c5e8d85/hetnet/neo4j/graphstyle.grass

Is there an automated workaround, so users don't have to execute this command? If not, then I'd like suggest a feature request to couple a specific Neo4j database with a custom style. It seems like styles make sense on a per database level, rather than a per browser level. Or perhaps on a per database per browser level, but with a database default.

(feature request) Browser: query assistant

From @mindrones on January 27, 2015 8:41

When writing clauses in the browser "shell" I'd like be able to autocomplete clauses pressing TAB:

  • type MA
  • press TAB
  • completes to MATCH

Possibly keeping the current capitalization (ma + TAB => match, MA + TAB => MATCH)

Copied from original issue: neo4j/neo4j#3876

Browser unable to show relationships in the graph under "Database Information" drawer

If the relationship has a " (double quote) in its name then the browser is unable to show the relationships under the database information drawer.
This is happening because broser is unable to parse the data returned by /db/data/relationship/types to a JSON since the double quotes in relationship types are not escaped before sending to the client.
The same thing DOES NOT happen with node labels.

Timeout for large LOAD CSV

From @jmatsushita on June 6, 2014 17:41

Hi there,

I'm trying to launch this cypher query.

LOAD CSV FROM 'https://raw.githubusercontent.com/iilab/openoil/master/data/BP%20Dataset%202014.05.28%20%28Full%20AR2013%20Scrape%20-%20edited%29%20-%20Sheet1.csv' AS line
MERGE (c:Company { name: line[0], ID: line[6], sourceURL: line[7], sourcePubDate: line[9]})
MERGE (p:Company { name: line[2]})
MERGE (j:Country { name: line[4]})
MERGE (conf:Confidence { level: line[8]})
MERGE (c)-[dir:DIRECT { immediate: line[1]}]->(p)
MERGE (c)-[jur:JURISDICTION]->(j)
MERGE (c)-[con:CONFIDENCE]->(conf)

Both on a local and server install it sometimes gets stuck on 'Executing query' and the spinner, and sometimes displays 'Unknown Error'.

See screen shot below where it worked after trying 3 times then failed again.

image

Since it succeeded after 42 seconds on that 4th time, it's probably a timeout or memory issue but the error message is not helping. Is there a server configuration that could help?

Cheers,

Jun

Copied from original issue: neo4j/neo4j#2525

Performance with big amounts of data returned per row

from 3.0.0's browser: getLineFromRow is freezing up the UI when I return very large rows. It seems like this might need some optimization. Alternatively, I don't even use the text tab--perhaps this could be lazily populated instead of holding me up from seeing my results?

cpu-profile

Browser: hover text to explain icons in :sysinfo output

From @mbyrne00 on January 27, 2016 3:13

:sysinfo or :play sysinfo has icons and different background colours in the Cluster section. It would be nice if you could see a quick description of what these meant when you hover your mouse over them.

Also the (i) icon links to a neo4j documentation page on Architecture with no documentation on the meaning of the cluster output.

Examples:

  • Hammer means master node
  • Tick vs status smiley face ... what's the difference? What other options are there?
  • Background turns yellow when the node isn't ready
  • Any more??

This may be documented somewhere but I haven't been able to find it - either way it would be nice to have some contextual help.

Copied from original issue: neo4j/neo4j#6308

Web UI navigator issues with large data sets

From @Vramin on March 18, 2014 18:48

The web UI seems to be broken on the 2.0.1 and the 2.1.0.M01 releases. The label names highlight, but clicking them gets no response. I'm on OS X 10.8.5, seeing the same behavior with both Chrome and Safari. My 2.0.0 instances still work fine, but I was trying to use the newer versions with my newer graphs and it isn't working. In Safari the labels don't even highlight on mouseover, but they do in Chrome. Using the community version.

Copied from original issue: neo4j/neo4j#2134

Allow multiple post-connect commands in neo4j.conf

Pull request #152 enabled auto-executing a command when opening a new Browser. The command is specified in neo4j.conf using the browser.post_connect_cmd setting. It would be nice to be able to specify multiple commands that would become multiple frames.

My current use case is:

  1. auto-applying a style (see #171)
  2. auto-playing a guide describing our network

I also plan to make use of the URL parameter API to play a guide on load (like http://neo4j.het.io/browser/?cmd=play&arg=cypher, see #153). However, these features differ in scope, I just wanted to mention the URL parameter API, which may suit some needs.

Add support to refresh a query result frame

It would be awesome if there was a way to refresh the result of a query instead of having to reload the query in the editor, run it, and possibly close the previous result frame.

Graph Style Sheet doesn't support attribute selectors styling

From @liudonghua123 on January 6, 2015 2:44

In Neo4j's browser graph visualization, graph style sheet only supports tag and tag.class selector, multiple chained class like "tag.class1.class2" is not support(see neo4j/neo4j#2112), I think attribute selectors is more important than multiple chained class.
For example, we can use the following to distinguish person of different gender.
node.Person[gender="male"] {
......
}
node.Person[gender="female"] {
......
}
And we could highlight the 1980s movies via
node.Movie[released^="198"] {
......
}

For more attribute selectors example, see http://www.w3schools.com/css/css_attribute_selectors.asp

Copied from original issue: neo4j/neo4j#3751

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.