Commit Graph

60 Commits

Author SHA1 Message Date
Arthur Lu
f274949523 Update README.md 2023-04-19 05:54:18 +00:00
Arthur Lu
7e0bce1dca add unit return to resources path 2023-04-19 02:46:05 +00:00
Arthur Lu
5862edcf24 fully implement new db 2023-04-19 02:42:35 +00:00
Arthur Lu
dacbd965cf implement new db strategy
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-19 01:03:55 +00:00
Arthur Lu
c92fc95e92 fix bug in create disk resource allocation
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-11 21:57:14 +00:00
Arthur Lu
3810eef1fa fix spelling
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-11 18:00:04 +00:00
Arthur Lu
1acaa6c864 use a better db json layout
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-11 17:56:48 +00:00
Arthur Lu
0c6fc5ae1f fix bug in resource get
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-03 21:53:11 +00:00
Arthur Lu
8862144524 add path to get remaining resources
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-04-03 21:45:06 +00:00
Arthur Lu
d135cec5ae fix bug in input validation
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-03-24 22:22:00 +00:00
Arthur Lu
eed39a007b remove extra consol logs
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-03-24 22:14:21 +00:00
Arthur Lu
bd845b47f0 fix bug in validation
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-03-24 22:10:17 +00:00
Arthur Lu
33deb01b74 implement quick input checks
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-03-24 19:35:16 +00:00
Arthur Lu
143e9d3f6e
Update README.md 2023-02-28 21:15:17 -08:00
Arthur Lu
3afb302a16 remove extra comment
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-03-01 03:44:42 +00:00
Arthur Lu
38589b1b33 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
Arthur Lu
51d231e7bf improve return data on success
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-03-01 00:53:29 +00:00
Arthur Lu
4bb9aadd04 almost finish implementing resource check
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-03-01 00:50:24 +00:00
Arthur Lu
96bbd469fb implement resource checking all config paths
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-03-01 00:38:09 +00:00
Arthur Lu
3e3ae6077b add some comments
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-28 23:36:22 +00:00
Arthur Lu
1e4b72cb8b rename getDiskByConfig to getDiskConfig
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-28 23:33:00 +00:00
Arthur Lu
2b311cd1f1 improve api responses
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-28 23:27:32 +00:00
Arthur Lu
4fdb2f1cb8 add resource check on resize
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-28 23:24:49 +00:00
Arthur Lu
976995e2a1 use vars to specify cors domain
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-28 22:04:30 +00:00
Arthur Lu
ac08243622 update required api permissions
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-28 02:42:36 +00:00
Arthur Lu
eb5b39ea22 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
Arthur Lu
2e6840ce99 fix cors origin
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-28 01:37:46 +00:00
Arthur Lu
f0798759c2 fix README instructions
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-28 00:07:24 +00:00
Arthur Lu
537420624e improve local db utils
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-27 23:11:51 +00:00
Arthur Lu
aa548d4fa8 add create instance endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-27 23:04:38 +00:00
Arthur Lu
dd40e0a802 improve endpoint args 2023-02-27 02:29:39 +00:00
Arthur Lu
3febe6601c add basic local db utility functions 2023-02-27 01:28:01 +00:00
Arthur Lu
3fe6994064 add additional prototypes in db.js 2023-02-27 01:09:49 +00:00
Arthur Lu
31ce8ae582 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
Arthur Lu
0cdb152a24 fix proxmox proxy post body parsing issue
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-24 22:34:19 +00:00
Arthur Lu
ec929d5f90 add post proxmox proxy endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-24 22:21:21 +00:00
Arthur Lu
6f2592dcca add no token proxmox api proxy endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-24 22:19:30 +00:00
Arthur Lu
f93a3726ac streamline authentication checking,
start on instance creation

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-24 00:17:28 +00:00
Arthur Lu
ab235fe581 add disk create endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-23 20:39:33 +00:00
Arthur Lu
5f1cf088a0 add instance delete path
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-21 22:35:09 +00:00
Arthur Lu
bb7660c202 add changing cpu and memory values
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-17 22:17:00 +00:00
Arthur Lu
a97811e516 improve return values 2023-02-13 04:34:07 +00:00
Arthur Lu
623b2087af add upid wait for actions which take significant time 2023-02-13 04:30:41 +00:00
Arthur Lu
b3379bfa3c add old got as dependency (is a security vulnerability),
use axios as http request handler
2023-02-13 02:11:55 +00:00
Arthur Lu
b69d248560 add start script and sample systemd service
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-10 21:58:22 +00:00
Arthur Lu
47e3cafc8b add disk attach,
add disk delete

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-10 21:41:36 +00:00
Arthur Lu
6460f6fd51 implement POST /api/disk/move
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-02-02 19:34:51 +00:00
Arthur Lu
d479879d2c implement resize endpoint
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2023-01-30 23:19:24 +00:00
Arthur Lu
f46c1165fa fix detach disk endpoint for lxc 2023-01-26 07:53:56 +00:00
Arthur Lu
ee7fdad946 implement disk detach 2023-01-25 02:01:47 +00:00