From a4d1582c8e380a27879cfd5fa902e6bcacc84077 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Fri, 12 Jul 2019 15:09:08 +0930 Subject: [PATCH] move disks to own graphql dir/file Signed-off-by: Alexis Tyler --- app/graphql/schema/types/array/array.graphql | 50 ----------------- app/graphql/schema/types/disks/disk.graphql | 59 ++++++++++++++++++++ 2 files changed, 59 insertions(+), 50 deletions(-) create mode 100644 app/graphql/schema/types/disks/disk.graphql diff --git a/app/graphql/schema/types/array/array.graphql b/app/graphql/schema/types/array/array.graphql index e8b70e014..2c9adb003 100644 --- a/app/graphql/schema/types/array/array.graphql +++ b/app/graphql/schema/types/array/array.graphql @@ -31,54 +31,4 @@ type Capacity { free: Long used: Long total: Long -} - -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 } \ No newline at end of file diff --git a/app/graphql/schema/types/disks/disk.graphql b/app/graphql/schema/types/disks/disk.graphql new file mode 100644 index 000000000..f5a969477 --- /dev/null +++ b/app/graphql/schema/types/disks/disk.graphql @@ -0,0 +1,59 @@ +type Query { + disk(id: String!): Disk @func(module: "disks/disk/get-disk") + disks: [Disk]! @func(module: "get-disks") +} + +type Mutation { + mountDisk: Disk + unmountDisk: Disk +} + +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 +} \ No newline at end of file