mirror of
https://github.com/unraid/api.git
synced 2026-01-14 04:29:51 -06:00
add array parity types and array disk types
Signed-off-by: Alexis Tyler <xo@wvvw.me>
This commit is contained in:
@@ -7,17 +7,12 @@ type Mutation {
|
||||
startArray: JSON @func(module: "array/update-array", data: { state: "start" })
|
||||
"""Stop array"""
|
||||
stopArray: JSON @func(module: "array/update-array", data: { state: "stop" })
|
||||
|
||||
"""Start parity check"""
|
||||
startPartityCheck: JSON @func(module: "array/update-parity", data: { state: "start" })
|
||||
"""Cancel parity check"""
|
||||
cancelPartityCheck: JSON @func(module: "array/update-parity", data: { state: "cancel" })
|
||||
}
|
||||
|
||||
type Array {
|
||||
state: ArrayState!
|
||||
capacity: ArrayCapacity!
|
||||
drives: [Drive]
|
||||
disks: [Disk]
|
||||
}
|
||||
|
||||
enum ArrayState {
|
||||
@@ -38,6 +33,52 @@ type Capacity {
|
||||
total: Long
|
||||
}
|
||||
|
||||
type Drive {
|
||||
x: String
|
||||
type Disk {
|
||||
idx: String!
|
||||
name: String!
|
||||
device: String!
|
||||
id: String!
|
||||
size: Int!
|
||||
status: DiskStatus!
|
||||
rotational: Boolean!
|
||||
format: String!
|
||||
temp: Int!
|
||||
numReads: Int!
|
||||
numWrites: Int!
|
||||
numErrors: Int!
|
||||
type: DiskType!
|
||||
color: String!
|
||||
fsStatus: DiskFsStatus!
|
||||
luksState: String!
|
||||
comment: String!
|
||||
exportable: Boolean!
|
||||
fsType: DiskFsType!
|
||||
fsColor: DiskFsColor!
|
||||
fsSize: Int!
|
||||
fsFree: Int!
|
||||
spindownDelay: String!
|
||||
spinupGroup: String!
|
||||
deviceSb: String!
|
||||
idSb: String!
|
||||
sizeSb: Int!
|
||||
}
|
||||
|
||||
enum DiskStatus {
|
||||
DISK_OK
|
||||
}
|
||||
|
||||
enum DiskType {
|
||||
Data
|
||||
}
|
||||
|
||||
enum DiskFsStatus {
|
||||
Mounted
|
||||
}
|
||||
|
||||
enum DiskFsType {
|
||||
xfs
|
||||
}
|
||||
|
||||
enum DiskFsColor {
|
||||
green_on
|
||||
}
|
||||
18
app/graphql/schema/types/array/parity.graphql
Normal file
18
app/graphql/schema/types/array/parity.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
type Query {
|
||||
parityHistory: [ParityCheck] @func(module: "get-parity-history")
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
"""Start parity check"""
|
||||
startPartityCheck: JSON @func(module: "array/update-parity", data: { state: "start" })
|
||||
"""Cancel parity check"""
|
||||
cancelPartityCheck: JSON @func(module: "array/update-parity", data: { state: "cancel" })
|
||||
}
|
||||
|
||||
type ParityCheck {
|
||||
date: String!
|
||||
duration: Int!
|
||||
speed: String!
|
||||
status: String!
|
||||
errors: String!
|
||||
}
|
||||
Reference in New Issue
Block a user