Skip to content

Commit f994cbf

Browse files
committed
Add redisgraph plugin
1 parent cf67ad4 commit f994cbf

24 files changed

+5947
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
.parcel-cache
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Example of the plugin for the “Client List” command
2+
3+
The example has been created using React, TypeScript, and [Elastic UI](https://elastic.github.io/eui/#/).
4+
[Parcel](https://parceljs.org/) is used to build the plugin.
5+
6+
## Running locally
7+
8+
The following commands will install dependencies and start the server to run the plugin locally:
9+
```
10+
yarn
11+
yarn start
12+
```
13+
These commands will install dependencies and start the server.
14+
15+
_Note_: Base styles are included to `index.html` from the repository.
16+
17+
This command will generate the `vendor` folder with styles and fonts of the core app. Add this folder
18+
inside the folder for your plugin and include appropriate styles to the `index.html` file.
19+
20+
```
21+
yarn build:statics - for Linux or MacOs
22+
yarn build:statics:win - for Windows
23+
```
24+
25+
## Build plugin
26+
27+
The following commands will build plugins to be used in RedisInsight:
28+
```
29+
yarn
30+
yarn build
31+
```
32+
33+
[Add](../../../../../docs/plugins/installation.md) the package.json file and the
34+
`dist` folder to the folder with your plugin, which should be located in the `plugins` folder.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"author": {
3+
"name": "Redis Ltd.",
4+
"email": "[email protected]",
5+
"url": "https://redis.com/redis-enterprise/redis-insight"
6+
},
7+
"bugs": {
8+
"url": "https://github.com/"
9+
},
10+
"description": "Show graph Visualization/table",
11+
"source": "./src/main.tsx",
12+
"styles": "./dist/styles.css",
13+
"main": "./dist/index.js",
14+
"name": "graph-plugin",
15+
"version": "0.0.1",
16+
"scripts": {
17+
"start": "cross-env NODE_ENV=development parcel serve src/index.html",
18+
"build": "rimraf dist && cross-env NODE_ENV=production concurrently \"yarn build:js && yarn minify:js\" \"yarn build:css\"",
19+
"build-lite": "rm dist/*.js && cross-env NODE_ENV=production concurrently \"yarn build:js && yarn minify:js\"",
20+
"build:js": "parcel build src/main.tsx --dist-dir dist",
21+
"build:css": "parcel build src/styles/styles.less --dist-dir dist",
22+
"minify:js": "terser -- dist/main.js > dist/index.js && rimraf dist/main.js"
23+
},
24+
"targets": {
25+
"main": false,
26+
"module": {
27+
"includeNodeModules": true
28+
}
29+
},
30+
"visualizations": [
31+
{
32+
"id": "graph-table",
33+
"name": "Table",
34+
"activationMethod": "renderGraphTable",
35+
"matchCommands": [
36+
"GRAPH.RO_QUERY",
37+
"GRAPH.QUERY"
38+
],
39+
"description": "Example of graph table plugin",
40+
"default": false
41+
},
42+
{
43+
"id": "graph-viz",
44+
"name": "Graph",
45+
"activationMethod": "renderGraph",
46+
"matchCommands": [
47+
"GRAPH.RO_QUERY",
48+
"GRAPH.QUERY"
49+
],
50+
"description": "Example of graph plugin",
51+
"default": true
52+
}
53+
],
54+
"devDependencies": {
55+
"@parcel/compressor-brotli": "^2.0.0",
56+
"@parcel/compressor-gzip": "^2.0.0",
57+
"@parcel/transformer-less": "^2.3.2",
58+
"@types/d3": "^7.1.0",
59+
"@types/react-json-tree": "^0.13.0",
60+
"concurrently": "^6.3.0",
61+
"cross-env": "^7.0.3",
62+
"parcel": "^2.0.0",
63+
"rimraf": "^3.0.2",
64+
"terser": "^5.9.0"
65+
},
66+
"dependencies": {
67+
"@elastic/eui": "34.6.0",
68+
"@emotion/react": "^11.7.1",
69+
"classnames": "^2.3.1",
70+
"d3": "^7.3.0",
71+
"moment": "^2.29.1",
72+
"prop-types": "^15.8.1",
73+
"react": "^17.0.2",
74+
"react-dom": "^17.0.2",
75+
"react-json-tree": "^0.16.1"
76+
}
77+
}

0 commit comments

Comments
 (0)