From 67868b72d4bf321893a709e07aa103fb5dce8c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20R=C3=A4tzel?= Date: Tue, 12 May 2020 07:12:17 +0000 Subject: [PATCH] =?UTF-8?q?Improve=20guides=20in=20the=20user=20interface?= =?UTF-8?q?=20=F0=9F=8F=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt to the evolution of language, names, and the organization of features. --- .../PersistentProcess.WebHost/Program.cs | 2 +- implement/elm-fullstack/Program.cs | 20 ++++++++++--------- implement/elm-fullstack/elm-fullstack.csproj | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/implement/PersistentProcess/PersistentProcess.WebHost/Program.cs b/implement/PersistentProcess/PersistentProcess.WebHost/Program.cs index 3c116902..fe32d242 100644 --- a/implement/PersistentProcess/PersistentProcess.WebHost/Program.cs +++ b/implement/PersistentProcess/PersistentProcess.WebHost/Program.cs @@ -2,6 +2,6 @@ namespace Kalmit.PersistentProcess.WebHost { public class Program { - static public string AppVersionId => "2020-05-11"; + static public string AppVersionId => "2020-05-12"; } } diff --git a/implement/elm-fullstack/Program.cs b/implement/elm-fullstack/Program.cs index bc281ecf..306309a1 100644 --- a/implement/elm-fullstack/Program.cs +++ b/implement/elm-fullstack/Program.cs @@ -68,16 +68,16 @@ CommandOption verboseLogOptionFromCommand(CommandLineApplication command) => app.Command("run-server", runServerCmd => { - runServerCmd.Description = "Run a web server supporting administration of an Elm-fullstack app via HTTP. Deployments and migrations of an app usually go through this HTTP server."; + runServerCmd.Description = "Run a web server supporting administration of an Elm-fullstack process via HTTP. This HTTP interface supports deployments, migrations, etc."; var adminInterfaceHttpPortDefault = 4000; var processStoreDirectoryPathOption = runServerCmd.Option("--process-store-directory-path", "Directory in the file system to contain the process store.", CommandOptionType.SingleValue).IsRequired(allowEmptyStrings: false); - var deletePreviousBackendStateOption = runServerCmd.Option("--delete-previous-backend-state", "Delete the previous state of the backend process. If you don't use this option, the server restores the last state backend on startup.", CommandOptionType.NoValue); + var deletePreviousProcessOption = runServerCmd.Option("--delete-previous-process", "Delete the previous backend process found in the given store. If you don't use this option, the server restores the process from the persistent store on startup.", CommandOptionType.NoValue); var adminInterfaceHttpPortOption = runServerCmd.Option("--admin-interface-http-port", "Port for the admin interface HTTP web host. The default is " + adminInterfaceHttpPortDefault.ToString() + ".", CommandOptionType.SingleValue); var adminRootPasswordOption = runServerCmd.Option("--admin-root-password", "Password to access the admin interface with the username 'root'.", CommandOptionType.SingleValue); var publicAppUrlsOption = runServerCmd.Option("--public-urls", "URLs to serve the public app from. The default is '" + string.Join(",", Kalmit.PersistentProcess.WebHost.StartupAdminInterface.PublicWebHostUrlsDefault) + "'.", CommandOptionType.SingleValue); - var replicateProcessFromOption = runServerCmd.Option("--replicate-process-from", "Source to replicate a process from. Can be a URL to a another host admin interface or a path to an archive containing files representing the process state. This option also erases any previously-stored history like '--delete-previous-backend-state'.", CommandOptionType.SingleValue); + var replicateProcessFromOption = runServerCmd.Option("--replicate-process-from", "Source to replicate a process from. Can be a URL to a another host admin interface or a path to an archive containing files representing the process state. This option also erases any previously-stored history like '--delete-previous-process'.", CommandOptionType.SingleValue); var replicateProcessAdminPasswordOption = runServerCmd.Option("--replicate-process-admin-password", "Used together with '--replicate-process-from' if the source requires a password to authenticate.", CommandOptionType.SingleValue); var deployAppConfigOption = runServerCmd.Option("--deploy-app-config", "Perform a deployment on startup, analogous to deploying with the `deploy-app-config` command. Can be combined with '--replicate-process-from'.", CommandOptionType.NoValue); @@ -94,7 +94,7 @@ CommandOption verboseLogOptionFromCommand(CommandLineApplication command) => var replicateProcessAdminPassword = replicateProcessAdminPasswordOption.Value() ?? UserSecrets.LoadPasswordForSite(replicateProcessSource); - if (deletePreviousBackendStateOption.HasValue() || replicateProcessFromOption.HasValue()) + if (deletePreviousProcessOption.HasValue() || replicateProcessFromOption.HasValue()) { Console.WriteLine("Deleting the previous process state from '" + processStoreDirectoryPath + "'..."); @@ -153,7 +153,7 @@ CommandOption verboseLogOptionFromCommand(CommandLineApplication command) => deployAppConfig( site: "http://localhost:" + adminInterfaceHttpPort, sitePassword: adminRootPasswordOption.Value(), - initElmAppState: deletePreviousBackendStateOption.HasValue() && !replicateProcessFromOption.HasValue()); + initElmAppState: deletePreviousProcessOption.HasValue() && !replicateProcessFromOption.HasValue()); } Microsoft.AspNetCore.Hosting.WebHostExtensions.WaitForShutdown(webHost); @@ -226,6 +226,8 @@ CommandOption verboseLogOptionFromCommand(CommandLineApplication command) => app.Command("truncate-process-history", truncateProcessHistoryCmd => { + truncateProcessHistoryCmd.Description = "Remove parts of the process history from the persistent store, which are not needed to restore the process."; + var siteAndPasswordFromCmd = siteAndSitePasswordOptionsOnCommand(truncateProcessHistoryCmd); truncateProcessHistoryCmd.OnExecute(() => @@ -245,7 +247,7 @@ CommandOption verboseLogOptionFromCommand(CommandLineApplication command) => app.Command("user-secrets", userSecretsCmd => { - userSecretsCmd.Description = "Manage user secrets to use with 'deploy' or replication."; + userSecretsCmd.Description = "Manage passwords for accessing the admin interfaces of servers."; userSecretsCmd.Command("store", userSecretsCmd => { @@ -253,9 +255,9 @@ CommandOption verboseLogOptionFromCommand(CommandLineApplication command) => var passwordArgument = userSecretsCmd.Argument("password", "Password to use for authentication.", multipleValues: false).IsRequired(allowEmptyStrings: false); userSecretsCmd.OnExecute(() => - { - UserSecrets.StorePasswordForSite(siteArgument.Value, passwordArgument.Value); - }); + { + UserSecrets.StorePasswordForSite(siteArgument.Value, passwordArgument.Value); + }); }); }); diff --git a/implement/elm-fullstack/elm-fullstack.csproj b/implement/elm-fullstack/elm-fullstack.csproj index 3ee65d49..f3d82acf 100644 --- a/implement/elm-fullstack/elm-fullstack.csproj +++ b/implement/elm-fullstack/elm-fullstack.csproj @@ -5,8 +5,8 @@ netcoreapp3.1 elm_fullstack elm-fullstack - 2020.0511.0.0 - 2020.0511.0.0 + 2020.0512.0.0 + 2020.0512.0.0