From a4439e90ec1927f48d7d8c9c36f9b33ff8df9c8a Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Mon, 10 Jun 2024 17:50:25 +0300 Subject: [PATCH] fix(settings): return the right value for public --- .../portainer/settings/queries/useSettings.ts | 66 ++++++++++++++++--- 1 file changed, 56 insertions(+), 10 deletions(-) diff --git a/app/react/portainer/settings/queries/useSettings.ts b/app/react/portainer/settings/queries/useSettings.ts index 467998d76..a4ddc2f3e 100644 --- a/app/react/portainer/settings/queries/useSettings.ts +++ b/app/react/portainer/settings/queries/useSettings.ts @@ -40,34 +40,80 @@ interface AuthenticatedResponse extends PublicSettingsResponse { } interface EdgeAdminResponse extends AuthenticatedResponse { + /** Only available for edge-admins */ Edge?: EdgeSettings; - /** TrustOnFirstConnect makes Portainer accepting edge agent connection by default */ + /** + * TrustOnFirstConnect makes Portainer accepting edge agent connection by default + * + * Only available for edge-admins + * */ TrustOnFirstConnect: boolean; - /** EnforceEdgeID makes Portainer store the Edge ID instead of accepting anyone */ + /** + * EnforceEdgeID makes Portainer store the Edge ID instead of accepting anyone + * + * Only available for edge-admins + * */ EnforceEdgeID: boolean; - /** EdgePortainerUrl is the URL that is exposed to edge agents */ + /** + * EdgePortainerUrl is the URL that is exposed to edge agents + * + * Only available for edge-admins + * */ EdgePortainerUrl: string; - /** The default check in interval for edge agent (in seconds) */ + /** + * The default check in interval for edge agent (in seconds) + * + * Only available for edge-admins + * */ EdgeAgentCheckinInterval: number; } interface AdminResponse extends EdgeAdminResponse { - /** A list of label name & value that will be used to hide containers when querying containers */ + /** + * A list of label name & value that will be used to hide containers when querying containers + * + * Only available for admins + * */ BlackListedLabels?: Pair[]; + /** Only available for admins */ LDAPSettings?: LDAPSettings; + /** Only available for admins */ OAuthSettings?: OAuthSettings; + /** Only available for admins */ InternalAuthSettings?: InternalAuthSettings; + /** Only available for admins */ openAMTConfiguration?: OpenAMTConfiguration; + /** Only available for admins */ fdoConfiguration?: FDOConfiguration; - /** The interval in which environment(endpoint) snapshots are created */ + /** + * The interval in which environment(endpoint) snapshots are created + * + * Only available for admins + * */ SnapshotInterval: string; - /** URL to the templates that will be displayed in the UI when navigating to App Templates */ + /** + * URL to the templates that will be displayed in the UI when navigating to App Templates + * + * Only available for admins + * */ TemplatesURL: string; - /** The duration of a user session */ + /** + * The duration of a user session + * + * Only available for admins + * */ UserSessionTimeout: string; - /** KubectlImage, defaults to portainer/kubectl-shell */ + /** + * KubectlImage, defaults to portainer/kubectl-shell + * + * Only available for admins + * */ KubectlShellImage: string; - /** Container environment parameter AGENT_SECRET */ + /** + * Container environment parameter AGENT_SECRET + * + * Only available for admins + * */ AgentSecret: string; }