graphiti-api / vandal

16 stars 4 forks source link

Add headers + CRUD using frontend + access remote graphiti servers #8

Closed XHPJ closed 3 years ago

XHPJ commented 3 years ago

Hello,

This PR adds the following functionalities to vandal:

The first to features also work for remote hosts.

Headers

The headers will be used when firing a request to the server and the fields are stored using localStorage and ls-secure for encryption.

CRUD

This is mostly affecting the query.ts. Still the payload (update/create) is passed from All.vue to the query object.

Remote Hosts

Vandal would expect an ENV called REMOTE_HOST which contains a JSON array with the following objects:

{ 
"name" : "<application name that will be shown in frontend>",
"url" : "https://<server url>"},    ## 'https://' needs to be there 
"schemaPath" : "</path/to/schema>/schema.json"
}

Right now vandal_ui looks inside index.html and replaced the string __REMOTE_HOSTS__ with the value of the ENV or an {} when no value is set.

Side note: I will create a PR for vandal_ui with the same branch name, that uses this version of vandal.

XHPJ commented 3 years ago

Note: I have also a little screen recording prepared in case you want to see this for easier evaluation, I can sent it to you via Slack.

richmolj commented 3 years ago

Note: I have also a little screen recording prepared in case you want to see this for easier evaluation, I can sent it to you via Slack.

I would love to see this, thank you!

Would you mind running a git rebase -i to consolidate these commits?