// Copyright Epic Games, Inc. All Rights Reserved. using System; using System.Collections.Generic; using EpicGames.Core; using EpicGames.Horde.Common; using HordeServer.Configuration; using HordeServer.Utilities; namespace HordeServer.Dashboard { /// /// Configuration for dashboard features /// [JsonSchema("https://unrealengine.com/horde/dashboard")] [JsonSchemaCatalog("Horde Dashboard", "Horde dashboard configuration file", new[] { "*.dashboard.json", "Dashboard/*.json" })] [ConfigDoc("*.dashboard.json", "[Horde](../../../README.md) > [Configuration](../../Config.md)", "Config/Schema/Dashboard.md")] [ConfigIncludeRoot] [ConfigMacroScope] public class DashboardConfig { /// /// Navigate to the landing page by default /// public bool ShowLandingPage { get; set; } = false; /// /// Custom landing page route to direct users to /// public string LandingPageRoute { get; set; } = String.Empty; /// /// Enable CI functionality /// public bool ShowCI { get; set; } = true; /// /// Whether to show functionality related to agents, pools, and utilization on the dashboard. /// public bool ShowAgents { get; set; } = true; /// /// Whether to show the agent registration page. When using registration tokens from elsewhere this is not needed. /// public bool ShowAgentRegistration { get; set; } = true; /// /// Show the Perforce server option on the server menu /// public bool ShowPerforceServers { get; set; } = true; /// /// Show the device manager on the server menu /// public bool ShowDeviceManager { get; set; } = true; /// /// Show automated tests on the server menu /// public bool ShowTests { get; set; } = true; /// /// Configuration for different agent pages /// public List AgentCategories { get; set; } = new List(); /// /// Configuration for different pool pages /// public List PoolCategories { get; set; } = new List(); /// /// Includes for other configuration files /// public List Include { get; set; } = new List(); /// /// Macros within this configuration /// public List Macros { get; set; } = new List(); } /// /// Configuration for a category of agents /// public class DashboardAgentCategoryConfig { /// /// Name of the category /// public string Name { get; set; } = "Unnamed"; /// /// Condition string to be evaluated for this page /// public Condition? Condition { get; set; } } /// /// Configuration for a category of pools /// public class DashboardPoolCategoryConfig { /// /// Name of the category /// public string Name { get; set; } = "Unnamed"; /// /// Condition string to be evaluated for this page /// public Condition? Condition { get; set; } } }