Skip to content

Commit

Permalink
feat: Session detail panel
Browse files Browse the repository at this point in the history
  • Loading branch information
yomybaby committed Oct 30, 2024
1 parent 80bd516 commit bc869ef
Show file tree
Hide file tree
Showing 27 changed files with 1,356 additions and 92 deletions.
10 changes: 4 additions & 6 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"FGPU",
"filebrowser",
"Frgmt",
"Frgmts",
"Gaudi",
"keypair",
"Lablup",
Expand All @@ -19,17 +20,14 @@
"RNGD",
"shmem",
"superadmin",
"textbox",
"vaadin",
"vfolder",
"vfolders",
"Warboy",
"webcomponent",
"webui",
"wsproxy",
"vfolders",
"vfolder",
"filebrowser",
"vaadin",
"textbox"
"wsproxy"
],
"flagWords": [
"데이터레이크",
Expand Down
255 changes: 207 additions & 48 deletions react/data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,31 @@ type Queries {
agents(scaling_group: String, status: String): [Agent]
agent_summary(agent_id: String!): AgentSummary
agent_summary_list(limit: Int!, offset: Int!, filter: String, order: String, scaling_group: String, status: String): AgentSummaryList

"""Added in 24.12.0."""
domain_node(id: GlobalIDField!, permission: DomainPermissionValueField = "read_attribute"): DomainNode

"""Added in 24.12.0."""
domain_nodes(filter: String, order: String, permission: DomainPermissionValueField = "read_attribute", offset: Int, before: String, after: String, first: Int, last: Int): DomainConnection
domain(name: String): Domain
domains(is_active: Boolean): [Domain]

"""Added in 24.03.0."""
group_node(id: String!): GroupNode

"""Added in 24.03.0."""
group_nodes(filter: String, order: String, offset: Int, before: String, after: String, first: Int, last: Int): GroupConnection
group_nodes(
"""Added in 24.09.0."""
filter: String

"""Added in 24.09.0."""
order: String
offset: Int
before: String
after: String
first: Int
last: Int
): GroupConnection
group(
id: UUID!
domain_name: String
Expand Down Expand Up @@ -349,6 +366,115 @@ type AgentSummaryList implements PaginatedList {
total_count: Int!
}

"""Added in 24.12.0."""
type DomainNode implements Node {
"""The ID of the object"""
id: ID!
name: String
description: String
is_active: Boolean
created_at: DateTime
modified_at: DateTime
total_resource_slots: JSONString
allowed_vfolder_hosts: JSONString
allowed_docker_registries: [String]
dotfiles: Bytes
integration_id: String
scaling_groups(filter: String, order: String, offset: Int, before: String, after: String, first: Int, last: Int): ScalinGroupConnection
}

"""Added in 24.09.1."""
scalar Bytes

"""Added in 24.12.0."""
type ScalinGroupConnection {
"""Pagination data for this connection."""
pageInfo: PageInfo!

"""Contains the nodes in this connection."""
edges: [ScalinGroupEdge]!

"""Total count of the GQL nodes of the query."""
count: Int
}

"""
The Relay compliant `PageInfo` type, containing data necessary to paginate this connection.
"""
type PageInfo {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!

"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!

"""When paginating backwards, the cursor to continue."""
startCursor: String

"""When paginating forwards, the cursor to continue."""
endCursor: String
}

"""
Added in 24.12.0. A Relay edge containing a `ScalinGroup` and its cursor.
"""
type ScalinGroupEdge {
"""The item at the end of the edge"""
node: ScalingGroupNode

"""A cursor for use in pagination"""
cursor: String!
}

"""Added in 24.12.0."""
type ScalingGroupNode implements Node {
"""The ID of the object"""
id: ID!
name: String
description: String
is_active: Boolean
is_public: Boolean
created_at: DateTime
wsproxy_addr: String
wsproxy_api_token: String
driver: String
driver_opts: JSONString
scheduler: String
scheduler_opts: JSONString
use_host_network: Boolean
}

"""
Added in 24.09.0. Global ID of GQL relay spec. Base64 encoded version of "<node type name>:<node id>". UUID or string type values are also allowed.
"""
scalar GlobalIDField

"""
Added in 24.12.0. One of ['read_attribute', 'read_sensitive_attribute', 'update_attribute', 'create_user', 'create_project'].
"""
scalar DomainPermissionValueField

"""Added in 24.12.0"""
type DomainConnection {
"""Pagination data for this connection."""
pageInfo: PageInfo!

"""Contains the nodes in this connection."""
edges: [DomainEdge]!

"""Total count of the GQL nodes of the query."""
count: Int
}

"""Added in 24.12.0 A Relay edge containing a `Domain` and its cursor."""
type DomainEdge {
"""The item at the end of the edge"""
node: DomainNode

"""A cursor for use in pagination"""
cursor: String!
}

type Domain {
name: String
description: String
Expand Down Expand Up @@ -400,23 +526,6 @@ type UserConnection {
count: Int
}

"""
The Relay compliant `PageInfo` type, containing data necessary to paginate this connection.
"""
type PageInfo {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!

"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!

"""When paginating backwards, the cursor to continue."""
startCursor: String

"""When paginating forwards, the cursor to continue."""
endCursor: String
}

"""Added in 24.03.0 A Relay edge containing a `User` and its cursor."""
type UserEdge {
"""The item at the end of the edge"""
Expand Down Expand Up @@ -936,9 +1045,17 @@ type ComputeSessionNode implements Node {
vfolder_mounts: [String]
occupied_slots: JSONString
requested_slots: JSONString

"""Added in 24.12.0."""
image_references: [String]

"""Added in 24.12.0."""
vfolder_nodes: [VirtualFolderNode]
num_queries: BigInt
inference_metrics: JSONString
kernel_nodes(filter: String, order: String, offset: Int, before: String, after: String, first: Int, last: Int): KernelConnection

"""Added in 24.9.0."""
kernel_nodes: [KernelNode]

"""Added in 24.09.0."""
dependents(filter: String, order: String, offset: Int, before: String, after: String, first: Int, last: Int): ComputeSessionConnection
Expand All @@ -955,27 +1072,6 @@ Added in 24.09.0. One of ['read_attribute', 'update_attribute', 'delete_session'
"""
scalar SessionPermissionValueField

"""Added in 24.09.0."""
type KernelConnection {
"""Pagination data for this connection."""
pageInfo: PageInfo!

"""Contains the nodes in this connection."""
edges: [KernelEdge]!

"""Total count of the GQL nodes of the query."""
count: Int
}

"""Added in 24.09.0. A Relay edge containing a `Kernel` and its cursor."""
type KernelEdge {
"""The item at the end of the edge"""
node: KernelNode

"""A cursor for use in pagination"""
cursor: String!
}

"""Added in 24.09.0."""
type KernelNode implements Node {
"""The ID of the object"""
Expand All @@ -989,6 +1085,14 @@ type KernelNode implements Node {
cluster_hostname: String
session_id: UUID
image: ImageNode

"""Added in 24.12.0."""
image_reference: String

"""
Added in 24.12.0. The architecture that the image of this kernel requires
"""
architecture: String
status: String
status_changed: DateTime
status_info: String
Expand Down Expand Up @@ -1030,11 +1134,6 @@ type ComputeSessionEdge {
cursor: String!
}

"""
Added in 24.09.0. Global ID of GQL relay spec. Base64 encoded version of "<node type name>:<node id>". UUID or string type values are also allowed.
"""
scalar GlobalIDField

type ComputeSessionList implements PaginatedList {
items: [ComputeSession]!
total_count: Int!
Expand Down Expand Up @@ -1258,9 +1357,7 @@ type ContainerRegistryNode implements Node {
"""The ID of the object"""
id: ID!

"""
Added in 24.09.0. The undecoded UUID type id of DB container_registries row.
"""
"""Added in 24.09.0. The UUID type id of DB container_registries row."""
row_id: UUID
name: String

Expand Down Expand Up @@ -1393,6 +1490,12 @@ type Mutations {
To purge domain, there should be no users and groups in the target domain.
"""
purge_domain(name: String!): PurgeDomain

"""Added in 24.12.0."""
create_domain_node(input: CreateDomainNodeInput!): CreateDomainNode

"""Added in 24.12.0."""
modify_domain_node(input: ModifyDomainNodeInput!): ModifyDomainNode
create_group(name: String!, props: GroupInput!): CreateGroup
modify_group(gid: UUID!, props: ModifyGroupInput!): ModifyGroup

Expand Down Expand Up @@ -1566,6 +1669,9 @@ type Mutations {
modify_container_registry(hostname: String!, props: ModifyContainerRegistryInput!): ModifyContainerRegistry
delete_container_registry(hostname: String!): DeleteContainerRegistry
modify_endpoint(endpoint_id: UUID!, props: ModifyEndpointInput!): ModifyEndpoint

"""Added in 24.09.0."""
check_and_transit_session_status(input: CheckAndTransitStatusInput!): CheckAndTransitStatus
}

type ModifyAgent {
Expand Down Expand Up @@ -1626,6 +1732,47 @@ type PurgeDomain {
msg: String
}

"""Added in 24.12.0."""
type CreateDomainNode {
ok: Boolean
msg: String
item: DomainNode
}

"""Added in 24.12.0."""
input CreateDomainNodeInput {
name: String!
description: String
is_active: Boolean = true
total_resource_slots: JSONString = "{}"
allowed_vfolder_hosts: JSONString = "{}"
allowed_docker_registries: [String] = []
integration_id: String = null
dotfiles: Bytes = "90"
scaling_groups: [String]
}

"""Added in 24.12.0."""
type ModifyDomainNode {
item: DomainNode
client_mutation_id: String
}

"""Added in 24.12.0."""
input ModifyDomainNodeInput {
id: GlobalIDField!
description: String
is_active: Boolean
total_resource_slots: JSONString
allowed_vfolder_hosts: JSONString
allowed_docker_registries: [String]
integration_id: String
dotfiles: Bytes
sgroups_to_add: [String]
sgroups_to_remove: [String]
client_mutation_id: String
}

type CreateGroup {
ok: Boolean
msg: String
Expand Down Expand Up @@ -2324,4 +2471,16 @@ input ExtraMountInput {
Added in 24.03.4. Set permission of this mount. Should be one of (ro,rw,wd). Default is null
"""
permission: String
}

"""Added in 24.12.0"""
type CheckAndTransitStatus {
item: [ComputeSessionNode]
client_mutation_id: String
}

"""Added in 24.12.0."""
input CheckAndTransitStatusInput {
ids: [GlobalIDField]!
client_mutation_id: String
}
1 change: 1 addition & 0 deletions react/relay.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ module.exports = {
// https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#number-string-boolean-symbol-and-object
DateTime: 'string',
UUID: 'string',
JSONString: 'string',
},
};
Loading

0 comments on commit bc869ef

Please sign in to comment.