Graph Style Script sharing (Enterprise)
Graph Style Script (GSS) sharing is a feature introduced in Lab 3.0, allowing users to share Graph Style Script among team members.
The Lab utilizes remote storage to securely store the scripts, ensuring sensitive information is protected and allowing easier collaboration.
Enterprise: GSS sharing requires a Memgraph Enterprise license to function. For more information on Memgraph Enterprise and instructions on how to enable it, refer to the enabling Memgraph Enterprise documentation.
Environment: GSS sharing is available exclusively when the Lab is started in a Docker environment.
How to set it up
For GSS sharing to function, the Lab requires a remote storage connection where GSS will be saved. Remote storage should be a new Memgraph instance or a new Memgraph database in a multi-tenant environment.
Having remote storage enables users to connect from different browsers to the same instance of Lab to see the same Graph Style Scripts.
This setup also allows administrators to connect to Memgraph, which acts as a remote storage, and access all users and Graph Style Scripts. Administrators can also perform migrations. It is essential to set up authentication and role-based permissions in Memgraph used as remote storage for the Lab to ensure data security.
Managing GSS in Lab
The Lab provides robust functionality for managing GSS, allowing users to create, save, and share styles for graph visualization. With the introduction of remote storage for GSS, users now have the flexibility to combine in-browser GSS with remote storage, tailoring their workflow to suit individual or team needs.
Understanding storage options for GSS
In-browser storage
In-browser Graph Style Scripts are stored locally in the user’s web browser. These scripts are accessible only within the same browser and on the same device where they were created or saved.
Key features of in-browser GSS:
- Save custom GSS: Users can create and save GSS directly in their browser.
- Load saved GSS: Any GSS saved in the browser can be loaded for use at any time.
- System default script: Load the system-provided default script for graph visualization.
- Custom default script: Designate any custom GSS as the default script to override the system default for that browser instance.
Limitations:
- In-browser Graph Style Scripts are device and browser-specific. They cannot be accessed from other devices or browsers.
Remote storage
Remote storage for GSS is a feature available as part of the Enterprise license. This option allows users to save Graph Style Scripts in a centralized storage system, enabling access from any device or browser connected to the same Lab instance.
Key features of remote storage GSS:
- Save and share GSS - Store GSS in the remote storage with
flexible sharing permissions:
- Private: Visible only to the creator.
- Public: Accessible to any authenticated user connected to the same Lab instance.
- Edit shared scripts: Creators of a shared GSS can update its name, code, and privacy settings.
- Copy to in-browser storage: Users can copy a remote GSS to their browser storage, particularly useful for setting up a system default script.
Benefits:
- Centralized access to GSS from any location or device.
- Collaboration through shared scripts while maintaining privacy controls.
Combining in-browser and remote storage
The Lab enables seamless integration of in-browser and remote storage, allowing users to:
- Use local and shared scripts: Access GSS stored locally in the browser alongside shared scripts from remote storage.
- Switch between storage types: Decide whether to save and retrieve GSS locally or from the remote storage based on accessibility and collaboration needs.
- Copy scripts across storages: Transfer a remote GSS to in-browser storage or vice versa, depending on the workflow.
Workflow examples
Individual workflow (in-browser focused):
- A user creates a custom GSS in their browser for personal use.
- The script is saved locally and set as the default for all graph visualizations in that browser.
- If the user moves to a new device, they will need to recreate or copy the script manually.
Collaborative workflow (remote storage focused):
- A team member creates a shared GSS in remote storage and sets it as public.
- Other authenticated users can access and use the script from their devices.
- The script’s creator updates it as needed, ensuring consistency across the team.
Hybrid workflow:
- A user saves a GSS in remote storage for collaboration.
- For personal tweaks, they copy the shared GSS to their in-browser storage and set it as the default on their device.
- The user can switch between the remote and local versions depending on the context.