From dcb2281d020b0db42e653ed61c3c1f359317ac98 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 22 Jul 2019 13:49:50 +0930 Subject: [PATCH] add network share descriptions and removed old array Signed-off-by: Alexis Tyler --- app/graphql/schema/types/disks/disk.graphql | 6 +++++ app/graphql/schema/types/info/array.graphql | 26 ------------------- app/graphql/schema/types/shares/share.graphql | 9 ++++++- 3 files changed, 14 insertions(+), 27 deletions(-) delete mode 100644 app/graphql/schema/types/info/array.graphql diff --git a/app/graphql/schema/types/disks/disk.graphql b/app/graphql/schema/types/disks/disk.graphql index 80c6a0a0b..dfb3bf0bc 100644 --- a/app/graphql/schema/types/disks/disk.graphql +++ b/app/graphql/schema/types/disks/disk.graphql @@ -34,6 +34,7 @@ type Disk { fsStatus: String luksState: String comment: String + """Indicates if the disk should be exported as a network share.""" exportable: Boolean! """Indicates the file system detected in partition 1 of the device.""" fsType: DiskFsType! @@ -52,8 +53,11 @@ enum DiskStatus { } enum DiskType { + """Data disk""" Data + """Parity disk""" Parity + """Flash disk""" Flash } @@ -62,7 +66,9 @@ enum DiskFsType { } enum DiskFsColor { + """Disk is OK and running""" green_on + """Disk is OK and not running""" green_off yellow_on yellow_off diff --git a/app/graphql/schema/types/info/array.graphql b/app/graphql/schema/types/info/array.graphql deleted file mode 100644 index 5d71606b2..000000000 --- a/app/graphql/schema/types/info/array.graphql +++ /dev/null @@ -1,26 +0,0 @@ -type Info { - array: InfoArray @func(module: "info/get-array") -} - -enum InfoArrayState { - """Array is started""" - started - """Array is stopped""" - stopped -} - -type InfoArray { - state: InfoArrayState - capacity: InfoArrayCapacity -} - -type InfoArrayCapacity { - bytes: Capacity - disks: Capacity -} - -type Capacity { - free: Long - used: Long - total: Long -} \ No newline at end of file diff --git a/app/graphql/schema/types/shares/share.graphql b/app/graphql/schema/types/shares/share.graphql index 875271205..826c4f392 100644 --- a/app/graphql/schema/types/shares/share.graphql +++ b/app/graphql/schema/types/shares/share.graphql @@ -1,16 +1,23 @@ type Query { - """Network Share""" + """Network Shares""" shares: [Share] @func(module: "get-shares") } +"""Network Share""" type Share { + """Display name""" name: String + """Free space in bytes""" free: Int + """Total size in bytes""" size: Int + """Disks that're included in this share""" include: [String] + """Disks that're excluded from this share""" exclude: [String] cache: Boolean nameOrig: String + """User comment""" comment: String allocator: String splitLevel: String