// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Tools.CrashReporter.CrashReportWebSite.Models
{
///
/// The view model for the crashes index page.
///
public class CrashesViewModel
{
/// Dates are in milliseconds relative to this base (for ease of Javascript usage)
public static readonly DateTime Epoch = new DateTime(1970, 1, 1);
/// A container for all the crashes that pass the current filters.
public IEnumerable Results { get; set; }
/// Information to properly paginate a large number of crashes.
public PagingInfo PagingInfo { get; set; }
/// Whether to sort ascending or descending.
public string Order { get; set; }
/// The term to sort by.
public string Term { get; set; }
/// The user group to filter by.
public string UserGroup { get; set; }
/// The type of report to filter by. e.g. Asserts.
public string CrashType { get; set; }
/// The query for advanced crash filtering.
public string Query { get; set; }
/// The date of the earliest crash to display.
public long DateFrom { get; set; }
/// The date of the most recent crash to display.
public long DateTo { get; set; }
/// The name of the branch to filter by.
public string BranchName { get; set; }
/// The name of the game to filter by.
public string GameName { get; set; }
/// A dictionary of group names vs. crash counts.
public Dictionary GroupCounts { get; set; }
/// The user supplied parameters.
public FormCollection FormCollection { get; set; }
/// The set of statuses a crash could have its status set to.
public IEnumerable SetStatus { get { return new List( new string[] { "Unset", "Reviewed", "New", "Coder", "EngineQA", "GameQA" } ); } }
}
}