Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4] Add Nodelist page (frontend) #23

Open
wants to merge 5 commits into
base: 3-home-page-frontend
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ Bob Management GUI changelog
- Login Page, backend (#16)
- Login Page, frontend (#17)
- Home page, backend (#18)
- Node list page, backend (#19)
- Home page, frontend (#22)
- Node list page, frontend (#23)
284 changes: 273 additions & 11 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,31 @@ paths:
description: Unauthorized
security:
- api_key: []
/api/v1/nodes/list:
get:
tags:
- services::api
summary: Returns simple list of all known nodes
description: |-
Returns simple list of all known nodes

# Errors

This function will return an error if a call to the primary node will fail
operationId: get_nodes_list
responses:
'200':
description: Simple Node List
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/dto.Node'
'401':
description: Unauthorized
security:
- api_key: []
/api/v1/nodes/rps:
get:
tags:
Expand Down Expand Up @@ -139,6 +164,82 @@ paths:
description: Unauthorized
security:
- api_key: []
/api/v1/nodes/{node_name}:
get:
tags:
- services::api
summary: Returns node inforamtion by their node name
description: |-
Returns node inforamtion by their node name

# Errors

This function will return an error if a call to the specified node will fail or node with
specified name not found
operationId: get_node_info
responses:
'200':
description: Node Inforamtion
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
'401':
description: Unauthorized
'404':
description: Node not found
security:
- api_key: []
/api/v1/nodes/{node_name}/configuration:
get:
tags:
- services::api
summary: Get Configuration from Node
description: |-
Get Configuration from Node

# Errors

This function will return an error if the server was unable to get node'a client or the request to get configuration fails
operationId: raw_configuration_by_node
responses:
'200':
description: Node's configuration
content:
application/json:
schema:
$ref: '#/components/schemas/NodeConfiguration'
'401':
description: Unauthorized
'404':
description: Node Not Found
security:
- api_key: []
/api/v1/nodes/{node_name}/metrics:
get:
tags:
- services::api
summary: Get Raw Metrics from Node
description: |-
Get Raw Metrics from Node

# Errors

This function will return an error if the server was unable to get node'a client or the request to get metrics fails
operationId: raw_metrics_by_node
responses:
'200':
description: Node's metrics
content:
application/json:
schema:
$ref: '#/components/schemas/TypedMetrics'
'401':
description: Unauthorized
'404':
description: Node Not Found
security:
- api_key: []
components:
schemas:
BobConnectionData:
Expand Down Expand Up @@ -174,6 +275,37 @@ components:
example:
login: archeoss
password: '12345'
Disk:
type: object
description: Physical disk definition
required:
- name
- path
- status
- totalSpace
- usedSpace
- iops
properties:
iops:
type: integer
format: int64
minimum: 0
name:
type: string
description: Disk name
path:
type: string
description: Disk path
status:
$ref: '#/components/schemas/DiskStatus'
totalSpace:
type: integer
format: int64
minimum: 0
usedSpace:
type: integer
format: int64
minimum: 0
DiskCount:
type: object
description: Disk count by their status
Expand Down Expand Up @@ -219,9 +351,14 @@ components:
- problems
properties:
problems:
type: array
items:
$ref: '#/components/schemas/DiskProblem'
type: object
required:
- problems
properties:
problems:
type: array
items:
$ref: '#/components/schemas/DiskProblem'
status:
type: string
enum:
Expand Down Expand Up @@ -306,6 +443,42 @@ components:
bad: 0
good: 0
offline: 0
NodeInfo:
type: object
required:
- name
- hostname
- vdisks
- status
properties:
alienCount:
type: integer
format: int64
nullable: true
minimum: 0
corruptedCount:
type: integer
format: int64
nullable: true
minimum: 0
hostname:
type: string
name:
type: string
rps:
allOf:
- $ref: '#/components/schemas/RPS'
nullable: true
space:
allOf:
- $ref: '#/components/schemas/SpaceInfo'
nullable: true
status:
$ref: '#/components/schemas/NodeStatus'
vdisks:
type: array
items:
$ref: '#/components/schemas/VDisk'
NodeProblem:
type: string
description: Defines kind of problem on Node
Expand All @@ -331,9 +504,14 @@ components:
- problems
properties:
problems:
type: array
items:
$ref: '#/components/schemas/NodeProblem'
type: object
required:
- problems
properties:
problems:
type: array
items:
$ref: '#/components/schemas/NodeProblem'
status:
type: string
enum:
Expand Down Expand Up @@ -419,6 +597,23 @@ components:
- hardware.free_space
- hardware.total_space
- hardware.descr_amount
Replica:
type: object
description: '[`VDisk`]''s replicas'
required:
- node
- disk
- path
- status
properties:
disk:
type: string
node:
type: string
path:
type: string
status:
$ref: '#/components/schemas/ReplicaStatus'
ReplicaProblem:
type: string
description: Reasons why Replica is offline
Expand All @@ -441,9 +636,14 @@ components:
- problems
properties:
problems:
type: array
items:
$ref: '#/components/schemas/ReplicaProblem'
type: object
required:
- problems
properties:
problems:
type: array
items:
$ref: '#/components/schemas/ReplicaProblem'
status:
type: string
enum:
Expand Down Expand Up @@ -797,6 +997,29 @@ components:
pearl.put_count_rate:
timestamp: 0
value: 0
VDisk:
type: object
description: Virtual disk Component
required:
- id
- status
- partitionCount
- replicas
properties:
id:
type: integer
format: int64
minimum: 0
partitionCount:
type: integer
format: int64
minimum: 0
replicas:
type: array
items:
$ref: '#/components/schemas/Replica'
status:
$ref: '#/components/schemas/VDiskStatus'
VDiskStatus:
oneOf:
- type: object
Expand Down Expand Up @@ -828,8 +1051,47 @@ components:

Variants - Virtual Disk status
status == 'bad' when at least one of its replicas has problems
example:
status: good
dto.Node:
type: object
required:
- name
- address
properties:
address:
type: string
name:
type: string
vdisks:
type: array
items:
$ref: '#/components/schemas/dto.VDisk'
nullable: true
dto.Replica:
type: object
required:
- node
- disk
- path
properties:
disk:
type: string
node:
type: string
path:
type: string
dto.VDisk:
type: object
required:
- id
properties:
id:
type: integer
format: int32
replicas:
type: array
items:
$ref: '#/components/schemas/dto.Replica'
nullable: true
securitySchemes:
api_key:
type: apiKey
Expand Down
Loading
Loading