| | | 1 | | using System.Globalization; |
| | | 2 | | |
| | | 3 | | namespace Jellyfin.Server.ServerSetupApp; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// A curated vocabulary of generic, non-identifying descriptions of what the server is doing during startup. |
| | | 7 | | /// These are shown in the always-visible header of the startup UI to <b>unauthenticated</b> clients, so every |
| | | 8 | | /// value must stay generic and must never contain server specific details (paths, names, plugin or migration ids, count |
| | | 9 | | /// </summary> |
| | | 10 | | public static class StartupActivity |
| | | 11 | | { |
| | | 12 | | /// <summary>The default state before any work has been reported.</summary> |
| | | 13 | | public const string Starting = "Starting up"; |
| | | 14 | | |
| | | 15 | | /// <summary>Validating that the configured storage locations are usable.</summary> |
| | | 16 | | public const string CheckingStorage = "Checking storage"; |
| | | 17 | | |
| | | 18 | | /// <summary>Bringing up the migration subsystem and running early startup checks.</summary> |
| | | 19 | | public const string Initializing = "Initializing server"; |
| | | 20 | | |
| | | 21 | | /// <summary>Preparing the system for migrations (e.g. taking safety backups).</summary> |
| | | 22 | | public const string PreparingMigrations = "Preparing migrations"; |
| | | 23 | | |
| | | 24 | | /// <summary>Restoring from a backup.</summary> |
| | | 25 | | public const string RestoringBackup = "Restoring backup"; |
| | | 26 | | |
| | | 27 | | /// <summary>Bringing up core services and plugins.</summary> |
| | | 28 | | public const string InitializingServices = "Initializing services"; |
| | | 29 | | |
| | | 30 | | /// <summary>Running the final startup tasks.</summary> |
| | | 31 | | public const string FinishingStartup = "Finishing startup"; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Builds a generic "Running migration X of Y" description. Only the numeric position and total are exposed. |
| | | 35 | | /// </summary> |
| | | 36 | | /// <param name="current">The 1-based index of the migration currently running.</param> |
| | | 37 | | /// <param name="total">The total number of migrations in this batch.</param> |
| | | 38 | | /// <returns>A generic progress description.</returns> |
| | | 39 | | public static string Migration(int current, int total) |
| | 1188 | 40 | | => string.Format(CultureInfo.InvariantCulture, "Running migration {0} of {1}", current, total); |
| | | 41 | | } |