// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. using System; using System.Collections.Generic; using System.Web.Mvc; using Tools.CrashReporter.CrashReportWebSite.DataModels; namespace Tools.CrashReporter.CrashReportWebSite.ViewModels { public class CrashDataModel { public int Id { get; set; } public int CrashType { get; set; } public string ChangelistVersion { get; set; } public string BuildVersion { get; set; } public string UserName { get; set; } public string GameName { get; set; } public string Summary { get; set; } public string SourceContext { get; set; } public string EngineMode { get; set; } public string PlatformName { get; set; } public DateTime TimeOfCrash { get; set; } public string Description { get; set; } public string RawCallStack { get; set; } public string ComputerName { get; set; } public string Branch { get; set; } /// /// Return a display friendly version of the time of Crash. /// /// A pair of strings representing the date and time of the Crash. public string[] GetTimeOfCrash() { string[] Results = new string[2]; DateTime LocalTimeOfCrash = TimeOfCrash.ToLocalTime(); Results[0] = LocalTimeOfCrash.ToShortDateString(); Results[1] = LocalTimeOfCrash.ToShortTimeString(); return Results; } } /// /// The view model for the bugg show page. /// public class BuggViewModel { /// The current Bugg to display details of. public Bugg Bugg { get; set; } /// A container for all the Crashes associated with this Bugg. public List CrashData { get; set; } /// A container for all the Crashes associated with this Bugg. public List Crashes { get; set; } /// The call stack common to all Crashes in this Bugg. public CallStackContainer CallStack { get; set; } /// public string SourceContext { get; set; } /// Time spent in generating this site, formatted as a string. public string GenerationTime { get; set; } /// Description of most recent Crash public string LatestCrashSummary { get; set; } /// Select list of jira projects public List JiraProjects; /// Jira Project to which to add a new bugg. public string JiraProject { get; set; } /// public string Page { get; set; } public PagingInfo PagingInfo { get; set; } /// /// Constructor for BuggViewModel class. /// public BuggViewModel() { JiraProjects = new List() { new SelectListItem(){ Text = "UE", Value = "UE"}, new SelectListItem(){ Text = "FORT", Value = "FORT"}, new SelectListItem(){ Text = "ORION", Value = "OR"}, }; } } }