Permissions & Authorization for Users #24
Initial Release; Includes Database and MVC refactoring
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
@model Disco.Web.Areas.Config.Models.Logging.IndexModel
|
||||
@using Disco.Services.Logging
|
||||
@{
|
||||
Authorization.Require(Claims.Config.Logging.Show);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Logging");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.API.Logging.RetrieveEvents()))
|
||||
{
|
||||
<div class="form" style="width: 520px;">
|
||||
<h2>
|
||||
Export Logs</h2>
|
||||
<h2>Export Logs</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 105px;">
|
||||
Start Filter
|
||||
<th style="width: 105px;">Start Filter
|
||||
</th>
|
||||
<td>
|
||||
<input id="filterStart" type="text" name="Start" />
|
||||
@@ -20,8 +20,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
End Filter
|
||||
<th>End Filter
|
||||
</th>
|
||||
<td>
|
||||
<input id="filterEnd" type="text" name="End" />
|
||||
@@ -29,8 +28,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Limit Filter
|
||||
<th>Limit Filter
|
||||
</th>
|
||||
<td>
|
||||
<select name="Take">
|
||||
@@ -44,8 +42,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Module Filter
|
||||
<th>Module Filter
|
||||
</th>
|
||||
<td>
|
||||
<select id="moduleId" name="ModuleId">
|
||||
@@ -58,10 +55,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="trLogModuleEventTypes" style="display: none">
|
||||
<th>
|
||||
Event Type Filter <span style="display: block;" class="checkboxBulkSelectContainer">
|
||||
Select: <a id="eventTypesSelectAll" href="#">ALL</a> | <a id="eventTypesSelectNone"
|
||||
href="#">NONE</a></span>
|
||||
<th>Event Type Filter <span style="display: block;" class="checkboxBulkSelectContainer">Select: <a id="eventTypesSelectAll" href="#">ALL</a> | <a id="eventTypesSelectNone"
|
||||
href="#">NONE</a></span>
|
||||
</th>
|
||||
<td>
|
||||
@{int uniqueIdSeed = 0;
|
||||
@@ -76,8 +71,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
</th>
|
||||
<th></th>
|
||||
<td>
|
||||
@Html.Hidden("Format", "CSV")
|
||||
<input type="submit" class="button" value="Download CSV" />
|
||||
@@ -153,8 +147,7 @@
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
<h2>
|
||||
Live Logging</h2>
|
||||
<h2>Live Logging</h2>
|
||||
@Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config.Models.Shared.LogEventsModel()
|
||||
{
|
||||
IsLive = true,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,18 +28,20 @@ namespace Disco.Web.Areas.Config.Views.Logging
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
using Disco.Services.Logging;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Logging/Index.cshtml")]
|
||||
public partial class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Logging.IndexModel>
|
||||
public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Logging.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
@@ -49,6 +51,8 @@ namespace Disco.Web.Areas.Config.Views.Logging
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Config.Logging.Show);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Logging");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
|
||||
@@ -58,7 +62,7 @@ namespace Disco.Web.Areas.Config.Views.Logging
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Logging.RetrieveEvents()))
|
||||
{
|
||||
|
||||
@@ -71,13 +75,13 @@ WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 520px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>\r\n Export Logs</h2>\r\n <table>\r\n <tr>\r" +
|
||||
"\n <th");
|
||||
WriteLiteral(">\r\n <h2>Export Logs</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||
" <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 105px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Start Filter\r\n </th>\r\n <td>\r" +
|
||||
"\n <input");
|
||||
WriteLiteral(">Start Filter\r\n </th>\r\n <td>\r\n <" +
|
||||
"input");
|
||||
|
||||
WriteLiteral(" id=\"filterStart\"");
|
||||
|
||||
@@ -90,8 +94,8 @@ WriteLiteral(" />\r\n <span");
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">* Optional</span>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
||||
" <th>\r\n End Filter\r\n </th>\r\n " +
|
||||
" <td>\r\n <input");
|
||||
" <th>End Filter\r\n </th>\r\n <td>\r\n " +
|
||||
" <input");
|
||||
|
||||
WriteLiteral(" id=\"filterEnd\"");
|
||||
|
||||
@@ -104,8 +108,8 @@ WriteLiteral(" />\r\n <span");
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">* Optional</span>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
||||
" <th>\r\n Limit Filter\r\n </th>\r\n " +
|
||||
" <td>\r\n <select");
|
||||
" <th>Limit Filter\r\n </th>\r\n <td>\r\n " +
|
||||
" <select");
|
||||
|
||||
WriteLiteral(" name=\"Take\"");
|
||||
|
||||
@@ -136,9 +140,8 @@ WriteLiteral(">50 Events</option>\r\n <option");
|
||||
WriteLiteral(" value=\"10\"");
|
||||
|
||||
WriteLiteral(">10 Events</option>\r\n </select>\r\n </td>\r\n " +
|
||||
" </tr>\r\n <tr>\r\n <th>\r\n Module " +
|
||||
"Filter\r\n </th>\r\n <td>\r\n <select" +
|
||||
"");
|
||||
" </tr>\r\n <tr>\r\n <th>Module Filter\r\n " +
|
||||
" </th>\r\n <td>\r\n <select");
|
||||
|
||||
WriteLiteral(" id=\"moduleId\"");
|
||||
|
||||
@@ -153,13 +156,13 @@ WriteLiteral(" selected=\"selected\"");
|
||||
WriteLiteral(">- All Modules -</option>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 50 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 50 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
foreach (var lm in Model.LogModules.Keys.OrderBy(lm => lm.ModuleDescription))
|
||||
{
|
||||
|
||||
@@ -168,20 +171,20 @@ WriteLiteral(">- All Modules -</option>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 2126), Tuple.Create("\"", 2146)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 2082), Tuple.Create("\"", 2102)
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2134), Tuple.Create<System.Object, System.Int32>(lm.ModuleId
|
||||
#line 52 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2090), Tuple.Create<System.Object, System.Int32>(lm.ModuleId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2134), false)
|
||||
, 2090), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 52 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
Write(lm.ModuleDescription);
|
||||
|
||||
|
||||
@@ -190,7 +193,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</option> \r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 53 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -203,13 +206,13 @@ WriteLiteral(" id=\"trLogModuleEventTypes\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n <th>\r\n Event Type Filter <span");
|
||||
WriteLiteral(">\r\n <th>Event Type Filter <span");
|
||||
|
||||
WriteLiteral(" style=\"display: block;\"");
|
||||
|
||||
WriteLiteral(" class=\"checkboxBulkSelectContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n Select: <a");
|
||||
WriteLiteral(">Select: <a");
|
||||
|
||||
WriteLiteral(" id=\"eventTypesSelectAll\"");
|
||||
|
||||
@@ -219,18 +222,18 @@ WriteLiteral(">ALL</a> | <a");
|
||||
|
||||
WriteLiteral(" id=\"eventTypesSelectNone\"");
|
||||
|
||||
WriteLiteral("\r\n href=\"#\"");
|
||||
WriteLiteral("\r\n href=\"#\"");
|
||||
|
||||
WriteLiteral(">NONE</a></span>\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 62 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 67 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 62 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
int uniqueIdSeed = 0;
|
||||
|
||||
|
||||
@@ -239,13 +242,13 @@ WriteLiteral(">NONE</a></span>\r\n </th>\r\n <td>\
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 69 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 64 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 64 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
foreach (var lm in Model.LogModules)
|
||||
{
|
||||
|
||||
@@ -257,7 +260,7 @@ WriteLiteral(" <div");
|
||||
WriteLiteral(" data-logmoduleid=\"");
|
||||
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 66 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
Write(lm.Key.ModuleId);
|
||||
|
||||
|
||||
@@ -272,7 +275,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 72 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 67 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
Write(CommonHelpers.CheckBoxList("EventTypeIds", lm.Value.ToSelectListItems(), 2, false, uniqueIdSeed));
|
||||
|
||||
|
||||
@@ -281,20 +284,20 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 69 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
uniqueIdSeed += lm.Value.Count;
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r" +
|
||||
"\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th><" +
|
||||
"/th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 76 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
Write(Html.Hidden("Format", "CSV"));
|
||||
|
||||
|
||||
@@ -359,16 +362,16 @@ WriteLiteral(">\r\n $(function () {\r\n var filterStar
|
||||
" </script>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 155 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 149 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<h2>\r\n Live Logging</h2>\r\n");
|
||||
WriteLiteral("<h2>Live Logging</h2>\r\n");
|
||||
|
||||
|
||||
#line 158 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
#line 151 "..\..\Areas\Config\Views\Logging\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config.Models.Shared.LogEventsModel()
|
||||
{
|
||||
IsLive = true,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Areas.Config.Views.Logging
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Logging/TaskStatus.cshtml")]
|
||||
public partial class TaskStatus : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Logging.TaskStatusModel>
|
||||
public partial class TaskStatus : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Logging.TaskStatusModel>
|
||||
{
|
||||
public TaskStatus()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user