feature: saved exports view/edit/trigger
This commit is contained in:
@@ -41,6 +41,9 @@
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.Entity" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -195,7 +198,10 @@
|
||||
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateBulkGenerate.cs" />
|
||||
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateCreatePackageModel.cs" />
|
||||
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateCreateModel.cs" />
|
||||
<Compile Include="UI\Config\Export\ConfigEnrolmentIndexModel.cs" />
|
||||
<Compile Include="UI\Config\Export\ConfigExportShowModel.cs" />
|
||||
<Compile Include="UI\Config\Export\ConfigExportEditModel.cs" />
|
||||
<Compile Include="UI\Config\Export\ConfigExportIndexModel.cs" />
|
||||
<Compile Include="UI\Config\Export\ConfigExportCreateModel.cs" />
|
||||
<Compile Include="UI\Config\Expressions\ConfigExpressionsBrowserModel.cs" />
|
||||
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateImportStatusModel.cs" />
|
||||
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateIndexModel.cs" />
|
||||
|
||||
@@ -8,5 +8,26 @@ namespace Disco.Models.Services.Exporting
|
||||
public byte WeekDays { get; set; }
|
||||
public byte StartHour { get; set; }
|
||||
public byte? EndHour { get; set; }
|
||||
|
||||
public bool IncludesDay(DayOfWeek day)
|
||||
=> (WeekDays & (1 << (int)day)) != 0;
|
||||
|
||||
public string StartHourFriendly()
|
||||
=> HourFriendly(StartHour);
|
||||
|
||||
public string EndHourFriendly()
|
||||
=> EndHour.HasValue ? HourFriendly(EndHour.Value) : string.Empty;
|
||||
|
||||
private static string HourFriendly(int hour)
|
||||
{
|
||||
if (hour == 0)
|
||||
return "12:00 AM";
|
||||
else if (hour < 12)
|
||||
return $"{hour}:00 AM";
|
||||
else if (hour == 12)
|
||||
return "12:00 PM";
|
||||
else
|
||||
return $"{hour - 12}:00 PM";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Disco.Models.UI.Config.Export
|
||||
{
|
||||
public interface ConfigExportCreateModel : ConfigExportEditModel
|
||||
{
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -3,13 +3,14 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.UI.Config.Export
|
||||
{
|
||||
public interface ConfigExportCreateModel : BaseUIModel
|
||||
public interface ConfigExportEditModel : BaseUIModel
|
||||
{
|
||||
string ExportTypeName { get; set; }
|
||||
Guid Id { get; set; }
|
||||
|
||||
string Name { get; set; }
|
||||
string Description { get; set; }
|
||||
bool IsEnabled { get; set; }
|
||||
|
||||
string FilePath { get; set; }
|
||||
bool TimestampSuffix { get; set; }
|
||||
@@ -0,0 +1,12 @@
|
||||
using Disco.Models.Services.Exporting;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.UI.Config.Export
|
||||
{
|
||||
public interface ConfigExportIndexModel : BaseUIModel
|
||||
{
|
||||
List<SavedExport> SavedExports { get; set; }
|
||||
Dictionary<string, string> ExportTypeNames { get; set; }
|
||||
Dictionary<string, Repository.User> CreatedUsers { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Disco.Models.UI.Config.Export
|
||||
{
|
||||
public interface ConfigExportShowModel : ConfigExportEditModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net45" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -35,7 +35,7 @@ namespace Disco.Services.Exporting
|
||||
|
||||
protected override void ExecuteTask()
|
||||
{
|
||||
SavedExports.EvaluateSavedExports();
|
||||
SavedExports.EvaluateSavedExportSchedules();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -171,6 +171,14 @@ namespace Disco.Services.Exporting
|
||||
return exports;
|
||||
}
|
||||
|
||||
public static List<SavedExport> GetSavedExports(DiscoDataContext database)
|
||||
=> database.DiscoConfiguration.SavedExports
|
||||
.Where(e => e.Enabled && exportTypes.ContainsKey(e.Type))
|
||||
.ToList();
|
||||
|
||||
public static Dictionary<string, string> GetSavedExportTypeNames()
|
||||
=> exportTypes.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Name, StringComparer.Ordinal);
|
||||
|
||||
public static bool IsAuthorized(SavedExport savedExport, AuthorizationToken authorization)
|
||||
{
|
||||
if (authorization.Has(Claims.Config.ManageSavedExports))
|
||||
@@ -188,7 +196,7 @@ namespace Disco.Services.Exporting
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void EvaluateSavedExports()
|
||||
public static void EvaluateSavedExportSchedules()
|
||||
{
|
||||
using (var database = new DiscoDataContext())
|
||||
{
|
||||
@@ -197,6 +205,13 @@ namespace Disco.Services.Exporting
|
||||
var scheduledExports = GetScheduledExports(database).ToList();
|
||||
|
||||
foreach (var scheduledExport in scheduledExports)
|
||||
{
|
||||
EvaluateSavedExportSchedule(database, scheduledExport);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void EvaluateSavedExportSchedule(DiscoDataContext database, SavedExport scheduledExport)
|
||||
{
|
||||
ExportResult exportResult = null;
|
||||
try
|
||||
@@ -206,7 +221,7 @@ namespace Disco.Services.Exporting
|
||||
catch (Exception ex)
|
||||
{
|
||||
SystemLog.LogException($"Failed to generate saved '{scheduledExport.Name}' [{scheduledExport.Id}]", ex);
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
var filePath = scheduledExport.FilePath;
|
||||
@@ -224,6 +239,12 @@ namespace Disco.Services.Exporting
|
||||
exportResult.Result.CopyTo(fileStream);
|
||||
}
|
||||
|
||||
var allExports = database.DiscoConfiguration.SavedExports;
|
||||
var configExport = allExports.First(e => e.Id == scheduledExport.Id);
|
||||
configExport.LastRunOn = DateTime.Now;
|
||||
database.DiscoConfiguration.SavedExports = allExports;
|
||||
database.SaveChanges();
|
||||
|
||||
SystemLog.LogInformation($"Saved '{scheduledExport.Name}' [{scheduledExport.Name}] wrote to '{filePath}'");
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -231,8 +252,6 @@ namespace Disco.Services.Exporting
|
||||
SystemLog.LogException($"Failed to write saved '{scheduledExport.Name}' [{scheduledExport.Id}] to '{filePath}'", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ExportResult EvaluateSavedExport(DiscoDataContext database, SavedExport savedExport)
|
||||
{
|
||||
@@ -273,7 +292,7 @@ namespace Disco.Services.Exporting
|
||||
var exports = database.DiscoConfiguration.SavedExports;
|
||||
var now = DateTime.Now;
|
||||
var hour = now.Hour;
|
||||
var day = (byte)(1 << (int)now.DayOfWeek);
|
||||
var day = now.DayOfWeek;
|
||||
|
||||
foreach (var export in exports)
|
||||
{
|
||||
@@ -292,7 +311,7 @@ namespace Disco.Services.Exporting
|
||||
continue;
|
||||
|
||||
// scheduled for today?
|
||||
if ((schedule.WeekDays & day) == 0)
|
||||
if (!schedule.IncludesDay(day))
|
||||
continue;
|
||||
|
||||
// always run if scheduled earlier today? (potentially missed)
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Exporting;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web.Areas.API.Models.Shared;
|
||||
using Disco.Web.Areas.Config.Models.Export;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
[ValidateAntiForgeryToken]
|
||||
[DiscoAuthorize(Claims.Config.ManageSavedExports)]
|
||||
public partial class ExportController : AuthorizedDatabaseController
|
||||
{
|
||||
|
||||
[HttpPost]
|
||||
public virtual ActionResult Update(EditModel model)
|
||||
{
|
||||
if (model.OnDemandPrincipals != null)
|
||||
{
|
||||
model.OnDemandSubjects = model.OnDemandPrincipals
|
||||
.Where(p => !string.IsNullOrWhiteSpace(p))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Select(p => ActiveDirectory.RetrieveADObject(p, true))
|
||||
.Where(ad => ad is ADUserAccount || ad is ADGroup)
|
||||
.Select(ad => SubjectDescriptorModel.FromActiveDirectoryObject(ad))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
var errorState = ModelState.First(m => m.Value.Errors.Any());
|
||||
var error = errorState.Value.Errors.First();
|
||||
return new HttpStatusCodeResult(400, $"{errorState.Key}: {error.Exception?.Message ?? error.ErrorMessage}");
|
||||
}
|
||||
|
||||
SavedExports.UpdateSavedExport(Database, model.ToSavedExport());
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Show(model.Id, saved: true));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public virtual ActionResult Delete(Guid id)
|
||||
{
|
||||
SavedExports.DeleteSavedExport(Database, id);
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Index());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
using Disco.Models.UI.Config.Export;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Exporting;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Logging;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web.Areas.API.Models.Shared;
|
||||
using Disco.Web.Areas.Config.Models.Export;
|
||||
using Disco.Web.Extensions;
|
||||
using System;
|
||||
@@ -13,10 +12,49 @@ using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
[DiscoAuthorize(Claims.Config.ManageSavedExports)]
|
||||
[DiscoAuthorize]
|
||||
public partial class ExportController : AuthorizedDatabaseController
|
||||
{
|
||||
[HttpGet]
|
||||
[DiscoAuthorize(Claims.Config.ManageSavedExports)]
|
||||
public virtual ActionResult Index()
|
||||
{
|
||||
var exports = SavedExports.GetSavedExports(Database);
|
||||
var exportUserIds = exports.Select(e => e.CreatedBy).Distinct().ToList();
|
||||
var users = Database.Users.Where(u => exportUserIds.Contains(u.UserId)).ToDictionary(u => u.UserId, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
var m = new IndexModel
|
||||
{
|
||||
SavedExports = exports,
|
||||
ExportTypeNames = SavedExports.GetSavedExportTypeNames(),
|
||||
CreatedUsers = users
|
||||
};
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigExportIndexModel>(ControllerContext, m);
|
||||
|
||||
return View(m);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[DiscoAuthorize(Claims.Config.ManageSavedExports)]
|
||||
public virtual ActionResult Show(Guid id, bool? saved = null, bool? exported = null)
|
||||
{
|
||||
var export = SavedExports.GetSavedExport(Database, id, out var exportTypeName);
|
||||
|
||||
if (export == null)
|
||||
return HttpNotFound();
|
||||
|
||||
var m = ShowModel.FromSavedExport(export, exportTypeName, saved ?? false, exported ?? false);
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigExportShowModel>(ControllerContext, m);
|
||||
|
||||
return View(m);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[DiscoAuthorize(Claims.Config.ManageSavedExports)]
|
||||
public virtual ActionResult Create(Guid id)
|
||||
{
|
||||
var export = SavedExports.GetSavedExport(Database, id, out var exportTypeName);
|
||||
@@ -24,7 +62,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
if (export == null)
|
||||
return HttpNotFound();
|
||||
|
||||
var m = CreateModel.FromSavedExport(export, exportTypeName);
|
||||
var m = EditModel.FromNewSavedExport(export, exportTypeName);
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigExportCreateModel>(ControllerContext, m);
|
||||
@@ -32,32 +70,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
return View(m);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public virtual ActionResult Create(CreateModel model)
|
||||
{
|
||||
if (model.OnDemandPrincipals != null)
|
||||
{
|
||||
model.OnDemandSubjects = model.OnDemandPrincipals
|
||||
.Where(p => !string.IsNullOrWhiteSpace(p))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Select(p => ActiveDirectory.RetrieveADObject(p, true))
|
||||
.Where(ad => ad is ADUserAccount || ad is ADGroup)
|
||||
.Select(ad => SubjectDescriptorModel.FromActiveDirectoryObject(ad))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
SavedExports.UpdateSavedExport(Database, model.ToSavedExport());
|
||||
}
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigExportCreateModel>(ControllerContext, model);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[DiscoAuthorize]
|
||||
[HttpGet]
|
||||
public virtual ActionResult Run(Guid id)
|
||||
{
|
||||
var export = SavedExports.GetSavedExport(Database, id, out _);
|
||||
@@ -72,7 +85,23 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
|
||||
var fileStream = exportResult.Result;
|
||||
|
||||
SystemLog.LogInformation($"Ran '{export.Name}' [{export.Name}] for {Authorization.User.UserId}");
|
||||
|
||||
return this.File(fileStream.GetBuffer(), 0, (int)fileStream.Length, exportResult.MimeType, exportResult.Filename);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[DiscoAuthorize(Claims.Config.ManageSavedExports)]
|
||||
public virtual ActionResult RunScheduled(Guid id)
|
||||
{
|
||||
var export = SavedExports.GetSavedExport(Database, id, out _);
|
||||
|
||||
if (export == null)
|
||||
return HttpNotFound();
|
||||
|
||||
SavedExports.EvaluateSavedExportSchedule(Database, export);
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Show(export.Id, exported: true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-5
@@ -8,16 +8,16 @@ using System.Linq;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Export
|
||||
{
|
||||
public class CreateModel : ConfigExportCreateModel
|
||||
public class EditModel : ConfigExportCreateModel, ConfigExportShowModel
|
||||
{
|
||||
public string ExportTypeName { get; set; }
|
||||
[Required]
|
||||
public Guid Id { get; set; }
|
||||
public string ExportTypeName { get; set; }
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[DataType(DataType.MultilineText)]
|
||||
public string Description { get; set; }
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
public bool TimestampSuffix { get; set; }
|
||||
|
||||
@@ -38,11 +38,12 @@ namespace Disco.Web.Areas.Config.Models.Export
|
||||
public List<SubjectDescriptorModel> OnDemandSubjects { get; set; }
|
||||
public List<string> OnDemandPrincipals { get; set; }
|
||||
|
||||
public static CreateModel FromSavedExport(SavedExport savedExport, string exportTypeName)
|
||||
public static EditModel FromNewSavedExport(SavedExport savedExport, string exportTypeName)
|
||||
{
|
||||
return new CreateModel
|
||||
return new EditModel
|
||||
{
|
||||
Id = savedExport.Id,
|
||||
IsEnabled = false,
|
||||
ExportTypeName = exportTypeName,
|
||||
ScheduleMonday = true,
|
||||
ScheduleTuesday = true,
|
||||
@@ -0,0 +1,14 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.UI.Config.Export;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Export
|
||||
{
|
||||
public class IndexModel : ConfigExportIndexModel
|
||||
{
|
||||
public List<SavedExport> SavedExports { get; set; }
|
||||
public Dictionary<string, string> ExportTypeNames { get; set; }
|
||||
public Dictionary<string, User> CreatedUsers { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Web.Areas.API.Models.Shared;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Export
|
||||
{
|
||||
public class ShowModel : EditModel
|
||||
{
|
||||
public bool WasSaved { get; set; }
|
||||
public bool WasExported { get; set; }
|
||||
|
||||
public static EditModel FromSavedExport(SavedExport savedExport, string exportTypeName, bool wasSaved, bool wasExported)
|
||||
{
|
||||
var model = new ShowModel
|
||||
{
|
||||
Id = savedExport.Id,
|
||||
ExportTypeName = exportTypeName,
|
||||
Name = savedExport.Name,
|
||||
Description = savedExport.Description,
|
||||
IsEnabled = savedExport.Enabled,
|
||||
FilePath = savedExport.FilePath,
|
||||
TimestampSuffix = savedExport.TimestampSuffix,
|
||||
ScheduleEnabled = savedExport.Schedule != null,
|
||||
ScheduleSunday = savedExport.Schedule?.IncludesDay(DayOfWeek.Sunday) ?? false,
|
||||
ScheduleMonday = savedExport.Schedule?.IncludesDay(DayOfWeek.Monday) ?? true,
|
||||
ScheduleTuesday = savedExport.Schedule?.IncludesDay(DayOfWeek.Tuesday) ?? true,
|
||||
ScheduleWednesday = savedExport.Schedule?.IncludesDay(DayOfWeek.Wednesday) ?? true,
|
||||
ScheduleThursday = savedExport.Schedule?.IncludesDay(DayOfWeek.Thursday) ?? true,
|
||||
ScheduleFriday = savedExport.Schedule?.IncludesDay(DayOfWeek.Friday) ?? true,
|
||||
ScheduleSaturday = savedExport.Schedule?.IncludesDay(DayOfWeek.Saturday) ?? false,
|
||||
ScheduleStartHour = savedExport.Schedule?.StartHour ?? 0,
|
||||
ScheduleEndHour = savedExport.Schedule?.EndHour,
|
||||
WasSaved = wasSaved,
|
||||
WasExported = wasExported,
|
||||
};
|
||||
if (savedExport.OnDemandPrincipals != null)
|
||||
{
|
||||
model.OnDemandPrincipals = savedExport.OnDemandPrincipals;
|
||||
model.OnDemandSubjects = savedExport.OnDemandPrincipals
|
||||
.Where(p => !string.IsNullOrWhiteSpace(p))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Select(p => ActiveDirectory.RetrieveADObject(p, true))
|
||||
.Where(ad => ad is ADUserAccount || ad is ADGroup)
|
||||
.Select(ad => SubjectDescriptorModel.FromActiveDirectoryObject(ad))
|
||||
.ToList();
|
||||
}
|
||||
return model;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.HasAny(Claims.Config.DocumentTemplate.Show))
|
||||
@if (Authorization.HasAny(Claims.Config.DocumentTemplate.Show, Claims.Config.ManageSavedExports))
|
||||
{
|
||||
<div class="pageMenuArea noSeperator">
|
||||
<h2>Features</h2>
|
||||
@@ -140,6 +140,13 @@
|
||||
and Users.
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
<i class="fa fa-cog"></i>@Html.ActionLinkClass("Saved Exports", MVC.Config.Export.Index(), "config")
|
||||
<div class="pageMenuBlurb">
|
||||
Update and run saved exports.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
|
||||
@@ -855,7 +855,7 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 131 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.DocumentTemplate.Show))
|
||||
if (Authorization.HasAny(Claims.Config.DocumentTemplate.Show, Claims.Config.ManageSavedExports))
|
||||
{
|
||||
|
||||
|
||||
@@ -912,20 +912,70 @@ WriteLiteral(" <div");
|
||||
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||
|
||||
WriteLiteral(">\r\n Create, Update and Bulk Generate documents bas" +
|
||||
"ed on PDF Templates for Jobs, Devices\r\n and Users.\r\n " +
|
||||
" </div>\r\n");
|
||||
"ed on PDF Templates for Jobs, Devices\r\n and Users" +
|
||||
".\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 142 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 143 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-cog\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 145 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 145 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Saved Exports", MVC.Config.Export.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 145 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||
|
||||
WriteLiteral(">\r\n Update and run saved exports.\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 149 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 144 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 151 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -934,7 +984,7 @@ WriteLiteral(" </div>\r\n");
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 146 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 153 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -943,7 +993,7 @@ WriteLiteral(" </td>\r\n");
|
||||
WriteLiteral(" </tr>\r\n</table>\r\n");
|
||||
|
||||
|
||||
#line 149 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 156 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
if (Model.UpdateAvailable)
|
||||
{
|
||||
@@ -961,14 +1011,14 @@ WriteLiteral(" class=\"fa fa-cloud-download info\"");
|
||||
|
||||
WriteLiteral("></i>\r\n <div>An updated version of Disco is available</div>\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 8213), Tuple.Create("\"", 8249)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 8682), Tuple.Create("\"", 8718)
|
||||
|
||||
#line 155 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8220), Tuple.Create<System.Object, System.Int32>(Model.UpdateResponse.UrlLink
|
||||
#line 162 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8689), Tuple.Create<System.Object, System.Int32>(Model.UpdateResponse.UrlLink
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8220), false)
|
||||
, 8689), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button small alert\"");
|
||||
@@ -978,7 +1028,7 @@ WriteLiteral(" target=\"_blank\"");
|
||||
WriteLiteral(">Download v");
|
||||
|
||||
|
||||
#line 155 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 162 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Model.UpdateResponse.LatestVersion);
|
||||
|
||||
|
||||
@@ -995,13 +1045,13 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 163 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 170 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 163 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 170 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
if (Model.UpdateResponse.ReleasedDate < DateTime.Now.AddDays(-14))
|
||||
{
|
||||
@@ -1017,7 +1067,7 @@ WriteLiteral("\r\n updateAvailableContainer.effect(\"shake\", { t
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 169 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 176 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1026,7 +1076,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral("\r\n });\r\n })();\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 174 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 181 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,230 +1,7 @@
|
||||
@model Disco.Web.Areas.Config.Models.Export.CreateModel
|
||||
@model Disco.Web.Areas.Config.Models.Export.EditModel
|
||||
@{
|
||||
Authorization.Require(Claims.Config.ManageSavedExports);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", null, "Create Saved " + Model.ExportTypeName);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", MVC.Config.Export.Index(), "Create Saved " + Model.ExportTypeName);
|
||||
}
|
||||
|
||||
@using (Html.BeginForm(MVC.Config.Export.Create(), FormMethod.Post))
|
||||
{
|
||||
@Html.AntiForgeryToken();
|
||||
@Html.HiddenFor(m => m.Id)
|
||||
|
||||
<div id="Config_Export_Create_Details" class="form" style="width: 530px;">
|
||||
<h2>Save @Model.ExportTypeName</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 140px">Name:</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.Name)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Description:<br />
|
||||
<em class="small">Optional</em>
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.Description)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="Config_Export_Create_Schedule" class="form" style="width: 530px; margin-top: 10px;">
|
||||
<h2>Schedule</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 140px"> </th>
|
||||
<td>
|
||||
<label>
|
||||
@Html.EditorFor(m => m.ScheduleEnabled)
|
||||
Enable Scheduled Export
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="@(Model.ScheduleEnabled ? null : "hidden")">
|
||||
<th>
|
||||
Days:
|
||||
</th>
|
||||
<td>
|
||||
<ul class="none">
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleMonday) Monday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleTuesday) Tuesday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleWednesday) Wednesday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleThursday) Thursday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleFriday) Friday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleSaturday) Saturday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleSunday) Sunday</label></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="@(Model.ScheduleEnabled ? null : "hidden")">
|
||||
<th>
|
||||
Start Time:
|
||||
</th>
|
||||
<td>
|
||||
<select name="ScheduleStartHour">
|
||||
@{
|
||||
<option value="0" @(Model.ScheduleStartHour == 0 ? "selected" : null)>12:00 AM</option>
|
||||
for (int i = 1; i < 12; i++)
|
||||
{
|
||||
<option value="@i" @(Model.ScheduleStartHour == i ? "selected" : null)>@i:00 AM</option>
|
||||
}
|
||||
<option value="12" @(Model.ScheduleStartHour == 12 ? "selected" : null)>12:00 PM</option>
|
||||
for (int i = 13; i < 24; i++)
|
||||
{
|
||||
<option value="@i" @(Model.ScheduleStartHour == i ? "selected" : null)>@(i % 12):00 PM</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> By default, Disco ICT shuts down at 1:30am and does not resume again until its needed. If a scheduled export was missed during this time, it will be run as soon as Disco ICT is resumed.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="@(Model.ScheduleEnabled ? null : "hidden")">
|
||||
<th>
|
||||
Repeat Hourly Until:
|
||||
</th>
|
||||
<td>
|
||||
<select name="ScheduleEndHour">
|
||||
<option value="" @(Model.ScheduleEndHour.HasValue ? null : "selected")>Run once</option>
|
||||
@{
|
||||
for (int i = 1; i < 12; i++)
|
||||
{
|
||||
<option value="@i" @(Model.ScheduleEndHour == i ? "selected" : null)>@i:00 AM</option>
|
||||
}
|
||||
<option value="12" @(Model.ScheduleEndHour == 12 ? "selected" : null)>12:00 PM</option>
|
||||
for (int i = 12; i < 24; i++)
|
||||
{
|
||||
<option value="@i" @(Model.ScheduleEndHour == i ? "selected" : null)>@(i % 12):00 PM</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="@(Model.ScheduleEnabled ? null : "hidden")">
|
||||
<th>
|
||||
File System Location:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.FilePath)
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> This is the full file path on the Disco ICT server (<code>@Environment.MachineName</code>). The location may be a network path. The Disco ICT Service Account (<code>@Environment.UserDomainName\@Environment.UserName</code>) must have write access to the location.
|
||||
</p>
|
||||
</div>
|
||||
<label>
|
||||
@Html.EditorFor(m => m.TimestampSuffix) Add time stamp suffix to file name
|
||||
</label>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> This will create a new file each time the export runs.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="Config_Export_Create_OnDemand" class="form" style="width: 530px; margin-top: 10px;">
|
||||
<h2>On Demand Export</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 140px">
|
||||
Additional Users/Groups:
|
||||
</th>
|
||||
<td>
|
||||
<ul id="Config_Export_Create_OnDemand_List" class="none">
|
||||
@if (Model.OnDemandSubjects != null)
|
||||
{
|
||||
foreach (var sg in Model.OnDemandSubjects)
|
||||
{
|
||||
<li>
|
||||
<input type="hidden" name="OnDemandPrincipals" value="@sg.Id" />
|
||||
<i class="fa fa-user@(sg.IsGroup ? "s" : null) fa-lg"></i>
|
||||
@sg.Name [@sg.Id]
|
||||
<i class="fa fa-times-circle remove"></i>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
<div>
|
||||
<input type="text" id="Config_Export_Create_OnDemand_Input" placeholder="Search users and groups" data-url="@(Url.Action(MVC.API.System.SearchSubjects()))" data-subjecturl="@Url.Action(MVC.API.System.Subject())" />
|
||||
<button type="button" id="Config_Export_Create_OnDemand_Add" class="button small">Add</button>
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> Users with the Manage Saved Exports permission (including Disco ICT Administrators) can perform an on-demand export at any time.
|
||||
Users or Group Members can be added to this list. These will also be able to perform an on-demand export using the link available after saving.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="actionBar">
|
||||
<button type="submit" class="button">Save</button>
|
||||
</div>
|
||||
}
|
||||
<script>
|
||||
$(function () {
|
||||
$('#ScheduleEnabled').on('change', function () {
|
||||
const enabled = $(this).is(':checked');
|
||||
$('#Config_Export_Create_Schedule tr:not(:first)').toggleClass('hidden', !enabled);
|
||||
});
|
||||
|
||||
const onDemandInput = $('#Config_Export_Create_OnDemand_Input');
|
||||
|
||||
onDemandInput
|
||||
.autocomplete({
|
||||
source: onDemandInput.attr('data-url'),
|
||||
minLength: 2,
|
||||
focus: function (e, ui) {
|
||||
onDemandInput.val(ui.item.Id);
|
||||
return false;
|
||||
},
|
||||
select: function (e, ui) {
|
||||
onDemandInput.val(ui.item.Id).blur();
|
||||
return false;
|
||||
}
|
||||
}).data('ui-autocomplete')._renderItem = function (ul, item) {
|
||||
return $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append("<a><strong>" + item.Name + "</strong><br>" + item.Id + " (" + item.Type + ")</a>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
$('#Config_Export_Create_OnDemand_Add').on('click', async function () {
|
||||
const id = onDemandInput.val();
|
||||
const body = new FormData();
|
||||
body.append('Id', id);
|
||||
const response = await fetch(onDemandInput.attr('data-subjecturl'), {
|
||||
method: 'POST',
|
||||
body: body
|
||||
});
|
||||
if (!response.ok) {
|
||||
alert('Error: ' + response.statusText);
|
||||
return;
|
||||
}
|
||||
const data = await response.json();
|
||||
|
||||
if (!data.IsGroup && !data.IsUserAccount) {
|
||||
alert('Error: Only users and groups can be added.');
|
||||
return;
|
||||
}
|
||||
|
||||
const $li = $('<li><input type="hidden" name="OnDemandPrincipals" /><i class="fa fa-lg"></i> <span></span><i class="fa fa-times-circle remove"></i></li>');
|
||||
$li.find('input').val(data.Id);
|
||||
$li.find('i.fa-lg').addClass(data.Type === 'user' ? 'fa-user' : 'fa-users');
|
||||
$li.find('span').text(data.Name + ' [' + data.Id + ']');
|
||||
$li.appendTo('#Config_Export_Create_OnDemand_List');
|
||||
});
|
||||
$('#Config_Export_Create_OnDemand_List').on('click', '.remove', function () {
|
||||
$(this).closest('li').remove();
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@Html.Partial(MVC.Config.Export.Views._Edit, Model)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Disco.Web.Areas.Config.Views.Export
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Export/Create.cshtml")]
|
||||
public partial class Create : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Export.CreateModel>
|
||||
public partial class Create : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Export.EditModel>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
@@ -48,856 +48,21 @@ namespace Disco.Web.Areas.Config.Views.Export
|
||||
|
||||
Authorization.Require(Claims.Config.ManageSavedExports);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", null, "Create Saved " + Model.ExportTypeName);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", MVC.Config.Export.Index(), "Create Saved " + Model.ExportTypeName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 8 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
using (Html.BeginForm(MVC.Config.Export.Create(), FormMethod.Post))
|
||||
{
|
||||
#line 7 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Export.Views._Edit, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.Id));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_Export_Create_Details\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 530px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Save ");
|
||||
|
||||
|
||||
#line 14 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ExportTypeName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h2>\r\n <table>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 140px\"");
|
||||
|
||||
WriteLiteral(">Name:</th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 19 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(model => model.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Description:<br />\r\n <em");
|
||||
|
||||
WriteLiteral(" class=\"small\"");
|
||||
|
||||
WriteLiteral(">Optional</em>\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(model => model.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_Export_Create_Schedule\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 530px; margin-top: 10px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Schedule</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||
"<th");
|
||||
|
||||
WriteLiteral(" style=\"width: 140px\"");
|
||||
|
||||
WriteLiteral("> </th>\r\n <td>\r\n <label>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.ScheduleEnabled));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n Enable Scheduled Export\r\n </label>\r\n" +
|
||||
" </td>\r\n </tr>\r\n <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1528), Tuple.Create("\"", 1578)
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1536), Tuple.Create<System.Object, System.Int32>(Model.ScheduleEnabled ? null : "hidden"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1536), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <th>\r\n Days:\r\n </th>\r\n " +
|
||||
" <td>\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n <li><label>");
|
||||
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.ScheduleMonday));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Monday</label></li>\r\n <li><label>");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.ScheduleTuesday));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Tuesday</label></li>\r\n <li><label>");
|
||||
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.ScheduleWednesday));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Wednesday</label></li>\r\n <li><label>");
|
||||
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.ScheduleThursday));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Thursday</label></li>\r\n <li><label>");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.ScheduleFriday));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Friday</label></li>\r\n <li><label>");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.ScheduleSaturday));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Saturday</label></li>\r\n <li><label>");
|
||||
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.ScheduleSunday));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Sunday</label></li>\r\n </ul>\r\n </td>\r\n " +
|
||||
" </tr>\r\n <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2480), Tuple.Create("\"", 2530)
|
||||
|
||||
#line 62 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2488), Tuple.Create<System.Object, System.Int32>(Model.ScheduleEnabled ? null : "hidden"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2488), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <th>\r\n Start Time:\r\n </th>\r\n" +
|
||||
" <td>\r\n <select");
|
||||
|
||||
WriteLiteral(" name=\"ScheduleStartHour\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteLiteral(" value=\"0\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 69 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ScheduleStartHour == 0 ? "selected" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(">12:00 AM</option>\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
for (int i = 1; i < 12; i++)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 2962), Tuple.Create("\"", 2972)
|
||||
|
||||
#line 72 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2970), Tuple.Create<System.Object, System.Int32>(i
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2970), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 72 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ScheduleStartHour == i ? "selected" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 72 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(i);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(":00 AM</option>\r\n");
|
||||
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteLiteral(" value=\"12\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ScheduleStartHour == 12 ? "selected" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(">12:00 PM</option>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
for (int i = 13; i < 24; i++)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 3324), Tuple.Create("\"", 3334)
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3332), Tuple.Create<System.Object, System.Int32>(i
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3332), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ScheduleStartHour == i ? "selected" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(i % 12);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(":00 PM</option>\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </select>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"info-box\"");
|
||||
|
||||
WriteLiteral(">\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"fa-p\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
||||
|
||||
WriteLiteral(@"></i> By default, Disco ICT shuts down at 1:30am and does not resume again until its needed. If a scheduled export was missed during this time, it will be run as soon as Disco ICT is resumed.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3959), Tuple.Create("\"", 4009)
|
||||
|
||||
#line 88 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3967), Tuple.Create<System.Object, System.Int32>(Model.ScheduleEnabled ? null : "hidden"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3967), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <th>\r\n Repeat Hourly Until:\r\n " +
|
||||
" </th>\r\n <td>\r\n <select");
|
||||
|
||||
WriteLiteral(" name=\"ScheduleEndHour\"");
|
||||
|
||||
WriteLiteral(">\r\n <option");
|
||||
|
||||
WriteLiteral(" value=\"\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ScheduleEndHour.HasValue ? null : "selected");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(">Run once</option>\r\n");
|
||||
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
for (int i = 1; i < 12; i++)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 4445), Tuple.Create("\"", 4455)
|
||||
|
||||
#line 98 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4453), Tuple.Create<System.Object, System.Int32>(i
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4453), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 98 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ScheduleEndHour == i ? "selected" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 98 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(i);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(":00 AM</option>\r\n");
|
||||
|
||||
|
||||
#line 99 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteLiteral(" value=\"12\"");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 100 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ScheduleEndHour == 12 ? "selected" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(">12:00 PM</option>\r\n");
|
||||
|
||||
|
||||
#line 101 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
for (int i = 12; i < 24; i++)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 4803), Tuple.Create("\"", 4813)
|
||||
|
||||
#line 103 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4811), Tuple.Create<System.Object, System.Int32>(i
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4811), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 103 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Model.ScheduleEndHour == i ? "selected" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 103 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(i % 12);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(":00 PM</option>\r\n");
|
||||
|
||||
|
||||
#line 104 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </select>\r\n </td>\r\n </tr>\r\n " +
|
||||
" <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 5037), Tuple.Create("\"", 5087)
|
||||
|
||||
#line 109 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5045), Tuple.Create<System.Object, System.Int32>(Model.ScheduleEnabled ? null : "hidden"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5045), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <th>\r\n File System Location:\r\n " +
|
||||
" </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 114 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.FilePath));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"info-box\"");
|
||||
|
||||
WriteLiteral(">\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"fa-p\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
||||
|
||||
WriteLiteral("></i> This is the full file path on the Disco ICT server (<code>");
|
||||
|
||||
|
||||
#line 117 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Environment.MachineName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</code>). The location may be a network path. The Disco ICT Service Account (<cod" +
|
||||
"e>");
|
||||
|
||||
|
||||
#line 117 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Environment.UserDomainName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\\");
|
||||
|
||||
|
||||
#line 117 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Environment.UserName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</code>) must have write access to the location.\r\n </p>\r\n " +
|
||||
" </div>\r\n <label>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 121 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.TimestampSuffix));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Add time stamp suffix to file name\r\n </label>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" class=\"info-box\"");
|
||||
|
||||
WriteLiteral(">\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"fa-p\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
||||
|
||||
WriteLiteral("></i> This will create a new file each time the export runs.\r\n " +
|
||||
" </p>\r\n </div>\r\n </td>\r\n </tr>\r" +
|
||||
"\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 132 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_Export_Create_OnDemand\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 530px; margin-top: 10px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>On Demand Export</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||
" <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 140px\"");
|
||||
|
||||
WriteLiteral(">\r\n Additional Users/Groups:\r\n </th>\r\n " +
|
||||
" <td>\r\n <ul");
|
||||
|
||||
WriteLiteral(" id=\"Config_Export_Create_OnDemand_List\"");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 142 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 142 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
if (Model.OnDemandSubjects != null)
|
||||
{
|
||||
foreach (var sg in Model.OnDemandSubjects)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"OnDemandPrincipals\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 6926), Tuple.Create("\"", 6940)
|
||||
|
||||
#line 147 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6934), Tuple.Create<System.Object, System.Int32>(sg.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6934), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6984), Tuple.Create("\"", 7034)
|
||||
, Tuple.Create(Tuple.Create("", 6992), Tuple.Create("fa", 6992), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 6994), Tuple.Create("fa-user", 6995), true)
|
||||
|
||||
#line 148 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7002), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "s" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7002), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 7028), Tuple.Create("fa-lg", 7029), true)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 149 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(sg.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" [");
|
||||
|
||||
|
||||
#line 149 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(sg.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("]\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-times-circle remove\"");
|
||||
|
||||
WriteLiteral("></i>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 152 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n <div>\r\n <in" +
|
||||
"put");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" id=\"Config_Export_Create_OnDemand_Input\"");
|
||||
|
||||
WriteLiteral(" placeholder=\"Search users and groups\"");
|
||||
|
||||
WriteLiteral(" data-url=\"");
|
||||
|
||||
|
||||
#line 156 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Url.Action(MVC.API.System.SearchSubjects()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-subjecturl=\"");
|
||||
|
||||
|
||||
#line 156 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
Write(Url.Action(MVC.API.System.Subject()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" />\r\n <button");
|
||||
|
||||
WriteLiteral(" type=\"button\"");
|
||||
|
||||
WriteLiteral(" id=\"Config_Export_Create_OnDemand_Add\"");
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Add</button>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"info-box\"");
|
||||
|
||||
WriteLiteral(">\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"fa-p\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
||||
|
||||
WriteLiteral(@"></i> Users with the Manage Saved Exports permission (including Disco ICT Administrators) can perform an on-demand export at any time.
|
||||
Users or Group Members can be added to this list. These will also be able to perform an on-demand export using the link available after saving.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
");
|
||||
|
||||
|
||||
#line 169 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n <button");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(">Save</button>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 173 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<script>\r\n $(function () {\r\n $(\'#ScheduleEnabled\').on(\'change\', functio" +
|
||||
"n () {\r\n const enabled = $(this).is(\':checked\');\r\n $(\'#Con" +
|
||||
"fig_Export_Create_Schedule tr:not(:first)\').toggleClass(\'hidden\', !enabled);\r\n " +
|
||||
" });\r\n\r\n const onDemandInput = $(\'#Config_Export_Create_OnDemand_Inp" +
|
||||
"ut\');\r\n\r\n onDemandInput\r\n .autocomplete({\r\n sou" +
|
||||
"rce: onDemandInput.attr(\'data-url\'),\r\n minLength: 2,\r\n " +
|
||||
" focus: function (e, ui) {\r\n onDemandInput.val(ui.item.Id" +
|
||||
");\r\n return false;\r\n },\r\n selec" +
|
||||
"t: function (e, ui) {\r\n onDemandInput.val(ui.item.Id).blur();" +
|
||||
"\r\n return false;\r\n }\r\n }).data(\'ui-" +
|
||||
"autocomplete\')._renderItem = function (ul, item) {\r\n return $(\"<l" +
|
||||
"i></li>\")\r\n .data(\"item.autocomplete\", item)\r\n " +
|
||||
" .append(\"<a><strong>\" + item.Name + \"</strong><br>\" + item.Id + \" (\" + item" +
|
||||
".Type + \")</a>\")\r\n .appendTo(ul);\r\n };\r\n $(" +
|
||||
"\'#Config_Export_Create_OnDemand_Add\').on(\'click\', async function () {\r\n " +
|
||||
" const id = onDemandInput.val();\r\n const body = new FormData();\r\n " +
|
||||
" body.append(\'Id\', id);\r\n const response = await fetch(onDem" +
|
||||
"andInput.attr(\'data-subjecturl\'), {\r\n method: \'POST\',\r\n " +
|
||||
" body: body\r\n });\r\n if (!response.ok) {\r\n " +
|
||||
" alert(\'Error: \' + response.statusText);\r\n return;\r\n " +
|
||||
" }\r\n const data = await response.json();\r\n\r\n if (!data.Is" +
|
||||
"Group && !data.IsUserAccount) {\r\n alert(\'Error: Only users and gr" +
|
||||
"oups can be added.\');\r\n return;\r\n }\r\n\r\n con" +
|
||||
"st $li = $(\'<li><input type=\"hidden\" name=\"OnDemandPrincipals\" /><i class=\"fa fa" +
|
||||
"-lg\"></i> <span></span><i class=\"fa fa-times-circle remove\"></i></li>\');\r\n " +
|
||||
" $li.find(\'input\').val(data.Id);\r\n $li.find(\'i.fa-lg\').addClass(" +
|
||||
"data.Type === \'user\' ? \'fa-user\' : \'fa-users\');\r\n $li.find(\'span\').te" +
|
||||
"xt(data.Name + \' [\' + data.Id + \']\');\r\n $li.appendTo(\'#Config_Export_" +
|
||||
"Create_OnDemand_List\');\r\n });\r\n $(\'#Config_Export_Create_OnDemand_" +
|
||||
"List\').on(\'click\', \'.remove\', function () {\r\n $(this).closest(\'li\').r" +
|
||||
"emove();\r\n })\r\n })\r\n</script>\r\n");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
@model Disco.Web.Areas.Config.Models.Export.IndexModel
|
||||
@{
|
||||
Authorization.Require(Claims.Config.ManageSavedExports);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Saved Exports");
|
||||
}
|
||||
|
||||
@if (Model.SavedExports.Any())
|
||||
{
|
||||
<table class="tableData">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Created</th>
|
||||
<th>Schedule</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
@foreach (var export in Model.SavedExports.OrderBy(e => e.Name))
|
||||
{
|
||||
string exportTypeName;
|
||||
Disco.Models.Repository.User createdUser;
|
||||
Model.ExportTypeNames.TryGetValue(export.Type, out exportTypeName);
|
||||
Model.CreatedUsers.TryGetValue(export.CreatedBy, out createdUser);
|
||||
<tr>
|
||||
<td>
|
||||
<a href="@Url.Action(MVC.Config.Export.Show(export.Id))">@export.Name</a>
|
||||
</td>
|
||||
<td>@exportTypeName</td>
|
||||
<td>
|
||||
@if (createdUser != null)
|
||||
{
|
||||
@CommonHelpers.FriendlyDateAndUser(export.CreatedOn, createdUser)
|
||||
}
|
||||
else
|
||||
{
|
||||
@CommonHelpers.FriendlyDateAndUser(export.CreatedOn, export.CreatedBy)
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (export.Schedule == null)
|
||||
{
|
||||
<text> </text>
|
||||
}
|
||||
else
|
||||
{
|
||||
var schedule = export.Schedule;
|
||||
<div>
|
||||
<span class="@(schedule.IncludesDay(DayOfWeek.Sunday) ? null : "subtleText")">S</span>
|
||||
<span class="@(schedule.IncludesDay(DayOfWeek.Monday) ? null : "subtleText")">M</span>
|
||||
<span class="@(schedule.IncludesDay(DayOfWeek.Tuesday) ? null : "subtleText")">T</span>
|
||||
<span class="@(schedule.IncludesDay(DayOfWeek.Wednesday) ? null : "subtleText")">W</span>
|
||||
<span class="@(schedule.IncludesDay(DayOfWeek.Thursday) ? null : "subtleText")">T</span>
|
||||
<span class="@(schedule.IncludesDay(DayOfWeek.Friday) ? null : "subtleText")">F</span>
|
||||
<span class="@(schedule.IncludesDay(DayOfWeek.Saturday) ? null : "subtleText")">S</span>
|
||||
<span class="smallText">at</span>
|
||||
<span>@schedule.StartHourFriendly()</span>
|
||||
@if (schedule.EndHour.HasValue)
|
||||
{
|
||||
<span class="smallText">-</span>
|
||||
<span>@schedule.EndHourFriendly()</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (export.Schedule != null)
|
||||
{
|
||||
<a href="@Url.Action(MVC.Config.Export.RunScheduled(export.Id))">Schedule Now</a>
|
||||
}
|
||||
<a href="@Url.Action(MVC.Config.Export.Run(export.Id))">Export Now</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No saved exports are configured</h2>
|
||||
<div>
|
||||
@if (Authorization.Has(Claims.Device.Actions.Export))
|
||||
{
|
||||
<a href="@Url.Action(MVC.Device.Export())" class="button small">Device Export</a>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Actions.Export))
|
||||
{
|
||||
<a href="@Url.Action(MVC.Job.Export())" class="button small">Job Export</a>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Config.UserFlag.Export))
|
||||
{
|
||||
<a href="@Url.Action(MVC.Config.UserFlag.Export())" class="button small">User Flag Export</a>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Config.DeviceFlag.Export))
|
||||
{
|
||||
<a href="@Url.Action(MVC.Config.DeviceFlag.Export())" class="button small">Device Flag Export</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,573 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.Export
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
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/Export/Index.cshtml")]
|
||||
public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Export.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Config.ManageSavedExports);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Saved Exports");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n");
|
||||
|
||||
|
||||
#line 8 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (Model.SavedExports.Any())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Name</th>\r\n <th>Type</th>\r\n " +
|
||||
" <th>Created</th>\r\n <th>Schedule</th>\r\n <th> </th>\r\n" +
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
foreach (var export in Model.SavedExports.OrderBy(e => e.Name))
|
||||
{
|
||||
string exportTypeName;
|
||||
Disco.Models.Repository.User createdUser;
|
||||
Model.ExportTypeNames.TryGetValue(export.Type, out exportTypeName);
|
||||
Model.CreatedUsers.TryGetValue(export.CreatedBy, out createdUser);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 868), Tuple.Create("\"", 921)
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 875), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Export.Show(export.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 875), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
Write(export.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</a>\r\n </td>\r\n <td>");
|
||||
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
Write(exportTypeName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (createdUser != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(export.CreatedOn, createdUser));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(export.CreatedOn, export.CreatedBy));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (export.Schedule == null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
var schedule = export.Schedule;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1737), Tuple.Create("\"", 1808)
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1745), Tuple.Create<System.Object, System.Int32>(schedule.IncludesDay(DayOfWeek.Sunday) ? null : "subtleText"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1745), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">S</span>\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1853), Tuple.Create("\"", 1924)
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1861), Tuple.Create<System.Object, System.Int32>(schedule.IncludesDay(DayOfWeek.Monday) ? null : "subtleText"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1861), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">M</span>\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1969), Tuple.Create("\"", 2041)
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1977), Tuple.Create<System.Object, System.Int32>(schedule.IncludesDay(DayOfWeek.Tuesday) ? null : "subtleText"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1977), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">T</span>\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2086), Tuple.Create("\"", 2160)
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2094), Tuple.Create<System.Object, System.Int32>(schedule.IncludesDay(DayOfWeek.Wednesday) ? null : "subtleText"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2094), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">W</span>\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2205), Tuple.Create("\"", 2278)
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2213), Tuple.Create<System.Object, System.Int32>(schedule.IncludesDay(DayOfWeek.Thursday) ? null : "subtleText"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2213), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">T</span>\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2323), Tuple.Create("\"", 2394)
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2331), Tuple.Create<System.Object, System.Int32>(schedule.IncludesDay(DayOfWeek.Friday) ? null : "subtleText"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2331), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">F</span>\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2439), Tuple.Create("\"", 2512)
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2447), Tuple.Create<System.Object, System.Int32>(schedule.IncludesDay(DayOfWeek.Saturday) ? null : "subtleText"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2447), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">S</span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"smallText\"");
|
||||
|
||||
WriteLiteral(">at</span>\r\n <span>");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
Write(schedule.StartHourFriendly());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (schedule.EndHour.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallText\"");
|
||||
|
||||
WriteLiteral(">-</span>\r\n");
|
||||
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
Write(schedule.EndHourFriendly());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (export.Schedule != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3122), Tuple.Create("\"", 3183)
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3129), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Export.RunScheduled(export.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3129), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">Schedule Now</a>\r\n");
|
||||
|
||||
|
||||
#line 69 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3248), Tuple.Create("\"", 3300)
|
||||
|
||||
#line 70 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3255), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Export.Run(export.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3255), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">Export Now</a>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>No saved exports are configured</h2>\r\n <div>\r\n");
|
||||
|
||||
|
||||
#line 81 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 81 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Actions.Export))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3626), Tuple.Create("\"", 3665)
|
||||
|
||||
#line 83 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3633), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Export())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3633), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Device Export</a>\r\n");
|
||||
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Actions.Export))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3819), Tuple.Create("\"", 3855)
|
||||
|
||||
#line 87 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3826), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Export())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3826), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Job Export</a>\r\n");
|
||||
|
||||
|
||||
#line 88 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 89 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.UserFlag.Export))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4010), Tuple.Create("\"", 4058)
|
||||
|
||||
#line 91 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4017), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.UserFlag.Export())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4017), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">User Flag Export</a>\r\n");
|
||||
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 93 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DeviceFlag.Export))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4221), Tuple.Create("\"", 4271)
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4228), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DeviceFlag.Export())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4228), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Device Flag Export</a>\r\n");
|
||||
|
||||
|
||||
#line 96 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 99 "..\..\Areas\Config\Views\Export\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,26 @@
|
||||
@model Disco.Web.Areas.Config.Models.Export.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Config.ManageSavedExports);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", MVC.Config.Export.Index(), "Saved " + Model.ExportTypeName + ": " + Model.Name);
|
||||
}
|
||||
|
||||
@if (Model.WasSaved)
|
||||
{
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> The saved export was updated.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.WasExported)
|
||||
{
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> The scheduled export was run.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@Html.Partial(MVC.Config.Export.Views._Edit, (Disco.Web.Areas.Config.Models.Export.EditModel)Model)
|
||||
@@ -0,0 +1,132 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.Export
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
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/Export/Show.cshtml")]
|
||||
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Export.ShowModel>
|
||||
{
|
||||
public Show()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\Export\Show.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Config.ManageSavedExports);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", MVC.Config.Export.Index(), "Saved " + Model.ExportTypeName + ": " + Model.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n");
|
||||
|
||||
|
||||
#line 8 "..\..\Areas\Config\Views\Export\Show.cshtml"
|
||||
if (Model.WasSaved)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"info-box\"");
|
||||
|
||||
WriteLiteral(">\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"fa-p\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
||||
|
||||
WriteLiteral("></i> The saved export was updated.\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 15 "..\..\Areas\Config\Views\Export\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\Export\Show.cshtml"
|
||||
if (Model.WasExported)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"info-box\"");
|
||||
|
||||
WriteLiteral(">\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"fa-p\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw fa-info-circle\"");
|
||||
|
||||
WriteLiteral("></i> The scheduled export was run.\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\Export\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\Export\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Export.Views._Edit, (Disco.Web.Areas.Config.Models.Export.EditModel)Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,287 @@
|
||||
@model Disco.Web.Areas.Config.Models.Export.EditModel
|
||||
@using (Html.BeginForm(MVC.API.Export.Update(), FormMethod.Post))
|
||||
{
|
||||
@Html.AntiForgeryToken();
|
||||
@Html.HiddenFor(m => m.Id)
|
||||
|
||||
<div id="Config_Export_Edit_Details" class="form" style="width: 530px;">
|
||||
<h2>Saved @Model.ExportTypeName</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 140px">Name:</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.Name)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Description:<br />
|
||||
<em class="small">Optional</em>
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.Description)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="Config_Export_Edit_Schedule" class="form" style="width: 530px; margin-top: 10px;">
|
||||
<h2>Schedule</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 140px"> </th>
|
||||
<td>
|
||||
<label>
|
||||
@Html.EditorFor(m => m.ScheduleEnabled)
|
||||
Enable Scheduled Export
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="@(Model.ScheduleEnabled ? null : "hidden")">
|
||||
<th>
|
||||
Days:
|
||||
</th>
|
||||
<td>
|
||||
<ul class="none">
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleMonday) Monday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleTuesday) Tuesday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleWednesday) Wednesday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleThursday) Thursday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleFriday) Friday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleSaturday) Saturday</label></li>
|
||||
<li><label>@Html.EditorFor(m => m.ScheduleSunday) Sunday</label></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="@(Model.ScheduleEnabled ? null : "hidden")">
|
||||
<th>
|
||||
Start Time:
|
||||
</th>
|
||||
<td>
|
||||
<select name="ScheduleStartHour">
|
||||
@{
|
||||
<option value="0" @(Model.ScheduleStartHour == 0 ? "selected" : null)>12:00 AM</option>
|
||||
for (int i = 1; i < 12; i++)
|
||||
{
|
||||
<option value="@i" @(Model.ScheduleStartHour == i ? "selected" : null)>@i:00 AM</option>
|
||||
}
|
||||
<option value="12" @(Model.ScheduleStartHour == 12 ? "selected" : null)>12:00 PM</option>
|
||||
for (int i = 13; i < 24; i++)
|
||||
{
|
||||
<option value="@i" @(Model.ScheduleStartHour == i ? "selected" : null)>@(i % 12):00 PM</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> By default, Disco ICT shuts down at 1:30am and does not resume again until its needed. If a scheduled export was missed during this time, it will be run as soon as Disco ICT is resumed.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="@(Model.ScheduleEnabled ? null : "hidden")">
|
||||
<th>
|
||||
Repeat Hourly Until:
|
||||
</th>
|
||||
<td>
|
||||
<select name="ScheduleEndHour">
|
||||
<option value="" @(Model.ScheduleEndHour.HasValue ? null : "selected")>Run once</option>
|
||||
@{
|
||||
for (int i = 1; i < 12; i++)
|
||||
{
|
||||
<option value="@i" @(Model.ScheduleEndHour == i ? "selected" : null)>@i:00 AM</option>
|
||||
}
|
||||
<option value="12" @(Model.ScheduleEndHour == 12 ? "selected" : null)>12:00 PM</option>
|
||||
for (int i = 12; i < 24; i++)
|
||||
{
|
||||
<option value="@i" @(Model.ScheduleEndHour == i ? "selected" : null)>@(i % 12):00 PM</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="@(Model.ScheduleEnabled ? null : "hidden")">
|
||||
<th>
|
||||
File System Location:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.FilePath)
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> This is the full file path on the Disco ICT server (<code>@Environment.MachineName</code>). The location may be a network path. The Disco ICT Service Account (<code>@Environment.UserDomainName\@Environment.UserName</code>) must have write access to the location.
|
||||
</p>
|
||||
</div>
|
||||
<label>
|
||||
@Html.EditorFor(m => m.TimestampSuffix) Add time stamp suffix to file name
|
||||
</label>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> This will create a new file each time the export runs.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="Config_Export_Edit_OnDemand" class="form" style="width: 530px; margin-top: 10px;">
|
||||
<h2>On Demand Export</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 140px">
|
||||
Additional Users/Groups:
|
||||
</th>
|
||||
<td>
|
||||
<ul id="Config_Export_Edit_OnDemand_List" class="none">
|
||||
@if (Model.OnDemandSubjects != null)
|
||||
{
|
||||
foreach (var sg in Model.OnDemandSubjects)
|
||||
{
|
||||
<li>
|
||||
<input type="hidden" name="OnDemandPrincipals" value="@sg.Id" />
|
||||
<i class="fa fa-user@(sg.IsGroup ? "s" : null) fa-lg"></i>
|
||||
@sg.Name [@sg.Id]
|
||||
<i class="fa fa-times-circle remove"></i>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
<div>
|
||||
<input type="text" id="Config_Export_Edit_OnDemand_Input" placeholder="Search users and groups" data-url="@(Url.Action(MVC.API.System.SearchSubjects()))" data-subjecturl="@Url.Action(MVC.API.System.Subject())" />
|
||||
<button type="button" id="Config_Export_Edit_OnDemand_Add" class="button small">Add</button>
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i> Users with the Manage Saved Exports permission (including Disco ICT Administrators) can perform an on-demand export at any time.
|
||||
Users or Group Members can be added to this list.
|
||||
@if (!Model.IsEnabled)
|
||||
{
|
||||
<text>These will also be able to perform an on-demand export using the link available after saving.</text>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@if (Model.IsEnabled)
|
||||
{
|
||||
var link = new Uri(Request.Url, Url.Action(MVC.Config.Export.Run(Model.Id)));
|
||||
<tr>
|
||||
<th>Link</th>
|
||||
<td>
|
||||
<input type="text" value="@link" style="width: 90%;" readonly data-clipboard />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="actionBar">
|
||||
@if (Model.IsEnabled)
|
||||
{
|
||||
if (Model.ScheduleEnabled)
|
||||
{
|
||||
<a href="@Url.Action(MVC.Config.Export.RunScheduled(Model.Id))" class="button">Schedule Now</a>
|
||||
}
|
||||
|
||||
<a href="@Url.Action(MVC.Config.Export.Run(Model.Id))" class="button">Export Now</a>
|
||||
|
||||
<button id="Config_Export_Edit_DeleteButton" type="button" class="button alert">Delete</button>
|
||||
}
|
||||
|
||||
<button type="submit" class="button">Save</button>
|
||||
</div>
|
||||
}
|
||||
@if (Model.IsEnabled)
|
||||
{
|
||||
<div id="Config_Export_Edit_DeleteDialog" title="Delete Saved @Model.ExportTypeName: @Model.Name" class="dialog">
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-exclamation-triangle"></i>Are you sure you want to delete the Saved @Model.ExportTypeName: @Model.Name?
|
||||
</p>
|
||||
</div>
|
||||
@using (Html.BeginForm(MVC.API.Export.Delete(), FormMethod.Post))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="id" value="@Model.Id" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<script>
|
||||
$(function () {
|
||||
$('#ScheduleEnabled').on('change', function () {
|
||||
const enabled = $(this).is(':checked');
|
||||
$('#Config_Export_Edit_Schedule tr:not(:first)').toggleClass('hidden', !enabled);
|
||||
});
|
||||
|
||||
const onDemandInput = $('#Config_Export_Edit_OnDemand_Input');
|
||||
|
||||
onDemandInput
|
||||
.autocomplete({
|
||||
source: onDemandInput.attr('data-url'),
|
||||
minLength: 2,
|
||||
focus: function (e, ui) {
|
||||
onDemandInput.val(ui.item.Id);
|
||||
return false;
|
||||
},
|
||||
select: function (e, ui) {
|
||||
onDemandInput.val(ui.item.Id).blur();
|
||||
return false;
|
||||
}
|
||||
}).data('ui-autocomplete')._renderItem = function (ul, item) {
|
||||
return $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append("<a><strong>" + item.Name + "</strong><br>" + item.Id + " (" + item.Type + ")</a>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
$('#Config_Export_Edit_OnDemand_Add').on('click', async function () {
|
||||
const id = onDemandInput.val();
|
||||
const body = new FormData();
|
||||
body.append('Id', id);
|
||||
const response = await fetch(onDemandInput.attr('data-subjecturl'), {
|
||||
method: 'POST',
|
||||
body: body
|
||||
});
|
||||
if (!response.ok) {
|
||||
alert('Error: ' + response.statusText);
|
||||
return;
|
||||
}
|
||||
const data = await response.json();
|
||||
|
||||
if (!data.IsGroup && !data.IsUserAccount) {
|
||||
alert('Error: Only users and groups can be added.');
|
||||
return;
|
||||
}
|
||||
|
||||
const $li = $('<li><input type="hidden" name="OnDemandPrincipals" /><i class="fa fa-lg"></i> <span></span><i class="fa fa-times-circle remove"></i></li>');
|
||||
$li.find('input').val(data.Id);
|
||||
$li.find('i.fa-lg').addClass(data.Type === 'user' ? 'fa-user' : 'fa-users');
|
||||
$li.find('span').text(data.Name + ' [' + data.Id + ']');
|
||||
$li.appendTo('#Config_Export_Edit_OnDemand_List');
|
||||
});
|
||||
$('#Config_Export_Edit_OnDemand_List').on('click', '.remove', function () {
|
||||
$(this).closest('li').remove();
|
||||
})
|
||||
|
||||
let $deleteDialog = null;
|
||||
$('#Config_Export_Edit_DeleteButton').on('click', function () {
|
||||
if (!$deleteDialog) {
|
||||
$deleteDialog = $('#Config_Export_Edit_DeleteDialog').dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
width: 350,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
'Cancel': function () {
|
||||
$(this).dialog("close");
|
||||
},
|
||||
'Delete': function () {
|
||||
$deleteDialog.find('form').submit();
|
||||
$(this).dialog("disable");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$deleteDialog.dialog('open');
|
||||
})
|
||||
})
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -58668,7 +58668,7 @@ jQuery.fn.DataTable.defaults.aLengthMenu = [[10, 20, 50, 100, 200, -1], [10, 20,
|
||||
|
||||
if (navigator.clipboard) {
|
||||
window.setTimeout(() => {
|
||||
$('[data-clipboard]')
|
||||
$('[data-clipboard]:not(input)')
|
||||
.on('mouseenter', e => {
|
||||
const $this = $(e.currentTarget);
|
||||
const previousPosition = $this.css('position');
|
||||
@@ -58699,6 +58699,22 @@ jQuery.fn.DataTable.defaults.aLengthMenu = [[10, 20, 50, 100, 200, -1], [10, 20,
|
||||
$this.removeData('clipboard');
|
||||
}
|
||||
});
|
||||
$('input[data-clipboard]')
|
||||
.each((i, el) => {
|
||||
const $this = $(el);
|
||||
const link = $('<i class="clipboard-button fa fa-clipboard fa-fw">');
|
||||
link.insertAfter($this);
|
||||
link.on('click', e => {
|
||||
e.preventDefault();
|
||||
const value = $this.val();
|
||||
navigator.clipboard.writeText(value).then(() => {
|
||||
link.removeClass('fa-clipboard').addClass('fa-check');
|
||||
window.setTimeout(() => {
|
||||
link.removeClass('fa-check').addClass('fa-clipboard');
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
})
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -198,7 +198,7 @@
|
||||
|
||||
if (navigator.clipboard) {
|
||||
window.setTimeout(() => {
|
||||
$('[data-clipboard]')
|
||||
$('[data-clipboard]:not(input)')
|
||||
.on('mouseenter', e => {
|
||||
const $this = $(e.currentTarget);
|
||||
const previousPosition = $this.css('position');
|
||||
@@ -229,6 +229,22 @@
|
||||
$this.removeData('clipboard');
|
||||
}
|
||||
});
|
||||
$('input[data-clipboard]')
|
||||
.each((i, el) => {
|
||||
const $this = $(el);
|
||||
const link = $('<i class="clipboard-button fa fa-clipboard fa-fw">');
|
||||
link.insertAfter($this);
|
||||
link.on('click', e => {
|
||||
e.preventDefault();
|
||||
const value = $this.val();
|
||||
navigator.clipboard.writeText(value).then(() => {
|
||||
link.removeClass('fa-clipboard').addClass('fa-check');
|
||||
window.setTimeout(() => {
|
||||
link.removeClass('fa-check').addClass('fa-clipboard');
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
})
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5903,6 +5903,9 @@ div.columnHost .column50 {
|
||||
.smallText {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.subtleText {
|
||||
color: #ededed;
|
||||
}
|
||||
.smallMessage {
|
||||
font-style: italic;
|
||||
color: #666;
|
||||
@@ -6027,3 +6030,11 @@ i.clipboard-link {
|
||||
i.clipboard-link:hover {
|
||||
color: #333;
|
||||
}
|
||||
i.clipboard-button {
|
||||
cursor: pointer;
|
||||
padding-left: 4px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
i.clipboard-button:hover {
|
||||
color: #9e9e9e;
|
||||
}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -2038,24 +2038,24 @@ h1.Config_DocumentTemplates {
|
||||
cursor: not-allowed;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List {
|
||||
#Config_Export_Edit_OnDemand #Config_Export_Edit_OnDemand_List {
|
||||
height: 120px;
|
||||
overflow-y: auto;
|
||||
background-color: #fff;
|
||||
border: 1px solid #d8d8d8;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li {
|
||||
#Config_Export_Edit_OnDemand #Config_Export_Edit_OnDemand_List li {
|
||||
cursor: pointer;
|
||||
margin: 2px 4px;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li:hover {
|
||||
#Config_Export_Edit_OnDemand #Config_Export_Edit_OnDemand_List li:hover {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li:hover .remove {
|
||||
#Config_Export_Edit_OnDemand #Config_Export_Edit_OnDemand_List li:hover .remove {
|
||||
opacity: 0.8;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li .remove {
|
||||
#Config_Export_Edit_OnDemand #Config_Export_Edit_OnDemand_List li .remove {
|
||||
margin-top: 2px;
|
||||
padding-right: 6px;
|
||||
float: right;
|
||||
@@ -2064,6 +2064,6 @@ h1.Config_DocumentTemplates {
|
||||
color: #e51400;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li .remove:hover {
|
||||
#Config_Export_Edit_OnDemand #Config_Export_Edit_OnDemand_List li .remove:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
@@ -2461,8 +2461,8 @@ h1.Config_DocumentTemplates {
|
||||
.dialog-bulk-generate {
|
||||
}
|
||||
|
||||
#Config_Export_Create_OnDemand {
|
||||
#Config_Export_Create_OnDemand_List {
|
||||
#Config_Export_Edit_OnDemand {
|
||||
#Config_Export_Edit_OnDemand_List {
|
||||
height: 120px;
|
||||
overflow-y: auto;
|
||||
background-color: @white;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1471,6 +1471,9 @@ div.columnHost .column50 {
|
||||
.smallText {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.subtleText {
|
||||
color: #ededed;
|
||||
}
|
||||
.smallMessage {
|
||||
font-style: italic;
|
||||
color: #666;
|
||||
@@ -1595,3 +1598,11 @@ i.clipboard-link {
|
||||
i.clipboard-link:hover {
|
||||
color: #333;
|
||||
}
|
||||
i.clipboard-button {
|
||||
cursor: pointer;
|
||||
padding-left: 4px;
|
||||
color: #1e6dab;
|
||||
}
|
||||
i.clipboard-button:hover {
|
||||
color: #9e9e9e;
|
||||
}
|
||||
@@ -1546,6 +1546,10 @@ div.columnHost {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.subtleText {
|
||||
color: @SubtleColour;
|
||||
}
|
||||
|
||||
.smallMessage {
|
||||
font-style: italic;
|
||||
color: #666;
|
||||
@@ -1696,3 +1700,13 @@ i.clipboard-link {
|
||||
color: @HeaderBackgroundColour;
|
||||
}
|
||||
}
|
||||
|
||||
i.clipboard-button {
|
||||
cursor: pointer;
|
||||
padding-left: 4px;
|
||||
color: @ButtonColour;
|
||||
|
||||
&:hover {
|
||||
color: @ButtonHoverColour;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -128,6 +128,9 @@
|
||||
<HintPath>..\packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
@@ -210,6 +213,7 @@
|
||||
<Compile Include="Areas\API\Controllers\DocumentTemplatePackageController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\DeviceFlagAssignmentController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\EnrollmentController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\ExportController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\UserFlagAssignmentController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\DeviceFlagController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\UserFlagController.cs" />
|
||||
@@ -245,7 +249,9 @@
|
||||
<Compile Include="Areas\Config\Models\DocumentTemplate\BulkGenerateModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\DocumentTemplate\CreatePackageModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\DocumentTemplate\ShowPackageModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Export\CreateModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Export\EditModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Export\IndexModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Export\ShowModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Shared\DeviceGroupDocumentTemplateBulkGenerateModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Shared\LinkedGroupModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\DeviceFlag\CreateModel.cs" />
|
||||
@@ -298,6 +304,21 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>ShowPackage.cshtml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Export\_Edit.generated.cs">
|
||||
<DependentUpon>_Edit.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Export\Show.generated.cs">
|
||||
<DependentUpon>Show.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Export\Index.generated.cs">
|
||||
<DependentUpon>Index.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Export\Create.generated.cs">
|
||||
<DependentUpon>Create.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -715,6 +736,9 @@
|
||||
<Compile Include="Extensions\T4MVC\API.EnrollmentController.generated.cs">
|
||||
<DependentUpon>T4MVC.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\T4MVC\API.ExportController.generated.cs">
|
||||
<DependentUpon>T4MVC.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\T4MVC\Config.DeviceFlagController.generated.cs">
|
||||
<DependentUpon>T4MVC.tt</DependentUpon>
|
||||
</Compile>
|
||||
@@ -1359,10 +1383,22 @@
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>CreatePackage.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<Content Include="Areas\Config\Views\Export\Create.cshtml">
|
||||
<None Include="Areas\Config\Views\Export\Create.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Create.generated.cs</LastGenOutput>
|
||||
</Content>
|
||||
</None>
|
||||
<None Include="Areas\Config\Views\Export\Index.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Index.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Areas\Config\Views\Export\Show.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Show.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Areas\Config\Views\Export\_Edit.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>_Edit.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Areas\Config\Views\JobPreferences\Index.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Index.generated.cs</LastGenOutput>
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
// <auto-generated />
|
||||
// This file was generated by a T4 template.
|
||||
// Don't change it directly as your change would get overwritten. Instead, make changes
|
||||
// to the .tt file (i.e. the T4 template) and save it to regenerate this file.
|
||||
|
||||
// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance
|
||||
// 0108: suppress "Foo hides inherited member Foo. Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed
|
||||
// 0114: suppress "Foo.BarController.Baz()' hides inherited member 'Qux.BarController.Baz()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." when an action (with an argument) overrides an action in a parent controller
|
||||
#pragma warning disable 1591, 3008, 3009, 0108, 0114
|
||||
#region T4MVC
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using T4MVC;
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class ExportController
|
||||
{
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ExportController() { }
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
protected ExportController(Dummy d) { }
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
protected RedirectToRouteResult RedirectToAction(ActionResult result)
|
||||
{
|
||||
var callInfo = result.GetT4MVCResult();
|
||||
return RedirectToRoute(callInfo.RouteValueDictionary);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
protected RedirectToRouteResult RedirectToAction(Task<ActionResult> taskResult)
|
||||
{
|
||||
return RedirectToAction(taskResult.Result);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
protected RedirectToRouteResult RedirectToActionPermanent(ActionResult result)
|
||||
{
|
||||
var callInfo = result.GetT4MVCResult();
|
||||
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
protected RedirectToRouteResult RedirectToActionPermanent(Task<ActionResult> taskResult)
|
||||
{
|
||||
return RedirectToActionPermanent(taskResult.Result);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Update()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Update);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Delete()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Delete);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ExportController Actions { get { return MVC.API.Export; } }
|
||||
[GeneratedCode("T4MVC", "2.0")]
|
||||
public readonly string Area = "API";
|
||||
[GeneratedCode("T4MVC", "2.0")]
|
||||
public readonly string Name = "Export";
|
||||
[GeneratedCode("T4MVC", "2.0")]
|
||||
public const string NameConst = "Export";
|
||||
[GeneratedCode("T4MVC", "2.0")]
|
||||
static readonly ActionNamesClass s_actions = new ActionNamesClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionNamesClass ActionNames { get { return s_actions; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNamesClass
|
||||
{
|
||||
public readonly string Update = "Update";
|
||||
public readonly string Delete = "Delete";
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNameConstants
|
||||
{
|
||||
public const string Update = "Update";
|
||||
public const string Delete = "Delete";
|
||||
}
|
||||
|
||||
|
||||
static readonly ActionParamsClass_Update s_params_Update = new ActionParamsClass_Update();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Update UpdateParams { get { return s_params_Update; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Update
|
||||
{
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Delete DeleteParams { get { return s_params_Delete; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Delete
|
||||
{
|
||||
public readonly string id = "id";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ViewsClass Views { get { return s_views; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ViewsClass
|
||||
{
|
||||
static readonly _ViewNamesClass s_ViewNames = new _ViewNamesClass();
|
||||
public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
|
||||
public class _ViewNamesClass
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public partial class T4MVC_ExportController : Disco.Web.Areas.API.Controllers.ExportController
|
||||
{
|
||||
public T4MVC_ExportController() : base(Dummy.Instance) { }
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.Export.EditModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Update(Disco.Web.Areas.Config.Models.Export.EditModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Update);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
UpdateOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void DeleteOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, System.Guid id);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Delete(System.Guid id)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Delete);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
DeleteOverride(callInfo, id);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion T4MVC
|
||||
#pragma warning restore 1591, 3008, 3009, 0108, 0114
|
||||
@@ -59,6 +59,12 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
return RedirectToActionPermanent(taskResult.Result);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Show()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Show);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Create()
|
||||
@@ -71,6 +77,12 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Run);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult RunScheduled()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.RunScheduled);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ExportController Actions { get { return MVC.Config.Export; } }
|
||||
@@ -87,18 +99,34 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNamesClass
|
||||
{
|
||||
public readonly string Index = "Index";
|
||||
public readonly string Show = "Show";
|
||||
public readonly string Create = "Create";
|
||||
public readonly string Run = "Run";
|
||||
public readonly string RunScheduled = "RunScheduled";
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNameConstants
|
||||
{
|
||||
public const string Index = "Index";
|
||||
public const string Show = "Show";
|
||||
public const string Create = "Create";
|
||||
public const string Run = "Run";
|
||||
public const string RunScheduled = "RunScheduled";
|
||||
}
|
||||
|
||||
|
||||
static readonly ActionParamsClass_Show s_params_Show = new ActionParamsClass_Show();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Show ShowParams { get { return s_params_Show; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Show
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string saved = "saved";
|
||||
public readonly string exported = "exported";
|
||||
}
|
||||
static readonly ActionParamsClass_Create s_params_Create = new ActionParamsClass_Create();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Create CreateParams { get { return s_params_Create; } }
|
||||
@@ -106,7 +134,6 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
public class ActionParamsClass_Create
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string model = "model";
|
||||
}
|
||||
static readonly ActionParamsClass_Run s_params_Run = new ActionParamsClass_Run();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -116,6 +143,14 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
public readonly string id = "id";
|
||||
}
|
||||
static readonly ActionParamsClass_RunScheduled s_params_RunScheduled = new ActionParamsClass_RunScheduled();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_RunScheduled RunScheduledParams { get { return s_params_RunScheduled; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_RunScheduled
|
||||
{
|
||||
public readonly string id = "id";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ViewsClass Views { get { return s_views; } }
|
||||
@@ -126,9 +161,15 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
|
||||
public class _ViewNamesClass
|
||||
{
|
||||
public readonly string _Edit = "_Edit";
|
||||
public readonly string Create = "Create";
|
||||
public readonly string Index = "Index";
|
||||
public readonly string Show = "Show";
|
||||
}
|
||||
public readonly string _Edit = "~/Areas/Config/Views/Export/_Edit.cshtml";
|
||||
public readonly string Create = "~/Areas/Config/Views/Export/Create.cshtml";
|
||||
public readonly string Index = "~/Areas/Config/Views/Export/Index.cshtml";
|
||||
public readonly string Show = "~/Areas/Config/Views/Export/Show.cshtml";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,6 +178,31 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
public T4MVC_ExportController() : base(Dummy.Instance) { }
|
||||
|
||||
[NonAction]
|
||||
partial void IndexOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Index()
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Index);
|
||||
IndexOverride(callInfo);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void ShowOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, System.Guid id, bool? saved, bool? exported);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Show(System.Guid id, bool? saved, bool? exported)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Show);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "saved", saved);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "exported", exported);
|
||||
ShowOverride(callInfo, id, saved, exported);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, System.Guid id);
|
||||
|
||||
@@ -149,18 +215,6 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.Export.CreateModel model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Create(Disco.Web.Areas.Config.Models.Export.CreateModel model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Create);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||
CreateOverride(callInfo, model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void RunOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, System.Guid id);
|
||||
|
||||
@@ -173,6 +227,18 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void RunScheduledOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, System.Guid id);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult RunScheduled(System.Guid id)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.RunScheduled);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
RunScheduledOverride(callInfo, id);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace T4MVC
|
||||
public Disco.Web.Areas.API.Controllers.DocumentTemplateController DocumentTemplate = new Disco.Web.Areas.API.Controllers.T4MVC_DocumentTemplateController();
|
||||
public Disco.Web.Areas.API.Controllers.DocumentTemplatePackageController DocumentTemplatePackage = new Disco.Web.Areas.API.Controllers.T4MVC_DocumentTemplatePackageController();
|
||||
public Disco.Web.Areas.API.Controllers.EnrollmentController Enrollment = new Disco.Web.Areas.API.Controllers.T4MVC_EnrollmentController();
|
||||
public Disco.Web.Areas.API.Controllers.ExportController Export = new Disco.Web.Areas.API.Controllers.T4MVC_ExportController();
|
||||
public Disco.Web.Areas.API.Controllers.ExpressionsController Expressions = new Disco.Web.Areas.API.Controllers.T4MVC_ExpressionsController();
|
||||
public Disco.Web.Areas.API.Controllers.JobController Job = new Disco.Web.Areas.API.Controllers.T4MVC_JobController();
|
||||
public Disco.Web.Areas.API.Controllers.JobPreferencesController JobPreferences = new Disco.Web.Areas.API.Controllers.T4MVC_JobPreferencesController();
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<package id="Rx-Main" version="2.2.5" targetFramework="net45" />
|
||||
<package id="Rx-PlatformServices" version="2.2.5" targetFramework="net45" />
|
||||
<package id="SqlServerCompact" version="4.0.8854.1" targetFramework="net45" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
<package id="T4MVC" version="3.17.5" targetFramework="net45" />
|
||||
<package id="T4MVCExtensions" version="3.17.5" targetFramework="net45" />
|
||||
<package id="TinyMCE.jQuery" version="4.1.2" targetFramework="net45" />
|
||||
|
||||
Reference in New Issue
Block a user