rolled back change creating an Infrastructure.Interfaces namespace, modified IModule interface to be strongly typed (#343)
* upgrade to .NET Core 3.2 Preview 3 and fixes for issues created by #314 * Components based on Bootstrap4 for Sections and TabStrip to increase productivity and promote uniformity in Module UIs * rolled back change creating an Infrastructure.Interfaces namespace, modified IModule interface to be strongly typed
This commit is contained in:
parent
05de65d3a0
commit
02fde9cec3
@ -1,22 +1,15 @@
|
|||||||
using System.Collections.Generic;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.Modules.Admin.ModuleCreator
|
namespace Oqtane.Modules.Admin.ModuleCreator
|
||||||
{
|
{
|
||||||
public class Module : IModule
|
public class Module : IModule
|
||||||
{
|
{
|
||||||
public Dictionary<string, string> Properties
|
public ModuleDefinition ModuleDefinition => new ModuleDefinition
|
||||||
{
|
{
|
||||||
get
|
Name = "Module Creator",
|
||||||
{
|
Description = "Enables software developers to quickly create modules by automating many of the initial module creation tasks",
|
||||||
Dictionary<string, string> properties = new Dictionary<string, string>
|
Version = "1.0.0",
|
||||||
{
|
Categories = "Developer"
|
||||||
{ "Name", "Module Creator" },
|
};
|
||||||
{ "Description", "Enables software developers to quickly create modules by automating many of the initial module creation tasks" },
|
|
||||||
{ "Version", "1.0.0" },
|
|
||||||
{ "Categories", "Developer" }
|
|
||||||
};
|
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,16 @@
|
|||||||
using System.Collections.Generic;
|
using Oqtane.Models;
|
||||||
|
using Oqtane.Modules;
|
||||||
|
|
||||||
namespace Oqtane.Modules.[Module]s
|
namespace Oqtane.Modules.[Module]s
|
||||||
{
|
{
|
||||||
public class Module : IModule
|
public class Module : IModule
|
||||||
{
|
{
|
||||||
public Dictionary<string, string> Properties
|
public ModuleDefinition ModuleDefinition => new ModuleDefinition
|
||||||
{
|
{
|
||||||
get
|
Name = "[Module]",
|
||||||
{
|
Description = "[Module]",
|
||||||
Dictionary<string, string> properties = new Dictionary<string, string>
|
Version = "1.0.0",
|
||||||
{
|
ServerAssemblyName = "Oqtane.Server"
|
||||||
{ "Name", "[Module]" },
|
};
|
||||||
{ "Description", "[Module]" },
|
|
||||||
{ "Version", "1.0.0" },
|
|
||||||
{ "ServerAssemblyName", "Oqtane.Server" }
|
|
||||||
};
|
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ using Oqtane.Repository.[Module]s;
|
|||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
|
|
||||||
namespace Oqtane.Controllers.[Module]s
|
namespace Oqtane.Controllers.[Module]s
|
||||||
{
|
{
|
||||||
|
@ -1,21 +1,14 @@
|
|||||||
using System.Collections.Generic;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.Modules.Counter
|
namespace Oqtane.Modules.Counter
|
||||||
{
|
{
|
||||||
public class Module : IModule
|
public class Module : IModule
|
||||||
{
|
{
|
||||||
public Dictionary<string, string> Properties
|
public ModuleDefinition ModuleDefinition => new ModuleDefinition
|
||||||
{
|
{
|
||||||
get
|
Name = "Counter",
|
||||||
{
|
Description = "Increments a counter",
|
||||||
Dictionary<string, string> properties = new Dictionary<string, string>
|
Version = "1.0.0"
|
||||||
{
|
};
|
||||||
{ "Name", "Counter" },
|
|
||||||
{ "Description", "Increments a counter" },
|
|
||||||
{ "Version", "1.0.0" }
|
|
||||||
};
|
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,15 @@
|
|||||||
using System.Collections.Generic;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.Modules.HtmlText
|
namespace Oqtane.Modules.HtmlText
|
||||||
{
|
{
|
||||||
public class ModuleInfo : IModule
|
public class ModuleInfo : IModule
|
||||||
{
|
{
|
||||||
public Dictionary<string, string> Properties
|
public ModuleDefinition ModuleDefinition => new ModuleDefinition
|
||||||
{
|
{
|
||||||
get
|
Name = "HtmlText",
|
||||||
{
|
Description = "Renders HTML or Text",
|
||||||
Dictionary<string, string> properties = new Dictionary<string, string>
|
Version = "1.0.0",
|
||||||
{
|
ServerAssemblyName = "Oqtane.Server"
|
||||||
{ "Name", "HtmlText" },
|
};
|
||||||
{ "Description", "Renders HTML or Text" },
|
|
||||||
{ "Version", "1.0.0" },
|
|
||||||
{ "ServerAssemblyName", "Oqtane.Server" }
|
|
||||||
};
|
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.Modules
|
namespace Oqtane.Modules
|
||||||
{
|
{
|
||||||
public interface IModule
|
public interface IModule
|
||||||
{
|
{
|
||||||
Dictionary<string, string> Properties { get; }
|
ModuleDefinition ModuleDefinition { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,14 @@
|
|||||||
using System.Collections.Generic;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.Modules.Weather
|
namespace Oqtane.Modules.Weather
|
||||||
{
|
{
|
||||||
public class Module : IModule
|
public class Module : IModule
|
||||||
{
|
{
|
||||||
public Dictionary<string, string> Properties
|
public ModuleDefinition ModuleDefinition => new ModuleDefinition
|
||||||
{
|
{
|
||||||
get
|
Name = "Weather",
|
||||||
{
|
Description = "Displays random weather using a service",
|
||||||
Dictionary<string, string> properties = new Dictionary<string, string>
|
Version = "1.0.0"
|
||||||
{
|
};
|
||||||
{ "Name", "Weather" },
|
|
||||||
{ "Description", "Displays random weather using a service" },
|
|
||||||
{ "Version", "1.0.0" }
|
|
||||||
};
|
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ using System;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -14,7 +14,7 @@ using System.Linq;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
||||||
|
@ -6,7 +6,7 @@ using Oqtane.Shared;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ using Microsoft.Extensions.Configuration;
|
|||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using Oqtane.Infrastructure;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
|
||||||
|
|
||||||
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ using System;
|
|||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ using Oqtane.Models;
|
|||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ using System.Reflection;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
using System;
|
using System;
|
||||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ using System.Linq;
|
|||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -5,7 +5,7 @@ using Oqtane.Models;
|
|||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -5,7 +5,7 @@ using Oqtane.Shared;
|
|||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -5,7 +5,7 @@ using Oqtane.Models;
|
|||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
@ -4,7 +4,7 @@ using Oqtane.Models;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -8,7 +8,7 @@ using System.Reflection;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
||||||
|
@ -11,7 +11,7 @@ using Oqtane.Shared;
|
|||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
|
@ -7,7 +7,6 @@ using System.Xml;
|
|||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
|
|
||||||
namespace Oqtane.Infrastructure
|
namespace Oqtane.Infrastructure
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Oqtane.Infrastructure.Interfaces
|
namespace Oqtane.Infrastructure
|
||||||
{
|
{
|
||||||
public interface IInstallationManager
|
public interface IInstallationManager
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ using Oqtane.Enums;
|
|||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
|
|
||||||
namespace Oqtane.Infrastructure.Interfaces
|
namespace Oqtane.Infrastructure
|
||||||
{
|
{
|
||||||
public interface ILogManager
|
public interface ILogManager
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Oqtane.Infrastructure.Interfaces
|
namespace Oqtane.Infrastructure
|
||||||
{
|
{
|
||||||
public interface ISiteTemplate
|
public interface ISiteTemplate
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.Infrastructure.Interfaces
|
namespace Oqtane.Infrastructure
|
||||||
{
|
{
|
||||||
public interface ISyncManager
|
public interface ISyncManager
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@ using Microsoft.Extensions.Configuration;
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
// ReSharper disable StringIndexOfIsCultureSpecific.2
|
// ReSharper disable StringIndexOfIsCultureSpecific.2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
@ -3,7 +3,7 @@ using Oqtane.Models;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
|
||||||
namespace Oqtane.Infrastructure
|
namespace Oqtane.Infrastructure
|
||||||
|
@ -7,7 +7,7 @@ using Oqtane.Shared;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
|
|
||||||
namespace Oqtane.Modules.HtmlText.Controllers
|
namespace Oqtane.Modules.HtmlText.Controllers
|
||||||
{
|
{
|
||||||
|
@ -148,50 +148,22 @@ namespace Oqtane.Repository
|
|||||||
if (moduletype != null)
|
if (moduletype != null)
|
||||||
{
|
{
|
||||||
var moduleobject = Activator.CreateInstance(moduletype);
|
var moduleobject = Activator.CreateInstance(moduletype);
|
||||||
Dictionary<string, string> properties = (Dictionary<string, string>)moduletype.GetProperty("Properties").GetValue(moduleobject);
|
moduledefinition = (ModuleDefinition)moduletype.GetProperty("ModuleDefinition").GetValue(moduleobject);
|
||||||
moduledefinition = new ModuleDefinition
|
|
||||||
{
|
|
||||||
ModuleDefinitionName = qualifiedModuleType,
|
|
||||||
Name = GetProperty(properties, "Name"),
|
|
||||||
Description = GetProperty(properties, "Description"),
|
|
||||||
Categories = GetProperty(properties, "Categories"),
|
|
||||||
Version = GetProperty(properties, "Version"),
|
|
||||||
Owner = GetProperty(properties, "Owner"),
|
|
||||||
Url = GetProperty(properties, "Url"),
|
|
||||||
Contact = GetProperty(properties, "Contact"),
|
|
||||||
License = GetProperty(properties, "License"),
|
|
||||||
Dependencies = GetProperty(properties, "Dependencies"),
|
|
||||||
PermissionNames = GetProperty(properties, "PermissionNames"),
|
|
||||||
ServerAssemblyName = GetProperty(properties, "ServerAssemblyName"),
|
|
||||||
ControlTypeTemplate = moduleType + "." + Constants.ActionToken + ", " + typename[1],
|
|
||||||
ControlTypeRoutes = "",
|
|
||||||
AssemblyName = assembly.FullName.Split(",")[0],
|
|
||||||
Permissions = ""
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
moduledefinition = new ModuleDefinition
|
moduledefinition = new ModuleDefinition
|
||||||
{
|
{
|
||||||
ModuleDefinitionName = qualifiedModuleType,
|
|
||||||
Name = moduleType.Substring(moduleType.LastIndexOf(".") + 1),
|
Name = moduleType.Substring(moduleType.LastIndexOf(".") + 1),
|
||||||
Description = moduleType.Substring(moduleType.LastIndexOf(".") + 1),
|
Description = moduleType.Substring(moduleType.LastIndexOf(".") + 1),
|
||||||
Categories = ((qualifiedModuleType.StartsWith("Oqtane.Modules.Admin.")) ? "Admin" : ""),
|
Categories = ((qualifiedModuleType.StartsWith("Oqtane.Modules.Admin.")) ? "Admin" : ""),
|
||||||
Version = new Version(1, 0, 0).ToString(),
|
Version = new Version(1, 0, 0).ToString()
|
||||||
Owner = "",
|
|
||||||
Url = "",
|
|
||||||
Contact = "",
|
|
||||||
License = "",
|
|
||||||
Dependencies = "",
|
|
||||||
PermissionNames = "",
|
|
||||||
ServerAssemblyName = "",
|
|
||||||
ControlTypeTemplate = moduleType + "." + Constants.ActionToken + ", " + typename[1],
|
|
||||||
ControlTypeRoutes = "",
|
|
||||||
AssemblyName = assembly.FullName.Split(",")[0],
|
|
||||||
Permissions = ""
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// permissions
|
// set internal properties
|
||||||
|
moduledefinition.ModuleDefinitionName = qualifiedModuleType;
|
||||||
|
moduledefinition.ControlTypeTemplate = moduleType + "." + Constants.ActionToken + ", " + typename[1];
|
||||||
|
moduledefinition.AssemblyName = assembly.FullName.Split(",")[0];
|
||||||
if (moduledefinition.Categories == "Admin")
|
if (moduledefinition.Categories == "Admin")
|
||||||
{
|
{
|
||||||
moduledefinition.Permissions = "[{\"PermissionName\":\"Utilize\",\"Permissions\":\"" + Constants.AdminRole + "\"}]";
|
moduledefinition.Permissions = "[{\"PermissionName\":\"Utilize\",\"Permissions\":\"" + Constants.AdminRole + "\"}]";
|
||||||
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Oqtane.Extensions;
|
using Oqtane.Extensions;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Modules;
|
using Oqtane.Modules;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.Repository
|
namespace Oqtane.Repository
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
|
|
||||||
namespace Oqtane.Security
|
namespace Oqtane.Security
|
||||||
|
@ -15,7 +15,6 @@ using Microsoft.Extensions.DependencyInjection;
|
|||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
using Oqtane.Infrastructure;
|
using Oqtane.Infrastructure;
|
||||||
using Oqtane.Infrastructure.Interfaces;
|
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
using Oqtane.Services;
|
using Oqtane.Services;
|
||||||
|
@ -5,6 +5,22 @@ namespace Oqtane.Models
|
|||||||
{
|
{
|
||||||
public class ModuleDefinition : IAuditable
|
public class ModuleDefinition : IAuditable
|
||||||
{
|
{
|
||||||
|
public ModuleDefinition()
|
||||||
|
{
|
||||||
|
Name = "";
|
||||||
|
Description = "";
|
||||||
|
Categories = "";
|
||||||
|
Version = "";
|
||||||
|
Owner = "";
|
||||||
|
Url = "";
|
||||||
|
Contact = "";
|
||||||
|
License = "";
|
||||||
|
Dependencies = "";
|
||||||
|
PermissionNames = "";
|
||||||
|
ServerAssemblyName = "";
|
||||||
|
ControlTypeRoutes = "";
|
||||||
|
}
|
||||||
|
|
||||||
public int ModuleDefinitionId { get; set; }
|
public int ModuleDefinitionId { get; set; }
|
||||||
public string ModuleDefinitionName { get; set; }
|
public string ModuleDefinitionName { get; set; }
|
||||||
|
|
||||||
@ -13,6 +29,8 @@ namespace Oqtane.Models
|
|||||||
public string ModifiedBy { get; set; }
|
public string ModifiedBy { get; set; }
|
||||||
public DateTime ModifiedOn { get; set; }
|
public DateTime ModifiedOn { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public int SiteId { get; set; }
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
@ -42,8 +60,6 @@ namespace Oqtane.Models
|
|||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string AssemblyName { get; set; }
|
public string AssemblyName { get; set; }
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public int SiteId { get; set; }
|
|
||||||
[NotMapped]
|
|
||||||
public string Permissions { get; set; }
|
public string Permissions { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user