ui(admin): fix eslint errors, add CreateAllocationForm
This commit is contained in:
parent
d32b3a0473
commit
84b207eddb
14 changed files with 311 additions and 289 deletions
|
@ -18,9 +18,9 @@ export const rawDataToAllocation = (data: FractalResponseData): Allocation => ({
|
|||
assigned: data.attributes.assigned,
|
||||
});
|
||||
|
||||
export default (uuid: string): Promise<Allocation[]> => {
|
||||
export default (id: string | number): Promise<Allocation[]> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.get(`/api/application/nodes/${uuid}/allocations`)
|
||||
http.get(`/api/application/nodes/${id}/allocations`)
|
||||
.then(({ data }) => resolve((data.data || []).map(rawDataToAllocation)))
|
||||
.catch(reject);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue