Add new REST API routes to token rights editor
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
Checkbox,
|
Checkbox,
|
||||||
FormControlLabel,
|
FormControlLabel,
|
||||||
|
Grid,
|
||||||
Paper,
|
Paper,
|
||||||
Table,
|
Table,
|
||||||
TableBody,
|
TableBody,
|
||||||
@@ -59,6 +60,7 @@ export function TokenRightsEditor(p: {
|
|||||||
<TableCell align="center">Get XML definition</TableCell>
|
<TableCell align="center">Get XML definition</TableCell>
|
||||||
<TableCell align="center">Get autostart</TableCell>
|
<TableCell align="center">Get autostart</TableCell>
|
||||||
<TableCell align="center">Set autostart</TableCell>
|
<TableCell align="center">Set autostart</TableCell>
|
||||||
|
<TableCell align="center">Backup disk</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
@@ -82,6 +84,10 @@ export function TokenRightsEditor(p: {
|
|||||||
{...p}
|
{...p}
|
||||||
right={{ verb: "PUT", path: "/api/vm/*/autostart" }}
|
right={{ verb: "PUT", path: "/api/vm/*/autostart" }}
|
||||||
/>
|
/>
|
||||||
|
<CellRight
|
||||||
|
{...p}
|
||||||
|
right={{ verb: "POST", path: "/api/vm/*/disk/*/backup" }}
|
||||||
|
/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
{/* Per VM operations */}
|
{/* Per VM operations */}
|
||||||
@@ -117,6 +123,14 @@ export function TokenRightsEditor(p: {
|
|||||||
{...p}
|
{...p}
|
||||||
right={{ verb: "PUT", path: `/api/vm/${v.uuid}/autostart` }}
|
right={{ verb: "PUT", path: `/api/vm/${v.uuid}/autostart` }}
|
||||||
parent={{ verb: "PUT", path: "/api/vm/*/autostart" }}
|
parent={{ verb: "PUT", path: "/api/vm/*/autostart" }}
|
||||||
|
/>{" "}
|
||||||
|
<CellRight
|
||||||
|
{...p}
|
||||||
|
right={{
|
||||||
|
verb: "POST",
|
||||||
|
path: `/api/vm/${v.uuid}/disk/*/backup`,
|
||||||
|
}}
|
||||||
|
parent={{ verb: "POST", path: "/api/vm/*/disk/*/backup" }}
|
||||||
/>
|
/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
))}
|
))}
|
||||||
@@ -669,6 +683,38 @@ export function TokenRightsEditor(p: {
|
|||||||
</Table>
|
</Table>
|
||||||
</RightsSection>
|
</RightsSection>
|
||||||
|
|
||||||
|
<Grid container>
|
||||||
|
<Grid size={{ md: 6 }}>
|
||||||
|
{/* Disk images */}
|
||||||
|
<RightsSection label="Disk images">
|
||||||
|
<RouteRight
|
||||||
|
{...p}
|
||||||
|
right={{ verb: "POST", path: "/api/disk_images/upload" }}
|
||||||
|
label="Upload a new disk image"
|
||||||
|
/>
|
||||||
|
<RouteRight
|
||||||
|
{...p}
|
||||||
|
right={{ verb: "GET", path: "/api/disk_images/list" }}
|
||||||
|
label="Get the list of disk images"
|
||||||
|
/>
|
||||||
|
<RouteRight
|
||||||
|
{...p}
|
||||||
|
right={{ verb: "GET", path: "/api/disk_images/*" }}
|
||||||
|
label="Download disk images"
|
||||||
|
/>
|
||||||
|
<RouteRight
|
||||||
|
{...p}
|
||||||
|
right={{ verb: "POST", path: "/api/disk_images/*/convert" }}
|
||||||
|
label="Convert disk images"
|
||||||
|
/>
|
||||||
|
<RouteRight
|
||||||
|
{...p}
|
||||||
|
right={{ verb: "DELETE", path: "/api/disk_images/*" }}
|
||||||
|
label="Delete disk images"
|
||||||
|
/>
|
||||||
|
</RightsSection>
|
||||||
|
</Grid>
|
||||||
|
<Grid size={{ md: 6 }}>
|
||||||
{/* ISO files */}
|
{/* ISO files */}
|
||||||
<RightsSection label="ISO files">
|
<RightsSection label="ISO files">
|
||||||
<RouteRight
|
<RouteRight
|
||||||
@@ -697,6 +743,8 @@ export function TokenRightsEditor(p: {
|
|||||||
label="Delete ISO files"
|
label="Delete ISO files"
|
||||||
/>
|
/>
|
||||||
</RightsSection>
|
</RightsSection>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
{/* Server general information */}
|
{/* Server general information */}
|
||||||
<RightsSection label="Server">
|
<RightsSection label="Server">
|
||||||
|
Reference in New Issue
Block a user