Naming fixes
This commit is contained in:
		@ -4,7 +4,7 @@
 | 
			
		||||
@inject IUserService UserService
 | 
			
		||||
 | 
			
		||||
<div class="row">
 | 
			
		||||
    @foreach (var p in pages)
 | 
			
		||||
    @foreach (var p in _pages)
 | 
			
		||||
    {
 | 
			
		||||
        if (UserSecurity.IsAuthorized(PageState.User, "View", p.Permissions))
 | 
			
		||||
        {
 | 
			
		||||
@ -21,11 +21,11 @@
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
 | 
			
		||||
    List<Page> pages;
 | 
			
		||||
    List<Page> _pages;
 | 
			
		||||
 | 
			
		||||
    protected override void OnInitialized()
 | 
			
		||||
    {
 | 
			
		||||
        Page admin = PageState.Pages.Where(item => item.Path == "admin").FirstOrDefault();
 | 
			
		||||
        pages = PageState.Pages.Where(item => item.ParentId == admin.PageId).ToList();
 | 
			
		||||
        Page admin = PageState.Pages.FirstOrDefault(item => item.Path == "admin");
 | 
			
		||||
        _pages = PageState.Pages.Where(item => item.ParentId == admin?.PageId).ToList();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@
 | 
			
		||||
@inject IFileService FileService
 | 
			
		||||
@inject IFolderService FolderService
 | 
			
		||||
 | 
			
		||||
@if (folders != null)
 | 
			
		||||
@if (_folders != null)
 | 
			
		||||
{
 | 
			
		||||
    <div class="container-fluid">
 | 
			
		||||
        <div class="form-group">
 | 
			
		||||
@ -27,10 +27,10 @@
 | 
			
		||||
                    <table class="table table-borderless">
 | 
			
		||||
                        <tr>
 | 
			
		||||
                            <td>
 | 
			
		||||
                                <label for="Name" class="control-label">Upload: </label>
 | 
			
		||||
                                <label  class="control-label">Upload: </label>
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                                <FileManager UploadMultiple="true" ShowFiles="false" FolderId="@folderid.ToString()" />
 | 
			
		||||
                                <FileManager UploadMultiple="true" ShowFiles="false" FolderId="@_folderId.ToString()" />
 | 
			
		||||
                            </td>
 | 
			
		||||
                        </tr>
 | 
			
		||||
                    </table>
 | 
			
		||||
@ -39,7 +39,7 @@
 | 
			
		||||
                    <table class="table table-borderless">
 | 
			
		||||
                        <tr>
 | 
			
		||||
                            <td>
 | 
			
		||||
                                <label for="Name" class="control-label">Url: </label>
 | 
			
		||||
                                <label  class="control-label">Url: </label>
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                                <input class="form-control" @bind="@url" />
 | 
			
		||||
@ -47,12 +47,12 @@
 | 
			
		||||
                        </tr>
 | 
			
		||||
                        <tr>
 | 
			
		||||
                            <td>
 | 
			
		||||
                                <label for="Name" class="control-label">Folder: </label>
 | 
			
		||||
                                <label  class="control-label">Folder: </label>
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                                <select class="form-control" @bind="@folderid">
 | 
			
		||||
                                <select class="form-control" @bind="@_folderId">
 | 
			
		||||
                                    <option value="-1"><Select Folder></option>
 | 
			
		||||
                                    @foreach (Folder folder in folders)
 | 
			
		||||
                                    @foreach (Folder folder in _folders)
 | 
			
		||||
                                    {
 | 
			
		||||
                                        <option value="@(folder.FolderId)">@(new string('-', folder.Level * 2))@(folder.Name)</option>
 | 
			
		||||
                                    }
 | 
			
		||||
@ -73,16 +73,16 @@
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
 | 
			
		||||
    string url = "";
 | 
			
		||||
    List<Folder> folders;
 | 
			
		||||
    int folderid = -1;
 | 
			
		||||
    List<Folder> _folders;
 | 
			
		||||
    int _folderId = -1;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        folders = await FolderService.GetFoldersAsync(ModuleState.SiteId);
 | 
			
		||||
        _folders = await FolderService.GetFoldersAsync(ModuleState.SiteId);
 | 
			
		||||
 | 
			
		||||
        if (PageState.QueryString.ContainsKey("id"))
 | 
			
		||||
        {
 | 
			
		||||
            folderid = int.Parse(PageState.QueryString["id"]);
 | 
			
		||||
            _folderId = int.Parse(PageState.QueryString["id"]);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -90,9 +90,9 @@
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            if (url != "" && folderid != -1)
 | 
			
		||||
            if (url != "" && _folderId != -1)
 | 
			
		||||
            {
 | 
			
		||||
                await FileService.UploadFileAsync(url, folderid);
 | 
			
		||||
                await FileService.UploadFileAsync(url, _folderId);
 | 
			
		||||
                await logger.LogInformation("File Downloaded Successfully From Url {Url}", url);
 | 
			
		||||
                AddModuleMessage("File Downloaded Successfully From Url", MessageType.Success);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@ -3,20 +3,20 @@
 | 
			
		||||
@inject IFolderService FolderService
 | 
			
		||||
@inject NavigationManager NavigationManager
 | 
			
		||||
 | 
			
		||||
@if (folders != null)
 | 
			
		||||
@if (_folders != null)
 | 
			
		||||
{
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Parent: </label>
 | 
			
		||||
                <label  class="control-label">Parent: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@parentid">
 | 
			
		||||
                <select class="form-control" @bind="@_parentId">
 | 
			
		||||
                    @if (PageState.QueryString.ContainsKey("id"))
 | 
			
		||||
                    {
 | 
			
		||||
                        <option value="-1"><No Parent></option>
 | 
			
		||||
                    }
 | 
			
		||||
                    @foreach (Folder folder in folders)
 | 
			
		||||
                    @foreach (Folder folder in _folders)
 | 
			
		||||
                    {
 | 
			
		||||
                        <option value="@(folder.FolderId)">@(new string('-', folder.Level * 2))@(folder.Name)</option>
 | 
			
		||||
                    }
 | 
			
		||||
@ -25,27 +25,27 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
                <label  class="control-label">Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@name" />
 | 
			
		||||
                <input class="form-control" @bind="@_name" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Permissions: </label>
 | 
			
		||||
                <label  class="control-label">Permissions: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <PermissionGrid EntityName="Folder" PermissionNames="Browse,View,Edit" Permissions="@permissions" @ref="permissiongrid" />
 | 
			
		||||
                <PermissionGrid EntityName="Folder" PermissionNames="Browse,View,Edit" Permissions="@_permissions" @ref="permissiongrid" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    @if (!issystem)
 | 
			
		||||
    @if (!_isSystem)
 | 
			
		||||
    {
 | 
			
		||||
        <button type="button" class="btn btn-success" @onclick="SaveFolder">Save</button>
 | 
			
		||||
    }
 | 
			
		||||
    <NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
 | 
			
		||||
    @if (!issystem && PageState.QueryString.ContainsKey("id"))
 | 
			
		||||
    @if (!_isSystem && PageState.QueryString.ContainsKey("id"))
 | 
			
		||||
    {
 | 
			
		||||
        <button type="button" class="btn btn-danger" @onclick="DeleteFolder">Delete</button>
 | 
			
		||||
    }
 | 
			
		||||
@ -53,7 +53,7 @@
 | 
			
		||||
    <br />
 | 
			
		||||
    @if (PageState.QueryString.ContainsKey("id"))
 | 
			
		||||
    {
 | 
			
		||||
        <AuditInfo CreatedBy="@createdby" CreatedOn="@createdon" ModifiedBy="@modifiedby" ModifiedOn="@modifiedon"></AuditInfo>
 | 
			
		||||
        <AuditInfo CreatedBy="@_createdBy" CreatedOn="@_createdOn" ModifiedBy="@_modifiedBy" ModifiedOn="@_modifiedOn"></AuditInfo>
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -61,54 +61,54 @@
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
    public override string Title { get { return "Folder Management"; } }
 | 
			
		||||
 | 
			
		||||
    List<Folder> folders;
 | 
			
		||||
    int folderid = -1;
 | 
			
		||||
    string name;
 | 
			
		||||
    int parentid = -1;
 | 
			
		||||
    bool issystem = false;
 | 
			
		||||
    string permissions = "";
 | 
			
		||||
    string createdby;
 | 
			
		||||
    DateTime createdon;
 | 
			
		||||
    string modifiedby;
 | 
			
		||||
    DateTime modifiedon;
 | 
			
		||||
    List<Folder> _folders;
 | 
			
		||||
    int _folderId = -1;
 | 
			
		||||
    string _name;
 | 
			
		||||
    int _parentId = -1;
 | 
			
		||||
    bool _isSystem = false;
 | 
			
		||||
    string _permissions = "";
 | 
			
		||||
    string _createdBy;
 | 
			
		||||
    DateTime _createdOn;
 | 
			
		||||
    string _modifiedBy;
 | 
			
		||||
    DateTime _modifiedOn;
 | 
			
		||||
 | 
			
		||||
    PermissionGrid permissiongrid;
 | 
			
		||||
    PermissionGrid _permissionGrid;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            folders = await FolderService.GetFoldersAsync(PageState.Site.SiteId);
 | 
			
		||||
            _folders = await FolderService.GetFoldersAsync(PageState.Site.SiteId);
 | 
			
		||||
 | 
			
		||||
            if (PageState.QueryString.ContainsKey("id"))
 | 
			
		||||
            {
 | 
			
		||||
                folderid = Int32.Parse(PageState.QueryString["id"]);
 | 
			
		||||
                Folder folder = await FolderService.GetFolderAsync(folderid);
 | 
			
		||||
                _folderId = Int32.Parse(PageState.QueryString["id"]);
 | 
			
		||||
                Folder folder = await FolderService.GetFolderAsync(_folderId);
 | 
			
		||||
                if (folder != null)
 | 
			
		||||
                {
 | 
			
		||||
                    parentid = folder.ParentId ?? -1;
 | 
			
		||||
                    name = folder.Name;
 | 
			
		||||
                    issystem = folder.IsSystem;
 | 
			
		||||
                    permissions = folder.Permissions;
 | 
			
		||||
                    createdby = folder.CreatedBy;
 | 
			
		||||
                    createdon = folder.CreatedOn;
 | 
			
		||||
                    modifiedby = folder.ModifiedBy;
 | 
			
		||||
                    modifiedon = folder.ModifiedOn;
 | 
			
		||||
                    _parentId = folder.ParentId ?? -1;
 | 
			
		||||
                    _name = folder.Name;
 | 
			
		||||
                    _isSystem = folder.IsSystem;
 | 
			
		||||
                    _permissions = folder.Permissions;
 | 
			
		||||
                    _createdBy = folder.CreatedBy;
 | 
			
		||||
                    _createdOn = folder.CreatedOn;
 | 
			
		||||
                    _modifiedBy = folder.ModifiedBy;
 | 
			
		||||
                    _modifiedOn = folder.ModifiedOn;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                parentid = folders[0].FolderId;
 | 
			
		||||
                List<PermissionString> permissionstrings = new List<PermissionString>();
 | 
			
		||||
                permissionstrings.Add(new PermissionString { PermissionName = "Browse", Permissions = Constants.AdminRole });
 | 
			
		||||
                permissionstrings.Add(new PermissionString { PermissionName = "View", Permissions = Constants.AdminRole });
 | 
			
		||||
                permissionstrings.Add(new PermissionString { PermissionName = "Edit", Permissions = Constants.AdminRole });
 | 
			
		||||
                permissions = UserSecurity.SetPermissionStrings(permissionstrings);
 | 
			
		||||
                _parentId = _folders[0].FolderId;
 | 
			
		||||
                List<PermissionString> permissionStrings = new List<PermissionString>();
 | 
			
		||||
                permissionStrings.Add(new PermissionString { PermissionName = "Browse", Permissions = Constants.AdminRole });
 | 
			
		||||
                permissionStrings.Add(new PermissionString { PermissionName = "View", Permissions = Constants.AdminRole });
 | 
			
		||||
                permissionStrings.Add(new PermissionString { PermissionName = "Edit", Permissions = Constants.AdminRole });
 | 
			
		||||
                _permissions = UserSecurity.SetPermissionStrings(permissionStrings);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Loading Folder {FolderId} {Error}", folderid, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Loading Folder {FolderId} {Error}", _folderId, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Loading Folder", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@ -117,12 +117,12 @@
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            if (name != "" && parentid != -1)
 | 
			
		||||
            if (_name != "" && _parentId != -1)
 | 
			
		||||
            {
 | 
			
		||||
                Folder folder;
 | 
			
		||||
                if (folderid != -1)
 | 
			
		||||
                if (_folderId != -1)
 | 
			
		||||
                {
 | 
			
		||||
                    folder = await FolderService.GetFolderAsync(folderid);
 | 
			
		||||
                    folder = await FolderService.GetFolderAsync(_folderId);
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
@ -130,19 +130,19 @@
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                folder.SiteId = PageState.Site.SiteId;
 | 
			
		||||
                if (parentid == -1)
 | 
			
		||||
                if (_parentId == -1)
 | 
			
		||||
                {
 | 
			
		||||
                    folder.ParentId = null;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    folder.ParentId = parentid;
 | 
			
		||||
                    folder.ParentId = _parentId;
 | 
			
		||||
                }
 | 
			
		||||
                folder.Name = name;
 | 
			
		||||
                folder.IsSystem = issystem;
 | 
			
		||||
                folder.Permissions = permissiongrid.GetPermissions();
 | 
			
		||||
                folder.Name = _name;
 | 
			
		||||
                folder.IsSystem = _isSystem;
 | 
			
		||||
                folder.Permissions = _permissionGrid.GetPermissions();
 | 
			
		||||
 | 
			
		||||
                if (folderid != -1)
 | 
			
		||||
                if (_folderId != -1)
 | 
			
		||||
                {
 | 
			
		||||
                    folder = await FolderService.UpdateFolderAsync(folder);
 | 
			
		||||
                }
 | 
			
		||||
@ -161,7 +161,7 @@
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Saving Folder {FolderId} {Error}", folderid, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Saving Folder {FolderId} {Error}", _folderId, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Saving Module", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@ -170,13 +170,13 @@
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            await FolderService.DeleteFolderAsync(folderid);
 | 
			
		||||
            await logger.LogInformation("Folder Deleted {Folder}", folderid);
 | 
			
		||||
            await FolderService.DeleteFolderAsync(_folderId);
 | 
			
		||||
            await logger.LogInformation("Folder Deleted {Folder}", _folderId);
 | 
			
		||||
            AddModuleMessage("Folder Deleted", MessageType.Success);
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Deleting Folder {Folder} {Error}", folderid, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Deleting Folder {Folder} {Error}", _folderId, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Deleting Folder", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -4,29 +4,29 @@
 | 
			
		||||
@inject IFolderService FolderService
 | 
			
		||||
@inject IFileService FileService
 | 
			
		||||
 | 
			
		||||
@if (Files != null)
 | 
			
		||||
@if (_files != null)
 | 
			
		||||
{
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Folder: </label>
 | 
			
		||||
                <label  class="control-label">Folder: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @onchange="(e => FolderChanged(e))">
 | 
			
		||||
                    @foreach (Folder folder in Folders)
 | 
			
		||||
                    @foreach (Folder folder in _folders)
 | 
			
		||||
                    {
 | 
			
		||||
                        <option value="@(folder.FolderId)">@(new string('-', folder.Level * 2))@(folder.Name)</option>
 | 
			
		||||
                    }
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <ActionLink Action="Edit" Text="Edit Folder" Class="btn btn-secondary" Parameters="@($"id=" + folderid.ToString())" /> 
 | 
			
		||||
                <ActionLink Action="Edit" Text="Edit Folder" Class="btn btn-secondary" Parameters="@($"id=" + _folderId.ToString())" /> 
 | 
			
		||||
                <ActionLink Action="Edit" Text="Add Folder" Class="btn btn-secondary" /> 
 | 
			
		||||
                <ActionLink Action="Add" Text="Upload Files" Parameters="@($"id=" + folderid.ToString())" />
 | 
			
		||||
                <ActionLink Action="Add" Text="Upload Files" Parameters="@($"id=" + _folderId.ToString())" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    <Pager Items="@Files">
 | 
			
		||||
    <Pager Items="@_files">
 | 
			
		||||
        <Header>
 | 
			
		||||
            <th> </th>
 | 
			
		||||
            <th>Name</th>
 | 
			
		||||
@ -42,7 +42,7 @@
 | 
			
		||||
            <td>@(context.Size / 1000) KB</td>
 | 
			
		||||
        </Row>
 | 
			
		||||
    </Pager>
 | 
			
		||||
    @if (Files.Count == 0)
 | 
			
		||||
    @if (_files.Count == 0)
 | 
			
		||||
    {
 | 
			
		||||
        <div class="text-center">No Files Exist In Selected Folder</div>
 | 
			
		||||
    }
 | 
			
		||||
@ -51,22 +51,22 @@
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
 | 
			
		||||
    List<Folder> Folders;
 | 
			
		||||
    int folderid = -1;
 | 
			
		||||
    List<File> Files;
 | 
			
		||||
    Uri uri;
 | 
			
		||||
    List<Folder> _folders;
 | 
			
		||||
    int _folderId = -1;
 | 
			
		||||
    List<File> _files;
 | 
			
		||||
    Uri _uri;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnParametersSetAsync()
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            Folders = await FolderService.GetFoldersAsync(PageState.Site.SiteId);
 | 
			
		||||
            if (folderid == -1 && Folders.Count > 0)
 | 
			
		||||
            _folders = await FolderService.GetFoldersAsync(PageState.Site.SiteId);
 | 
			
		||||
            if (_folderId == -1 && _folders.Count > 0)
 | 
			
		||||
            {
 | 
			
		||||
                folderid = Folders[0].FolderId;
 | 
			
		||||
                _folderId = _folders[0].FolderId;
 | 
			
		||||
                await GetFiles();
 | 
			
		||||
            }
 | 
			
		||||
            uri = new Uri(NavigationManager.Uri);
 | 
			
		||||
            _uri = new Uri(NavigationManager.Uri);
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
@ -77,14 +77,14 @@
 | 
			
		||||
 | 
			
		||||
    private async Task GetFiles()
 | 
			
		||||
    {
 | 
			
		||||
        Files = await FileService.GetFilesAsync(folderid);
 | 
			
		||||
        _files = await FileService.GetFilesAsync(_folderId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async void FolderChanged(ChangeEventArgs e)
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            folderid = int.Parse((string)e.Value);
 | 
			
		||||
            _folderId = int.Parse((string)e.Value);
 | 
			
		||||
            await GetFiles();
 | 
			
		||||
            StateHasChanged();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -6,26 +6,26 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
                <label class="control-label">Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@name" />
 | 
			
		||||
                <input class="form-control" @bind="@_name" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Type: </label>
 | 
			
		||||
                <label class="control-label">Type: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@jobtype" />
 | 
			
		||||
                <input class="form-control" @bind="@_jobType" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Enabled? </label>
 | 
			
		||||
                <label class="control-label">Enabled? </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@isenabled">
 | 
			
		||||
                <select class="form-control" @bind="@_isEnabled">
 | 
			
		||||
                    <option value="True">Yes</option>
 | 
			
		||||
                    <option value="False">No</option>
 | 
			
		||||
                </select>
 | 
			
		||||
@ -33,11 +33,11 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Runs Every: </label>
 | 
			
		||||
                <label class="control-label">Runs Every: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@interval" />
 | 
			
		||||
                <select class="form-control" @bind="@frequency">
 | 
			
		||||
                <input class="form-control" @bind="@_interval" />
 | 
			
		||||
                <select class="form-control" @bind="@_frequency">
 | 
			
		||||
                    <option value="m">Minute(s)</option>
 | 
			
		||||
                    <option value="H">Hour(s)</option>
 | 
			
		||||
                    <option value="d">Day(s)</option>
 | 
			
		||||
@ -47,26 +47,26 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Starting: </label>
 | 
			
		||||
                <label class="control-label">Starting: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@startdate" />
 | 
			
		||||
                <input class="form-control" @bind="@_startDate" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Ending: </label>
 | 
			
		||||
                <label class="control-label">Ending: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@enddate" />
 | 
			
		||||
                <input class="form-control" @bind="@_endDate" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Retention Log (Items): </label>
 | 
			
		||||
                <label class="control-label">Retention Log (Items): </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@retentionhistory" />
 | 
			
		||||
                <input class="form-control" @bind="@_retentionHistory" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
@ -76,42 +76,42 @@
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
 | 
			
		||||
 | 
			
		||||
    string name = "";
 | 
			
		||||
    string jobtype = "";
 | 
			
		||||
    string isenabled = "True";
 | 
			
		||||
    string interval = "";
 | 
			
		||||
    string frequency = "";
 | 
			
		||||
    string startdate = "";
 | 
			
		||||
    string enddate = "";
 | 
			
		||||
    string retentionhistory = "10";
 | 
			
		||||
    string _name = "";
 | 
			
		||||
    string _jobType = "";
 | 
			
		||||
    string _isEnabled = "True";
 | 
			
		||||
    string _interval = "";
 | 
			
		||||
    string _frequency = "";
 | 
			
		||||
    string _startDate = "";
 | 
			
		||||
    string _endDate = "";
 | 
			
		||||
    string _retentionHistory = "10";
 | 
			
		||||
 | 
			
		||||
    private async Task SaveJob()
 | 
			
		||||
    {
 | 
			
		||||
        if (name != "" && !string.IsNullOrEmpty(jobtype) && frequency != "" && interval != "" && retentionhistory != "")
 | 
			
		||||
        if (_name != "" && !string.IsNullOrEmpty(_jobType) && _frequency != "" && _interval != "" && _retentionHistory != "")
 | 
			
		||||
        {
 | 
			
		||||
            Job job = new Job();
 | 
			
		||||
            job.Name = name;
 | 
			
		||||
            job.JobType = jobtype;
 | 
			
		||||
            job.IsEnabled = Boolean.Parse(isenabled);
 | 
			
		||||
            job.Frequency = frequency;
 | 
			
		||||
            job.Interval = int.Parse(interval);
 | 
			
		||||
            if (startdate == "")
 | 
			
		||||
            job.Name = _name;
 | 
			
		||||
            job.JobType = _jobType;
 | 
			
		||||
            job.IsEnabled = Boolean.Parse(_isEnabled);
 | 
			
		||||
            job.Frequency = _frequency;
 | 
			
		||||
            job.Interval = int.Parse(_interval);
 | 
			
		||||
            if (_startDate == "")
 | 
			
		||||
            {
 | 
			
		||||
                job.StartDate = null;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                job.StartDate = DateTime.Parse(startdate);
 | 
			
		||||
                job.StartDate = DateTime.Parse(_startDate);
 | 
			
		||||
            }
 | 
			
		||||
            if (enddate == "")
 | 
			
		||||
            if (_endDate == "")
 | 
			
		||||
            {
 | 
			
		||||
                job.EndDate = null;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                job.EndDate = DateTime.Parse(enddate);
 | 
			
		||||
                job.EndDate = DateTime.Parse(_endDate);
 | 
			
		||||
            }
 | 
			
		||||
            job.RetentionHistory = int.Parse(retentionhistory);
 | 
			
		||||
            job.RetentionHistory = int.Parse(_retentionHistory);
 | 
			
		||||
            job.IsStarted = false;
 | 
			
		||||
            job.IsExecuting = false;
 | 
			
		||||
            job.NextExecution = null;
 | 
			
		||||
 | 
			
		||||
@ -6,26 +6,26 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
                <label  class="control-label">Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@name" />
 | 
			
		||||
                <input class="form-control" @bind="@_name" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Type: </label>
 | 
			
		||||
                <label  class="control-label">Type: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@jobtype" />
 | 
			
		||||
                <input class="form-control" @bind="@_jobType" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Enabled? </label>
 | 
			
		||||
                <label  class="control-label">Enabled? </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@isenabled">
 | 
			
		||||
                <select class="form-control" @bind="@_isEnabled">
 | 
			
		||||
                    <option value="True">Yes</option>
 | 
			
		||||
                    <option value="False">No</option>
 | 
			
		||||
                </select>
 | 
			
		||||
@ -33,11 +33,11 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Runs Every: </label>
 | 
			
		||||
                <label  class="control-label">Runs Every: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@interval" />
 | 
			
		||||
                <select class="form-control" @bind="@frequency">
 | 
			
		||||
                <input class="form-control" @bind="@_interval" />
 | 
			
		||||
                <select class="form-control" @bind="@_frequency">
 | 
			
		||||
                    <option value="m">Minute(s)</option>
 | 
			
		||||
                    <option value="H">Hour(s)</option>
 | 
			
		||||
                    <option value="d">Day(s)</option>
 | 
			
		||||
@ -47,26 +47,26 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Starting: </label>
 | 
			
		||||
                <label  class="control-label">Starting: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@startdate" />
 | 
			
		||||
                <input class="form-control" @bind="@_startDate" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Ending: </label>
 | 
			
		||||
                <label  class="control-label">Ending: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@enddate" />
 | 
			
		||||
                <input class="form-control" @bind="@_endDate" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Retention Log (Items): </label>
 | 
			
		||||
                <label  class="control-label">Retention Log (Items): </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@retentionhistory" />
 | 
			
		||||
                <input class="form-control" @bind="@_retentionHistory" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
@ -76,68 +76,68 @@
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
 | 
			
		||||
 | 
			
		||||
    int jobid;
 | 
			
		||||
    string name = "";
 | 
			
		||||
    string jobtype = "";
 | 
			
		||||
    string isenabled = "True";
 | 
			
		||||
    string interval = "";
 | 
			
		||||
    string frequency = "";
 | 
			
		||||
    string startdate = "";
 | 
			
		||||
    string enddate = "";
 | 
			
		||||
    string retentionhistory = "";
 | 
			
		||||
    int _jobId;
 | 
			
		||||
    string _name = "";
 | 
			
		||||
    string _jobType = "";
 | 
			
		||||
    string _isEnabled = "True";
 | 
			
		||||
    string _interval = "";
 | 
			
		||||
    string _frequency = "";
 | 
			
		||||
    string _startDate = "";
 | 
			
		||||
    string _endDate = "";
 | 
			
		||||
    string _retentionHistory = "";
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            jobid = Int32.Parse(PageState.QueryString["id"]);
 | 
			
		||||
            Job job = await JobService.GetJobAsync(jobid);
 | 
			
		||||
            _jobId = Int32.Parse(PageState.QueryString["id"]);
 | 
			
		||||
            Job job = await JobService.GetJobAsync(_jobId);
 | 
			
		||||
            if (job != null)
 | 
			
		||||
            {
 | 
			
		||||
                name = job.Name;
 | 
			
		||||
                jobtype = job.JobType;
 | 
			
		||||
                isenabled = job.IsEnabled.ToString();
 | 
			
		||||
                interval = job.Interval.ToString();
 | 
			
		||||
                frequency = job.Frequency;
 | 
			
		||||
                startdate = (job.StartDate != null) ? job.StartDate.ToString() : "";
 | 
			
		||||
                enddate = (job.EndDate != null) ? job.EndDate.ToString() : "";
 | 
			
		||||
                retentionhistory = job.RetentionHistory.ToString();
 | 
			
		||||
                _name = job.Name;
 | 
			
		||||
                _jobType = job.JobType;
 | 
			
		||||
                _isEnabled = job.IsEnabled.ToString();
 | 
			
		||||
                _interval = job.Interval.ToString();
 | 
			
		||||
                _frequency = job.Frequency;
 | 
			
		||||
                _startDate = (job.StartDate != null) ? job.StartDate.ToString() : "";
 | 
			
		||||
                _endDate = (job.EndDate != null) ? job.EndDate.ToString() : "";
 | 
			
		||||
                _retentionHistory = job.RetentionHistory.ToString();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Loading Job {JobId} {Error}", jobid, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Loading Job {JobId} {Error}", _jobId, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Loading Job", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async Task SaveJob()
 | 
			
		||||
    {
 | 
			
		||||
        if (name != "" && !string.IsNullOrEmpty(jobtype) && frequency != "" && interval != "" && retentionhistory != "")
 | 
			
		||||
        if (_name != "" && !string.IsNullOrEmpty(_jobType) && _frequency != "" && _interval != "" && _retentionHistory != "")
 | 
			
		||||
        {
 | 
			
		||||
            Job job = await JobService.GetJobAsync(jobid);
 | 
			
		||||
            job.Name = name;
 | 
			
		||||
            job.JobType = jobtype;
 | 
			
		||||
            job.IsEnabled = Boolean.Parse(isenabled);
 | 
			
		||||
            job.Frequency = frequency;
 | 
			
		||||
            job.Interval = int.Parse(interval);
 | 
			
		||||
            if (startdate == "")
 | 
			
		||||
            Job job = await JobService.GetJobAsync(_jobId);
 | 
			
		||||
            job.Name = _name;
 | 
			
		||||
            job.JobType = _jobType;
 | 
			
		||||
            job.IsEnabled = Boolean.Parse(_isEnabled);
 | 
			
		||||
            job.Frequency = _frequency;
 | 
			
		||||
            job.Interval = int.Parse(_interval);
 | 
			
		||||
            if (_startDate == "")
 | 
			
		||||
            {
 | 
			
		||||
                job.StartDate = null;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                job.StartDate = DateTime.Parse(startdate);
 | 
			
		||||
                job.StartDate = DateTime.Parse(_startDate);
 | 
			
		||||
            }
 | 
			
		||||
            if (enddate == "")
 | 
			
		||||
            if (_endDate == "")
 | 
			
		||||
            {
 | 
			
		||||
                job.EndDate = null;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                job.EndDate = DateTime.Parse(enddate);
 | 
			
		||||
                job.EndDate = DateTime.Parse(_endDate);
 | 
			
		||||
            }
 | 
			
		||||
            job.RetentionHistory = int.Parse(retentionhistory);
 | 
			
		||||
            job.RetentionHistory = int.Parse(_retentionHistory);
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
@inherits ModuleBase
 | 
			
		||||
@inject IJobService JobService
 | 
			
		||||
 | 
			
		||||
@if (Jobs == null)
 | 
			
		||||
@if (_jobs == null)
 | 
			
		||||
{
 | 
			
		||||
    <p><em>Loading...</em></p>
 | 
			
		||||
}
 | 
			
		||||
@ -13,7 +13,7 @@ else
 | 
			
		||||
    <button type="button" class="btn btn-secondary" @onclick="(async () => await Refresh())">Refresh</button>
 | 
			
		||||
    <br /><br />
 | 
			
		||||
 | 
			
		||||
    <Pager Items="@Jobs">
 | 
			
		||||
    <Pager Items="@_jobs">
 | 
			
		||||
        <Header>
 | 
			
		||||
            <th> </th>
 | 
			
		||||
            <th> </th>
 | 
			
		||||
@ -49,23 +49,23 @@ else
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
 | 
			
		||||
 | 
			
		||||
    List<Job> Jobs;
 | 
			
		||||
    List<Job> _jobs;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnParametersSetAsync()
 | 
			
		||||
    {
 | 
			
		||||
        Jobs = await JobService.GetJobsAsync();
 | 
			
		||||
        _jobs = await JobService.GetJobsAsync();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private string DisplayStatus(bool IsEnabled, bool IsExecuting)
 | 
			
		||||
    private string DisplayStatus(bool isEnabled, bool isExecuting)
 | 
			
		||||
    {
 | 
			
		||||
        string status = "";
 | 
			
		||||
        if (!IsEnabled)
 | 
			
		||||
        if (!isEnabled)
 | 
			
		||||
        {
 | 
			
		||||
            status = "Disabled";
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            if (IsExecuting)
 | 
			
		||||
            if (isExecuting)
 | 
			
		||||
            {
 | 
			
		||||
                status = "Executing";
 | 
			
		||||
            }
 | 
			
		||||
@ -79,59 +79,59 @@ else
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    private string DisplayFrequency(int Interval, string Frequency)
 | 
			
		||||
    private string DisplayFrequency(int interval, string frequency)
 | 
			
		||||
    {
 | 
			
		||||
        string frequency = "Every " + Interval.ToString() + " ";
 | 
			
		||||
        switch (Frequency)
 | 
			
		||||
        string result = "Every " + interval.ToString() + " ";
 | 
			
		||||
        switch (frequency)
 | 
			
		||||
        {
 | 
			
		||||
            case "m":
 | 
			
		||||
                frequency += "Minute";
 | 
			
		||||
                result += "Minute";
 | 
			
		||||
                break;
 | 
			
		||||
            case "H":
 | 
			
		||||
                frequency += "Hour";
 | 
			
		||||
                result += "Hour";
 | 
			
		||||
                break;
 | 
			
		||||
            case "d":
 | 
			
		||||
                frequency += "Day";
 | 
			
		||||
                result += "Day";
 | 
			
		||||
                break;
 | 
			
		||||
            case "M":
 | 
			
		||||
                frequency += "Month";
 | 
			
		||||
                result += "Month";
 | 
			
		||||
                break;
 | 
			
		||||
        }
 | 
			
		||||
        if (Interval > 1)
 | 
			
		||||
        if (interval > 1)
 | 
			
		||||
        {
 | 
			
		||||
            frequency += "s";
 | 
			
		||||
            result += "s";
 | 
			
		||||
        }
 | 
			
		||||
        return frequency;
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async Task DeleteJob(Job Job)
 | 
			
		||||
    private async Task DeleteJob(Job job)
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            await JobService.DeleteJobAsync(Job.JobId);
 | 
			
		||||
            await logger.LogInformation("Job Deleted {Job}", Job);
 | 
			
		||||
            await JobService.DeleteJobAsync(job.JobId);
 | 
			
		||||
            await logger.LogInformation("Job Deleted {Job}", job);
 | 
			
		||||
            StateHasChanged();
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Deleting Job {Job} {Error}", Job, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Deleting Job {Job} {Error}", job, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Deleting Job", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async Task StartJob(int JobId)
 | 
			
		||||
    private async Task StartJob(int jobId)
 | 
			
		||||
    {
 | 
			
		||||
        await JobService.StartJobAsync(JobId);
 | 
			
		||||
        await JobService.StartJobAsync(jobId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async Task StopJob(int JobId)
 | 
			
		||||
    private async Task StopJob(int jobId)
 | 
			
		||||
    {
 | 
			
		||||
        await JobService.StopJobAsync(JobId);
 | 
			
		||||
        await JobService.StopJobAsync(jobId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async Task Refresh()
 | 
			
		||||
    {
 | 
			
		||||
        Jobs = await JobService.GetJobsAsync();
 | 
			
		||||
        _jobs = await JobService.GetJobsAsync();
 | 
			
		||||
        StateHasChanged();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -2,13 +2,13 @@
 | 
			
		||||
@inherits ModuleBase
 | 
			
		||||
@inject IJobLogService JobLogService
 | 
			
		||||
 | 
			
		||||
@if (JobLogs == null)
 | 
			
		||||
@if (_jobLogs == null)
 | 
			
		||||
{
 | 
			
		||||
    <p><em>Loading...</em></p>
 | 
			
		||||
}
 | 
			
		||||
else
 | 
			
		||||
{
 | 
			
		||||
<Pager Items="@JobLogs">
 | 
			
		||||
<Pager Items="@_jobLogs">
 | 
			
		||||
    <Header>
 | 
			
		||||
        <th>Name</th>
 | 
			
		||||
        <th>Status</th>
 | 
			
		||||
@ -30,28 +30,28 @@ else
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
 | 
			
		||||
 | 
			
		||||
    List<JobLog> JobLogs;
 | 
			
		||||
    List<JobLog> _jobLogs;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnParametersSetAsync()
 | 
			
		||||
    {
 | 
			
		||||
        JobLogs = await JobLogService.GetJobLogsAsync();
 | 
			
		||||
        _jobLogs = await JobLogService.GetJobLogsAsync();
 | 
			
		||||
        if (PageState.QueryString.ContainsKey("id"))
 | 
			
		||||
        {
 | 
			
		||||
            JobLogs = JobLogs.Where(item => item.JobId == Int32.Parse(PageState.QueryString["id"])).ToList();
 | 
			
		||||
            _jobLogs = _jobLogs.Where(item => item.JobId == Int32.Parse(PageState.QueryString["id"])).ToList();
 | 
			
		||||
        }
 | 
			
		||||
        JobLogs = JobLogs.OrderByDescending(item => item.JobLogId).ToList();
 | 
			
		||||
        _jobLogs = _jobLogs.OrderByDescending(item => item.JobLogId).ToList();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private string DisplayStatus(bool IsExecuting, bool? Succeeded)
 | 
			
		||||
    private string DisplayStatus(bool isExecuting, bool? succeeded)
 | 
			
		||||
    {
 | 
			
		||||
        string status = "";
 | 
			
		||||
        if (IsExecuting)
 | 
			
		||||
        if (isExecuting)
 | 
			
		||||
        {
 | 
			
		||||
            status = "Executing";
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            if (Succeeded.Value)
 | 
			
		||||
            if (succeeded != null && succeeded.Value)
 | 
			
		||||
            {
 | 
			
		||||
                status = "Succeeded";
 | 
			
		||||
            }
 | 
			
		||||
@ -62,4 +62,4 @@ else
 | 
			
		||||
        }
 | 
			
		||||
        return status;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,13 @@
 | 
			
		||||
@namespace Oqtane.Modules.Admin.Login
 | 
			
		||||
@inherits ModuleBase
 | 
			
		||||
@inject NavigationManager NavigationManager
 | 
			
		||||
@inject IJSRuntime jsRuntime
 | 
			
		||||
@inject IJSRuntime JsRuntime
 | 
			
		||||
@inject IUserService UserService
 | 
			
		||||
@inject IServiceProvider ServiceProvider
 | 
			
		||||
 | 
			
		||||
@if (Message != "")
 | 
			
		||||
@if (_message != "")
 | 
			
		||||
{
 | 
			
		||||
    <ModuleMessage Message="@Message" Type="@Type" />
 | 
			
		||||
    <ModuleMessage Message="@_message" Type="@_type" />
 | 
			
		||||
}
 | 
			
		||||
<AuthorizeView>
 | 
			
		||||
    <Authorizing>
 | 
			
		||||
@ -20,16 +20,16 @@
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            <div class="form-group">
 | 
			
		||||
                <label for="Username" class="control-label">Username: </label>
 | 
			
		||||
                <input type="text" name="Username" class="form-control" placeholder="Username" @bind="@Username" />
 | 
			
		||||
                <input type="text" name="Username" class="form-control" placeholder="Username" @bind="@_username" id="Username" />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="form-group">
 | 
			
		||||
                <label for="Password" class="control-label">Password: </label>
 | 
			
		||||
                <input type="password" name="Password" class="form-control" placeholder="Password" @bind="@Password" />
 | 
			
		||||
                <input type="password" name="Password" class="form-control" placeholder="Password" @bind="@_password" id="Password" />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="form-group">
 | 
			
		||||
                <div class="form-check form-check-inline">
 | 
			
		||||
                    <label class="form-check-label" for="Remember">Remember Me?</label> 
 | 
			
		||||
                    <input type="checkbox" class="form-check-input" name="Remember" @bind="@Remember" />
 | 
			
		||||
                    <input type="checkbox" class="form-check-input" name="Remember" @bind="@_remember" id="Remember" />
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <button type="button" class="btn btn-primary" @onclick="Login">Login</button>
 | 
			
		||||
@ -43,38 +43,38 @@
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Anonymous; } }
 | 
			
		||||
 | 
			
		||||
    string ReturnUrl = "";
 | 
			
		||||
    public string Message = "";
 | 
			
		||||
    public MessageType Type = MessageType.Info;
 | 
			
		||||
    public string Username = "";
 | 
			
		||||
    public string Password = "";
 | 
			
		||||
    public bool Remember = false;
 | 
			
		||||
    string _returnUrl = "";
 | 
			
		||||
    string _message = "";
 | 
			
		||||
    MessageType _type = MessageType.Info;
 | 
			
		||||
    string _username = "";
 | 
			
		||||
    string _password = "";
 | 
			
		||||
    bool _remember = false;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        if (PageState.QueryString.ContainsKey("returnurl"))
 | 
			
		||||
        {
 | 
			
		||||
            ReturnUrl = PageState.QueryString["returnurl"];
 | 
			
		||||
            _returnUrl = PageState.QueryString["returnurl"];
 | 
			
		||||
        }
 | 
			
		||||
        if (PageState.QueryString.ContainsKey("name"))
 | 
			
		||||
        {
 | 
			
		||||
            Username = PageState.QueryString["name"];
 | 
			
		||||
            _username = PageState.QueryString["name"];
 | 
			
		||||
        }
 | 
			
		||||
        if (PageState.QueryString.ContainsKey("token"))
 | 
			
		||||
        {
 | 
			
		||||
            User user = new User();
 | 
			
		||||
            user.SiteId = PageState.Site.SiteId;
 | 
			
		||||
            user.Username = Username;
 | 
			
		||||
            user.Username = _username;
 | 
			
		||||
            user = await UserService.VerifyEmailAsync(user, PageState.QueryString["token"]);
 | 
			
		||||
 | 
			
		||||
            if (user != null)
 | 
			
		||||
            {
 | 
			
		||||
                Message = "User Account Verified Successfully. You Can Now Login With Your Username And Password Below.";
 | 
			
		||||
                _message = "User Account Verified Successfully. You Can Now Login With Your Username And Password Below.";
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                Message = "User Account Could Not Be Verified. Please Contact Your Administrator For Further Instructions.";
 | 
			
		||||
                Type = MessageType.Warning;
 | 
			
		||||
                _message = "User Account Could Not Be Verified. Please Contact Your Administrator For Further Instructions.";
 | 
			
		||||
                _type = MessageType.Warning;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@ -87,21 +87,21 @@
 | 
			
		||||
            // server-side Blazor
 | 
			
		||||
            User user = new User();
 | 
			
		||||
            user.SiteId = PageState.Site.SiteId;
 | 
			
		||||
            user.Username = Username;
 | 
			
		||||
            user.Password = Password;
 | 
			
		||||
            user.Username = _username;
 | 
			
		||||
            user.Password = _password;
 | 
			
		||||
            user = await UserService.LoginUserAsync(user, false, false);
 | 
			
		||||
            if (user.IsAuthenticated)
 | 
			
		||||
            {
 | 
			
		||||
                await logger.LogInformation("Login Successful For Username {Username}", Username);
 | 
			
		||||
                await logger.LogInformation("Login Successful For Username {Username}", _username);
 | 
			
		||||
                // complete the login on the server so that the cookies are set correctly on SignalR
 | 
			
		||||
                var interop = new Interop(jsRuntime);
 | 
			
		||||
                var interop = new Interop(JsRuntime);
 | 
			
		||||
                string antiforgerytoken = await interop.GetElementByName("__RequestVerificationToken");
 | 
			
		||||
                var fields = new { __RequestVerificationToken = antiforgerytoken, username = Username, password = Password, remember = Remember, returnurl = ReturnUrl };
 | 
			
		||||
                var fields = new { __RequestVerificationToken = antiforgerytoken, username = _username, password = _password, remember = _remember, returnurl = _returnUrl };
 | 
			
		||||
                await interop.SubmitForm("/pages/login/", fields);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                await logger.LogInformation("Login Failed For Username {Username}", Username);
 | 
			
		||||
                await logger.LogInformation("Login Failed For Username {Username}", _username);
 | 
			
		||||
                AddModuleMessage("Login Failed. Please Remember That Passwords Are Case Sensitive And User Accounts Require Email Verification When They Initially Created.", MessageType.Error);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@ -110,18 +110,18 @@
 | 
			
		||||
            // client-side Blazor
 | 
			
		||||
            User user = new User();
 | 
			
		||||
            user.SiteId = PageState.Site.SiteId;
 | 
			
		||||
            user.Username = Username;
 | 
			
		||||
            user.Password = Password;
 | 
			
		||||
            user = await UserService.LoginUserAsync(user, true, Remember);
 | 
			
		||||
            user.Username = _username;
 | 
			
		||||
            user.Password = _password;
 | 
			
		||||
            user = await UserService.LoginUserAsync(user, true, _remember);
 | 
			
		||||
            if (user.IsAuthenticated)
 | 
			
		||||
            {
 | 
			
		||||
                await logger.LogInformation("Login Successful For Username {Username}", Username);
 | 
			
		||||
                await logger.LogInformation("Login Successful For Username {Username}", _username);
 | 
			
		||||
                authstateprovider.NotifyAuthenticationChanged();
 | 
			
		||||
                NavigationManager.NavigateTo(NavigateUrl(ReturnUrl, "reload"));
 | 
			
		||||
                NavigationManager.NavigateTo(NavigateUrl(_returnUrl, "reload"));
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                await logger.LogInformation("Login Failed For Username {Username}", Username);
 | 
			
		||||
                await logger.LogInformation("Login Failed For Username {Username}", _username);
 | 
			
		||||
                AddModuleMessage("Login Failed. Please Remember That Passwords Are Case Sensitive And User Accounts Require Verification When They Are Initially Created So You May Wish To Check Your Email.", MessageType.Error);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@ -129,28 +129,28 @@
 | 
			
		||||
 | 
			
		||||
    private void Cancel()
 | 
			
		||||
    {
 | 
			
		||||
        NavigationManager.NavigateTo(ReturnUrl);
 | 
			
		||||
        NavigationManager.NavigateTo(_returnUrl);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private async Task Forgot()
 | 
			
		||||
    {
 | 
			
		||||
        if (Username != "")
 | 
			
		||||
        if (_username != "")
 | 
			
		||||
        {
 | 
			
		||||
            User user = await UserService.GetUserAsync(Username, PageState.Site.SiteId);
 | 
			
		||||
            User user = await UserService.GetUserAsync(_username, PageState.Site.SiteId);
 | 
			
		||||
            if (user != null)
 | 
			
		||||
            {
 | 
			
		||||
                await UserService.ForgotPasswordAsync(user);
 | 
			
		||||
                Message = "Please Check The Email Address Associated To Your User Account For A Password Reset Notification";
 | 
			
		||||
                _message = "Please Check The Email Address Associated To Your User Account For A Password Reset Notification";
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                Message = "User Does Not Exist";
 | 
			
		||||
                Type = MessageType.Warning;
 | 
			
		||||
                _message = "User Does Not Exist";
 | 
			
		||||
                _type = MessageType.Warning;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            Message = "Please Enter The Username Related To Your Account And Then Select The Forgot Password Option Again";
 | 
			
		||||
            _message = "Please Enter The Username Related To Your Account And Then Select The Forgot Password Option Again";
 | 
			
		||||
        }
 | 
			
		||||
        StateHasChanged();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,5 @@
 | 
			
		||||
@namespace Oqtane.Modules.Admin.Logs
 | 
			
		||||
@using System.Globalization
 | 
			
		||||
@inherits ModuleBase
 | 
			
		||||
@inject NavigationManager NavigationManager
 | 
			
		||||
@inject ILogService LogService
 | 
			
		||||
@ -12,7 +13,7 @@
 | 
			
		||||
                <label class="control-label">Date/Time: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@logdate" disabled />
 | 
			
		||||
                <input class="form-control" @bind="@_logDate" disabled />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -20,7 +21,7 @@
 | 
			
		||||
                <label class="control-label">Level: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@level" disabled />
 | 
			
		||||
                <input class="form-control" @bind="@_level" disabled />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -28,7 +29,7 @@
 | 
			
		||||
                <label class="control-label">Feature: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@feature" disabled />
 | 
			
		||||
                <input class="form-control" @bind="@_feature" disabled />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -36,7 +37,7 @@
 | 
			
		||||
                <label class="control-label">Function: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@function" disabled />
 | 
			
		||||
                <input class="form-control" @bind="@_function" disabled />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -44,39 +45,39 @@
 | 
			
		||||
                <label class="control-label">Category: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@category" disabled />
 | 
			
		||||
                <input class="form-control" @bind="@_category" disabled />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        @if (pagename != "")
 | 
			
		||||
        @if (_pageName != "")
 | 
			
		||||
        {
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label class="control-label">Page: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input class="form-control" @bind="@pagename" disabled />
 | 
			
		||||
                    <input class="form-control" @bind="@_pageName" disabled />
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        }
 | 
			
		||||
        @if (moduletitle != "")
 | 
			
		||||
        @if (_moduleTitle != "")
 | 
			
		||||
        {
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label class="control-label">Module: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input class="form-control" @bind="@moduletitle" disabled />
 | 
			
		||||
                    <input class="form-control" @bind="@_moduleTitle" disabled />
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        }
 | 
			
		||||
        @if (username != "")
 | 
			
		||||
        @if (_username != "")
 | 
			
		||||
        {
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label class="control-label">User: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input class="form-control" @bind="@username" disabled />
 | 
			
		||||
                    <input class="form-control" @bind="@_username" disabled />
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        }
 | 
			
		||||
@ -85,7 +86,7 @@
 | 
			
		||||
                <label class="control-label">Url: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@url" disabled />
 | 
			
		||||
                <input class="form-control" @bind="@_url" disabled />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -93,7 +94,7 @@
 | 
			
		||||
                <label class="control-label">Template: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@template" disabled />
 | 
			
		||||
                <input class="form-control" @bind="@_template" disabled />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -101,17 +102,17 @@
 | 
			
		||||
                <label class="control-label">Message: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@message" rows="5" disabled />
 | 
			
		||||
                <textarea class="form-control" @bind="@_message" rows="5" disabled></textarea>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        @if (!string.IsNullOrEmpty(exception))
 | 
			
		||||
        @if (!string.IsNullOrEmpty(_exception))
 | 
			
		||||
        {
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label class="control-label">Exception: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <textarea class="form-control" @bind="@exception" rows="5" disabled />
 | 
			
		||||
                    <textarea class="form-control" @bind="@_exception" rows="5" disabled></textarea>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        }
 | 
			
		||||
@ -120,7 +121,7 @@
 | 
			
		||||
                <label class="control-label">Properties: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@properties" rows="5" disabled />
 | 
			
		||||
                <textarea class="form-control" @bind="@_properties" rows="5" disabled></textarea>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -128,7 +129,7 @@
 | 
			
		||||
                <label class="control-label">Server: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@server" disabled />
 | 
			
		||||
                <input class="form-control" @bind="@_server" disabled />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
@ -137,41 +138,41 @@
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
 | 
			
		||||
    int logid;
 | 
			
		||||
    string logdate = "";
 | 
			
		||||
    string level = "";
 | 
			
		||||
    string feature = "";
 | 
			
		||||
    string function = "";
 | 
			
		||||
    string category = "";
 | 
			
		||||
    string pagename = "";
 | 
			
		||||
    string moduletitle = "";
 | 
			
		||||
    string username = "";
 | 
			
		||||
    string url = "";
 | 
			
		||||
    string template = "";
 | 
			
		||||
    string message = "";
 | 
			
		||||
    string exception = "";
 | 
			
		||||
    string properties = "";
 | 
			
		||||
    string server = "";
 | 
			
		||||
    int _logId;
 | 
			
		||||
    string _logDate = "";
 | 
			
		||||
    string _level = "";
 | 
			
		||||
    string _feature = "";
 | 
			
		||||
    string _function = "";
 | 
			
		||||
    string _category = "";
 | 
			
		||||
    string _pageName = "";
 | 
			
		||||
    string _moduleTitle = "";
 | 
			
		||||
    string _username = "";
 | 
			
		||||
    string _url = "";
 | 
			
		||||
    string _template = "";
 | 
			
		||||
    string _message = "";
 | 
			
		||||
    string _exception = "";
 | 
			
		||||
    string _properties = "";
 | 
			
		||||
    string _server = "";
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            logid = Int32.Parse(PageState.QueryString["id"]);
 | 
			
		||||
            Log log = await LogService.GetLogAsync(logid);
 | 
			
		||||
            _logId = Int32.Parse(PageState.QueryString["id"]);
 | 
			
		||||
            Log log = await LogService.GetLogAsync(_logId);
 | 
			
		||||
            if (log != null)
 | 
			
		||||
            {
 | 
			
		||||
                logdate = log.LogDate.ToString();
 | 
			
		||||
                level = log.Level;
 | 
			
		||||
                feature = log.Feature;
 | 
			
		||||
                function = log.Function;
 | 
			
		||||
                category = log.Category;
 | 
			
		||||
                _logDate = log.LogDate.ToString(CultureInfo.CurrentCulture);
 | 
			
		||||
                _level = log.Level;
 | 
			
		||||
                _feature = log.Feature;
 | 
			
		||||
                _function = log.Function;
 | 
			
		||||
                _category = log.Category;
 | 
			
		||||
                if (log.PageId != null)
 | 
			
		||||
                {
 | 
			
		||||
                    Page page = await PageService.GetPageAsync(log.PageId.Value);
 | 
			
		||||
                    if (page != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        pagename = page.Name;
 | 
			
		||||
                        _pageName = page.Name;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                if (log.PageId != null && log.ModuleId != null)
 | 
			
		||||
@ -179,7 +180,7 @@
 | 
			
		||||
                    PageModule pagemodule = await PageModuleService.GetPageModuleAsync(log.PageId.Value, log.ModuleId.Value);
 | 
			
		||||
                    if (pagemodule != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        moduletitle = pagemodule.Title;
 | 
			
		||||
                        _moduleTitle = pagemodule.Title;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                if (log.UserId != null)
 | 
			
		||||
@ -187,20 +188,20 @@
 | 
			
		||||
                    User user = await UserService.GetUserAsync(log.UserId.Value, PageState.Site.SiteId);
 | 
			
		||||
                    if (user != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        username = user.Username;
 | 
			
		||||
                        _username = user.Username;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                url = log.Url;
 | 
			
		||||
                template = log.MessageTemplate;
 | 
			
		||||
                message = log.Message;
 | 
			
		||||
                exception = log.Exception;
 | 
			
		||||
                properties = log.Properties;
 | 
			
		||||
                server = log.Server;
 | 
			
		||||
                _url = log.Url;
 | 
			
		||||
                _template = log.MessageTemplate;
 | 
			
		||||
                _message = log.Message;
 | 
			
		||||
                _exception = log.Exception;
 | 
			
		||||
                _properties = log.Properties;
 | 
			
		||||
                _server = log.Server;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Loading Log {LogId} {Error}", logid, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Loading Log {LogId} {Error}", _logId, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Loading Log", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
@inherits ModuleBase
 | 
			
		||||
@inject ILogService LogService
 | 
			
		||||
 | 
			
		||||
@if (Logs == null)
 | 
			
		||||
@if (_logs == null)
 | 
			
		||||
{
 | 
			
		||||
    <p><em>Loading...</em></p>
 | 
			
		||||
}
 | 
			
		||||
@ -45,9 +45,9 @@ else
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
 | 
			
		||||
    @if (Logs.Any())
 | 
			
		||||
    @if (_logs.Any())
 | 
			
		||||
    {
 | 
			
		||||
        <Pager Items="@Logs">
 | 
			
		||||
        <Pager Items="@_logs">
 | 
			
		||||
            <Header>
 | 
			
		||||
                <th> </th>
 | 
			
		||||
                <th>Date</th>
 | 
			
		||||
@ -73,10 +73,10 @@ else
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
 | 
			
		||||
    string level = "-";
 | 
			
		||||
    string function = "-";
 | 
			
		||||
    string rows = "10";
 | 
			
		||||
    List<Log> Logs;
 | 
			
		||||
    string _level = "-";
 | 
			
		||||
    string _function = "-";
 | 
			
		||||
    string _rows = "10";
 | 
			
		||||
    List<Log> _logs;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
@ -95,7 +95,7 @@ else
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            level = (string)e.Value;
 | 
			
		||||
            _level = (string)e.Value;
 | 
			
		||||
            await GetLogs();
 | 
			
		||||
            StateHasChanged();
 | 
			
		||||
        }
 | 
			
		||||
@ -110,7 +110,7 @@ else
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            function = (string)e.Value;
 | 
			
		||||
            _function = (string)e.Value;
 | 
			
		||||
            await GetLogs();
 | 
			
		||||
            StateHasChanged();
 | 
			
		||||
        }
 | 
			
		||||
@ -126,7 +126,7 @@ else
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            rows = (string)e.Value;
 | 
			
		||||
            _rows = (string)e.Value;
 | 
			
		||||
            await GetLogs();
 | 
			
		||||
            StateHasChanged();
 | 
			
		||||
        }
 | 
			
		||||
@ -139,7 +139,7 @@ else
 | 
			
		||||
 | 
			
		||||
    private async Task GetLogs()
 | 
			
		||||
    {
 | 
			
		||||
        Logs = await LogService.GetLogsAsync(PageState.Site.SiteId, ((level == "-") ? "" : level), ((function == "-") ? "" : function), int.Parse(rows));
 | 
			
		||||
        _logs = await LogService.GetLogsAsync(PageState.Site.SiteId, ((_level == "-") ? "" : _level), ((_function == "-") ? "" : _function), int.Parse(_rows));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private string GetClass(string function)
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@
 | 
			
		||||
<table class="table table-borderless">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Module: </label>
 | 
			
		||||
            <label  class="control-label">Module: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <FileManager Filter="nupkg" ShowFiles="false" Folder="Modules" />
 | 
			
		||||
@ -16,12 +16,12 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
 | 
			
		||||
@if (packages != null)
 | 
			
		||||
@if (_packages != null)
 | 
			
		||||
{
 | 
			
		||||
    <hr class="app-rule" />
 | 
			
		||||
    <div class="mx-auto text-center"><h2>Available Modules</h2></div>
 | 
			
		||||
 | 
			
		||||
    <Pager Items="@packages">
 | 
			
		||||
    <Pager Items="@_packages">
 | 
			
		||||
        <Header>
 | 
			
		||||
            <th>Name</th>
 | 
			
		||||
            <th>Version</th>
 | 
			
		||||
@ -44,19 +44,19 @@
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
 | 
			
		||||
 | 
			
		||||
    List<Package> packages;
 | 
			
		||||
    List<Package> _packages;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            List<ModuleDefinition> moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(PageState.Site.SiteId);
 | 
			
		||||
            packages = await PackageService.GetPackagesAsync("module");
 | 
			
		||||
            foreach(Package package in packages.ToArray())
 | 
			
		||||
            _packages = await PackageService.GetPackagesAsync("module");
 | 
			
		||||
            foreach(Package package in _packages.ToArray())
 | 
			
		||||
            {
 | 
			
		||||
                if (moduledefinitions.Exists(item => Utilities.GetTypeName(item.ModuleDefinitionName) == package.PackageId))
 | 
			
		||||
                {
 | 
			
		||||
                    packages.Remove(package);
 | 
			
		||||
                    _packages.Remove(package);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -6,18 +6,18 @@
 | 
			
		||||
<table class="table table-borderless">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
            <label  class="control-label">Name: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <input class="form-control" @bind="@name" />
 | 
			
		||||
            <input class="form-control" @bind="@_name" />
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Permissions: </label>
 | 
			
		||||
            <label  class="control-label">Permissions: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <PermissionGrid EntityName="ModuleDefinition" PermissionNames="Utilize" Permissions="@permissions" @ref="permissiongrid" />
 | 
			
		||||
            <PermissionGrid EntityName="ModuleDefinition" PermissionNames="Utilize" Permissions="@_permissions" @ref="_permissiongrid" />
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
@ -25,40 +25,40 @@
 | 
			
		||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
 | 
			
		||||
<br />
 | 
			
		||||
<br />
 | 
			
		||||
<AuditInfo CreatedBy="@createdby" CreatedOn="@createdon" ModifiedBy="@modifiedby" ModifiedOn="@modifiedon"></AuditInfo>
 | 
			
		||||
<AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon"></AuditInfo>
 | 
			
		||||
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
 | 
			
		||||
    int ModuleDefinitionId;
 | 
			
		||||
    string name;
 | 
			
		||||
    string permissions;
 | 
			
		||||
    string createdby;
 | 
			
		||||
    DateTime createdon;
 | 
			
		||||
    string modifiedby;
 | 
			
		||||
    DateTime modifiedon;
 | 
			
		||||
    int _moduleDefinitionId;
 | 
			
		||||
    string _name;
 | 
			
		||||
    string _permissions;
 | 
			
		||||
    string _createdby;
 | 
			
		||||
    DateTime _createdon;
 | 
			
		||||
    string _modifiedby;
 | 
			
		||||
    DateTime _modifiedon;
 | 
			
		||||
 | 
			
		||||
    PermissionGrid permissiongrid;
 | 
			
		||||
    PermissionGrid _permissiongrid;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            ModuleDefinitionId = Int32.Parse(PageState.QueryString["id"]);
 | 
			
		||||
            ModuleDefinition moduledefinition = await ModuleDefinitionService.GetModuleDefinitionAsync(ModuleDefinitionId, ModuleState.SiteId);
 | 
			
		||||
            if (moduledefinition != null)
 | 
			
		||||
            _moduleDefinitionId = Int32.Parse(PageState.QueryString["id"]);
 | 
			
		||||
            ModuleDefinition moduleDefinition = await ModuleDefinitionService.GetModuleDefinitionAsync(_moduleDefinitionId, ModuleState.SiteId);
 | 
			
		||||
            if (moduleDefinition != null)
 | 
			
		||||
            {
 | 
			
		||||
                name = moduledefinition.Name;
 | 
			
		||||
                permissions = moduledefinition.Permissions;
 | 
			
		||||
                createdby = moduledefinition.CreatedBy;
 | 
			
		||||
                createdon = moduledefinition.CreatedOn;
 | 
			
		||||
                modifiedby = moduledefinition.ModifiedBy;
 | 
			
		||||
                modifiedon = moduledefinition.ModifiedOn;
 | 
			
		||||
                _name = moduleDefinition.Name;
 | 
			
		||||
                _permissions = moduleDefinition.Permissions;
 | 
			
		||||
                _createdby = moduleDefinition.CreatedBy;
 | 
			
		||||
                _createdon = moduleDefinition.CreatedOn;
 | 
			
		||||
                _modifiedby = moduleDefinition.ModifiedBy;
 | 
			
		||||
                _modifiedon = moduleDefinition.ModifiedOn;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Loading ModuleDefinition {ModuleDefinitionId} {Error}", ModuleDefinitionId, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Loading ModuleDefinition {ModuleDefinitionId} {Error}", _moduleDefinitionId, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Loading Module", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@ -67,15 +67,15 @@
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            ModuleDefinition moduledefinition = await ModuleDefinitionService.GetModuleDefinitionAsync(ModuleDefinitionId, ModuleState.SiteId);
 | 
			
		||||
            moduledefinition.Permissions = permissiongrid.GetPermissions();
 | 
			
		||||
            ModuleDefinition moduledefinition = await ModuleDefinitionService.GetModuleDefinitionAsync(_moduleDefinitionId, ModuleState.SiteId);
 | 
			
		||||
            moduledefinition.Permissions = _permissiongrid.GetPermissions();
 | 
			
		||||
            await ModuleDefinitionService.UpdateModuleDefinitionAsync(moduledefinition);
 | 
			
		||||
            await logger.LogInformation("ModuleDefinition Saved {ModuleDefinition}", moduledefinition);
 | 
			
		||||
            NavigationManager.NavigateTo(NavigateUrl());
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Saving ModuleDefinition {ModuleDefinitionId} {Error}", ModuleDefinitionId, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Saving ModuleDefinition {ModuleDefinitionId} {Error}", _moduleDefinitionId, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Saving Module", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@
 | 
			
		||||
@inject IModuleDefinitionService ModuleDefinitionService
 | 
			
		||||
@inject IPackageService PackageService
 | 
			
		||||
 | 
			
		||||
@if (moduledefinitions == null)
 | 
			
		||||
@if (_moduleDefinitions == null)
 | 
			
		||||
{
 | 
			
		||||
    <p><em>Loading...</em></p>
 | 
			
		||||
}
 | 
			
		||||
@ -12,7 +12,7 @@ else
 | 
			
		||||
{
 | 
			
		||||
    <ActionLink Action="Add" Text="Install Module" />
 | 
			
		||||
 | 
			
		||||
    <Pager Items="@moduledefinitions">
 | 
			
		||||
    <Pager Items="@_moduleDefinitions">
 | 
			
		||||
        <Header>
 | 
			
		||||
            <th> </th>
 | 
			
		||||
            <th> </th>
 | 
			
		||||
@ -43,15 +43,15 @@ else
 | 
			
		||||
@code {
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
 | 
			
		||||
 | 
			
		||||
    List<ModuleDefinition> moduledefinitions;
 | 
			
		||||
    List<Package> packages;
 | 
			
		||||
    List<ModuleDefinition> _moduleDefinitions;
 | 
			
		||||
    List<Package> _packages;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(PageState.Site.SiteId);
 | 
			
		||||
            packages = await PackageService.GetPackagesAsync("module");
 | 
			
		||||
            _moduleDefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(PageState.Site.SiteId);
 | 
			
		||||
            _packages = await PackageService.GetPackagesAsync("module");
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
@ -63,7 +63,7 @@ else
 | 
			
		||||
    private bool UpgradeAvailable(string moduledefinitionname, string version)
 | 
			
		||||
    {
 | 
			
		||||
        bool upgradeavailable = false;
 | 
			
		||||
        Package package = packages.Where(item => item.PackageId == Utilities.GetTypeName(moduledefinitionname)).FirstOrDefault();
 | 
			
		||||
        Package package = _packages.Where(item => item.PackageId == Utilities.GetTypeName(moduledefinitionname)).FirstOrDefault();
 | 
			
		||||
        if (package != null)
 | 
			
		||||
        {
 | 
			
		||||
            upgradeavailable = (Version.Parse(package.Version).CompareTo(Version.Parse(version)) > 0);
 | 
			
		||||
@ -87,18 +87,18 @@ else
 | 
			
		||||
        }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
    private async Task DeleteModule(ModuleDefinition ModuleDefinition)
 | 
			
		||||
    private async Task DeleteModule(ModuleDefinition moduleDefinition)
 | 
			
		||||
    {
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            await ModuleDefinitionService.DeleteModuleDefinitionAsync(ModuleDefinition.ModuleDefinitionId, ModuleDefinition.SiteId);
 | 
			
		||||
            await logger.LogInformation("Module Deleted {ModuleDefinition}", ModuleDefinition);
 | 
			
		||||
            await ModuleDefinitionService.DeleteModuleDefinitionAsync(moduleDefinition.ModuleDefinitionId, moduleDefinition.SiteId);
 | 
			
		||||
            await logger.LogInformation("Module Deleted {ModuleDefinition}", moduleDefinition);
 | 
			
		||||
            NavigationManager.NavigateTo(NavigateUrl());
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception ex)
 | 
			
		||||
        {
 | 
			
		||||
            await logger.LogError(ex, "Error Deleting Module {ModuleDefinition} {Error}", ModuleDefinition, ex.Message);
 | 
			
		||||
            await logger.LogError(ex, "Error Deleting Module {ModuleDefinition} {Error}", moduleDefinition, ex.Message);
 | 
			
		||||
            AddModuleMessage("Error Deleting Module", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -7,10 +7,10 @@
 | 
			
		||||
    <tbody>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Title" class="control-label">Content: </label>
 | 
			
		||||
                <label class="control-label">Content: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@content" rows="5" />
 | 
			
		||||
                <textarea class="form-control" @bind="@_content" rows="5"></textarea>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </tbody>
 | 
			
		||||
@ -23,10 +23,10 @@
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
    public override string Title { get { return "Export Module"; } }
 | 
			
		||||
 | 
			
		||||
    string content = "";
 | 
			
		||||
    string _content = "";
 | 
			
		||||
 | 
			
		||||
    private async Task ExportModule()
 | 
			
		||||
    {
 | 
			
		||||
        content = await ModuleService.ExportModuleAsync(ModuleState.ModuleId);
 | 
			
		||||
        _content = await ModuleService.ExportModuleAsync(ModuleState.ModuleId);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@
 | 
			
		||||
                <label for="Title" class="control-label">Content: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@content" rows="5" />
 | 
			
		||||
                <textarea class="form-control" @bind="@_content" rows="5"></textarea>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </tbody>
 | 
			
		||||
@ -23,16 +23,16 @@
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
 | 
			
		||||
    public override string Title { get { return "Import Module"; } }
 | 
			
		||||
 | 
			
		||||
    string content = "";
 | 
			
		||||
    string _content = "";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    private async Task ImportModule()
 | 
			
		||||
    {
 | 
			
		||||
        if (content != "")
 | 
			
		||||
        if (_content != "")
 | 
			
		||||
        {
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                await ModuleService.ImportModuleAsync(ModuleState.ModuleId, content);
 | 
			
		||||
                await ModuleService.ImportModuleAsync(ModuleState.ModuleId, _content);
 | 
			
		||||
                StateHasChanged();
 | 
			
		||||
                NavigationManager.NavigateTo(NavigateUrl());
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,7 @@
 | 
			
		||||
                <label for="Title" class="control-label">Title: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="text" name="Title" class="form-control" @bind="@title" />
 | 
			
		||||
                <input type="text" name="Title" class="form-control" @bind="@_title" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -20,9 +20,9 @@
 | 
			
		||||
                <label for="Container" class="control-label">Container: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@containertype">
 | 
			
		||||
                <select class="form-control" @bind="@_containerType">
 | 
			
		||||
                    <option value=""><Select Container></option>
 | 
			
		||||
                    @foreach (KeyValuePair<string, string> container in containers)
 | 
			
		||||
                    @foreach (KeyValuePair<string, string> container in _containers)
 | 
			
		||||
                    {
 | 
			
		||||
                        <option value="@container.Key">@container.Value</option>
 | 
			
		||||
                    }
 | 
			
		||||
@ -34,7 +34,7 @@
 | 
			
		||||
                <label for="Name" class="control-label">Permissions: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <PermissionGrid EntityName="Module" PermissionNames="@permissionnames" Permissions="@permissions" @ref="permissiongrid" />
 | 
			
		||||
                <PermissionGrid EntityName="Module" PermissionNames="@_permissionNames" Permissions="@_permissions" @ref="permissiongrid" />
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -42,7 +42,7 @@
 | 
			
		||||
                <label for="Page" class="control-label">Page: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@pageid">
 | 
			
		||||
                <select class="form-control" @bind="@_pageId">
 | 
			
		||||
                    @foreach (Page p in PageState.Pages)
 | 
			
		||||
                    {
 | 
			
		||||
                        <option value="@p.PageId">@p.Name</option>
 | 
			
		||||
@ -63,26 +63,26 @@
 | 
			
		||||
    public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Edit; } }
 | 
			
		||||
    public override string Title { get { return "Module Settings"; } }
 | 
			
		||||
 | 
			
		||||
    Dictionary<string, string> containers = new Dictionary<string, string>();
 | 
			
		||||
    string title;
 | 
			
		||||
    string containertype;
 | 
			
		||||
    string permissionnames = "";
 | 
			
		||||
    string permissions;
 | 
			
		||||
    string pageid;
 | 
			
		||||
    Dictionary<string, string> _containers = new Dictionary<string, string>();
 | 
			
		||||
    string _title;
 | 
			
		||||
    string _containerType;
 | 
			
		||||
    string _permissionNames = "";
 | 
			
		||||
    string _permissions;
 | 
			
		||||
    string _pageId;
 | 
			
		||||
 | 
			
		||||
    PermissionGrid permissiongrid;
 | 
			
		||||
    PermissionGrid _permissiongrid;
 | 
			
		||||
 | 
			
		||||
    RenderFragment DynamicComponent { get; set; }
 | 
			
		||||
    object settings;
 | 
			
		||||
    object _settings;
 | 
			
		||||
 | 
			
		||||
    protected override async Task OnInitializedAsync()
 | 
			
		||||
    {
 | 
			
		||||
        title = ModuleState.Title;
 | 
			
		||||
        containers = ThemeService.GetContainerTypes(await ThemeService.GetThemesAsync());
 | 
			
		||||
        containertype = ModuleState.ContainerType;
 | 
			
		||||
        permissions = ModuleState.Permissions;
 | 
			
		||||
        permissionnames = ModuleState.ModuleDefinition.PermissionNames;
 | 
			
		||||
        pageid = ModuleState.PageId.ToString();
 | 
			
		||||
        _title = ModuleState.Title;
 | 
			
		||||
        _containers = ThemeService.GetContainerTypes(await ThemeService.GetThemesAsync());
 | 
			
		||||
        _containerType = ModuleState.ContainerType;
 | 
			
		||||
        _permissions = ModuleState.Permissions;
 | 
			
		||||
        _permissionNames = ModuleState.ModuleDefinition.PermissionNames;
 | 
			
		||||
        _pageId = ModuleState.PageId.ToString();
 | 
			
		||||
 | 
			
		||||
        DynamicComponent = builder =>
 | 
			
		||||
        {
 | 
			
		||||
@ -90,7 +90,7 @@
 | 
			
		||||
            if (moduleType != null)
 | 
			
		||||
            {
 | 
			
		||||
                builder.OpenComponent(0, moduleType);
 | 
			
		||||
                builder.AddComponentReferenceCapture(1, inst => { settings = Convert.ChangeType(inst, moduleType); });
 | 
			
		||||
                builder.AddComponentReferenceCapture(1, inst => { _settings = Convert.ChangeType(inst, moduleType); });
 | 
			
		||||
                builder.CloseComponent();
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
@ -99,20 +99,20 @@
 | 
			
		||||
    private async Task SaveModule()
 | 
			
		||||
    {
 | 
			
		||||
        Module module = ModuleState;
 | 
			
		||||
        module.Permissions = permissiongrid.GetPermissions();
 | 
			
		||||
        module.Permissions = _permissiongrid.GetPermissions();
 | 
			
		||||
        await ModuleService.UpdateModuleAsync(module);
 | 
			
		||||
 | 
			
		||||
        PageModule pagemodule = await PageModuleService.GetPageModuleAsync(ModuleState.PageModuleId);
 | 
			
		||||
        pagemodule.PageId = int.Parse(pageid);
 | 
			
		||||
        pagemodule.Title = title;
 | 
			
		||||
        pagemodule.ContainerType = containertype;
 | 
			
		||||
        pagemodule.PageId = int.Parse(_pageId);
 | 
			
		||||
        pagemodule.Title = _title;
 | 
			
		||||
        pagemodule.ContainerType = _containerType;
 | 
			
		||||
        await PageModuleService.UpdatePageModuleAsync(pagemodule);
 | 
			
		||||
        await PageModuleService.UpdatePageModuleOrderAsync(pagemodule.PageId, pagemodule.Pane);
 | 
			
		||||
 | 
			
		||||
        Type moduleType = Type.GetType(ModuleState.ModuleType);
 | 
			
		||||
        if (moduleType != null)
 | 
			
		||||
        {
 | 
			
		||||
            moduleType.GetMethod("UpdateSettings").Invoke(settings, null); // method must be public in settings component
 | 
			
		||||
            moduleType.GetMethod("UpdateSettings").Invoke(_settings, null); // method must be public in settings component
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        NavigationManager.NavigateTo(NavigateUrl());
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
                <label  class="control-label">Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@name" />
 | 
			
		||||
@ -14,7 +14,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Title: </label>
 | 
			
		||||
                <label  class="control-label">Title: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@title" />
 | 
			
		||||
@ -22,7 +22,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Description: </label>
 | 
			
		||||
                <label  class="control-label">Description: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@description" rows="5" />
 | 
			
		||||
@ -30,7 +30,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Category: </label>
 | 
			
		||||
                <label  class="control-label">Category: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@category" />
 | 
			
		||||
@ -38,7 +38,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Order: </label>
 | 
			
		||||
                <label  class="control-label">Order: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@vieworder" />
 | 
			
		||||
@ -46,7 +46,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Length: </label>
 | 
			
		||||
                <label  class="control-label">Length: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@maxlength" />
 | 
			
		||||
@ -54,7 +54,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Default Value: </label>
 | 
			
		||||
                <label  class="control-label">Default Value: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@defaultvalue" />
 | 
			
		||||
@ -62,7 +62,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Required? </label>
 | 
			
		||||
                <label  class="control-label">Required? </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@isrequired">
 | 
			
		||||
@ -73,7 +73,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Private? </label>
 | 
			
		||||
                <label  class="control-label">Private? </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@isprivate">
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
<table class="table table-borderless">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
            <label  class="control-label">Name: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <input class="form-control" @bind="@name" />
 | 
			
		||||
@ -14,7 +14,7 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Description: </label>
 | 
			
		||||
            <label  class="control-label">Description: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <textarea class="form-control" @bind="@description" rows="5" />
 | 
			
		||||
@ -22,7 +22,7 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Auto Assigned? </label>
 | 
			
		||||
            <label  class="control-label">Auto Assigned? </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <select class="form-control" @bind="@isautoassigned">
 | 
			
		||||
@ -33,7 +33,7 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">System Role? </label>
 | 
			
		||||
            <label  class="control-label">System Role? </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <select class="form-control" @bind="@issystem">
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
<table class="table table-borderless">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
            <label  class="control-label">Name: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <input class="form-control" @bind="@name" />
 | 
			
		||||
@ -14,7 +14,7 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Description: </label>
 | 
			
		||||
            <label  class="control-label">Description: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <textarea class="form-control" @bind="@description" rows="5" />
 | 
			
		||||
@ -22,7 +22,7 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Auto Assigned? </label>
 | 
			
		||||
            <label  class="control-label">Auto Assigned? </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <select class="form-control" @bind="@isautoassigned">
 | 
			
		||||
@ -33,7 +33,7 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">System Role? </label>
 | 
			
		||||
            <label  class="control-label">System Role? </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <select class="form-control" @bind="@issystem">
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,7 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
                <label  class="control-label">Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@name" />
 | 
			
		||||
@ -20,7 +20,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Tenant: </label>
 | 
			
		||||
                <label  class="control-label">Tenant: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@tenant" readonly />
 | 
			
		||||
@ -28,7 +28,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Aliases: </label>
 | 
			
		||||
                <label  class="control-label">Aliases: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@urls" rows="3" />
 | 
			
		||||
@ -36,7 +36,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Logo: </label>
 | 
			
		||||
                <label  class="control-label">Logo: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <FileManager FileId="@logofileid.ToString()" @ref="filemanager" />
 | 
			
		||||
@ -44,7 +44,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Default Theme: </label>
 | 
			
		||||
                <label  class="control-label">Default Theme: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @onchange="(e => ThemeChanged(e))">
 | 
			
		||||
@ -65,7 +65,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Default Layout: </label>
 | 
			
		||||
                <label  class="control-label">Default Layout: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@layouttype">
 | 
			
		||||
@ -79,7 +79,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Default Container: </label>
 | 
			
		||||
                <label  class="control-label">Default Container: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@containertype">
 | 
			
		||||
@ -93,7 +93,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Is Deleted? </label>
 | 
			
		||||
                <label  class="control-label">Is Deleted? </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@isdeleted">
 | 
			
		||||
@ -111,7 +111,7 @@
 | 
			
		||||
        <table class="table table-borderless">
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label for="Name" class="control-label">Host: </label>
 | 
			
		||||
                    <label  class="control-label">Host: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input class="form-control" @bind="@smtphost" />
 | 
			
		||||
@ -119,7 +119,7 @@
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label for="Name" class="control-label">Port: </label>
 | 
			
		||||
                    <label  class="control-label">Port: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input class="form-control" @bind="@smtpport" />
 | 
			
		||||
@ -127,7 +127,7 @@
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label for="Name" class="control-label">SSL Enabled: </label>
 | 
			
		||||
                    <label  class="control-label">SSL Enabled: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input class="form-control" @bind="@smtpssl" />
 | 
			
		||||
@ -135,7 +135,7 @@
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label for="Name" class="control-label">Username: </label>
 | 
			
		||||
                    <label  class="control-label">Username: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input class="form-control" @bind="@smtpusername" />
 | 
			
		||||
@ -143,7 +143,7 @@
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label for="Name" class="control-label">Password: </label>
 | 
			
		||||
                    <label  class="control-label">Password: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input type="password" class="form-control" @bind="@smtppassword" />
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ else
 | 
			
		||||
<table class="table table-borderless">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Tenant: </label>
 | 
			
		||||
            <label  class="control-label">Tenant: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <select class="form-control" @onchange="(e => TenantChanged(e))">
 | 
			
		||||
@ -30,7 +30,7 @@ else
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
            <label  class="control-label">Name: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <input class="form-control" @bind="@name" />
 | 
			
		||||
@ -38,7 +38,7 @@ else
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Aliases: </label>
 | 
			
		||||
            <label  class="control-label">Aliases: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <textarea class="form-control" @bind="@urls" rows="3" />
 | 
			
		||||
@ -46,7 +46,7 @@ else
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Default Theme: </label>
 | 
			
		||||
            <label  class="control-label">Default Theme: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <select class="form-control" @onchange="(e => ThemeChanged(e))">
 | 
			
		||||
@ -60,7 +60,7 @@ else
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Default Layout: </label>
 | 
			
		||||
            <label  class="control-label">Default Layout: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <select class="form-control" @bind="@layouttype">
 | 
			
		||||
@ -74,7 +74,7 @@ else
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Default Container: </label>
 | 
			
		||||
            <label  class="control-label">Default Container: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <select class="form-control" @bind="@containertype">
 | 
			
		||||
@ -90,7 +90,7 @@ else
 | 
			
		||||
    {
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Host Username:</label>
 | 
			
		||||
                <label  class="control-label">Host Username:</label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@username" readonly />
 | 
			
		||||
@ -98,7 +98,7 @@ else
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Host Password:</label>
 | 
			
		||||
                <label  class="control-label">Host Password:</label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="password" class="form-control" @bind="@password" />
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
                <label  class="control-label">Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@name" />
 | 
			
		||||
@ -19,7 +19,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Tenant: </label>
 | 
			
		||||
                <label  class="control-label">Tenant: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@tenant" readonly />
 | 
			
		||||
@ -27,7 +27,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Aliases: </label>
 | 
			
		||||
                <label  class="control-label">Aliases: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@urls" rows="3" />
 | 
			
		||||
@ -35,7 +35,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Default Theme: </label>
 | 
			
		||||
                <label  class="control-label">Default Theme: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @onchange="(e => ThemeChanged(e))">
 | 
			
		||||
@ -56,7 +56,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Default Layout: </label>
 | 
			
		||||
                <label  class="control-label">Default Layout: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@layouttype">
 | 
			
		||||
@ -70,7 +70,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Default Container: </label>
 | 
			
		||||
                <label  class="control-label">Default Container: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@containertype">
 | 
			
		||||
@ -84,7 +84,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Is Deleted? </label>
 | 
			
		||||
                <label  class="control-label">Is Deleted? </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@isdeleted">
 | 
			
		||||
 | 
			
		||||
@ -7,7 +7,7 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
                <label  class="control-label">Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@name" />
 | 
			
		||||
@ -69,7 +69,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Schema: </label>
 | 
			
		||||
                <label  class="control-label">Schema: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@schema" />
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
<table class="table table-borderless">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Name: </label>
 | 
			
		||||
            <label  class="control-label">Name: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <input class="form-control" @bind="@name" />
 | 
			
		||||
@ -14,7 +14,7 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Connection String: </label>
 | 
			
		||||
            <label  class="control-label">Connection String: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <input class="form-control" @bind="@connectionstring" />
 | 
			
		||||
@ -22,7 +22,7 @@
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Schema: </label>
 | 
			
		||||
            <label  class="control-label">Schema: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <input class="form-control" @bind="@schema" />
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@
 | 
			
		||||
<table class="table table-borderless">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Theme: </label>
 | 
			
		||||
            <label  class="control-label">Theme: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <FileManager Filter="nupkg" ShowFiles="false" Folder="Themes" />
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@
 | 
			
		||||
<table class="table table-borderless">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label for="Name" class="control-label">Framework: </label>
 | 
			
		||||
            <label  class="control-label">Framework: </label>
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>
 | 
			
		||||
            <FileManager Filter="nupkg" ShowFiles="false" Folder="Framework" />
 | 
			
		||||
@ -56,4 +56,4 @@
 | 
			
		||||
        await InstallationService.Upgrade();
 | 
			
		||||
        NavigationManager.NavigateTo(NavigateUrl());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">To: </label>
 | 
			
		||||
                <label  class="control-label">To: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control"  @bind="@userid">
 | 
			
		||||
@ -26,7 +26,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Subject: </label>
 | 
			
		||||
                <label  class="control-label">Subject: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@subject" />
 | 
			
		||||
@ -34,7 +34,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Message: </label>
 | 
			
		||||
                <label  class="control-label">Message: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@body" rows="5" />
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">@title: </label>
 | 
			
		||||
                <label  class="control-label">@title: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" readonly @bind="userid">
 | 
			
		||||
@ -26,7 +26,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Subject: </label>
 | 
			
		||||
                <label  class="control-label">Subject: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@subject" />
 | 
			
		||||
@ -36,7 +36,7 @@
 | 
			
		||||
        {
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <label for="Name" class="control-label">Date: </label>
 | 
			
		||||
                    <label  class="control-label">Date: </label>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input class="form-control" @bind="@createdon" />
 | 
			
		||||
@ -45,7 +45,7 @@
 | 
			
		||||
        }
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Message: </label>
 | 
			
		||||
                <label  class="control-label">Message: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <textarea class="form-control" @bind="@body" rows="5" />
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Username: </label>
 | 
			
		||||
                <label  class="control-label">Username: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@username" />
 | 
			
		||||
@ -18,7 +18,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Password: </label>
 | 
			
		||||
                <label  class="control-label">Password: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="password" class="form-control" @bind="@password" />
 | 
			
		||||
@ -26,7 +26,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Confirm Password: </label>
 | 
			
		||||
                <label  class="control-label">Confirm Password: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="password" class="form-control" @bind="@confirm" />
 | 
			
		||||
@ -34,7 +34,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Email: </label>
 | 
			
		||||
                <label  class="control-label">Email: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@email" />
 | 
			
		||||
@ -42,7 +42,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Full Name: </label>
 | 
			
		||||
                <label  class="control-label">Full Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@displayname" />
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Username: </label>
 | 
			
		||||
                <label  class="control-label">Username: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@username" readonly />
 | 
			
		||||
@ -26,7 +26,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Password: </label>
 | 
			
		||||
                <label  class="control-label">Password: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="password" class="form-control" @bind="@password" />
 | 
			
		||||
@ -34,7 +34,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Confirm Password: </label>
 | 
			
		||||
                <label  class="control-label">Confirm Password: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="password" class="form-control" @bind="@confirm" />
 | 
			
		||||
@ -42,7 +42,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Email: </label>
 | 
			
		||||
                <label  class="control-label">Email: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@email" />
 | 
			
		||||
@ -50,7 +50,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Full Name: </label>
 | 
			
		||||
                <label  class="control-label">Full Name: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@displayname" />
 | 
			
		||||
@ -58,7 +58,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Photo: </label>
 | 
			
		||||
                <label  class="control-label">Photo: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <FileManager FileId="@photofileid.ToString()" @ref="filemanager" />
 | 
			
		||||
@ -88,7 +88,7 @@
 | 
			
		||||
        }
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Is Deleted? </label>
 | 
			
		||||
                <label  class="control-label">Is Deleted? </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@isdeleted">
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,7 @@ else
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Role: </label>
 | 
			
		||||
                <label  class="control-label">Role: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <select class="form-control" @bind="@roleid">
 | 
			
		||||
@ -26,7 +26,7 @@ else
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Effective Date: </label>
 | 
			
		||||
                <label  class="control-label">Effective Date: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@effectivedate" />
 | 
			
		||||
@ -34,7 +34,7 @@ else
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label for="Name" class="control-label">Expiry Date: </label>
 | 
			
		||||
                <label  class="control-label">Expiry Date: </label>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input class="form-control" @bind="@expirydate" />
 | 
			
		||||
@ -184,4 +184,4 @@ else
 | 
			
		||||
            AddModuleMessage("Error Removing User From Role", MessageType.Error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user