2021-10-18 08:49:16 +00:00
|
|
|
# Config UI
|
|
|
|
|
2021-10-20 15:58:14 +00:00
|
|
|
a web app to edit and action on update powered by [ACE](https://ace.c9.io/#nav=howto&api=edit_session)
|
2021-10-18 08:49:16 +00:00
|
|
|
|
2021-10-18 15:53:49 +00:00
|
|
|
```
|
|
|
|
Usage: configui [options]
|
2021-10-20 16:12:12 +00:00
|
|
|
-allow string
|
|
|
|
IPs to allow, blank to allow all
|
2021-10-18 15:53:49 +00:00
|
|
|
-bind string
|
2021-10-20 16:12:12 +00:00
|
|
|
address to bind (default "0.0.0.0:8000")
|
2021-10-18 15:53:49 +00:00
|
|
|
-c string
|
|
|
|
cmd to apply
|
|
|
|
-f string
|
|
|
|
path to config file
|
|
|
|
-log string
|
|
|
|
log to file
|
|
|
|
-n string
|
|
|
|
alias of file
|
|
|
|
-p string
|
|
|
|
path to file, precedence over config
|
2021-10-20 16:12:12 +00:00
|
|
|
-static
|
|
|
|
disable config api
|
2021-10-18 15:53:49 +00:00
|
|
|
-v show version
|
|
|
|
```
|
|
|
|
|
|
|
|
## Config
|
|
|
|
|
|
|
|
```json
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"path": "configui.log",
|
|
|
|
"ro": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"path": "etc/test.ini",
|
|
|
|
"name": "test",
|
|
|
|
"action": "myip local -P"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
```
|
|
|
|
|
|
|
|
`configui -f PATH/TO/CONFIG`
|
|
|
|
|
2021-10-18 08:49:16 +00:00
|
|
|
## Api
|
|
|
|
|
|
|
|
### Files
|
|
|
|
|
|
|
|
`GET /api/files`
|
|
|
|
|
|
|
|
res:
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"test": {
|
|
|
|
"path": "test",
|
|
|
|
"name": "test",
|
|
|
|
"action": "myip local -P",
|
|
|
|
"data": ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### File
|
|
|
|
|
|
|
|
`GET /api/file?name=ALIAS`
|
|
|
|
|
|
|
|
res:
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"action": "myip local -P",
|
|
|
|
"data": "test",
|
|
|
|
"name": "test",
|
|
|
|
"path": "test"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Update
|
|
|
|
|
|
|
|
`POST /api/file`
|
|
|
|
|
|
|
|
req:
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"data": "test",
|
|
|
|
"name": "test",
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Apply
|
|
|
|
|
|
|
|
`POST /api/apply?name=ALIAS`
|