Skip to content

Commit

Permalink
Module clean up and V12 compatibility updates
Browse files Browse the repository at this point in the history
* Delete Cache items module and related probe files

* Delete CMSFile usage check (CMSFileModule.cs) and related sql query file

* Remove Newsletters not using email queue (OMNewslettersWithoutQueue.cs)

* Remove Old Web Farm Tasks (OldWebFarmTasks.cs)

* Delete Site map (SiteMapModule.cs)

* Delete Add license key for (LicenseSetupModule.cs)

* Merge Click jacking protection check with module Security settings in web.config; Partial Refactor

* Merge Flood Protection into Security settings

* Merge SSL used for Administrative Interface (SslInAdministrationModule.cs) into Security settings

* Delete Password policy settings module; refactor and prune related tests

* Validate GlobalAdminSetupModule for K12. Refactor. Add app restart code.

* Validate SettingsModule for K12

* Validate and refactor RobotsTxtModule

* Validate SiteDomainAliasesSetup for K12

* Validate SitesSetupModule for K12

* Validate Disable enabled SMTP servers for K12

* Validate StagingServersSetupModule for K12

* Validate WebFarmServersSetupModule for K12

* Validate WebPartAnalyzerModule for K12

* Validate User password modules for K12

* Validate k12 compatibility

* Add missing SQL file
  • Loading branch information
JosefDvorak authored and ChristopherJennings committed May 7, 2019
1 parent 75048b4 commit af9345f
Show file tree
Hide file tree
Showing 22 changed files with 377 additions and 25 deletions.
5 changes: 4 additions & 1 deletion KInspector.Modules/Kentico.KInspector.Modules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@
<Content Include="Scripts\GetTableColumns.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Scripts\InstanceInfo8.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Scripts\PageTypeFieldsDataTypeMismatchModule.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -325,7 +328,7 @@
<Content Include="Scripts\ScreenshotterModule.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Scripts\InstanceInfo.sql">
<Content Include="Scripts\InstanceInfo10.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Scripts\SecuritySettingsModule.sql">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Displays information about application restarts.
Expand Down
3 changes: 2 additions & 1 deletion KInspector.Modules/Modules/EventLog/EventLogErrorsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Displays all errors from the event log.
Expand Down
3 changes: 2 additions & 1 deletion KInspector.Modules/Modules/EventLog/EventLogSizeModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0"),
},
Category = "Event log"
};
Expand Down
3 changes: 2 additions & 1 deletion KInspector.Modules/Modules/EventLog/PageNotFoundsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0"),
},
Comment = @"Displays all the 404 errors from the event log.
Expand Down
3 changes: 2 additions & 1 deletion KInspector.Modules/Modules/General/BigTablesModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Displays top 25 biggest tables from the database.",
Category = "Database"
Expand Down
3 changes: 2 additions & 1 deletion KInspector.Modules/Modules/General/ClassTableValidation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Compares Kentico Classes against tables in database, and displays non-matching entries. Lists tables without Class, Classes without specified table, and missing Class tables. Excludes those classes, which are not meant to have a table. ",
Category = "Database"
Expand Down
3 changes: 2 additions & 1 deletion KInspector.Modules/Modules/General/ColumnFieldValidation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0"),
},
Comment = @"Compares Kentico class fields against table columns in database, and displays non-matching entries. Lists columns without class field and class fields without specified table column.",
Category = "Database"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Runs DBCC CHECKDB on current database which checks all consistency issues (https://msdn.microsoft.com/en-us/library/ms176064.aspx).",
Category = "Consistency issues"
Expand Down
1 change: 1 addition & 0 deletions KInspector.Modules/Modules/General/DebugCheckModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("12.0"),
new Version("11.0")
},
Comment = @"Ensures that all debug keys in the CMS_SettingsKey table and the web.config file are set to false."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Category = "General",
Comment = @"Displays all page templates with disabled web parts and web part zones, meaning templates which have property 'visible' set to 'false'."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Checks that CMS_Tree and CMS_Document tables are without any consistency issues.",
Category = "Consistency issues"
Expand Down
23 changes: 16 additions & 7 deletions KInspector.Modules/Modules/General/InstanceInfoModule.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
using System;
using System.Collections.Generic;
using System.Security.AccessControl;
using Kentico.KInspector.Core;

namespace Kentico.KInspector.Modules
{
public class InstanceInfoModule : IModule
{
private static Dictionary<Version, string> VersionConfig => new Dictionary<Version, string>
{
[new Version("8.0")] = "InstanceInfo8.sql",
[new Version("8.0")] = "InstanceInfo8.sql",
[new Version("8.1")] = "InstanceInfo8.sql",
[new Version("8.2")] = "InstanceInfo8.sql",
[new Version("9.0")] = "InstanceInfo8.sql",
[new Version("10.0")] = "InstanceInfo10.sql",
[new Version("11.0")] = "InstanceInfo10.sql",
[new Version("12.0")] = "InstanceInfo10.sql",
};

public ModuleMetadata GetModuleMetadata()
{
return new ModuleMetadata
{
Name = "Kentico instance information",
SupportedVersions = new[] {
new Version("8.0"),
new Version("8.1"),
new Version("8.2"),
new Version("9.0")
},
SupportedVersions = VersionConfig.Keys,
Comment = @"Shows various information about the Kentico instance.",
};
}

public ModuleResults GetResults(IInstanceInfo instanceInfo)
{
var dbService = instanceInfo.DBService;
var results = dbService.ExecuteAndGetDataSetFromFile("InstanceInfo.sql");
var results = dbService.ExecuteAndGetDataSetFromFile(VersionConfig[instanceInfo.Version]);

return new ModuleResults
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Category = "Performance",
Comment = @"Web sites utilizing Azure Blob storage should limit media library folder size to maximum 100 items per folder to achieve good performance.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"You may face this error when exporting/importing a site or when working with web parts / widgets that list more than one-page type.
This error is caused by at least two different page types (for example A and B) having a field named in the same way (for example FieldName) but in each page type the field data is stored as a different data type (for example for A, it is 'Text' and for B it is 'GUID').
Expand Down
3 changes: 2 additions & 1 deletion KInspector.Modules/Modules/General/ScheduledTasksModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Selects important scheduled tasks",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public ModuleMetadata GetModuleMetadata()
SupportedVersions = new[] {
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Checks for possible issues with processing system, workflow, marketing automation, smart search, and web farm tasks.",
Category = "Database"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0"),
},
Comment = @"Contact groups that have macro condition set via plain macro are always just slower and should be rewritten into MacroRuleDesigner, so that they can be translated into SQL queries to decrease recalculation time.
For more, see https://docs.kentico.com/display/K82/Improving+custom+macro+performance+in+scoring+and+contact+groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0"),
},
Comment = @"Checks whether there is Online marketing module enabled and if so, checks the old contacts deletion settings. These are important to keep OM database smaller.",
Category = "Online marketing",
Expand Down
3 changes: 2 additions & 1 deletion KInspector.Modules/Modules/OnlineMarketing/OMTablesSize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public ModuleMetadata GetModuleMetadata()
new Version("8.2"),
new Version("9.0"),
new Version("10.0"),
new Version("11.0")
new Version("11.0"),
new Version("12.0")
},
Comment = @"Checks whether Online marketing tables aren't too big.
Expand Down
Loading

0 comments on commit af9345f

Please sign in to comment.