Commit Graph

118 Commits

Author SHA1 Message Date
Arthur Lu
83a03bfd7b update lcoaldb template
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-06-14 22:34:10 +00:00
Arthur Lu
03b3a994c6 improve user config routes,
add glocal resource config route,
remove debug console logs

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-06-14 22:20:30 +00:00
Arthur Lu
e9386f5204 implement proc type in /instance/resources 2023-06-14 04:49:43 +00:00
Arthur Lu
8d7d952e21 fix bugs in network methods 2023-06-09 04:24:22 +00:00
Arthur Lu
a807e5cb03 move source files to src folder,
move localdb to config folder,
consolidate vars.js with localdb,
move service scripts to service folder
2023-06-09 03:58:38 +00:00
Arthur Lu
0043e3e783 fix formatting 2023-06-09 02:05:26 +00:00
Arthur Lu
c110330154 add checking for disk bus prefix in disk create and disk attach 2023-06-09 00:24:37 +00:00
Arthur Lu
e356684cd9 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
Arthur Lu
78377c0479 fix handleResponse responding with proxmox task status
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-06-03 00:10:33 +00:00
Arthur Lu
2936d39368 change /api/node/pci to /api/instance/pci
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-06-02 23:14:13 +00:00
Arthur Lu
5eb5642166 fix nodes pci endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-06-01 17:12:52 +00:00
Arthur Lu
15f4026979 add /api/nodes/pci endpoint (untested)
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-06-01 15:35:20 +00:00
Arthur Lu
310ff8e6ae fix approveResources
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-24 23:10:05 +00:00
Arthur Lu
52d40796e9 fix bugs in utils.js
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-24 22:42:38 +00:00
Arthur Lu
0ad242a557 implement db as class,
improve approveResources

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-24 22:21:00 +00:00
Arthur Lu
7e7f9b2b55 fix api crash on username missing from lcoaldb 2023-05-23 00:11:48 +00:00
Arthur Lu
c8c42d3b95 remove console.log
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-19 20:50:45 +00:00
Arthur Lu
fd7dec6af3 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
Arthur Lu
87b1b622fb fix comments,
fix handleResponse

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-19 20:03:38 +00:00
Arthur Lu
478a25c9e0 fix issue in swap handling in /instance/resources
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-18 20:19:01 +00:00
Arthur Lu
f43e9e50d7 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
Arthur Lu
505ea28e8a handle NaN or undefined values in approveResources
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-18 14:58:44 +00:00
Arthur Lu
70953f3194 mitigate some vulnerabilities in disk attach,
handle errors in getDiskInfo as result of nonexistent disk
2023-05-18 08:09:18 +00:00
Arthur Lu
2cd23324e5 fix formatting 2023-05-17 21:38:11 +00:00
Arthur Lu
b12d84d4be fix authentication checks for routes involving specific instances 2023-05-17 21:30:36 +00:00
Arthur Lu
8c71ceafcf fix network resource usage calculation
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-16 16:50:24 +00:00
Arthur Lu
34de9788ba fix db template
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-16 16:46:15 +00:00
Arthur Lu
90d399d8b6 implement network interface endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-16 16:34:39 +00:00
Arthur Lu
f415b8f962 fix auth early escape
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-16 15:46:39 +00:00
Arthur Lu
4039cdf92d fix bug in login endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-15 22:11:24 +00:00
Arthur Lu
ef23428753 fix error handling in ticket endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-15 22:00:46 +00:00
Arthur Lu
0aff37a9c3 remove httponly form username cookie 2023-05-13 07:38:32 +00:00
Arthur Lu
a70981afb6 update README 2023-05-13 07:36:13 +00:00
Arthur Lu
08947ca15d implement safer pve ticket endpoint 2023-05-13 07:34:58 +00:00
Arthur Lu
a0ebcdf1b0 remove helmet 2023-05-13 05:17:48 +00:00
Arthur Lu
9cfa53172c fix bug in instance post
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-12 21:07:47 +00:00
Arthur Lu
e89eeeb5cb separate user data endpoints
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-05-12 20:51:07 +00:00
Arthur Lu
2a37423dd9 style fix 2023-05-11 07:10:22 +00:00
Arthur Lu
3d72e189d4 update vars.js.template
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-27 17:27:51 +00:00
Arthur Lu
2a70548a43 add node restriction
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-27 15:39:01 +00:00
Arthur Lu
0063b6b2b9
Update README.md 2023-04-26 16:38:04 -07:00
Arthur Lu
8527c0aa80
Update README.md 2023-04-26 16:36:54 -07:00
Arthur Lu
4200bd7df4
Update README.md 2023-04-26 16:36:23 -07:00
Arthur Lu
7ea2160c9b fix /api/version 2023-04-26 21:58:15 +00:00
Arthur Lu
cc3c1061ba use consistent version notation 2023-04-26 02:38:46 +00:00
Arthur Lu
51c10734b1 update readme with required nodejs version 2023-04-26 02:38:24 +00:00
Arthur Lu
6fc9113e4f use experimental import assertion,
requires nodejs 18 or higher
2023-04-26 01:40:12 +00:00
Arthur Lu
2deda42ec5 update to es6 and fix some syntax errors 2023-04-26 01:18:05 +00:00
Arthur Lu
631237d857 change /api/resources to /api/instance/resources
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-25 15:30:28 +00:00
Arthur Lu
096dfb10e0 fix bugs from refactor
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-24 21:45:32 +00:00