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

add explorer doc #722

Merged
merged 10 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
29 changes: 29 additions & 0 deletions docs-2.0/nebula-explorer/about-explorer/ex-ug-what-is-explorer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 什么是Nebula Explorer

Nebula Explorer (简称 Explorer)是一款可以通过 Web 访问的图形探索可视化工具,搭配 Nebula Graph 内核使用,用于与图形数据进行可视化交互。即使没有图数据操作经验,用户也可以快速成为图专家。

!!! enterpriseonly

Explorer 仅在企业版提供。

## 适用场景

Explorer 适用于使用 GUI 工具进行图探索,支持可视化展示图数据。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

## 产品优点
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

- 灵活性强:支持通过 VID 、 Tag 、 Subgraph 等方式查询数据。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

- 便于筛选:支持自定义筛选条件对当前节点进行灵活筛选。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

- 易于使用:不需要复杂环境即可使用,可视化页面便于用户轻松实现图探索。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

- 展示多样:支持层次图( dagre )、力导向图( force )、环形图( circular )的方式对查询的数据进行展示。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

## 身份验证

Nebula Graph 默认不启用身份验证,一般情况下用户可以使用默认账号和密码(`user` 和 `password`)登录 Studio。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

Nebula Graph 启用了身份验证后,用户只能使用指定的账号和密码登录 Explorer。

关于 Nebula Graph 的身份验证功能,参考 [Nebula Graph 用户手册](../7.data-security/1.authentication/1.authentication.md "点击前往 Nebula Graph 官网")。
43 changes: 43 additions & 0 deletions docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 连接数据库

对于 RPM 安装的 Explorer ,在成功启动 Explorer 后,用户需要配置连接 Nebula Graph。本文主要描述 RPM 安装的 Explorer 如何连接 Nebula Graph 数据库。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

## 前提条件

在连接 Nebula Graph 数据库前,用户需要确认以下信息:

- 已经安装了 Explorer 。详细信息参考 [部署 Explorer](ex_ug_connect.md)。

- Nebula Graph 的 Graph 服务本机 IP 地址以及服务所用端口。默认端口为 `9669`。

- Nebula Graph 数据库登录账号信息,包括用户名和密码。

!!! Note

如果 Nebula Graph 已经启用了身份验证,并且已经创建了不同角色的用户,用户只能使用被分配到的账号和密码登录数据库。如果未启用身份验证,用户可以使用默认用户名(`user`)和默认密码(`password`)登录数据库。关于启用身份验证,参考 [Nebula Graph 用户手册](../../README.md "点击进入 Nebula Graph 用户手册")。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

## 操作步骤

按以下步骤连接 Nebula Graph 数据库:

1. 在 Explorer 的 **配置数据库** 页面上,输入以下信息:

- **Host**:填写 Nebula Graph 的 Graph 服务本机 IP 地址及端口。格式为 `ip:port`。如果端口未修改,则使用默认端口 `9669`。

!!! Note

即使 Nebula Graph 数据库与 Explorer 部署在同一台机器上,用户也必须在 **Host** 字段填写这台机器的本机 IP 地址,而不是 `127.0.0.1` 或者 `localhost`。

- **用户名** 和 **密码**:根据 Nebula Graph 的身份验证设置填写登录账号和密码。
- 如果未启用身份验证,可以填写默认用户名 `user` 和默认密码 `password`。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved
- 如果已启用身份验证,但是未创建账号信息,用户只能以 GOD 角色登录,必须填写 `root` 及对应的密码 `nebula`。
- 如果已启用身份验证,同时又创建了不同的用户并分配了角色,不同角色的用户使用自己的账号和密码登录。

![Nebula Graph Explorer 的登录页面](../figs/ex-ug-002.png "配置数据库")

2. 完成设置后,点击 **连接** 按钮。
如果能看到如下图所示的界面,表示已经成功连接到 Nebula Graph 数据库。

![Explorer 进入控制台页面,表示成功连接到 Nebula Graph](../figs/ex-ug-003.png "Nebula Graph 连接成功")

一次连接会话持续 30 分钟。如果超过 30 分钟没有操作,会话即断开,用户需要重新登录数据库。
71 changes: 71 additions & 0 deletions docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 部署 Explorer

本文介绍如何在本地通过 RPM 部署 Explorer。

## 前提条件

在部署 Explorer 之前,用户需要确认以下信息:

- Nebula Graph 服务已经部署并启动。详细信息,参考[Nebula Graph安装部署](../4.deployment-and-installation/1.resource-preparations.md "点击前往 Nebula Graph 安装部署")。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

!!! Note

用户可以使用Docker Compose或RPM方式部署并启动 Nebula Graph 服务。如果刚开始使用 Nebula Graph,建议使用 Docker Compose 部署 Nebula Graph。详细信息参考 [使用 Docker Compose 部署 Nebula Graph](../../2.quick-start/2.deploy-nebula-graph-with-docker-compose.md "点击前往 GitHub 网站")。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

- 确保在安装开始前,以下端口处于未被使用状态。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

| 端口号 | 说明 |
| ---- | ---- |
| 7000 | Explorer 提供的 web 服务 |
| 8070 | Nebula-http-gateway 的 HTTP 服务 |
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

## 安装

1. 根据需要选择并下载 RPM 包,建议选择最新版本。常用链接如下:
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

| 安装包 | 检验和 | Nebula Graph内核版本 |
| ----- | ----- | ----- |
| [nebula-graph-explorer-{{ explorer.base100 }}-1.x86_64.rpm](https://oss-cdn.nebula-graph.com.cn/nebula-graph-explorer/nebula-graph-explorer-{{ explorer.base100 }}-1.x86_64.rpm) | [nebula-graph-explorer-{{ explorer.base100 }}-1.x86_64.rpm.sha256](https://oss-cdn.nebula-graph.com.cn/nebula-graph-explorer/nebula-graph-explorer-{{ explorer.base100 }}-1.x86_64.rpm.sha256) | 2.0.1 |
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

2. 使用`sudo rpm -i <rpm>`命令安装RPM包。

例如,安装 Explorer 1.0.0 版本需要运行以下命令:
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

```bash
$ sudo rpm -i nebula-graph-explorer-1.0.0-1.x86_64.rpm
```


## 卸载

用户可以使用以下的命令卸载 Explorer 。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

```bash
$ sudo rpm -e nebula-graph-explorer-1.0.0-1.x86_64.rpm
```

## 异常处理

如果在安装过程中自动启动失败或是需要手动启动或停止服务,请使用以下命令.
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

- 手动启动服务

```bash
$ sudo sh ./scripts/start.sh
```

- 手动停止服务

```bash
$ sudo sh ./scripts/stop.sh
```

## 后续操作

启动成功后,在浏览器地址栏输入 `http://ipaddress:7000`。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

如果在浏览器窗口中能看到以下登录界面,表示已经成功部署并启动 Explorer。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

![Nebula Graph Explorer 登录页面](../figs/ex-ug-001.png)

进入 Explorer 登录界面后,用户需要连接 Nebula Graph。详细信息,参考[连接数据库](ex-ug-connect.md)。
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 清除链接

Explorer 还连接在某个 Nebula Graph 数据库时,在工具栏中,选择 设置 ![icon](../figs/nav-setup.png) > 清空连接,如下图所示:
![清除链接](../figs/ex-ug-004.png)

之后,如果浏览器上显示 **配置数据库** 页面,表示 Explorer 已经成功断开了与 Nebula Graph 数据库的连接。

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-006-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-011.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-012.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-015.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-017.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-018.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-019.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-020.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/ex-ug-022.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-2.0/nebula-explorer/figs/nav-Revoke.png
Binary file added docs-2.0/nebula-explorer/figs/nav-delete.png
Binary file added docs-2.0/nebula-explorer/figs/nav-deleteReverse.png
Binary file added docs-2.0/nebula-explorer/figs/nav-graphSpace.png
Binary file added docs-2.0/nebula-explorer/figs/nav-help.png
Binary file added docs-2.0/nebula-explorer/figs/nav-query.png
Binary file added docs-2.0/nebula-explorer/figs/nav-setup.png
Binary file added docs-2.0/nebula-explorer/figs/sidebar-unfold.png
23 changes: 23 additions & 0 deletions docs-2.0/nebula-explorer/operation-guide/ex-ug-canvas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 画布操作

本文主要介绍画布中的操作。

## 查看点边

用户可以移动鼠标到点和边上,详细查看点和边的数据。以下展示 VID 为 `103` 的点的详细信息:
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

![vertex_details](../figs/ex-ug-019.png)

## 选中操作
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

用户可以按住左键拖拽框选多个点和边,或是按住 **Shift** 选中多个点和边,对选中的点和边进行操作。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

![select](../figs/ex-ug-021.png)

## 快速操作

用户可以选择一个或多个点和边,在空白处点击右键可以进行对点进行扩展、查找两个点之间的路径、查看属性等等的操作。如果用户只选中一个点,不能查找共同邻居和路径查询。如果用户只选中一条边,只能查看这条边的属性。

点击适合选中尺寸可以将选中的数据,移动到画布的中心,方便用户查看。
foesa-yang marked this conversation as resolved.
Show resolved Hide resolved

![quick](../figs/ex-ug-022.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 图探索拓展

图探索拓展分为以下四类:

- 拓展
- 共同邻居
- 路径查询
- 查看属性

## 拓展

用户可以双击某一点,对该点进行拓展。也可以框选画布中的多个点,在如下操作栏中修改边类型,选择边的流入流出方向,修改点的颜色,规定拓展步数和自定义过滤条件。

![expand](../figs/ex-ug-013.png)

## 共同邻居

用户可以选中画布中的两个点,查询两点的共同邻居。选中多个点并查询共同邻居时,默认返回 **没有相应数据** 。

![common_neighbor](../figs/ex-ug-014.png)

## 路径查询

用户可以选中画布中的两个点,默认框选的第一个点为起点,第二个点为终点。用户可自定义边的类型和方向,规定拓展步数,选择查询以下三种路径: `All path`,`Shortest path` 和 `Noloop path`。

![find_path](../figs/ex-ug-015.png)

## 查看属性

用户可以在选择画布中展示或隐藏,点的属性或边的属性。

![show_property](../figs/ex-ug-016.png)
73 changes: 73 additions & 0 deletions docs-2.0/nebula-explorer/operation-guide/ex-ug-page-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 页面概览

本文主要介绍 Explorer 的主页面。

## 概览

![Explorer](../figs/ex-ug-006-1.png)
Explorer 的主页面分为五个部分:

- 标签栏
- 侧边栏
- 画布
- 缩略图
- 关系列表

## 标签栏

- 导出图形:支持导出当前视图的 CSV 文件或图片(SVG)文件。

## 侧边栏

侧边栏包括四个部分,用户可以点击按钮对图进行探索、修改画布上点的内容等等。

- 查询探索:在进行探索之前,用户需要在查询数据并显示在画布中。

- 图探索拓展:包括对点的拓展、查找两个点的共同邻居、查找两个点的路径、显示属性切换等功能。

- 删除及撤销:对画布中显示的数据删除、撤回上一步操作。

- 设置和帮助:切换图空间、查找帮助、修改设置等。

### 查询探索

- 开始:单击 ![query](../figs/nav-query.png)图标,通过VID、Tag和子图,查询数据并显示到页面上。

### 图探索扩展

- 拓展:单击 ![expand](../figs/rightclickmenu-expand.png)图标,选择页面上的节点并进行自定义拓展,包括拓展方向、拓展步数、过滤条件等。
- 共同邻居:单击 ![commonNeighbor](../figs/rightclickmenu-commonNeighbor.png)图标,选择页面上 2 个点并查看它们的共同邻居。
- 路径查询:单击 ![findPath](../figs/rightclickmenu-findPath.png)图标,可以查询起点到终点之间的 `all paths` 、 `Shortest path` 或者是 `Noloop path` 的路径。
- 查看属性:单击 ![propertyView](../figs/nav-propertyView.png)图标,选择是否显示画板中的点或边的属性值。

### 删除及撤销

- 删除:单击 ![delete](../figs/nav-delete.png)图标,可以删除画板中选中的点。
- 反向删除:单击 ![deleteReverse](../figs/nav-deleteReverse.png)图标,可以删除画布中未选择的所有点。
- 撤销:单击 ![Revoke](../figs/nav-Revoke.png)图标,撤销上一步操作。

### 设置及帮助

- 选择图空间:单击 ![graphSpace](../figs/nav-graphSpace.png)图标,切换当前图空间。
- 帮助:单击 ![help](../figs/nav-help.png)图标,查看更多信息。
- 设置:单击 ![setup](../figs/nav-setup.png)图标,可以查看用户名和快捷键、修改语言设置、清除 Explorer 链接等。
## 画布

画布主要分为:

- 图:显示通过VID、Tag或子图查询的数据。

- 点边概览:默认隐藏,在当前画布选中点和边时才显示。点击()图标,用户可以打开菜单,查看当前子图中选中的点和边的详细数据。

## 缩略图

用户可以通过缩略图上的按钮,完成图模式的切换,全屏展示画布中的图,移动、放大、缩小画布,收起缩略图等。同时在缩略图的左下角显示了画布中的图占总图的百分比。

- 图模式切换:用户可以切换画布中图的展示模式。

| 图标 | ![force](../figs/Thumbnail-graphView.png) | ![dagre](../figs/Thumbnail-treeView.png) | ![circular](../figs/Thumbnail-sphereView.png) |
| ---- | ---- |----| ----|
| 展示模式 | force(力导向图) | dagre(层次图) | circular(环形图) |
## 关系列表

点击右侧的 ![unfold](../figs/sidebar-unfold.png)图标,用户可以打开菜单,查看画板中 Tag 和 Edge 的数量、搜索 Tag 和 Edge ,同时也支持修改点的颜色和图标。
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 查询探索

在 Explorer 中,用户可以选择以下查询方式,展示数据:

- VID 查询
- Tag 查询
- 子图查询

## VID 查询

用户可以通过输入VID或者生成VID的数据查询,一行仅支持一个数据。同时也支持随机导入数据和文件导入数据。确认添加后,数据会显示在画布中。以下给出示例:

![VID](../figs/ex-ug-009.png)

## Tag 查询

基于 Tag 查询,必选值为 Tag 和索引。用户可以对输出的结果进行数量上的限制和结果进行过滤。以下查询 10 个年龄大于 30 岁,且不等于 40 岁的球员,示例如下:
![Tag](../figs/ex-ug-011.png)

## 子图查询

基于子图查询,必选值为 VID 。用户可以查看一个或多个点的子图,支持规定子图的步数、边类型及流入流出的方向。以下给出 VID 值为 101 ,步数为 4 ,边类型为 server 和 like 的入边的示例:
![Query](../figs/ex-ug-012.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 关系列表

用户可以在关系列表中,选中点和边。选中 Tag 为 `bachelor` 和 `player` 的 6 个点,选中 Edge 为 `serve` 的 5 条边,示例如下:

![select](../figs/ex-ug-017.png)

同时,用户可以修改 Tag 的颜色和图标,使得关键节点更为突出。

在默认情况下,Tag 完全相同的 VID 点的颜色相同,并且也支持手动修改一个点或一组 Tag 完全相同的点的颜色。例如标签为 `bachelor` 和 `player`的点,修改其中一个点的颜色,在关系列表中你可以点开查看,示例如下:

![icon](../figs/ex-ug-018.png)
12 changes: 12 additions & 0 deletions docs-2.0/nebula-explorer/operation-guide/ex-ug-shortcuts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 快捷键

本文列出了 Explorer 支持的快捷键。

| 操作 | 说明 |
| :-- | :--|
| Shift + 'Enter' | 拓展 |
| Shift + '-' | 缩小 |
| Shift + '+' | 放大 |
| Shift + 'l' | 显示 |
| Shift + 'z' | 撤销 |
| 选中 + Shift + 'del' | 删除 |
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ extra:
studio:
base111b: 1.1.1-beta
base220: 2.2.0
explorer:
base100: 1.0.0
exchange:
release: master
importer:
Expand Down