예제 #1
0
        /// <summary>
        /// Create the html required to make a link for a callstack line for a crash.
        /// </summary>
        /// <param name="Helper">The Url helper object.</param>
        /// <param name="CallStack">A line of a callstack to wrap in a link.</param>
        /// <param name="Model">The view model for the current page.</param>
        /// <returns>A string suitable for MVC to render.</returns>
        public static MvcHtmlString CallStackSearchLink( this UrlHelper Helper, string CallStack, CrashesViewModel Model )
        {
            StringBuilder Result = new StringBuilder();
            TagBuilder Tag = new TagBuilder( "a" );

            string URL = Helper.Action( "Index", new {
                                                        controller = "Crashes",
                                                        SortTerm = Model.SortTerm,
                                                        SortOrder = Model.SortOrder,
                                                        CrashType = Model.CrashType,
                                                        UserGroup = Model.UserGroup,
                                                        SearchQuery = CallStack,
                                                        UsernameQuery = Model.UsernameQuery,
                                                        EpicIdQuery = Model.EpicIdQuery,
                                                        MachineIdQuery = Model.MachineIdQuery,
                                                        DescriptionQuery = Model.DescriptionQuery,
                                                        MessageQuery = Model.MessageQuery,
                                                        JiraQuery = Model.JiraQuery,
                                                        DateFrom = Model.DateFrom,
                                                        DateTo = Model.DateTo,
                                                        BranchName = Model.BranchName,
                                                        GameName = Model.GameName
                                                    } );

            Tag.MergeAttribute( "href", URL );
            Tag.InnerHtml = CallStack;
            Result.AppendLine( Tag.ToString() );

            return MvcHtmlString.Create( Result.ToString() );
        }
예제 #2
0
 /// <summary>
 /// The main view of the home page.
 /// </summary>
 public ActionResult Index()
 {
     using (FAutoScopedLogTimer LogTimer = new FAutoScopedLogTimer( this.GetType().ToString(), bCreateNewLog: true ))
     {
         CrashesViewModel Result = new CrashesViewModel();
         Result.GenerationTime = LogTimer.GetElapsedSeconds().ToString( "F2" );
         return View( "Index", Result );
     }
 }
예제 #3
0
		/// <summary>
		/// Create the html required to create the links for table headers to control the sorting of crashes.
		/// </summary>
		/// <param name="Helper">The Url helper object.</param>
		/// <param name="HeaderName">The table column header name.</param>
		/// <param name="SortTerm">The sort term to use when sorting by the column.</param>
		/// <param name="Model">The view model for the current page.</param>
		/// <returns>A string suitable for MVC to render.</returns>
		public static MvcHtmlString TableHeader( this UrlHelper Helper, string HeaderName, string SortTerm, CrashesViewModel Model )
		{
			StringBuilder Result = new StringBuilder();
			TagBuilder Tag = new TagBuilder( "a" );

			string URL = Helper.Action( "Index", new { 
														controller = "Crashes",
														Page = Model.PagingInfo.CurrentPage,
														SortTerm = SortTerm,
														PreviousOrder = Model.SortOrder,
														PreviousTerm = Model.SortTerm,
														CrashType = Model.CrashType,
														UserGroup = Model.UserGroup,
														SearchQuery = Model.SearchQuery,
														UsernameQuery = Model.UsernameQuery,
														EpicIdOrMachineQuery = Model.EpicIdOrMachineQuery,
														MessageQuery = Model.MessageQuery,
														BuggId = Model.BuggId,
														BuiltFromCL = Model.BuiltFromCL,
														JiraQuery = Model.JiraQuery,
														DateFrom = Model.DateFrom,
														DateTo = Model.DateTo,
														BranchName = Model.BranchName,
														VersionName = Model.VersionName,
														GameName = Model.GameName
													} );

			Tag.MergeAttribute( "href", URL );
			string SortArrow = "";
			if( Model.SortTerm == SortTerm )
			{
				if( Model.SortOrder == "Descending" )
				{
					SortArrow = "<img border=0 src='../../Content/Images/SortDescending.png' />";
				}
				else
				{
					SortArrow = "<img border=0 src='../../Content/Images/SortAscending.png' />";
				}
			}
			else
			{
				SortArrow = "<img border=0 src='../../Content/Images/SortPlaceHolder.png' />";
			}

			Tag.InnerHtml = "<span>" + HeaderName + "&nbsp;" + SortArrow + "</span>";
			Result.AppendLine( Tag.ToString() );

			return MvcHtmlString.Create( Result.ToString() );
		}
        /// <summary>
        /// Create the html required to change the current user group to filter crashes by.
        /// </summary>
        /// <param name="Helper">The Url helper object.</param>
        /// <param name="UserGroup">The user group to generate a link for.</param>
        /// <param name="Model">The view model for the current page.</param>
        /// <returns>A string suitable for MVC to render.</returns>
        public static MvcHtmlString UserGroupLink( this UrlHelper Helper, string UserGroup, CrashesViewModel Model )
        {
            StringBuilder Result = new StringBuilder();
            TagBuilder Tag = new TagBuilder( "a" );

            string URL = Helper.Action( "Index", new {
                                                        controller = "Crashes",
                                                        SortTerm = Model.Term,
                                                        SortOrder = Model.Order,
                                                        CrashType = Model.CrashType,
                                                        UserGroup = UserGroup,
                                                        SearchQuery = Model.Query,
                                                        DateFrom = Model.DateFrom,
                                                        DateTo = Model.DateTo,
                                                        BranchName = Model.BranchName,
                                                        GameName = Model.GameName
                                                    } );

            Tag.MergeAttribute( "href", URL );
            Tag.InnerHtml = UserGroup;
            Result.AppendLine( Tag.ToString() );

            return MvcHtmlString.Create( Result.ToString() );
        }
예제 #5
0
파일: HomeController.cs 프로젝트: mymei/UE4
        public ActionResult Index()
        {
            CrashesViewModel Result = new CrashesViewModel();

            return View("Index", Result);
        }