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

Push i18n resources to lib #1953

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
03972ea
Add documentation CI/CD (#1)
QubitPi Apr 20, 2023
ffb1c57
Do not release to npm as a fork (#3)
QubitPi May 22, 2023
7c075f3
Initiate internal doc (#2)
QubitPi Jun 6, 2023
aa77f18
Add more docs on neo4j-browser internals (#4)
QubitPi Jun 12, 2023
139aff2
Update documentation (#5)
QubitPi Jul 7, 2023
64e8a67
Document how to include both nodes and links in JSON export (#6)
QubitPi Sep 23, 2023
cea05ca
Support double-clicking canvas creates new node (#7)
QubitPi Oct 5, 2023
6b39d0f
Fetch both nodes and links unlimited in initial graph rendering (#14)
QubitPi Oct 25, 2023
33dfa9e
Make node label and properties editable inspector panel (#15)
QubitPi Oct 25, 2023
2cb1008
Support creating relationship on canvas by alt-clicking two nodes and…
QubitPi Oct 25, 2023
f743b33
Show isolated nodes in 'SELECT *' (#16)
QubitPi Oct 26, 2023
ea6d3bd
Publish graphing module to NPM (#17)
QubitPi Nov 19, 2023
565ee97
Publishing neo4j-arc requires manually bumping version (#18)
QubitPi Nov 19, 2023
f4334e3
Add documentation on neo4j-arc basic usage from outside & Support re-…
QubitPi Nov 20, 2023
dbd0c55
Notify user the required node version for running neo4j-browser (#20)
QubitPi Nov 21, 2023
a14d953
NodeInspectorPanel shows by default but can be turned-off by option (…
QubitPi Nov 21, 2023
68b63d6
neo4j-arc should be node/rel-ID agnostic (#22)
QubitPi Nov 22, 2023
de81616
Update NPM link for fork (#23)
QubitPi Nov 22, 2023
d97e8d0
Fix broken tests in order to keep in sync with upstream (#24)
QubitPi Nov 22, 2023
89e8dca
Add documentation explaining Suber (v.s. Redux) (#25)
QubitPi Nov 22, 2023
644fac9
On-canvas node creation is done by sending message only (#26)
QubitPi Nov 22, 2023
c3084d7
Rollback #14 but keep # returns unlimited (#27)
QubitPi Nov 23, 2023
b6e89d6
Document 'browser-password' (#28)
QubitPi Nov 23, 2023
9b61fba
Enhance documentation (#29)
QubitPi Nov 23, 2023
f79fb5a
Remove package-lock.json (#34)
QubitPi Nov 24, 2023
b946112
Bump browser TS version to 4.x by aligning browser TS version with ne…
QubitPi Nov 24, 2023
3931ba4
Initialize i18n support and apply it onto OverviewPane (#31)
QubitPi Nov 24, 2023
bd423e0
Enhance documentation (#35)
QubitPi Nov 24, 2023
1550c98
Push i18n resources down to neo4j-arc library
QubitPi Nov 25, 2023
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
Prev Previous commit
Next Next commit
Add more docs on neo4j-browser internals (#4)
  • Loading branch information
QubitPi committed Nov 22, 2023
commit aa77f18ccd58a9679509ab28c7363240da1d30c5
274 changes: 274 additions & 0 deletions docs/modules/ROOT/images/cql/graph-model-relationships.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
CREATE (id:`State` {
name: "id"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "id"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (labels:`State` {
name: "labels"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "labels"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (propertyList:`State` {
name: "propertyList"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "propertyList"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (propertyMap:`State` {
name: "propertyMap"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "propertyMap"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (isNode:`FixedState` {
name: "isNode"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "isNode"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (isRelationship:`FixedState` {
name: "isRelationship"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "isRelationship"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (radius:`VisualState` {
name: "radius"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "radius"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (caption:`VisualState` {
name: "caption"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "caption"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (selected:`VisualState` {
name: "selected"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "selected"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (expanded:`VisualState` {
name: "expanded"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "expanded"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (minified:`VisualState` {
name: "minified"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "minified"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (contextMenu:`VisualState` {
name: "contextMenu"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "contextMenu"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (x:`VisualState` {
name: "x"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "x"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (y:`VisualState` {
name: "y"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "y"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (fx:`VisualState` {
name: "fixed x"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "fixed x"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (fx:`VisualState` {
name: "fixed y"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "fixed y"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (hoverFixed:`VisualState` {
name: "hoverFixed"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "hoverFixed"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (initialPositionCalculated:`VisualState` {
name: "initialPositionCalculated"
});
MATCH (source), (target)
WHERE source.name = "NodeModel" AND target.name = "initialPositionCalculated"
CREATE (source)-[r:`state`]->(target) RETURN type(r);













MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "id"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "propertyList"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "propertyMap"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "NodeModel"
CREATE (source)-[r:`source`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "NodeModel"
CREATE (source)-[r:`target`]->(target) RETURN type(r);

CREATE (type:`State` {
name: "type"
});
MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "type"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "isNode"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "isRelationship"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (naturalAngle:`VisualState` {
name: "naturalAngle"
});
MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "naturalAngle"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "caption"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (captionLength:`VisualState` {
name: "captionLength"
});
MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "captionLength"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (captionHeight:`VisualState` {
name: "captionHeight"
});
MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "captionHeight"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "RelationshipCaptionLayout"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (shortCaption:`VisualState` {
name: "shortCaption"
});
MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "shortCaption"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (shortCaptionLength:`VisualState` {
name: "shortCaptionLength"
});
MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "shortCaptionLength"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "selected"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (centreDistance:`VisualState` {
name: "centreDistance"
});
MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "centreDistance"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

CREATE (arrow:`VisualState` {
name: "arrow"
});
MATCH (source), (target)
WHERE source.name = "RelationshipModel" AND target.name = "arrow"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "arrow" AND target.name = "ArcArrow"
CREATE (source)-[r:`sub-type`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "arrow" AND target.name = "LoopArrow"
CREATE (source)-[r:`sub-type`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "arrow" AND target.name = "StraightArrow"
CREATE (source)-[r:`sub-type`]->(target) RETURN type(r);










MATCH (source), (target)
WHERE source.name = "GraphModel" AND target.name = "NodeModel"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "GraphModel" AND target.name = "RelationshipModel"
CREATE (source)-[r:`state`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "GraphModel" AND target.name = "NodeModel"
CREATE (source)-[r:`expandedNodeMap`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "GraphModel" AND target.name = "NodeModel"
CREATE (source)-[r:`nodeMap`]->(target) RETURN type(r);

MATCH (source), (target)
WHERE source.name = "GraphModel" AND target.name = "RelationshipModel"
CREATE (source)-[r:`relationshipMap`]->(target) RETURN type(r);
26 changes: 26 additions & 0 deletions docs/modules/ROOT/images/cql/types.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
MATCH (n) DETACH DELETE n;

CREATE (NodeModel:`Type` {
name: "NodeModel"
});
CREATE (RelationshipModel:`Type` {
name: "RelationshipModel"
});
CREATE (GraphModel:`Type` {
name: "GraphModel"
});

CREATE (RelationshipCaptionLayout:`Type` {
name: "RelationshipCaptionLayout"
});

CREATE (StraightArrow:`Type` {
name: "StraightArrow"
});

CREATE (LoopArrow:`Type` {
name: "LoopArrow"
});
CREATE (ArcArrow:`Type` {
name: "ArcArrow"
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 7 additions & 10 deletions docs/modules/ROOT/pages/internals/graph-modelling.adoc
Original file line number Diff line number Diff line change
@@ -12,28 +12,25 @@ Neo4J Browser first defines 3 of its own language-independent models:

The node and relationship are implemented as TypeScript classes.

image:internals-graph-model.png[width=300]

== Node Modeling

https://github.com/QubitPi/neo4j-browser/blob/master/src/neo4j-arc/graph-visualization/models/Node.ts[NodeModel] models
a node/vertex in a graph. It also encapsulates styling information, such as node radius and caption text. The styling
fields of this node are all "effectively uninitialized" and will be determined later
fields of this node are all "effectively uninitialized" and will be computed later.

To initialize a node, the following information is needed
The orange nodes shown above have to be initialized through constructor.

- An unique identifier of this node. This is also the surrogate key of that node in database
- labels The name of the group under which all nodes with the same label are counted together and displayed
as a single node type on UI. The name is a bit of misleading. In Neo4J browser, a `label` is NOT the text displayed on
a node but rather the "type" of that node. This is used to distinguish the different types of node displayed on UI
- A mapping containig all node properties where the key is the propery name and value is the
property value
- propertyTypes An object that maps the property name to the data type (in string) of the propery value
Note that the "labels" are sort of mis-leading. They are actually the name of the *group* under which all nodes with the
same label are counted together and displayed as a single node type on UI (specirically on inspection panel). In Neo4J
browser, a `label` is NOT the text displayed on a node but rather the "type" of that node.

== Link Modeling

A link is modeled as a
https://github.com/QubitPi/neo4j-browser/blob/master/src/neo4j-arc/graph-visualization/models/Relationship.ts[Relationship]
in Neo4J Broswer.
in Neo4J Broswer.

== Graph Modeling

4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/operations/browser-rbac-count.adoc
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
= Node and relationship counts with role-based access control

Normally Neo4j Browser can look up node and relationship counts quickly, as they are cached in the database.
However, if role-based access control is configured (see link:https://neo4j.com/docs/operations-manual/current/authentication-authorization/access-control/[Operations Manual -> Fine-grained access control^] for more information), Neo4j counts the nodes and relationships the current user has access to on-demand, which is computationally expensive and thus potentially time-consuming.
If Neo4j Browser detects that the counts are slow, it automatically stops polling counts and instead show a button for manual refresh.
However, if role-based access control is configured (see link:https://neo4j.com/docs/operations-manual/current/authentication-authorization/access-control/[Operations Manual -> Fine-grained access control^] for more information), Neo4j counts the nodes and relationships the current user has access to on-demand, which is computationally expensive and thus potentially time-consuming.
If Neo4j Browser detects that the counts are slow, it automatically stops polling counts and instead show a button for manual refresh.

image:rbac-count.png[width=300]