// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
namespace Tools.CrashReporter.CrashReportWebSite.Models
{
///
/// The view model for the Bugg index page.
///
/// // @TODO yrx 2014-08-14 Add base class
public class BuggsViewModel
{
/// Tooltip for "Crash Groups" tab
public const string Tooltip = "Collections of crashes that have the exact same callstack.";
/// A container of sorted Buggs.
public IEnumerable Results { get; set; }
/// Information to paginate the list of Buggs.
public PagingInfo PagingInfo { get; set; }
/// The criterion to sort by e.g. Game.
public string SortTerm { get; set; }
/// Either ascending or descending.
public string SortOrder { get; set; }
/// The current user group name.
public string UserGroup { get; set; }
/// The type of report to filter by. e.g. Asserts.
public string CrashType { get; set; }
/// The query that filtered the results.
public string SearchQuery { get; set; }
/// The date of the earliest crash in a Bugg.
public long DateFrom { get; set; }
/// The date of the most recent crash in a Bugg.
public long DateTo { get; set; }
/// The version to filter by.
public string VersionName { get; set; }
/// A dictionary of the number of Buggs per user group.
public SortedDictionary GroupCounts { get; set; }
/// The set of statuses a Bugg could have its status set to.
public IEnumerable SetStatus
{
get
{
return new List
(
new string[]
{
"Unset",
"Reviewed",
"New",
"Coder",
"Tester"
}
);
}
}
/// User input from the client.
public FormCollection FormCollection { get; set; }
/// A collection of Version names used in the drop down on the main search form
public List VersionNames { get; set; }
/// Time spent in generating this site, formatted as a string.
public string GenerationTime { get; set; }
///
/// Default constructor
///
public BuggsViewModel()
{
VersionNames = CrashRepository.GetVersions();
}
}
}