fixes for framework upgrade, fixes for control panel CSS styles, added AllPages attrubute for Modules, bumped version to 0.9.1 to test upgrades
This commit is contained in:
parent
c394c6ea7a
commit
d7ad175cd7
|
@ -32,6 +32,17 @@
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<Label For="allpages" HelpText="Indicate if this module should be displayed on all pages">Display On All Pages? </Label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select id="allpages" class="form-control" @bind="@_allPages">
|
||||||
|
<option value="True">Yes</option>
|
||||||
|
<option value="False">No</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<Label For="page" HelpText="The page that the module is on">Page: </Label>
|
<Label For="page" HelpText="The page that the module is on">Page: </Label>
|
||||||
|
@ -77,6 +88,7 @@
|
||||||
private Dictionary<string, string> _containers;
|
private Dictionary<string, string> _containers;
|
||||||
private string _title;
|
private string _title;
|
||||||
private string _containerType;
|
private string _containerType;
|
||||||
|
private string _allPages = "false";
|
||||||
private string _permissionNames = "";
|
private string _permissionNames = "";
|
||||||
private string _permissions;
|
private string _permissions;
|
||||||
private string _pageId;
|
private string _pageId;
|
||||||
|
@ -95,6 +107,7 @@
|
||||||
_title = ModuleState.Title;
|
_title = ModuleState.Title;
|
||||||
_containers = ThemeService.GetContainerTypes(await ThemeService.GetThemesAsync());
|
_containers = ThemeService.GetContainerTypes(await ThemeService.GetThemesAsync());
|
||||||
_containerType = ModuleState.ContainerType;
|
_containerType = ModuleState.ContainerType;
|
||||||
|
_allPages = ModuleState.AllPages.ToString();
|
||||||
_permissions = ModuleState.Permissions;
|
_permissions = ModuleState.Permissions;
|
||||||
_permissionNames = ModuleState.ModuleDefinition.PermissionNames;
|
_permissionNames = ModuleState.ModuleDefinition.PermissionNames;
|
||||||
_pageId = ModuleState.PageId.ToString();
|
_pageId = ModuleState.PageId.ToString();
|
||||||
|
@ -120,18 +133,18 @@
|
||||||
|
|
||||||
private async Task SaveModule()
|
private async Task SaveModule()
|
||||||
{
|
{
|
||||||
var module = ModuleState;
|
|
||||||
module.Permissions = _permissionGrid.GetPermissions();
|
|
||||||
await ModuleService.UpdateModuleAsync(module);
|
|
||||||
|
|
||||||
var pagemodule = await PageModuleService.GetPageModuleAsync(ModuleState.PageModuleId);
|
var pagemodule = await PageModuleService.GetPageModuleAsync(ModuleState.PageModuleId);
|
||||||
pagemodule.PageId = int.Parse(_pageId);
|
pagemodule.PageId = int.Parse(_pageId);
|
||||||
pagemodule.Title = _title;
|
pagemodule.Title = _title;
|
||||||
pagemodule.ContainerType = _containerType;
|
pagemodule.ContainerType = _containerType;
|
||||||
|
|
||||||
await PageModuleService.UpdatePageModuleAsync(pagemodule);
|
await PageModuleService.UpdatePageModuleAsync(pagemodule);
|
||||||
await PageModuleService.UpdatePageModuleOrderAsync(pagemodule.PageId, pagemodule.Pane);
|
await PageModuleService.UpdatePageModuleOrderAsync(pagemodule.PageId, pagemodule.Pane);
|
||||||
|
|
||||||
|
var module = ModuleState;
|
||||||
|
module.AllPages = bool.Parse(_allPages);
|
||||||
|
module.Permissions = _permissionGrid.GetPermissions();
|
||||||
|
await ModuleService.UpdateModuleAsync(module);
|
||||||
|
|
||||||
if (_settingsModuleType != null)
|
if (_settingsModuleType != null)
|
||||||
{
|
{
|
||||||
var moduleType = Type.GetType(ModuleState.ModuleType);
|
var moduleType = Type.GetType(ModuleState.ModuleType);
|
||||||
|
|
|
@ -11,29 +11,27 @@
|
||||||
<TabPanel Name="Download">
|
<TabPanel Name="Download">
|
||||||
@if (_upgradeavailable)
|
@if (_upgradeavailable)
|
||||||
{
|
{
|
||||||
<ModuleMessage Type="MessageType.Info" Message="Download a new version of the framework. Once you are ready click Install to complete the installation."></ModuleMessage>
|
<ModuleMessage Type="MessageType.Info" Message="Select The Upgrade Button To Install a New Framework Version"></ModuleMessage>
|
||||||
@("Framework") @_package.Version <button type="button" class="btn btn-success" @onclick=@(async () => await Download(Constants.PackageId, Constants.Version))>Download</button>
|
@("Framework") @_package.Version <button type="button" class="btn btn-success" @onclick=@(async () => await Download(Constants.PackageId, Constants.Version))>Upgrade</button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<ModuleMessage Type="MessageType.Info" Message="Framework Is Already Up To Date"></ModuleMessage>
|
<ModuleMessage Type="MessageType.Info" Message="Framework Is Already Up To Date"></ModuleMessage>
|
||||||
}
|
}
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
@if (_upgradeavailable)
|
|
||||||
{
|
|
||||||
<TabPanel Name="Upload">
|
<TabPanel Name="Upload">
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<Label HelpText="Upload a new framework package. Once it is uploaded click Install to complete the installation.">Framework: </Label>
|
<Label HelpText="Upload a framework package and select Install to complete the installation">Framework: </Label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<FileManager Filter="nupkg" ShowFiles="false" Folder="Framework" />
|
<FileManager Filter="nupkg" ShowFiles="false" Folder="Framework" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<button type="button" class="btn btn-success" @onclick="Upgrade">Install</button>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
}
|
|
||||||
</TabStrip>
|
</TabStrip>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<RazorLangVersion>3.0</RazorLangVersion>
|
<RazorLangVersion>3.0</RazorLangVersion>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Version>0.9.0</Version>
|
<Version>0.9.1</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
<div class="@CardClass">
|
<div class="@CardClass">
|
||||||
<div class="@HeaderClass">
|
<div class="@HeaderClass">
|
||||||
Control Panel
|
<span class="font-weight-bold">Control Panel</span>
|
||||||
<button type="button" class="close" @onclick="HideControlPanel" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" @onclick="HideControlPanel" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -245,17 +245,17 @@
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(ButtonClass))
|
if (string.IsNullOrEmpty(ButtonClass))
|
||||||
{
|
{
|
||||||
ButtonClass = "btn-outline-primary";
|
ButtonClass = "btn-outline-secondary";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(CardClass))
|
if (string.IsNullOrEmpty(CardClass))
|
||||||
{
|
{
|
||||||
CardClass = "card bg-secondary mb-3";
|
CardClass = "card border-secondary mb-3";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(HeaderClass))
|
if (string.IsNullOrEmpty(HeaderClass))
|
||||||
{
|
{
|
||||||
HeaderClass = "card-header text-white";
|
HeaderClass = "card-header";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(BodyClass))
|
if (string.IsNullOrEmpty(BodyClass))
|
||||||
|
@ -361,6 +361,7 @@
|
||||||
module.SiteId = PageState.Site.SiteId;
|
module.SiteId = PageState.Site.SiteId;
|
||||||
module.PageId = PageState.Page.PageId;
|
module.PageId = PageState.Page.PageId;
|
||||||
module.ModuleDefinitionName = _moduleDefinitionName;
|
module.ModuleDefinitionName = _moduleDefinitionName;
|
||||||
|
module.AllPages = false;
|
||||||
module.Permissions = PageState.Page.Permissions;
|
module.Permissions = PageState.Page.Permissions;
|
||||||
module = await ModuleService.AddModuleAsync(module);
|
module = await ModuleService.AddModuleAsync(module);
|
||||||
_moduleId = module.ModuleId.ToString();
|
_moduleId = module.ModuleId.ToString();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<main role="main">
|
<main role="main">
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-primary fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-primary fixed-top">
|
||||||
<Logo /><Menu Orientation="Horizontal" /><div class="ml-md-auto"><UserProfile /> <Login /> <ControlPanel ButtonClass="btn-outline-secondary" CardClass="bg-light" /></div>
|
<Logo /><Menu Orientation="Horizontal" /><div class="ml-md-auto"><UserProfile /> <Login /> <ControlPanel /></div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<PaneLayout />
|
<PaneLayout />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>Oqtane.Framework</id>
|
<id>Oqtane.Framework</id>
|
||||||
<version>0.9.0</version>
|
<version>0.9.1</version>
|
||||||
<authors>Shaun Walker</authors>
|
<authors>Shaun Walker</authors>
|
||||||
<owners>.NET Foundation</owners>
|
<owners>.NET Foundation</owners>
|
||||||
<title>Oqtane Framework</title>
|
<title>Oqtane Framework</title>
|
||||||
|
|
|
@ -16,14 +16,16 @@ namespace Oqtane.Controllers
|
||||||
{
|
{
|
||||||
private readonly IModuleRepository _modules;
|
private readonly IModuleRepository _modules;
|
||||||
private readonly IPageModuleRepository _pageModules;
|
private readonly IPageModuleRepository _pageModules;
|
||||||
|
private readonly IPageRepository _pages;
|
||||||
private readonly IModuleDefinitionRepository _moduleDefinitions;
|
private readonly IModuleDefinitionRepository _moduleDefinitions;
|
||||||
private readonly IUserPermissions _userPermissions;
|
private readonly IUserPermissions _userPermissions;
|
||||||
private readonly ILogManager _logger;
|
private readonly ILogManager _logger;
|
||||||
|
|
||||||
public ModuleController(IModuleRepository modules, IPageModuleRepository pageModules, IModuleDefinitionRepository moduleDefinitions, IUserPermissions userPermissions, ILogManager logger)
|
public ModuleController(IModuleRepository modules, IPageModuleRepository pageModules, IPageRepository pages, IModuleDefinitionRepository moduleDefinitions, IUserPermissions userPermissions, ILogManager logger)
|
||||||
{
|
{
|
||||||
_modules = modules;
|
_modules = modules;
|
||||||
_pageModules = pageModules;
|
_pageModules = pageModules;
|
||||||
|
_pages = pages;
|
||||||
_moduleDefinitions = moduleDefinitions;
|
_moduleDefinitions = moduleDefinitions;
|
||||||
_userPermissions = userPermissions;
|
_userPermissions = userPermissions;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
@ -42,6 +44,7 @@ namespace Oqtane.Controllers
|
||||||
Module module = new Module();
|
Module module = new Module();
|
||||||
module.SiteId = pagemodule.Module.SiteId;
|
module.SiteId = pagemodule.Module.SiteId;
|
||||||
module.ModuleDefinitionName = pagemodule.Module.ModuleDefinitionName;
|
module.ModuleDefinitionName = pagemodule.Module.ModuleDefinitionName;
|
||||||
|
module.AllPages = pagemodule.Module.AllPages;
|
||||||
module.Permissions = pagemodule.Module.Permissions;
|
module.Permissions = pagemodule.Module.Permissions;
|
||||||
module.CreatedBy = pagemodule.Module.CreatedBy;
|
module.CreatedBy = pagemodule.Module.CreatedBy;
|
||||||
module.CreatedOn = pagemodule.Module.CreatedOn;
|
module.CreatedOn = pagemodule.Module.CreatedOn;
|
||||||
|
@ -111,7 +114,20 @@ namespace Oqtane.Controllers
|
||||||
if (ModelState.IsValid && _userPermissions.IsAuthorized(User, EntityNames.Module, module.ModuleId, PermissionNames.Edit))
|
if (ModelState.IsValid && _userPermissions.IsAuthorized(User, EntityNames.Module, module.ModuleId, PermissionNames.Edit))
|
||||||
{
|
{
|
||||||
module = _modules.UpdateModule(module);
|
module = _modules.UpdateModule(module);
|
||||||
_logger.Log(LogLevel.Information, this, LogFunction.Update, "Module Updated {Module}", module);
|
if (module.AllPages)
|
||||||
|
{
|
||||||
|
var pageModule = _pageModules.GetPageModules(module.SiteId).FirstOrDefault(item => item.ModuleId == module.ModuleId);
|
||||||
|
_logger.Log(LogLevel.Information, this, LogFunction.Update, "Module Updated {Module}", module);
|
||||||
|
|
||||||
|
var pages = _pages.GetPages(module.SiteId).ToList();
|
||||||
|
foreach (Page page in pages)
|
||||||
|
{
|
||||||
|
if (page.PageId != pageModule.PageId && !page.EditMode)
|
||||||
|
{
|
||||||
|
_pageModules.AddPageModule(new PageModule { PageId = page.PageId, ModuleId = pageModule.ModuleId, Title = pageModule.Title, Pane = pageModule.Pane, Order = pageModule.Order, ContainerType = pageModule.ContainerType });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -124,6 +124,16 @@ namespace Oqtane.Controllers
|
||||||
page = _pages.AddPage(page);
|
page = _pages.AddPage(page);
|
||||||
_syncManager.AddSyncEvent(_tenants.GetTenant().TenantId, EntityNames.Site, page.SiteId);
|
_syncManager.AddSyncEvent(_tenants.GetTenant().TenantId, EntityNames.Site, page.SiteId);
|
||||||
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Page Added {Page}", page);
|
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Page Added {Page}", page);
|
||||||
|
|
||||||
|
if (!page.EditMode)
|
||||||
|
{
|
||||||
|
var modules = _modules.GetModules(page.SiteId).Where(item => item.AllPages).ToList();
|
||||||
|
foreach (Module module in modules)
|
||||||
|
{
|
||||||
|
var pageModule = _pageModules.GetPageModules(page.SiteId).FirstOrDefault(item => item.ModuleId == module.ModuleId);
|
||||||
|
_pageModules.AddPageModule(new PageModule { PageId = page.PageId, ModuleId = pageModule.ModuleId, Title = pageModule.Title, Pane = pageModule.Pane, Order = pageModule.Order, ContainerType = pageModule.ContainerType });
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -174,6 +184,7 @@ namespace Oqtane.Controllers
|
||||||
module.SiteId = page.SiteId;
|
module.SiteId = page.SiteId;
|
||||||
module.PageId = page.PageId;
|
module.PageId = page.PageId;
|
||||||
module.ModuleDefinitionName = pm.Module.ModuleDefinitionName;
|
module.ModuleDefinitionName = pm.Module.ModuleDefinitionName;
|
||||||
|
module.AllPages = false;
|
||||||
module.Permissions = new List<Permission> {
|
module.Permissions = new List<Permission> {
|
||||||
new Permission(PermissionNames.View, userid, true),
|
new Permission(PermissionNames.View, userid, true),
|
||||||
new Permission(PermissionNames.Edit, userid, true)
|
new Permission(PermissionNames.Edit, userid, true)
|
||||||
|
|
|
@ -180,17 +180,17 @@ namespace Oqtane.Infrastructure
|
||||||
|
|
||||||
private void FinishUpgrade()
|
private void FinishUpgrade()
|
||||||
{
|
{
|
||||||
string folder = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
|
|
||||||
|
|
||||||
// check if upgrade application exists
|
// check if upgrade application exists
|
||||||
|
string folder = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
|
||||||
if (folder == null || !File.Exists(Path.Combine(folder, "Oqtane.Upgrade.exe"))) return;
|
if (folder == null || !File.Exists(Path.Combine(folder, "Oqtane.Upgrade.exe"))) return;
|
||||||
|
|
||||||
// run upgrade application
|
// run upgrade application
|
||||||
var process = new Process
|
var process = new Process
|
||||||
{
|
{
|
||||||
StartInfo =
|
StartInfo =
|
||||||
{
|
{
|
||||||
FileName = Path.Combine(folder, "Oqtane.Upgrade.exe"),
|
FileName = Path.Combine(folder, "Oqtane.Upgrade.exe"),
|
||||||
Arguments = "",
|
Arguments = "\"" + _environment.ContentRootPath + "\" \"" + _environment.WebRootPath + "\"",
|
||||||
ErrorDialog = false,
|
ErrorDialog = false,
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
CreateNoWindow = true,
|
CreateNoWindow = true,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Version>0.9.0</Version>
|
<Version>0.9.1</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -17,10 +17,15 @@
|
||||||
<RootNamespace>Oqtane</RootNamespace>
|
<RootNamespace>Oqtane</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Scripts\Tenant.0.9.1.sql" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Modules\HtmlText\Scripts\HtmlText.1.0.0.sql" />
|
<EmbeddedResource Include="Modules\HtmlText\Scripts\HtmlText.1.0.0.sql" />
|
||||||
<EmbeddedResource Include="Modules\HtmlText\Scripts\HtmlText.Uninstall.sql" />
|
<EmbeddedResource Include="Modules\HtmlText\Scripts\HtmlText.Uninstall.sql" />
|
||||||
<EmbeddedResource Include="Scripts\Master.0.9.0.sql" />
|
<EmbeddedResource Include="Scripts\Master.0.9.0.sql" />
|
||||||
|
<EmbeddedResource Include="Scripts\Tenant.0.9.1.sql" />
|
||||||
<EmbeddedResource Include="Scripts\Tenant.0.9.0.sql" />
|
<EmbeddedResource Include="Scripts\Tenant.0.9.0.sql" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -775,6 +775,7 @@ namespace Oqtane.Repository
|
||||||
{
|
{
|
||||||
SiteId = site.SiteId,
|
SiteId = site.SiteId,
|
||||||
ModuleDefinitionName = pagetemplatemodule.ModuleDefinitionName,
|
ModuleDefinitionName = pagetemplatemodule.ModuleDefinitionName,
|
||||||
|
AllPages = false,
|
||||||
Permissions = pagetemplatemodule.ModulePermissions,
|
Permissions = pagetemplatemodule.ModulePermissions,
|
||||||
};
|
};
|
||||||
module = _moduleRepository.AddModule(module);
|
module = _moduleRepository.AddModule(module);
|
||||||
|
|
14
Oqtane.Server/Scripts/Tenant.0.9.1.sql
Normal file
14
Oqtane.Server/Scripts/Tenant.0.9.1.sql
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
migration script
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[Module] ADD
|
||||||
|
[AllPages] [bit] NULL
|
||||||
|
GO
|
||||||
|
|
||||||
|
UPDATE [dbo].[Module]
|
||||||
|
SET [AllPages] = 0
|
||||||
|
GO
|
||||||
|
|
|
@ -28,16 +28,6 @@ app {
|
||||||
width: 100%; /* 100% width */
|
width: 100%; /* 100% width */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pad the navigation links */
|
|
||||||
.app-controlpanel .nav-item {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-controlpanel .card-body .control-label {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Admin Modal */
|
/* Admin Modal */
|
||||||
.app-admin-modal .modal {
|
.app-admin-modal .modal {
|
||||||
position: fixed; /* Stay in place */
|
position: fixed; /* Stay in place */
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace Oqtane.Models
|
||||||
public int ModuleId { get; set; }
|
public int ModuleId { get; set; }
|
||||||
public int SiteId { get; set; }
|
public int SiteId { get; set; }
|
||||||
public string ModuleDefinitionName { get; set; }
|
public string ModuleDefinitionName { get; set; }
|
||||||
|
public bool AllPages { get; set; }
|
||||||
|
|
||||||
public string CreatedBy { get; set; }
|
public string CreatedBy { get; set; }
|
||||||
public DateTime CreatedOn { get; set; }
|
public DateTime CreatedOn { get; set; }
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Version>0.9.0</Version>
|
<Version>0.9.1</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
public class Constants
|
public class Constants
|
||||||
{
|
{
|
||||||
public const string PackageId = "Oqtane.Framework";
|
public const string PackageId = "Oqtane.Framework";
|
||||||
public const string Version = "0.9.0";
|
public const string Version = "0.9.1";
|
||||||
public const string ReleaseVersions = "0.9.0";
|
public const string ReleaseVersions = "0.9.0,0.9.1";
|
||||||
|
|
||||||
public const string PageComponent = "Oqtane.UI.ThemeBuilder, Oqtane.Client";
|
public const string PageComponent = "Oqtane.UI.ThemeBuilder, Oqtane.Client";
|
||||||
public const string ContainerComponent = "Oqtane.UI.ContainerBuilder, Oqtane.Client";
|
public const string ContainerComponent = "Oqtane.UI.ContainerBuilder, Oqtane.Client";
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<Version>0.9.0</Version>
|
<Version>0.9.1</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
|
|
@ -10,14 +10,12 @@ namespace Oqtane.Upgrade
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
string binfolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
// requires 2 arguments - the contentrootpath and the webrootpath of the site
|
||||||
|
if (args.Length == 2)
|
||||||
// assumes that the application executable must be deployed to the /bin of the Oqtane.Server project
|
|
||||||
if (binfolder.Contains(Path.Combine("Oqtane.Server", "bin")))
|
|
||||||
{
|
{
|
||||||
// ie. binfolder = Oqtane.Server\bin\Debug\netcoreapp3.0\
|
string binfolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||||
string rootfolder = Directory.GetParent(binfolder).Parent.Parent.FullName;
|
string rootfolder = args[0];
|
||||||
string deployfolder = Path.Combine(rootfolder, Path.Combine("wwwroot","Framework"));
|
string deployfolder = Path.Combine(args[1], "Framework");
|
||||||
|
|
||||||
if (Directory.Exists(deployfolder))
|
if (Directory.Exists(deployfolder))
|
||||||
{
|
{
|
||||||
|
@ -87,7 +85,7 @@ namespace Oqtane.Upgrade
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
// clean up backup
|
// clean up backup
|
||||||
foreach (string file in files)
|
foreach (string file in files)
|
||||||
|
@ -99,7 +97,7 @@ namespace Oqtane.Upgrade
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// restore on failure
|
// restore on failure
|
||||||
foreach (string file in files)
|
foreach (string file in files)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user