From b1400bcb684c43790dd38628b6c131e9e7c4d400 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 27 Nov 2019 21:49:36 -0500 Subject: fallback to Amazon S3 if saving a log to Pastebin fails --- src/SMAPI.Web/ViewModels/LogParserModel.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Web/ViewModels') diff --git a/src/SMAPI.Web/ViewModels/LogParserModel.cs b/src/SMAPI.Web/ViewModels/LogParserModel.cs index f4c5214b..b06b5b2d 100644 --- a/src/SMAPI.Web/ViewModels/LogParserModel.cs +++ b/src/SMAPI.Web/ViewModels/LogParserModel.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; @@ -34,12 +35,18 @@ namespace StardewModdingAPI.Web.ViewModels /// Whether to show the raw unparsed log. public bool ShowRaw { get; set; } - /// An error which occurred while uploading the log to Pastebin. + /// A non-blocking warning while uploading the log. + public string UploadWarning { get; set; } + + /// An error which occurred while uploading the log. public string UploadError { get; set; } /// An error which occurred while parsing the log file. public string ParseError => this.ParsedLog?.Error; + /// When the uploaded file will no longer be available. + public DateTime? Expiry { get; set; } + /********* ** Public methods -- cgit From 5f532c259d5d3050bd6a053659067617db136d57 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 1 Dec 2019 21:55:20 -0500 Subject: migrate from AWS to Azure This commit migrates from subdomains to paths (due to the cost of a wildcard HTTPS certificate on Azure), adds a web project to redirect the old subdomains from AWS to Azure, and removes AWS-specific hacks. --- src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorModel.cs | 7 +------ src/SMAPI.Web/ViewModels/LogParserModel.cs | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'src/SMAPI.Web/ViewModels') diff --git a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorModel.cs b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorModel.cs index 2d13bf23..5b18331f 100644 --- a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorModel.cs +++ b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorModel.cs @@ -9,9 +9,6 @@ namespace StardewModdingAPI.Web.ViewModels.JsonValidator /********* ** Accessors *********/ - /// The root URL for the log parser controller. - public string SectionUrl { get; set; } - /// The paste ID. public string PasteID { get; set; } @@ -44,13 +41,11 @@ namespace StardewModdingAPI.Web.ViewModels.JsonValidator public JsonValidatorModel() { } /// Construct an instance. - /// The root URL for the log parser controller. /// The paste ID. /// The schema name with which the JSON was validated. /// The supported JSON schemas (names indexed by ID). - public JsonValidatorModel(string sectionUrl, string pasteID, string schemaName, IDictionary schemaFormats) + public JsonValidatorModel(string pasteID, string schemaName, IDictionary schemaFormats) { - this.SectionUrl = sectionUrl; this.PasteID = pasteID; this.SchemaName = schemaName; this.SchemaFormats = schemaFormats; diff --git a/src/SMAPI.Web/ViewModels/LogParserModel.cs b/src/SMAPI.Web/ViewModels/LogParserModel.cs index b06b5b2d..bea79eae 100644 --- a/src/SMAPI.Web/ViewModels/LogParserModel.cs +++ b/src/SMAPI.Web/ViewModels/LogParserModel.cs @@ -20,9 +20,6 @@ namespace StardewModdingAPI.Web.ViewModels /********* ** Accessors *********/ - /// The root URL for the log parser controller. - public string SectionUrl { get; set; } - /// The paste ID. public string PasteID { get; set; } @@ -55,12 +52,10 @@ namespace StardewModdingAPI.Web.ViewModels public LogParserModel() { } /// Construct an instance. - /// The root URL for the log parser controller. /// The paste ID. /// The viewer's detected OS, if known. - public LogParserModel(string sectionUrl, string pasteID, Platform? platform) + public LogParserModel(string pasteID, Platform? platform) { - this.SectionUrl = sectionUrl; this.PasteID = pasteID; this.DetectedPlatform = platform; this.ParsedLog = null; -- cgit