574 lines
17 KiB
C#
574 lines
17 KiB
C#
#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
|