@using Disco.Web.Areas.Config.Models.DeviceFlag; @model ExportModel @{ Authorization.RequireAny(Claims.Config.DeviceFlag.Export); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags", MVC.Config.DeviceFlag.Index(null), "Export"); var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData); var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool) && p.PropertyName != "CurrentOnly") .GroupBy(m => m.ShortDisplayName); }
@using (Html.BeginForm(MVC.API.DeviceFlag.Export())) {

Export Scope

Device Flags: @foreach (var flag in Model.DeviceFlags) {
}
@Html.LabelFor(m => m.Options.CurrentOnly) @Html.CheckBoxFor(m => m.Options.CurrentOnly)

Uncheck to include all historical device flag assignments.

@Html.LabelFor(m => m.Options.Format) @Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v }))

Export Fields (Defaults)

@foreach (var optionGroup in optionGroups) { var optionFields = optionGroup.ToList(); var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2); }
@optionGroup.Key @if (optionFields.Count > 2) { ALL | NONE }
    @foreach (var optionItem in optionFields.Take(itemsPerColumn)) {
  • }
    @foreach (var optionItem in optionFields.Skip(itemsPerColumn)) {
  • }
}
@if (Model.ExportSessionId != null) {
@if (Model.ExportSessionResult.RecordCount == 0) {

No records matched the filter criteria

} else {

@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.

Download Device Flag Export }
}

Exporting device flags...

Export Device Flags