- Notifications
You must be signed in to change notification settings - Fork39
GUI for the hydra python agent
License
HTTP-APIs/hydra-python-agent-gui
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a GUI for theHydra Ecosystem's Agent. It's divided in two parts: the left side shows the Hydra API as a linked graph and at the right you have a generic console built based on the API Documentation that you can use to query the API. The Frontend was built with React, a middle layer to use the Agent was built with Flask.
It's recommended that you use venv(virtual environment):
sudo apt-get install python3-venv # If not installedpython3 -m venv venvsource venv/bin/activatepip3 install -r requirements.txt
The Agent uses a Redis local server as a caching layer. That said, it's necessary that you run Redis Graph locally:
sudo ./redis_setup.sh # <- Might be necessary to uso sudo
Since this is an API Client, we need an appropriate hydrus server to query to. To setup a localhost follow the instructions athttps://github.com/HTTP-APIs/hydrus#demo.
If you've installed the Requirements and have the proper Redis running you can simply:
python3 app.py
Now open your browser and enjoy at:http://localhost:3000/
This repository is divided in two parts, the Middle-Layer/Backend with Flask underapp.py
and the React project under the folderconsole-frontend
.
The Flask Backend is built to communicate with the Python Agent package. It declares five endpoints which are used for this:
- send-command - Send Commands to Agent and returns the server response
- /hydra-doc - Simply serves the Hydra Doc
- apidoc-graph - Fetches Hydra Doc from the Agent, process it in Vis.js Network format and returns it to the GUI
- /start-agent - Simply starts/restarts the Agent with the URL parameter
- / - Serves the React build under /console-frontend/build
The React Frontend
Go the the README.md insideconsole-frontend
for further information. If you make modifications insideconsole-frontend
, make sure to runnpm run build
to create a updated production build.
About
GUI for the hydra python agent
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.