Add API tokens support #9
@ -79,9 +79,9 @@ export function App() {
|
|||||||
<Route path="nwfilter/:uuid/edit" element={<EditNWFilterRoute />} />
|
<Route path="nwfilter/:uuid/edit" element={<EditNWFilterRoute />} />
|
||||||
|
|
||||||
<Route path="tokens" element={<TokensListRoute />} />
|
<Route path="tokens" element={<TokensListRoute />} />
|
||||||
<Route path="tokens/new" element={<CreateApiTokenRoute />} />
|
<Route path="token/new" element={<CreateApiTokenRoute />} />
|
||||||
<Route path="tokens/:id" element={<ViewApiTokenRoute />} />
|
<Route path="token/:id" element={<ViewApiTokenRoute />} />
|
||||||
<Route path="tokens/:id/edit" element={<EditApiTokenRoute />} />
|
<Route path="token/:id/edit" element={<EditApiTokenRoute />} />
|
||||||
|
|
||||||
<Route path="sysinfo" element={<SysInfoRoute />} />
|
<Route path="sysinfo" element={<SysInfoRoute />} />
|
||||||
<Route path="*" element={<NotFoundRoute />} />
|
<Route path="*" element={<NotFoundRoute />} />
|
||||||
|
@ -18,7 +18,7 @@ export interface APIToken {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function APITokenURL(t: APIToken, edit: boolean = false): string {
|
export function APITokenURL(t: APIToken, edit: boolean = false): string {
|
||||||
return `/tokens/${t.id}${edit ? "/edit" : ""}`;
|
return `/token/${t.id}${edit ? "/edit" : ""}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface APITokenPrivateKey {
|
export interface APITokenPrivateKey {
|
||||||
|
@ -47,7 +47,7 @@ export function TokensListRouteInner(p: {
|
|||||||
<VirtWebRouteContainer
|
<VirtWebRouteContainer
|
||||||
label="API tokens"
|
label="API tokens"
|
||||||
actions={
|
actions={
|
||||||
<RouterLink to="/tokens/new">
|
<RouterLink to="/token/new">
|
||||||
<Button>New</Button>
|
<Button>New</Button>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user