From c984d5ad51c80a9ede1613c2bbbf51279966dd8b Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 25 Feb 2018 23:33:07 -0500 Subject: fix log filtering some mods incorrectly --- docs/release-notes.md | 1 + src/SMAPI.Web/Views/LogParser/Index.cshtml | 12 ++++++------ src/SMAPI.Web/wwwroot/Content/js/log-parser.js | 6 ++++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 16284211..74db0256 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -2,6 +2,7 @@ ## 2.6 (upcoming) * For the [log parser][]: * Fixed mod list not including all mods if at least one has no author name. + * Fixed some log entries being incorrectly filtered. ## 2.5.2 * For modders: diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index d9125954..39557d50 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -78,13 +78,13 @@ Installed mods: click any mod to filter - show all - hide all + show all + hide all @foreach (var mod in Model.ParsedLog.Mods.Where(p => p.ContentPackFor == null)) { - + @mod.Name @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[] contentPackList)) @@ -127,9 +127,9 @@ @foreach (var message in Model.ParsedLog.Messages) { - string levelStr = @message.Level.ToString().ToLower(); + string levelStr = message.Level.ToString().ToLower(); - + @@ -137,7 +137,7 @@ if (message.Repeated > 0) { - + diff --git a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js index 87a70391..38a75a80 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js +++ b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js @@ -62,6 +62,7 @@ smapi.logParser = function (data, sectionUrl) { updateModFilters(); }, + showAllMods: function () { for (var key in this.showMods) { if (this.showMods.hasOwnProperty(key)) { @@ -70,6 +71,7 @@ smapi.logParser = function (data, sectionUrl) { } updateModFilters(); }, + hideAllMods: function () { for (var key in this.showMods) { if (this.showMods.hasOwnProperty(key)) { @@ -77,6 +79,10 @@ smapi.logParser = function (data, sectionUrl) { } } updateModFilters(); + }, + + filtersAllow: function(modId, level) { + return this.showMods[modId] !== false && this.showLevels[level] !== false; } } }); -- cgit
@message.Time @message.Level.ToString().ToUpper() @message.Mod
repeats [@message.Repeated] times.