Added Automatic Allocations
Known issues: - Port range to auto create is hard coded - React interface is still a WIP.
This commit is contained in:
parent
bcbd2c4996
commit
8f8bd0be83
8 changed files with 186 additions and 4 deletions
11
resources/scripts/api/server/network/newServerAllocation.ts
Normal file
11
resources/scripts/api/server/network/newServerAllocation.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { Allocation } from '@/api/server/getServer';
|
||||
import http from '@/api/http';
|
||||
import { rawDataToServerAllocation } from '@/api/transformers';
|
||||
|
||||
export default (uuid: string): Promise<Allocation> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.get(`/api/client/servers/${uuid}/network/allocations/new`)
|
||||
.then(({ data }) => resolve(rawDataToServerAllocation(data)))
|
||||
.catch(reject);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue