feature: saved exports
initial - not feature complete
This commit is contained in:
@@ -725,6 +725,15 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
return this.File(fileStream.GetBuffer(), 0, (int)fileStream.Length, context.Result.MimeType, context.Result.Filename);
|
||||
}
|
||||
[DiscoAuthorizeAll(Claims.Config.ManageSavedExports, Claims.Device.Actions.Export)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult SaveExport(ExportModel Model)
|
||||
{
|
||||
var export = new DeviceExport(Model.Options);
|
||||
var savedExport = SavedExports.SaveExport(export, Database, CurrentUser);
|
||||
|
||||
return RedirectToAction(MVC.Config.Export.Create(savedExport.Id));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
using Disco.Models.UI.Config.Export;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Exporting;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
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;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
[DiscoAuthorize(Claims.Config.ManageSavedExports)]
|
||||
public partial class ExportController : AuthorizedDatabaseController
|
||||
{
|
||||
[HttpGet]
|
||||
public virtual ActionResult Create(Guid id)
|
||||
{
|
||||
var export = SavedExports.GetSavedExport(Database, id, out var exportTypeName);
|
||||
|
||||
if (export == null)
|
||||
return HttpNotFound();
|
||||
|
||||
var m = CreateModel.FromSavedExport(export, exportTypeName);
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigExportCreateModel>(ControllerContext, m);
|
||||
|
||||
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]
|
||||
public virtual ActionResult Run(Guid id)
|
||||
{
|
||||
var export = SavedExports.GetSavedExport(Database, id, out _);
|
||||
|
||||
if (export == null)
|
||||
return HttpNotFound();
|
||||
|
||||
if (!SavedExports.IsAuthorized(export, Authorization))
|
||||
return new HttpStatusCodeResult(System.Net.HttpStatusCode.Forbidden, "Not authorized to run export");
|
||||
|
||||
var exportResult = SavedExports.EvaluateSavedExport(Database, export);
|
||||
|
||||
var fileStream = exportResult.Result;
|
||||
|
||||
return this.File(fileStream.GetBuffer(), 0, (int)fileStream.Length, exportResult.MimeType, exportResult.Filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.UI.Config.Export;
|
||||
using Disco.Web.Areas.API.Models.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Export
|
||||
{
|
||||
public class CreateModel : ConfigExportCreateModel
|
||||
{
|
||||
public string ExportTypeName { get; set; }
|
||||
[Required]
|
||||
public Guid Id { get; set; }
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[DataType(DataType.MultilineText)]
|
||||
public string Description { get; set; }
|
||||
|
||||
public string FilePath { get; set; }
|
||||
public bool TimestampSuffix { get; set; }
|
||||
|
||||
public bool ScheduleEnabled { get; set; }
|
||||
public bool ScheduleMonday { get; set; }
|
||||
public bool ScheduleTuesday { get; set; }
|
||||
public bool ScheduleWednesday { get; set; }
|
||||
public bool ScheduleThursday { get; set; }
|
||||
public bool ScheduleFriday { get; set; }
|
||||
public bool ScheduleSaturday { get; set; }
|
||||
public bool ScheduleSunday { get; set; }
|
||||
|
||||
[Range(0, 23)]
|
||||
public byte ScheduleStartHour { get; set; }
|
||||
[Range(0, 23)]
|
||||
public byte? ScheduleEndHour { get; set; }
|
||||
|
||||
public List<SubjectDescriptorModel> OnDemandSubjects { get; set; }
|
||||
public List<string> OnDemandPrincipals { get; set; }
|
||||
|
||||
public static CreateModel FromSavedExport(SavedExport savedExport, string exportTypeName)
|
||||
{
|
||||
return new CreateModel
|
||||
{
|
||||
Id = savedExport.Id,
|
||||
ExportTypeName = exportTypeName,
|
||||
ScheduleMonday = true,
|
||||
ScheduleTuesday = true,
|
||||
ScheduleWednesday = true,
|
||||
ScheduleThursday = true,
|
||||
ScheduleFriday = true,
|
||||
};
|
||||
}
|
||||
|
||||
public SavedExport ToSavedExport()
|
||||
{
|
||||
var weekDays = default(byte);
|
||||
if (ScheduleMonday) weekDays |= 1 << (int)DayOfWeek.Monday;
|
||||
if (ScheduleTuesday) weekDays |= 1 << (int)DayOfWeek.Tuesday;
|
||||
if (ScheduleWednesday) weekDays |= 1 << (int)DayOfWeek.Wednesday;
|
||||
if (ScheduleThursday) weekDays |= 1 << (int)DayOfWeek.Thursday;
|
||||
if (ScheduleFriday) weekDays |= 1 << (int)DayOfWeek.Friday;
|
||||
if (ScheduleSaturday) weekDays |= 1 << (int)DayOfWeek.Saturday;
|
||||
if (ScheduleSunday) weekDays |= 1 << (int)DayOfWeek.Sunday;
|
||||
|
||||
return new SavedExport
|
||||
{
|
||||
Id = Id,
|
||||
Name = Name,
|
||||
Description = Description,
|
||||
FilePath = FilePath,
|
||||
TimestampSuffix = TimestampSuffix,
|
||||
Schedule = ScheduleEnabled ? new SavedExportSchedule
|
||||
{
|
||||
WeekDays = weekDays,
|
||||
StartHour = ScheduleStartHour,
|
||||
EndHour = ScheduleEndHour,
|
||||
} : null,
|
||||
OnDemandPrincipals = OnDemandSubjects?.Select(s => s.Id).ToList(),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ else
|
||||
</table>
|
||||
}
|
||||
<!-- #region Administrator Subjects -->
|
||||
<div id="Config_AuthRoles_Subjects_Update_Dialog" class="dialog" title="Disco Administrators">
|
||||
<div id="Config_AuthRoles_Subjects_Update_Dialog" class="dialog" title="Disco ICT Administrators">
|
||||
<div id="Config_AuthRoles_Subjects_Update_Dialog_ListContainer">
|
||||
<span id="Config_AuthRoles_Subjects_Update_Dialog_None" class="smallMessage">None Associated</span>
|
||||
<ul id="Config_AuthRoles_Subjects_Update_Dialog_List" class="none">
|
||||
|
||||
@@ -181,7 +181,7 @@ WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Disco Administrators\"");
|
||||
WriteLiteral(" title=\"Disco ICT Administrators\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
@@ -218,14 +218,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1805), Tuple.Create("\"", 1845)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1809), Tuple.Create("\"", 1849)
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1813), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
, Tuple.Create(Tuple.Create("", 1817), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1813), false)
|
||||
, 1817), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-subjectid=\"");
|
||||
@@ -339,14 +339,14 @@ WriteLiteral(">Add</a>\r\n </div>\r\n <form");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_Form\"");
|
||||
|
||||
WriteAttribute("action", Tuple.Create(" action=\"", 2876), Tuple.Create("\"", 2965)
|
||||
WriteAttribute("action", Tuple.Create(" action=\"", 2880), Tuple.Create("\"", 2969)
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2885), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.AuthorizationRole.UpdateAdministratorSubjects(null, true))
|
||||
, Tuple.Create(Tuple.Create("", 2889), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.AuthorizationRole.UpdateAdministratorSubjects(null, true))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2885), false)
|
||||
, 2889), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" method=\"post\"");
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
@model Disco.Web.Areas.Config.Models.Export.CreateModel
|
||||
@{
|
||||
Authorization.Require(Claims.Config.ManageSavedExports);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", null, "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>
|
||||
@@ -0,0 +1,905 @@
|
||||
#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/Create.cshtml")]
|
||||
public partial class Create : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.Export.CreateModel>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Config.ManageSavedExports);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Exports", null, "Create Saved " + Model.ExportTypeName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n");
|
||||
|
||||
|
||||
#line 8 "..\..\Areas\Config\Views\Export\Create.cshtml"
|
||||
using (Html.BeginForm(MVC.Config.Export.Create(), FormMethod.Post))
|
||||
{
|
||||
|
||||
|
||||
#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");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -2037,4 +2037,33 @@ h1.Config_DocumentTemplates {
|
||||
.dialog-item-picker > div.disabled {
|
||||
cursor: not-allowed;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_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 {
|
||||
cursor: pointer;
|
||||
margin: 2px 4px;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li:hover {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li:hover .remove {
|
||||
opacity: 0.8;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li .remove {
|
||||
margin-top: 2px;
|
||||
padding-right: 6px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
color: #e51400;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
#Config_Export_Create_OnDemand #Config_Export_Create_OnDemand_List li .remove:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
@@ -2460,3 +2460,40 @@ h1.Config_DocumentTemplates {
|
||||
|
||||
.dialog-bulk-generate {
|
||||
}
|
||||
|
||||
#Config_Export_Create_OnDemand {
|
||||
#Config_Export_Create_OnDemand_List {
|
||||
height: 120px;
|
||||
overflow-y: auto;
|
||||
background-color: @white;
|
||||
border: 1px solid @TableDataDarkBorderColour;
|
||||
margin-bottom: 10px;
|
||||
|
||||
li {
|
||||
cursor: pointer;
|
||||
margin: 2px 4px;
|
||||
|
||||
&:hover {
|
||||
background-color: @TableDataBorderColour;
|
||||
|
||||
.remove {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
|
||||
.remove {
|
||||
margin-top: 2px;
|
||||
padding-right: 6px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
color: @StatusRemove;
|
||||
font-size: 1.3em;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -233,6 +233,7 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Controllers\AuthorizationRoleController.cs" />
|
||||
<Compile Include="Areas\Config\Controllers\ExportController.cs" />
|
||||
<Compile Include="Areas\Config\Controllers\DeviceFlagController.cs" />
|
||||
<Compile Include="Areas\Config\Controllers\UserFlagController.cs" />
|
||||
<Compile Include="Areas\Config\Controllers\JobPreferencesController.cs" />
|
||||
@@ -244,6 +245,7 @@
|
||||
<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\Shared\DeviceGroupDocumentTemplateBulkGenerateModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\Shared\LinkedGroupModel.cs" />
|
||||
<Compile Include="Areas\Config\Models\DeviceFlag\CreateModel.cs" />
|
||||
@@ -296,6 +298,11 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>ShowPackage.cshtml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Export\Create.generated.cs">
|
||||
<DependentUpon>Create.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Areas\Config\Views\Expressions\Browser.generated.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -711,6 +718,9 @@
|
||||
<Compile Include="Extensions\T4MVC\Config.DeviceFlagController.generated.cs">
|
||||
<DependentUpon>T4MVC.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\T4MVC\Config.ExportController.generated.cs">
|
||||
<DependentUpon>T4MVC.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\T4MVC\T4MVCExtensions.cs" />
|
||||
<Compile Include="Extensions\T4MVC\API.AuthorizationRoleController.generated.cs">
|
||||
<DependentUpon>T4MVC.tt</DependentUpon>
|
||||
@@ -1349,6 +1359,10 @@
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>CreatePackage.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<Content Include="Areas\Config\Views\Export\Create.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Create.generated.cs</LastGenOutput>
|
||||
</Content>
|
||||
<None Include="Areas\Config\Views\JobPreferences\Index.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Index.generated.cs</LastGenOutput>
|
||||
|
||||
@@ -221,6 +221,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.ExportRetrieve);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult SaveExport()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public DeviceController Actions { get { return MVC.API.Device; } }
|
||||
@@ -264,6 +270,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string ImportApply = "ImportApply";
|
||||
public readonly string Export = "Export";
|
||||
public readonly string ExportRetrieve = "ExportRetrieve";
|
||||
public readonly string SaveExport = "SaveExport";
|
||||
public readonly string MigrateDeviceMacAddressesFromLog = "MigrateDeviceMacAddressesFromLog";
|
||||
}
|
||||
|
||||
@@ -297,6 +304,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string ImportApply = "ImportApply";
|
||||
public const string Export = "Export";
|
||||
public const string ExportRetrieve = "ExportRetrieve";
|
||||
public const string SaveExport = "SaveExport";
|
||||
public const string MigrateDeviceMacAddressesFromLog = "MigrateDeviceMacAddressesFromLog";
|
||||
}
|
||||
|
||||
@@ -548,6 +556,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public readonly string id = "id";
|
||||
}
|
||||
static readonly ActionParamsClass_SaveExport s_params_SaveExport = new ActionParamsClass_SaveExport();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_SaveExport SaveExportParams { get { return s_params_SaveExport; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_SaveExport
|
||||
{
|
||||
public readonly string Model = "Model";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ViewsClass Views { get { return s_views; } }
|
||||
@@ -922,6 +938,18 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void SaveExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Device.ExportModel Model);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult SaveExport(Disco.Web.Models.Device.ExportModel Model)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SaveExport);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
|
||||
SaveExportOverride(callInfo, Model);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void MigrateDeviceMacAddressesFromLogOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
// <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.Config.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 Create()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Create);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult Run()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Run);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ExportController Actions { get { return MVC.Config.Export; } }
|
||||
[GeneratedCode("T4MVC", "2.0")]
|
||||
public readonly string Area = "Config";
|
||||
[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 Create = "Create";
|
||||
public readonly string Run = "Run";
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNameConstants
|
||||
{
|
||||
public const string Create = "Create";
|
||||
public const string Run = "Run";
|
||||
}
|
||||
|
||||
|
||||
static readonly ActionParamsClass_Create s_params_Create = new ActionParamsClass_Create();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Create CreateParams { get { return s_params_Create; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
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]
|
||||
public ActionParamsClass_Run RunParams { get { return s_params_Run; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Run
|
||||
{
|
||||
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
|
||||
{
|
||||
public readonly string Create = "Create";
|
||||
}
|
||||
public readonly string Create = "~/Areas/Config/Views/Export/Create.cshtml";
|
||||
}
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public partial class T4MVC_ExportController : Disco.Web.Areas.Config.Controllers.ExportController
|
||||
{
|
||||
public T4MVC_ExportController() : base(Dummy.Instance) { }
|
||||
|
||||
[NonAction]
|
||||
partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, System.Guid id);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Create(System.Guid id)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Create);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
CreateOverride(callInfo, id);
|
||||
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);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult Run(System.Guid id)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Run);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
RunOverride(callInfo, id);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion T4MVC
|
||||
#pragma warning restore 1591, 3008, 3009, 0108, 0114
|
||||
@@ -89,6 +89,7 @@ namespace T4MVC
|
||||
public Disco.Web.Areas.Config.Controllers.DeviceProfileController DeviceProfile = new Disco.Web.Areas.Config.Controllers.T4MVC_DeviceProfileController();
|
||||
public Disco.Web.Areas.Config.Controllers.DocumentTemplateController DocumentTemplate = new Disco.Web.Areas.Config.Controllers.T4MVC_DocumentTemplateController();
|
||||
public Disco.Web.Areas.Config.Controllers.EnrolmentController Enrolment = new Disco.Web.Areas.Config.Controllers.T4MVC_EnrolmentController();
|
||||
public Disco.Web.Areas.Config.Controllers.ExportController Export = new Disco.Web.Areas.Config.Controllers.T4MVC_ExportController();
|
||||
public Disco.Web.Areas.Config.Controllers.ExpressionsController Expressions = new Disco.Web.Areas.Config.Controllers.T4MVC_ExpressionsController();
|
||||
public Disco.Web.Areas.Config.Controllers.JobPreferencesController JobPreferences = new Disco.Web.Areas.Config.Controllers.T4MVC_JobPreferencesController();
|
||||
public Disco.Web.Areas.Config.Controllers.JobQueueController JobQueue = new Disco.Web.Areas.Config.Controllers.T4MVC_JobQueueController();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
.GroupBy(m => m.ShortDisplayName);
|
||||
}
|
||||
<div id="Devices_Export">
|
||||
@using (Html.BeginForm(MVC.API.Device.Export()))
|
||||
@using (Html.BeginForm(MVC.API.Device.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Device.SaveExport()) }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="Devices_Export_Type" class="form" style="width: 570px">
|
||||
@@ -171,6 +171,10 @@
|
||||
$('#Devices_Export_Button').click(function () {
|
||||
$form.submit();
|
||||
});
|
||||
$('#Devices_Export_Save_Button').click(function () {
|
||||
$form.attr('action', $form.data('saveaction'));
|
||||
$form.submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -205,5 +209,14 @@
|
||||
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting devices...</h4>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
<a id="Devices_Export_Button" href="#" class="button">Export Devices</a>
|
||||
@if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
<button type="button" id="Devices_Export_Save_Button" class="button">Save Export</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button type="button" class="button" disabled title="Requires Manage Saved Exports Permission">Save Export</button>
|
||||
}
|
||||
|
||||
<button type="button" id="Devices_Export_Button" class="button">Export Now</button>
|
||||
</div>
|
||||
|
||||
@@ -77,7 +77,7 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Device\Export.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.Export()))
|
||||
using (Html.BeginForm(MVC.API.Device.Export(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Device.SaveExport()) }))
|
||||
{
|
||||
|
||||
|
||||
@@ -323,40 +323,40 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3918), Tuple.Create("\"", 3949)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4003), Tuple.Create("\"", 4034)
|
||||
|
||||
#line 67 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3926), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
, Tuple.Create(Tuple.Create("", 4011), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3926), false)
|
||||
, 4011), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4031), Tuple.Create("\"", 4068)
|
||||
, Tuple.Create(Tuple.Create("", 4036), Tuple.Create("Options_", 4036), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4116), Tuple.Create("\"", 4153)
|
||||
, Tuple.Create(Tuple.Create("", 4121), Tuple.Create("Options_", 4121), true)
|
||||
|
||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4044), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
, Tuple.Create(Tuple.Create("", 4129), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4044), false)
|
||||
, 4129), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4069), Tuple.Create("\"", 4108)
|
||||
, Tuple.Create(Tuple.Create("", 4076), Tuple.Create("Options.", 4076), true)
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4154), Tuple.Create("\"", 4193)
|
||||
, Tuple.Create(Tuple.Create("", 4161), Tuple.Create("Options.", 4161), true)
|
||||
|
||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4084), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
, Tuple.Create(Tuple.Create("", 4169), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4084), false)
|
||||
, 4169), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
@@ -372,15 +372,15 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 4179), Tuple.Create("\"", 4217)
|
||||
, Tuple.Create(Tuple.Create("", 4185), Tuple.Create("Options_", 4185), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 4264), Tuple.Create("\"", 4302)
|
||||
, Tuple.Create(Tuple.Create("", 4270), Tuple.Create("Options_", 4270), true)
|
||||
|
||||
#line 68 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4193), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
, Tuple.Create(Tuple.Create("", 4278), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4193), false)
|
||||
, 4278), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -428,40 +428,40 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4806), Tuple.Create("\"", 4837)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4891), Tuple.Create("\"", 4922)
|
||||
|
||||
#line 77 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4814), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
, Tuple.Create(Tuple.Create("", 4899), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4814), false)
|
||||
, 4899), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 4919), Tuple.Create("\"", 4956)
|
||||
, Tuple.Create(Tuple.Create("", 4924), Tuple.Create("Options_", 4924), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 5004), Tuple.Create("\"", 5041)
|
||||
, Tuple.Create(Tuple.Create("", 5009), Tuple.Create("Options_", 5009), true)
|
||||
|
||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4932), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
, Tuple.Create(Tuple.Create("", 5017), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4932), false)
|
||||
, 5017), false)
|
||||
);
|
||||
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 4957), Tuple.Create("\"", 4996)
|
||||
, Tuple.Create(Tuple.Create("", 4964), Tuple.Create("Options.", 4964), true)
|
||||
WriteAttribute("name", Tuple.Create(" name=\"", 5042), Tuple.Create("\"", 5081)
|
||||
, Tuple.Create(Tuple.Create("", 5049), Tuple.Create("Options.", 5049), true)
|
||||
|
||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4972), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
, Tuple.Create(Tuple.Create("", 5057), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4972), false)
|
||||
, 5057), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
@@ -477,15 +477,15 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 5067), Tuple.Create("\"", 5105)
|
||||
, Tuple.Create(Tuple.Create("", 5073), Tuple.Create("Options_", 5073), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 5152), Tuple.Create("\"", 5190)
|
||||
, Tuple.Create(Tuple.Create("", 5158), Tuple.Create("Options_", 5158), true)
|
||||
|
||||
#line 78 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5081), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
, Tuple.Create(Tuple.Create("", 5166), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5081), false)
|
||||
, 5166), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -570,10 +570,12 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
" resizable: false,\r\n modal: true,\r\n " +
|
||||
" autoOpen: true\r\n });\r\n $(\'#Devices_Export_Butto" +
|
||||
"n\').click(function () {\r\n $form.submit();\r\n })" +
|
||||
";\r\n });\r\n </script>\r\n");
|
||||
";\r\n $(\'#Devices_Export_Save_Button\').click(function () {\r\n " +
|
||||
" $form.attr(\'action\', $form.data(\'saveaction\'));\r\n " +
|
||||
" $form.submit();\r\n });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 176 "..\..\Views\Device\Export.cshtml"
|
||||
#line 180 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -582,7 +584,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 178 "..\..\Views\Device\Export.cshtml"
|
||||
#line 182 "..\..\Views\Device\Export.cshtml"
|
||||
if (Model.ExportId.HasValue)
|
||||
{
|
||||
|
||||
@@ -600,13 +602,13 @@ WriteLiteral(" title=\"Export Devices\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 181 "..\..\Views\Device\Export.cshtml"
|
||||
#line 185 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 181 "..\..\Views\Device\Export.cshtml"
|
||||
#line 185 "..\..\Views\Device\Export.cshtml"
|
||||
if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
|
||||
@@ -616,7 +618,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
|
||||
|
||||
#line 184 "..\..\Views\Device\Export.cshtml"
|
||||
#line 188 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -627,7 +629,7 @@ WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
||||
WriteLiteral(" <h4>");
|
||||
|
||||
|
||||
#line 187 "..\..\Views\Device\Export.cshtml"
|
||||
#line 191 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount);
|
||||
|
||||
|
||||
@@ -636,7 +638,7 @@ WriteLiteral(" <h4>");
|
||||
WriteLiteral(" record");
|
||||
|
||||
|
||||
#line 187 "..\..\Views\Device\Export.cshtml"
|
||||
#line 191 "..\..\Views\Device\Export.cshtml"
|
||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -646,14 +648,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 9673), Tuple.Create("\"", 9744)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 9955), Tuple.Create("\"", 10026)
|
||||
|
||||
#line 188 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 9680), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportId.Value))
|
||||
#line 192 "..\..\Views\Device\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 9962), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportId.Value))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 9680), false)
|
||||
, 9962), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
@@ -665,7 +667,7 @@ WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
||||
WriteLiteral("></i>Download Device Export</a>\r\n");
|
||||
|
||||
|
||||
#line 189 "..\..\Views\Device\Export.cshtml"
|
||||
#line 193 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -688,7 +690,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 203 "..\..\Views\Device\Export.cshtml"
|
||||
#line 207 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -712,15 +714,69 @@ WriteLiteral("></i>Exporting devices...</h4>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Export_Button\"");
|
||||
|
||||
#line 212 "..\..\Views\Device\Export.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 212 "..\..\Views\Device\Export.cshtml"
|
||||
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
||||
{
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" type=\"button\"");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Export_Save_Button\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(">Export Devices</a>\r\n</div>\r\n");
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 215 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" type=\"button\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" disabled");
|
||||
|
||||
WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
||||
|
||||
WriteLiteral(">Save Export</button>\r\n");
|
||||
|
||||
|
||||
#line 219 "..\..\Views\Device\Export.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <button");
|
||||
|
||||
WriteLiteral(" type=\"button\"");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Export_Button\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(">Export Now</button>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user