alu
d2dbbea292
add checking for disk bus prefix in disk create and disk attach
2023-06-09 00:24:37 +00:00
alu
825f7ccea1
improve method comments relating to pve builtin return objects,
...
add paths to create and delete network interfaces,
check for interface existence in modify interface,
add vlan specification to user config and use in network interface creation,
fix disk path security by checking disk existence or nonexistence,
TODO: check create and mount disk against allowed bus types
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-06-08 23:33:32 +00:00
alu
3f98355d32
fix handleResponse responding with proxmox task status
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-06-03 00:10:33 +00:00
alu
4f654f5dcf
change /api/node/pci to /api/instance/pci
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-06-02 23:14:13 +00:00
alu
9dc751b5e4
fix nodes pci endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-06-01 17:12:52 +00:00
alu
2dec550425
add /api/nodes/pci endpoint (untested)
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-06-01 15:35:20 +00:00
alu
1c2a0c7580
fix approveResources
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-24 23:10:05 +00:00
alu
864bec53ac
fix bugs in utils.js
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-24 22:42:38 +00:00
alu
7773a4182f
implement db as class,
...
improve approveResources
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-24 22:21:00 +00:00
alu
8396de3a96
fix api crash on username missing from lcoaldb
2023-05-23 00:11:48 +00:00
alu
94bc7db86d
remove console.log
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-19 20:50:45 +00:00
alu
e18c10ac35
update localdb.json.template,
...
fix tempalte resource checking for post /instance
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-19 20:50:07 +00:00
alu
c45f582fc1
fix comments,
...
fix handleResponse
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-19 20:03:38 +00:00
alu
b16ef89577
fix issue in swap handling in /instance/resources
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-18 20:19:01 +00:00
alu
0d5aea6f49
improve response value of /user/nodes endpoint,
...
add basic documentation of routes,
add swap for lxc instances to /instance/resources endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-18 20:05:41 +00:00
alu
4444416175
handle NaN or undefined values in approveResources
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-18 14:58:44 +00:00
alu
754e7a018b
mitigate some vulnerabilities in disk attach,
...
handle errors in getDiskInfo as result of nonexistent disk
2023-05-18 08:09:18 +00:00
alu
e83cf890e7
fix formatting
2023-05-17 21:38:11 +00:00
alu
414c08fbf5
fix authentication checks for routes involving specific instances
2023-05-17 21:30:36 +00:00
alu
f27ea02f10
fix network resource usage calculation
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-16 16:50:24 +00:00
alu
ce901e71d3
fix db template
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-16 16:46:15 +00:00
alu
f236ae544b
implement network interface endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-16 16:34:39 +00:00
alu
e12e245abd
fix auth early escape
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-16 15:46:39 +00:00
alu
d6cd844379
fix bug in login endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-15 22:11:24 +00:00
alu
9f7b62cdff
fix error handling in ticket endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-15 22:00:46 +00:00
alu
89e046e093
remove httponly form username cookie
2023-05-13 07:38:32 +00:00
alu
924c77b98a
update README
2023-05-13 07:36:13 +00:00
alu
11061e6a20
implement safer pve ticket endpoint
2023-05-13 07:34:58 +00:00
alu
b2347fd709
remove helmet
2023-05-13 05:17:48 +00:00
alu
0054a269a5
fix bug in instance post
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-12 21:07:47 +00:00
alu
f21d3cffea
separate user data endpoints
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-05-12 20:51:07 +00:00
alu
fd969e04af
style fix
2023-05-11 07:10:22 +00:00
alu
7f9d6f8e61
update vars.js.template
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-27 17:27:51 +00:00
alu
dcef0bb032
add node restriction
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-27 15:39:01 +00:00
alu and GitHub
116cb14cc5
Update README.md
2023-04-26 16:38:04 -07:00
alu and GitHub
9998d8f919
Update README.md
2023-04-26 16:36:54 -07:00
alu and GitHub
99bd318079
Update README.md
2023-04-26 16:36:23 -07:00
alu
caf3e06da1
fix /api/version
2023-04-26 21:58:15 +00:00
alu
d1540b9fb5
use consistent version notation
2023-04-26 02:38:46 +00:00
alu
4f3d92ea31
update readme with required nodejs version
2023-04-26 02:38:24 +00:00
alu
53d7d79886
use experimental import assertion,
...
requires nodejs 18 or higher
2023-04-26 01:40:12 +00:00
alu
3209c33b4e
update to es6 and fix some syntax errors
2023-04-26 01:18:05 +00:00
alu
8650ea4d2e
change /api/resources to /api/instance/resources
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-25 15:30:28 +00:00
alu
3e6c85e6bb
fix bugs from refactor
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-24 21:45:32 +00:00
alu
99814f5c80
fix bug in /api/user
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-24 21:34:30 +00:00
alu
02dbd0dec7
code cleanup,
...
disk paths now under instance
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-24 21:28:58 +00:00
alu
eeb96a9164
fix bug in /user/instances
2023-04-21 22:40:12 +00:00
alu
0251bd51d4
add /user/instances path
2023-04-21 22:37:12 +00:00
alu
3247989baa
minor change to user data to fit additional user data
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-20 21:39:41 +00:00
alu
9ccb9edf44
add vmid range check to instance creation,
...
add configurable templates to instance creation
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-20 21:27:32 +00:00
alu
c3160f760f
simplify db
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-20 20:43:05 +00:00
alu
109f9993cc
bug fixes
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-19 20:36:48 +00:00
alu
4c3a4978fd
Update README.md
2023-04-19 05:54:18 +00:00
alu
c5448ca727
add unit return to resources path
2023-04-19 02:46:05 +00:00
alu
09ee11055f
fully implement new db
2023-04-19 02:42:35 +00:00
alu
2ef4bfd3d2
implement new db strategy
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-19 01:03:55 +00:00
alu
943d598b69
fix bug in create disk resource allocation
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-11 21:57:14 +00:00
alu
b77850bad6
fix spelling
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-11 18:00:04 +00:00
alu
123431332f
use a better db json layout
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-11 17:56:48 +00:00
alu
059c1fe0d2
fix bug in resource get
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-03 21:53:11 +00:00
alu
4b37ababda
add path to get remaining resources
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-04-03 21:45:06 +00:00
alu
6bda62ae15
fix bug in input validation
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-24 22:22:00 +00:00
alu
f34d9ae523
remove extra consol logs
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-24 22:14:21 +00:00
alu
3a823c85ba
fix bug in validation
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-24 22:10:17 +00:00
alu
7272bbe683
implement quick input checks
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-24 19:35:16 +00:00
alu and GitHub
b7018aae33
Update README.md
2023-02-28 21:15:17 -08:00
alu
e042bf6c41
remove extra comment
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-01 03:44:42 +00:00
alu
71b786792f
implement disk deallocation in delete instance,
...
remove console.logs
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-01 01:14:03 +00:00
alu
364c268a64
improve return data on success
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-01 00:53:29 +00:00
alu
cf418bc610
almost finish implementing resource check
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-01 00:50:24 +00:00
alu
1f25cc1cd1
implement resource checking all config paths
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-03-01 00:38:09 +00:00
alu
22e12da060
add some comments
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 23:36:22 +00:00
alu
e8060bf691
rename getDiskByConfig to getDiskConfig
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 23:33:00 +00:00
alu
8118a31ef6
improve api responses
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 23:27:32 +00:00
alu
1c27b3c2a8
add resource check on resize
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 23:24:49 +00:00
alu
b970e990a6
use vars to specify cors domain
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 22:04:30 +00:00
alu
7b95a3ddab
update required api permissions
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 02:42:36 +00:00
alu
7015e356e2
assign pool membership of new isntance using user group membership
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 02:38:30 +00:00
alu
d8e6274c3d
fix cors origin
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 01:37:46 +00:00
alu
dc50a90bd5
fix README instructions
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-28 00:07:24 +00:00
alu
f65772d6e4
improve local db utils
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-27 23:11:51 +00:00
alu
940f41875b
add create instance endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-27 23:04:38 +00:00
alu
44b5cd356a
improve endpoint args
2023-02-27 02:29:39 +00:00
alu
a296550349
add basic local db utility functions
2023-02-27 01:28:01 +00:00
alu
71d793aabb
add additional prototypes in db.js
2023-02-27 01:09:49 +00:00
alu
c9595980cd
rename index.js to main.js
...
remove unused imports in main.js,
add function prototypes to db.js
2023-02-26 08:36:27 +00:00
alu
62eca6c427
fix proxmox proxy post body parsing issue
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-24 22:34:19 +00:00
alu
ce8a4f29fa
add post proxmox proxy endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-24 22:21:21 +00:00
alu
c06a15c3bb
add no token proxmox api proxy endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-24 22:19:30 +00:00
alu
295d096ed8
streamline authentication checking,
...
start on instance creation
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-24 00:17:28 +00:00
alu
57668384cc
add disk create endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-23 20:39:33 +00:00
alu
9f4320a697
add instance delete path
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-21 22:35:09 +00:00
alu
14fa48bd86
add changing cpu and memory values
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-17 22:17:00 +00:00
alu
934873396d
improve return values
2023-02-13 04:34:07 +00:00
alu
9d454183db
add upid wait for actions which take significant time
2023-02-13 04:30:41 +00:00
alu
1db0d1e80f
add old got as dependency (is a security vulnerability),
...
use axios as http request handler
2023-02-13 02:11:55 +00:00
alu
816c5a2c9e
add start script and sample systemd service
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-10 21:58:22 +00:00
alu
a716e7efab
add disk attach,
...
add disk delete
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-10 21:41:36 +00:00
alu
00fe6c57a5
implement POST /api/disk/move
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-02-02 19:34:51 +00:00
alu
b10c30e937
implement resize endpoint
...
Signed-off-by: Arthur Lu <learthurgo@gmail.com >
2023-01-30 23:19:24 +00:00