graphiti-api / vandal

16 stars 4 forks source link

add header + ui CRUD + remote access #9

Closed XHPJ closed 2 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

Sorry I had to create a new PR since the rebase was a bit messy and I hope it looks fine now.