fix: add INELIGIBLE state to ConfigErrorState enum (#1220)

This commit is contained in:
Zack Spear
2025-03-13 17:19:13 -07:00
committed by GitHub
parent 3ea3953f4c
commit 0f550f9d94
12 changed files with 12 additions and 15 deletions

View File

@@ -285,6 +285,7 @@ export type Config = Node & {
}; };
export enum ConfigErrorState { export enum ConfigErrorState {
INELIGIBLE = 'INELIGIBLE',
INVALID = 'INVALID', INVALID = 'INVALID',
NO_KEY_SERVER = 'NO_KEY_SERVER', NO_KEY_SERVER = 'NO_KEY_SERVER',
UNKNOWN_ERROR = 'UNKNOWN_ERROR', UNKNOWN_ERROR = 'UNKNOWN_ERROR',

View File

@@ -1,10 +1,3 @@
enum ConfigErrorState {
UNKNOWN_ERROR
INVALID
NO_KEY_SERVER
WITHDRAWN
}
type Config implements Node { type Config implements Node {
id: ID! id: ID!
valid: Boolean valid: Boolean

View File

@@ -8,6 +8,7 @@ type Subscription {
enum ConfigErrorState { enum ConfigErrorState {
UNKNOWN_ERROR UNKNOWN_ERROR
INELIGIBLE
INVALID INVALID
NO_KEY_SERVER NO_KEY_SERVER
WITHDRAWN WITHDRAWN

View File

@@ -676,7 +676,7 @@ echo "</div>";
echo "<div class='nav-tile right'>"; echo "<div class='nav-tile right'>";
if (isset($myPage['Lock'])) { if (isset($myPage['Lock'])) {
$title = $themes2 ? "" : _('Unlock sortable items'); $title = $themes2 ? "" : _('Unlock sortable items');
echo "<div class='nav-item LockButton util'><a 'href='#' class='hand' onclick='LockButton();return false;' title=\"$title\"><b class='icon-u-lock system green-text'></b><span>"._('Unlock sortable items')."</span></a></div>"; echo "<div class='nav-item LockButton util'><a href='#' class='hand' onclick='LockButton();return false;' title=\"$title\"><b class='icon-u-lock system green-text'></b><span>"._('Unlock sortable items')."</span></a></div>";
} }
if ($display['usage']) my_usage(); if ($display['usage']) my_usage();

View File

@@ -667,7 +667,7 @@ echo "</div>";
echo "<div class='nav-tile right'>"; echo "<div class='nav-tile right'>";
if (isset($myPage['Lock'])) { if (isset($myPage['Lock'])) {
$title = $themes2 ? "" : _('Unlock sortable items'); $title = $themes2 ? "" : _('Unlock sortable items');
echo "<div class='nav-item LockButton util'><a 'href='#' class='hand' onclick='LockButton();return false;' title=\"$title\"><b class='icon-u-lock system green-text'></b><span>"._('Unlock sortable items')."</span></a></div>"; echo "<div class='nav-item LockButton util'><a href='#' class='hand' onclick='LockButton();return false;' title=\"$title\"><b class='icon-u-lock system green-text'></b><span>"._('Unlock sortable items')."</span></a></div>";
} }
if ($display['usage']) my_usage(); if ($display['usage']) my_usage();

View File

@@ -46,6 +46,7 @@ if (!function_exists('ipaddr')) {
} }
$configErrorEnum = [ // used to map $var['configValid'] value to mimic unraid-api's `configError` ENUM $configErrorEnum = [ // used to map $var['configValid'] value to mimic unraid-api's `configError` ENUM
"error" => 'UNKNOWN_ERROR', "error" => 'UNKNOWN_ERROR',
"ineligible" => 'INELIGIBLE',
"invalid" => 'INVALID', "invalid" => 'INVALID',
"nokeyserver" => 'NO_KEY_SERVER', "nokeyserver" => 'NO_KEY_SERVER',
"withdrawn" => 'WITHDRAWN', "withdrawn" => 'WITHDRAWN',

View File

@@ -1,4 +1,4 @@
/* eslint-disable */
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null; export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>; export type InputMaybe<T> = Maybe<T>;
@@ -288,6 +288,7 @@ export type Config = Node & {
}; };
export enum ConfigErrorState { export enum ConfigErrorState {
Ineligible = 'INELIGIBLE',
Invalid = 'INVALID', Invalid = 'INVALID',
NoKeyServer = 'NO_KEY_SERVER', NoKeyServer = 'NO_KEY_SERVER',
UnknownError = 'UNKNOWN_ERROR', UnknownError = 'UNKNOWN_ERROR',
@@ -371,6 +372,7 @@ export type Disk = {
bytesPerSector: Scalars['Long']['output']; bytesPerSector: Scalars['Long']['output'];
device: Scalars['String']['output']; device: Scalars['String']['output'];
firmwareRevision: Scalars['String']['output']; firmwareRevision: Scalars['String']['output'];
id: Scalars['ID']['output'];
interfaceType: DiskInterfaceType; interfaceType: DiskInterfaceType;
name: Scalars['String']['output']; name: Scalars['String']['output'];
partitions?: Maybe<Array<DiskPartition>>; partitions?: Maybe<Array<DiskPartition>>;

View File

@@ -792,7 +792,6 @@ export const useServerStore = defineStore('server', () => {
// ref: 'configError', // ref: 'configError',
// type: 'server', // type: 'server',
// }; // };
//@ts-expect-error - causing a build-breaking type error, but seems plausible, so i kept it around - pujitm
case 'INELIGIBLE': case 'INELIGIBLE':
return { return {
heading: 'Ineligible for OS Version', heading: 'Ineligible for OS Version',