mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
feat: complete node pool api, sdk and ui
Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import { Login } from "@/pages/auth/login.tsx"
|
||||
import { JobsPage } from "@/pages/jobs/jobs-page.tsx"
|
||||
import { LabelsPage } from "@/pages/labels/labels-page.tsx"
|
||||
import { MePage } from "@/pages/me/me-page.tsx"
|
||||
import { NodePoolsPage } from "@/pages/nodepools/node-pools-page.tsx"
|
||||
import { OrgApiKeys } from "@/pages/org/api-keys.tsx"
|
||||
import { OrgMembers } from "@/pages/org/members.tsx"
|
||||
import { OrgSettings } from "@/pages/org/settings.tsx"
|
||||
@@ -31,6 +32,7 @@ export default function App() {
|
||||
<Route path="/taints" element={<TaintsPage />} />
|
||||
<Route path="/labels" element={<LabelsPage />} />
|
||||
<Route path="/annotations" element={<AnnotationPage />} />
|
||||
<Route path="/node-pools" element={<NodePoolsPage />} />
|
||||
|
||||
<Route path="/admin/jobs" element={<JobsPage />} />
|
||||
</Route>
|
||||
|
||||
91
ui/src/api/node_pools.ts
Normal file
91
ui/src/api/node_pools.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
import { withRefresh } from "@/api/with-refresh.ts"
|
||||
import type {
|
||||
DtoAttachAnnotationsRequest,
|
||||
DtoAttachLabelsRequest,
|
||||
DtoAttachServersRequest,
|
||||
DtoAttachTaintsRequest,
|
||||
DtoCreateNodePoolRequest,
|
||||
DtoUpdateNodePoolRequest,
|
||||
} from "@/sdk"
|
||||
import { makeNodePoolApi } from "@/sdkClient.ts"
|
||||
|
||||
const nodePools = makeNodePoolApi()
|
||||
export const canAttachToPool = (poolRole: string | undefined, serverRole: string | undefined) => {
|
||||
if (!poolRole) return true
|
||||
return poolRole === serverRole
|
||||
}
|
||||
|
||||
export const nodePoolsApi = {
|
||||
listNodePools: () =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.listNodePools({})
|
||||
}),
|
||||
createNodePool: (body: DtoCreateNodePoolRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.createNodePool({ body })
|
||||
}),
|
||||
getNodePool: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.getNodePool({ id })
|
||||
}),
|
||||
deleteNodePool: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
await nodePools.deleteNodePool({ id })
|
||||
}),
|
||||
updateNodePool: (id: string, body: DtoUpdateNodePoolRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.updateNodePool({ id, body })
|
||||
}),
|
||||
// Servers
|
||||
listNodePoolServers: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.listNodePoolServers({ id })
|
||||
}),
|
||||
attachNodePoolServer: (id: string, body: DtoAttachServersRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.attachNodePoolServers({ id, body })
|
||||
}),
|
||||
detachNodePoolServers: (id: string, serverId: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.detachNodePoolServer({ id, serverId })
|
||||
}),
|
||||
// Taints
|
||||
listNodePoolTaints: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.listNodePoolTaints({ id })
|
||||
}),
|
||||
attachNodePoolTaints: (id: string, body: DtoAttachTaintsRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.attachNodePoolTaints({ id, body })
|
||||
}),
|
||||
detachNodePoolTaints: (id: string, taintId: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.detachNodePoolTaint({ id, taintId })
|
||||
}),
|
||||
// Labels
|
||||
listNodePoolLabels: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.listNodePoolLabels({ id })
|
||||
}),
|
||||
attachNodePoolLabels: (id: string, body: DtoAttachLabelsRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.attachNodePoolLabels({ id, body })
|
||||
}),
|
||||
detachNodePoolLabels: (id: string, labelId: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.detachNodePoolLabel({ id, labelId })
|
||||
}),
|
||||
// Annotations
|
||||
listNodePoolAnnotations: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.listNodePoolAnnotations({ id })
|
||||
}),
|
||||
attachNodePoolAnnotations: (id: string, body: DtoAttachAnnotationsRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.attachNodePoolAnnotations({ id, body })
|
||||
}),
|
||||
detachNodePoolAnnotations: (id: string, annotationId: string) =>
|
||||
withRefresh(async () => {
|
||||
return await nodePools.detachNodePoolAnnotation({ id, annotationId })
|
||||
}),
|
||||
}
|
||||
@@ -1,10 +1,29 @@
|
||||
import { withRefresh } from "@/api/with-refresh.ts"
|
||||
import { orgStore } from "@/auth/org.ts"
|
||||
import { authStore } from "@/auth/store.ts"
|
||||
import type { DtoCreateSSHRequest, DtoSshResponse, DtoSshRevealResponse } from "@/sdk"
|
||||
import { makeSshApi } from "@/sdkClient.ts"
|
||||
|
||||
const ssh = makeSshApi()
|
||||
export type SshDownloadPart = "public" | "private" | "both"
|
||||
|
||||
function authHeaders() {
|
||||
const token = authStore.getAccessToken()
|
||||
const orgId = orgStore.get()
|
||||
return {
|
||||
...(token ? { Authorization: `Bearer ${token}` } : {}),
|
||||
...(orgId ? { "X-Org-ID": orgId } : {}),
|
||||
}
|
||||
}
|
||||
|
||||
async function authedFetch(input: RequestInfo | URL, init: RequestInit = {}) {
|
||||
return fetch(input, {
|
||||
...init,
|
||||
headers: { ...(init.headers as any), ...authHeaders() },
|
||||
credentials: "include", // keep if you rely on cookies/HttpOnly sessions
|
||||
})
|
||||
}
|
||||
|
||||
export const sshApi = {
|
||||
listSshKeys: () =>
|
||||
withRefresh(async (): Promise<DtoSshResponse[]> => {
|
||||
@@ -42,7 +61,7 @@ export const sshApi = {
|
||||
url.searchParams.set("part", part)
|
||||
url.searchParams.set("mode", "json")
|
||||
|
||||
const res = await fetch(url.toString())
|
||||
const res = await authedFetch(url.toString())
|
||||
if (!res.ok) throw new Error(`Download failed: ${res.statusText}`)
|
||||
return (await res.json()) as {
|
||||
id: string
|
||||
@@ -61,7 +80,7 @@ export const sshApi = {
|
||||
const url = new URL(`/api/v1/ssh/${id}/download`, window.location.origin)
|
||||
url.searchParams.set("part", part)
|
||||
|
||||
const res = await fetch(url.toString())
|
||||
const res = await authedFetch(url.toString())
|
||||
if (!res.ok) throw new Error(`Download failed: ${res.statusText}`)
|
||||
|
||||
// Parse filename from Content-Disposition
|
||||
|
||||
@@ -378,8 +378,13 @@ export const MePage = () => {
|
||||
<Input
|
||||
type="number"
|
||||
inputMode="numeric"
|
||||
step={1}
|
||||
min={1}
|
||||
placeholder="e.g. 720"
|
||||
{...field}
|
||||
onChange={(e) =>
|
||||
field.onChange(e.target.value === "" ? "" : Number(e.target.value))
|
||||
}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
|
||||
1065
ui/src/pages/nodepools/node-pools-page.tsx
Normal file
1065
ui/src/pages/nodepools/node-pools-page.tsx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -59,7 +59,7 @@ const createServerSchema = z
|
||||
public_ip_address: z.string().trim().optional().or(z.literal("")),
|
||||
private_ip_address: z.string().trim().min(1, "Private IP address required"),
|
||||
role: z.enum(ROLE_OPTIONS),
|
||||
ssh_key_id: z.string().uuid("Pick a valid SSH key"),
|
||||
ssh_key_id: z.uuid("Pick a valid SSH key"),
|
||||
ssh_user: z.string().trim().min(1, "SSH user is required"),
|
||||
status: z.enum(STATUS).default("pending"),
|
||||
})
|
||||
|
||||
@@ -6,9 +6,14 @@ docs/AnnotationsApi.md
|
||||
docs/ArcherAdminApi.md
|
||||
docs/AuthApi.md
|
||||
docs/DtoAnnotationResponse.md
|
||||
docs/DtoAttachAnnotationsRequest.md
|
||||
docs/DtoAttachLabelsRequest.md
|
||||
docs/DtoAttachServersRequest.md
|
||||
docs/DtoAttachTaintsRequest.md
|
||||
docs/DtoAuthStartResponse.md
|
||||
docs/DtoCreateAnnotationRequest.md
|
||||
docs/DtoCreateLabelRequest.md
|
||||
docs/DtoCreateNodePoolRequest.md
|
||||
docs/DtoCreateSSHRequest.md
|
||||
docs/DtoCreateServerRequest.md
|
||||
docs/DtoCreateTaintRequest.md
|
||||
@@ -18,6 +23,7 @@ docs/DtoJob.md
|
||||
docs/DtoJobStatus.md
|
||||
docs/DtoLabelResponse.md
|
||||
docs/DtoLogoutRequest.md
|
||||
docs/DtoNodePoolResponse.md
|
||||
docs/DtoPageJob.md
|
||||
docs/DtoQueueInfo.md
|
||||
docs/DtoRefreshRequest.md
|
||||
@@ -28,6 +34,7 @@ docs/DtoTaintResponse.md
|
||||
docs/DtoTokenPair.md
|
||||
docs/DtoUpdateAnnotationRequest.md
|
||||
docs/DtoUpdateLabelRequest.md
|
||||
docs/DtoUpdateNodePoolRequest.md
|
||||
docs/DtoUpdateServerRequest.md
|
||||
docs/DtoUpdateTaintRequest.md
|
||||
docs/HandlersCreateUserKeyRequest.md
|
||||
@@ -49,6 +56,7 @@ docs/ModelsAPIKey.md
|
||||
docs/ModelsOrganization.md
|
||||
docs/ModelsUser.md
|
||||
docs/ModelsUserEmail.md
|
||||
docs/NodePoolsApi.md
|
||||
docs/OrgsApi.md
|
||||
docs/ServersApi.md
|
||||
docs/SshApi.md
|
||||
@@ -62,6 +70,7 @@ src/apis/HealthApi.ts
|
||||
src/apis/LabelsApi.ts
|
||||
src/apis/MeAPIKeysApi.ts
|
||||
src/apis/MeApi.ts
|
||||
src/apis/NodePoolsApi.ts
|
||||
src/apis/OrgsApi.ts
|
||||
src/apis/ServersApi.ts
|
||||
src/apis/SshApi.ts
|
||||
@@ -69,9 +78,14 @@ src/apis/TaintsApi.ts
|
||||
src/apis/index.ts
|
||||
src/index.ts
|
||||
src/models/DtoAnnotationResponse.ts
|
||||
src/models/DtoAttachAnnotationsRequest.ts
|
||||
src/models/DtoAttachLabelsRequest.ts
|
||||
src/models/DtoAttachServersRequest.ts
|
||||
src/models/DtoAttachTaintsRequest.ts
|
||||
src/models/DtoAuthStartResponse.ts
|
||||
src/models/DtoCreateAnnotationRequest.ts
|
||||
src/models/DtoCreateLabelRequest.ts
|
||||
src/models/DtoCreateNodePoolRequest.ts
|
||||
src/models/DtoCreateSSHRequest.ts
|
||||
src/models/DtoCreateServerRequest.ts
|
||||
src/models/DtoCreateTaintRequest.ts
|
||||
@@ -81,6 +95,7 @@ src/models/DtoJob.ts
|
||||
src/models/DtoJobStatus.ts
|
||||
src/models/DtoLabelResponse.ts
|
||||
src/models/DtoLogoutRequest.ts
|
||||
src/models/DtoNodePoolResponse.ts
|
||||
src/models/DtoPageJob.ts
|
||||
src/models/DtoQueueInfo.ts
|
||||
src/models/DtoRefreshRequest.ts
|
||||
@@ -91,6 +106,7 @@ src/models/DtoTaintResponse.ts
|
||||
src/models/DtoTokenPair.ts
|
||||
src/models/DtoUpdateAnnotationRequest.ts
|
||||
src/models/DtoUpdateLabelRequest.ts
|
||||
src/models/DtoUpdateNodePoolRequest.ts
|
||||
src/models/DtoUpdateServerRequest.ts
|
||||
src/models/DtoUpdateTaintRequest.ts
|
||||
src/models/HandlersCreateUserKeyRequest.ts
|
||||
|
||||
1170
ui/src/sdk/apis/NodePoolsApi.ts
Normal file
1170
ui/src/sdk/apis/NodePoolsApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@ export * from './HealthApi';
|
||||
export * from './LabelsApi';
|
||||
export * from './MeApi';
|
||||
export * from './MeAPIKeysApi';
|
||||
export * from './NodePoolsApi';
|
||||
export * from './OrgsApi';
|
||||
export * from './ServersApi';
|
||||
export * from './SshApi';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# AnnotationsApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ArcherAdminApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# AuthApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
34
ui/src/sdk/docs/DtoAttachAnnotationsRequest.md
Normal file
34
ui/src/sdk/docs/DtoAttachAnnotationsRequest.md
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
# DtoAttachAnnotationsRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`annotation_ids` | Array<string>
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoAttachAnnotationsRequest } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"annotation_ids": null,
|
||||
} satisfies DtoAttachAnnotationsRequest
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoAttachAnnotationsRequest
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
34
ui/src/sdk/docs/DtoAttachLabelsRequest.md
Normal file
34
ui/src/sdk/docs/DtoAttachLabelsRequest.md
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
# DtoAttachLabelsRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`label_ids` | Array<string>
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoAttachLabelsRequest } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"label_ids": null,
|
||||
} satisfies DtoAttachLabelsRequest
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoAttachLabelsRequest
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
34
ui/src/sdk/docs/DtoAttachServersRequest.md
Normal file
34
ui/src/sdk/docs/DtoAttachServersRequest.md
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
# DtoAttachServersRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`server_ids` | Array<string>
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoAttachServersRequest } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"server_ids": null,
|
||||
} satisfies DtoAttachServersRequest
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoAttachServersRequest
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
34
ui/src/sdk/docs/DtoAttachTaintsRequest.md
Normal file
34
ui/src/sdk/docs/DtoAttachTaintsRequest.md
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
# DtoAttachTaintsRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`taint_ids` | Array<string>
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoAttachTaintsRequest } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"taint_ids": null,
|
||||
} satisfies DtoAttachTaintsRequest
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoAttachTaintsRequest
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
36
ui/src/sdk/docs/DtoCreateNodePoolRequest.md
Normal file
36
ui/src/sdk/docs/DtoCreateNodePoolRequest.md
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
# DtoCreateNodePoolRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`name` | string
|
||||
`role` | string
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoCreateNodePoolRequest } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"name": null,
|
||||
"role": null,
|
||||
} satisfies DtoCreateNodePoolRequest
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoCreateNodePoolRequest
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
52
ui/src/sdk/docs/DtoNodePoolResponse.md
Normal file
52
ui/src/sdk/docs/DtoNodePoolResponse.md
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
# DtoNodePoolResponse
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`annotations` | [Array<DtoAnnotationResponse>](DtoAnnotationResponse.md)
|
||||
`created_at` | string
|
||||
`id` | string
|
||||
`labels` | [Array<DtoLabelResponse>](DtoLabelResponse.md)
|
||||
`name` | string
|
||||
`organization_id` | string
|
||||
`role` | string
|
||||
`servers` | [Array<DtoServerResponse>](DtoServerResponse.md)
|
||||
`taints` | [Array<DtoTaintResponse>](DtoTaintResponse.md)
|
||||
`updated_at` | string
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoNodePoolResponse } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"annotations": null,
|
||||
"created_at": null,
|
||||
"id": null,
|
||||
"labels": null,
|
||||
"name": null,
|
||||
"organization_id": null,
|
||||
"role": null,
|
||||
"servers": null,
|
||||
"taints": null,
|
||||
"updated_at": null,
|
||||
} satisfies DtoNodePoolResponse
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoNodePoolResponse
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ const example = {
|
||||
"organization_id": null,
|
||||
"private_ip_address": null,
|
||||
"public_ip_address": null,
|
||||
"role": null,
|
||||
"role": master|worker|bastion,
|
||||
"ssh_key_id": null,
|
||||
"ssh_user": null,
|
||||
"status": null,
|
||||
"status": pending|provisioning|ready|failed,
|
||||
"updated_at": null,
|
||||
} satisfies DtoServerResponse
|
||||
|
||||
|
||||
36
ui/src/sdk/docs/DtoUpdateNodePoolRequest.md
Normal file
36
ui/src/sdk/docs/DtoUpdateNodePoolRequest.md
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
# DtoUpdateNodePoolRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`name` | string
|
||||
`role` | string
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoUpdateNodePoolRequest } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"name": null,
|
||||
"role": null,
|
||||
} satisfies DtoUpdateNodePoolRequest
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoUpdateNodePoolRequest
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# HealthApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# LabelsApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# MeAPIKeysApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# MeApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
1435
ui/src/sdk/docs/NodePoolsApi.md
Normal file
1435
ui/src/sdk/docs/NodePoolsApi.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
# OrgsApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ServersApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SshApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# TaintsApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
All URIs are relative to */api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
|
||||
64
ui/src/sdk/models/DtoAttachAnnotationsRequest.ts
Normal file
64
ui/src/sdk/models/DtoAttachAnnotationsRequest.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAttachAnnotationsRequest
|
||||
*/
|
||||
export interface DtoAttachAnnotationsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoAttachAnnotationsRequest
|
||||
*/
|
||||
annotation_ids?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachAnnotationsRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachAnnotationsRequest(value: object): value is DtoAttachAnnotationsRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachAnnotationsRequestFromJSON(json: any): DtoAttachAnnotationsRequest {
|
||||
return DtoAttachAnnotationsRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachAnnotationsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoAttachAnnotationsRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'annotation_ids': json['annotation_ids'] == null ? undefined : json['annotation_ids'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachAnnotationsRequestToJSON(json: any): DtoAttachAnnotationsRequest {
|
||||
return DtoAttachAnnotationsRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachAnnotationsRequestToJSONTyped(value?: DtoAttachAnnotationsRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'annotation_ids': value['annotation_ids'],
|
||||
};
|
||||
}
|
||||
|
||||
64
ui/src/sdk/models/DtoAttachLabelsRequest.ts
Normal file
64
ui/src/sdk/models/DtoAttachLabelsRequest.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAttachLabelsRequest
|
||||
*/
|
||||
export interface DtoAttachLabelsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoAttachLabelsRequest
|
||||
*/
|
||||
label_ids?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachLabelsRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachLabelsRequest(value: object): value is DtoAttachLabelsRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachLabelsRequestFromJSON(json: any): DtoAttachLabelsRequest {
|
||||
return DtoAttachLabelsRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachLabelsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoAttachLabelsRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'label_ids': json['label_ids'] == null ? undefined : json['label_ids'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachLabelsRequestToJSON(json: any): DtoAttachLabelsRequest {
|
||||
return DtoAttachLabelsRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachLabelsRequestToJSONTyped(value?: DtoAttachLabelsRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'label_ids': value['label_ids'],
|
||||
};
|
||||
}
|
||||
|
||||
64
ui/src/sdk/models/DtoAttachServersRequest.ts
Normal file
64
ui/src/sdk/models/DtoAttachServersRequest.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAttachServersRequest
|
||||
*/
|
||||
export interface DtoAttachServersRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoAttachServersRequest
|
||||
*/
|
||||
server_ids?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachServersRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachServersRequest(value: object): value is DtoAttachServersRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachServersRequestFromJSON(json: any): DtoAttachServersRequest {
|
||||
return DtoAttachServersRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachServersRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoAttachServersRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'server_ids': json['server_ids'] == null ? undefined : json['server_ids'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachServersRequestToJSON(json: any): DtoAttachServersRequest {
|
||||
return DtoAttachServersRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachServersRequestToJSONTyped(value?: DtoAttachServersRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'server_ids': value['server_ids'],
|
||||
};
|
||||
}
|
||||
|
||||
64
ui/src/sdk/models/DtoAttachTaintsRequest.ts
Normal file
64
ui/src/sdk/models/DtoAttachTaintsRequest.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAttachTaintsRequest
|
||||
*/
|
||||
export interface DtoAttachTaintsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoAttachTaintsRequest
|
||||
*/
|
||||
taint_ids?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachTaintsRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachTaintsRequest(value: object): value is DtoAttachTaintsRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachTaintsRequestFromJSON(json: any): DtoAttachTaintsRequest {
|
||||
return DtoAttachTaintsRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachTaintsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoAttachTaintsRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'taint_ids': json['taint_ids'] == null ? undefined : json['taint_ids'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachTaintsRequestToJSON(json: any): DtoAttachTaintsRequest {
|
||||
return DtoAttachTaintsRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachTaintsRequestToJSONTyped(value?: DtoAttachTaintsRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'taint_ids': value['taint_ids'],
|
||||
};
|
||||
}
|
||||
|
||||
83
ui/src/sdk/models/DtoCreateNodePoolRequest.ts
Normal file
83
ui/src/sdk/models/DtoCreateNodePoolRequest.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoCreateNodePoolRequest
|
||||
*/
|
||||
export interface DtoCreateNodePoolRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateNodePoolRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateNodePoolRequest
|
||||
*/
|
||||
role?: DtoCreateNodePoolRequestRoleEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateNodePoolRequestRoleEnum = {
|
||||
master: 'master',
|
||||
worker: 'worker'
|
||||
} as const;
|
||||
export type DtoCreateNodePoolRequestRoleEnum = typeof DtoCreateNodePoolRequestRoleEnum[keyof typeof DtoCreateNodePoolRequestRoleEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateNodePoolRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateNodePoolRequest(value: object): value is DtoCreateNodePoolRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateNodePoolRequestFromJSON(json: any): DtoCreateNodePoolRequest {
|
||||
return DtoCreateNodePoolRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateNodePoolRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoCreateNodePoolRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'role': json['role'] == null ? undefined : json['role'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateNodePoolRequestToJSON(json: any): DtoCreateNodePoolRequest {
|
||||
return DtoCreateNodePoolRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateNodePoolRequestToJSONTyped(value?: DtoCreateNodePoolRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'role': value['role'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@@ -42,7 +41,7 @@ export interface DtoCreateServerRequest {
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
role?: string;
|
||||
role?: DtoCreateServerRequestRoleEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -60,9 +59,32 @@ export interface DtoCreateServerRequest {
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
status?: string;
|
||||
status?: DtoCreateServerRequestStatusEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateServerRequestRoleEnum = {
|
||||
master: 'master',
|
||||
worker: 'worker',
|
||||
bastion: 'bastion'
|
||||
} as const;
|
||||
export type DtoCreateServerRequestRoleEnum = typeof DtoCreateServerRequestRoleEnum[keyof typeof DtoCreateServerRequestRoleEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateServerRequestStatusEnum = {
|
||||
pending: 'pending',
|
||||
provisioning: 'provisioning',
|
||||
ready: 'ready',
|
||||
failed: 'failed'
|
||||
} as const;
|
||||
export type DtoCreateServerRequestStatusEnum = typeof DtoCreateServerRequestStatusEnum[keyof typeof DtoCreateServerRequestStatusEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateServerRequest interface.
|
||||
*/
|
||||
|
||||
156
ui/src/sdk/models/DtoNodePoolResponse.ts
Normal file
156
ui/src/sdk/models/DtoNodePoolResponse.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import type { DtoTaintResponse } from "./DtoTaintResponse"
|
||||
import { DtoTaintResponseFromJSON, DtoTaintResponseToJSON, } from "./DtoTaintResponse"
|
||||
import type { DtoLabelResponse } from "./DtoLabelResponse"
|
||||
import { DtoLabelResponseFromJSON, DtoLabelResponseToJSON, } from "./DtoLabelResponse"
|
||||
import type { DtoServerResponse } from "./DtoServerResponse"
|
||||
import { DtoServerResponseFromJSON, DtoServerResponseToJSON, } from "./DtoServerResponse"
|
||||
import type { DtoAnnotationResponse } from "./DtoAnnotationResponse"
|
||||
import { DtoAnnotationResponseFromJSON, DtoAnnotationResponseToJSON, } from "./DtoAnnotationResponse"
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoNodePoolResponse
|
||||
*/
|
||||
export interface DtoNodePoolResponse {
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoAnnotationResponse>}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
annotations?: Array<DtoAnnotationResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoLabelResponse>}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
labels?: Array<DtoLabelResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
role?: DtoNodePoolResponseRoleEnum;
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoServerResponse>}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
servers?: Array<DtoServerResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoTaintResponse>}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
taints?: Array<DtoTaintResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoNodePoolResponseRoleEnum = {
|
||||
master: 'master',
|
||||
worker: 'worker'
|
||||
} as const;
|
||||
export type DtoNodePoolResponseRoleEnum = typeof DtoNodePoolResponseRoleEnum[keyof typeof DtoNodePoolResponseRoleEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoNodePoolResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoNodePoolResponse(value: object): value is DtoNodePoolResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoNodePoolResponseFromJSON(json: any): DtoNodePoolResponse {
|
||||
return DtoNodePoolResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoNodePoolResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoNodePoolResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'annotations': json['annotations'] == null ? undefined : ((json['annotations'] as Array<any>).map(DtoAnnotationResponseFromJSON)),
|
||||
'created_at': json['created_at'] == null ? undefined : json['created_at'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'labels': json['labels'] == null ? undefined : ((json['labels'] as Array<any>).map(DtoLabelResponseFromJSON)),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'organization_id': json['organization_id'] == null ? undefined : json['organization_id'],
|
||||
'role': json['role'] == null ? undefined : json['role'],
|
||||
'servers': json['servers'] == null ? undefined : ((json['servers'] as Array<any>).map(DtoServerResponseFromJSON)),
|
||||
'taints': json['taints'] == null ? undefined : ((json['taints'] as Array<any>).map(DtoTaintResponseFromJSON)),
|
||||
'updated_at': json['updated_at'] == null ? undefined : json['updated_at'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoNodePoolResponseToJSON(json: any): DtoNodePoolResponse {
|
||||
return DtoNodePoolResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoNodePoolResponseToJSONTyped(value?: DtoNodePoolResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'annotations': value['annotations'] == null ? undefined : ((value['annotations'] as Array<any>).map(DtoAnnotationResponseToJSON)),
|
||||
'created_at': value['created_at'],
|
||||
'id': value['id'],
|
||||
'labels': value['labels'] == null ? undefined : ((value['labels'] as Array<any>).map(DtoLabelResponseToJSON)),
|
||||
'name': value['name'],
|
||||
'organization_id': value['organization_id'],
|
||||
'role': value['role'],
|
||||
'servers': value['servers'] == null ? undefined : ((value['servers'] as Array<any>).map(DtoServerResponseToJSON)),
|
||||
'taints': value['taints'] == null ? undefined : ((value['taints'] as Array<any>).map(DtoTaintResponseToJSON)),
|
||||
'updated_at': value['updated_at'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@@ -60,7 +59,7 @@ export interface DtoServerResponse {
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
role?: string;
|
||||
role?: DtoServerResponseRoleEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -78,7 +77,7 @@ export interface DtoServerResponse {
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
status?: string;
|
||||
status?: DtoServerResponseStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -87,6 +86,29 @@ export interface DtoServerResponse {
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoServerResponseRoleEnum = {
|
||||
master: 'master',
|
||||
worker: 'worker',
|
||||
bastion: 'bastion'
|
||||
} as const;
|
||||
export type DtoServerResponseRoleEnum = typeof DtoServerResponseRoleEnum[keyof typeof DtoServerResponseRoleEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoServerResponseStatusEnum = {
|
||||
pending: 'pending',
|
||||
provisioning: 'provisioning',
|
||||
ready: 'ready',
|
||||
failed: 'failed'
|
||||
} as const;
|
||||
export type DtoServerResponseStatusEnum = typeof DtoServerResponseStatusEnum[keyof typeof DtoServerResponseStatusEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoServerResponse interface.
|
||||
*/
|
||||
|
||||
83
ui/src/sdk/models/DtoUpdateNodePoolRequest.ts
Normal file
83
ui/src/sdk/models/DtoUpdateNodePoolRequest.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoUpdateNodePoolRequest
|
||||
*/
|
||||
export interface DtoUpdateNodePoolRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateNodePoolRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateNodePoolRequest
|
||||
*/
|
||||
role?: DtoUpdateNodePoolRequestRoleEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateNodePoolRequestRoleEnum = {
|
||||
master: 'master',
|
||||
worker: 'worker'
|
||||
} as const;
|
||||
export type DtoUpdateNodePoolRequestRoleEnum = typeof DtoUpdateNodePoolRequestRoleEnum[keyof typeof DtoUpdateNodePoolRequestRoleEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateNodePoolRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateNodePoolRequest(value: object): value is DtoUpdateNodePoolRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateNodePoolRequestFromJSON(json: any): DtoUpdateNodePoolRequest {
|
||||
return DtoUpdateNodePoolRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateNodePoolRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoUpdateNodePoolRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'role': json['role'] == null ? undefined : json['role'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateNodePoolRequestToJSON(json: any): DtoUpdateNodePoolRequest {
|
||||
return DtoUpdateNodePoolRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateNodePoolRequestToJSONTyped(value?: DtoUpdateNodePoolRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'role': value['role'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@@ -42,7 +41,7 @@ export interface DtoUpdateServerRequest {
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
role?: string;
|
||||
role?: DtoUpdateServerRequestRoleEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -60,9 +59,32 @@ export interface DtoUpdateServerRequest {
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
status?: string;
|
||||
status?: DtoUpdateServerRequestStatusEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateServerRequestRoleEnum = {
|
||||
master: 'master',
|
||||
worker: 'worker',
|
||||
bastion: 'bastion'
|
||||
} as const;
|
||||
export type DtoUpdateServerRequestRoleEnum = typeof DtoUpdateServerRequestRoleEnum[keyof typeof DtoUpdateServerRequestRoleEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateServerRequestStatusEnum = {
|
||||
pending: 'pending',
|
||||
provisioning: 'provisioning',
|
||||
ready: 'ready',
|
||||
failed: 'failed'
|
||||
} as const;
|
||||
export type DtoUpdateServerRequestStatusEnum = typeof DtoUpdateServerRequestStatusEnum[keyof typeof DtoUpdateServerRequestStatusEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateServerRequest interface.
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './DtoAnnotationResponse';
|
||||
export * from './DtoAttachAnnotationsRequest';
|
||||
export * from './DtoAttachLabelsRequest';
|
||||
export * from './DtoAttachServersRequest';
|
||||
export * from './DtoAttachTaintsRequest';
|
||||
export * from './DtoAuthStartResponse';
|
||||
export * from './DtoCreateAnnotationRequest';
|
||||
export * from './DtoCreateLabelRequest';
|
||||
export * from './DtoCreateNodePoolRequest';
|
||||
export * from './DtoCreateSSHRequest';
|
||||
export * from './DtoCreateServerRequest';
|
||||
export * from './DtoCreateTaintRequest';
|
||||
@@ -13,6 +18,7 @@ export * from './DtoJob';
|
||||
export * from './DtoJobStatus';
|
||||
export * from './DtoLabelResponse';
|
||||
export * from './DtoLogoutRequest';
|
||||
export * from './DtoNodePoolResponse';
|
||||
export * from './DtoPageJob';
|
||||
export * from './DtoQueueInfo';
|
||||
export * from './DtoRefreshRequest';
|
||||
@@ -23,6 +29,7 @@ export * from './DtoTaintResponse';
|
||||
export * from './DtoTokenPair';
|
||||
export * from './DtoUpdateAnnotationRequest';
|
||||
export * from './DtoUpdateLabelRequest';
|
||||
export * from './DtoUpdateNodePoolRequest';
|
||||
export * from './DtoUpdateServerRequest';
|
||||
export * from './DtoUpdateTaintRequest';
|
||||
export * from './HandlersCreateUserKeyRequest';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
|
||||
export const BASE_PATH = "http://localhost:8080/api/v1".replace(/\/+$/, "");
|
||||
export const BASE_PATH = "/api/v1".replace(/\/+$/, "");
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
basePath?: string; // override base path
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
LabelsApi,
|
||||
MeApi,
|
||||
MeAPIKeysApi,
|
||||
NodePoolsApi,
|
||||
OrgsApi,
|
||||
ServersApi,
|
||||
SshApi,
|
||||
@@ -99,6 +100,11 @@ export function makeLabelsApi() {
|
||||
export function makeAnnotationsApi() {
|
||||
return makeApiClient(AnnotationsApi)
|
||||
}
|
||||
|
||||
export function makeArcherAdminApi() {
|
||||
return makeApiClient(ArcherAdminApi)
|
||||
}
|
||||
|
||||
export function makeNodePoolApi() {
|
||||
return makeApiClient(NodePoolsApi)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user