/// <returns> /// The end of the JS map that is the jquery datatable config for the /// attempts table. /// </returns> private string AttemptsTableInit() { TaskType type = null; string symbol = $(AMParams.TaskType); if (!symbol.IsEmpty()) { type = MRApps.TaskType(symbol); } else { TaskId taskID = MRApps.ToTaskID($(AMParams.TaskId)); type = taskID.GetTaskType(); } StringBuilder b = JQueryUI.TableInit().Append(", 'aaData': attemptsTableData").Append (", bDeferRender: true").Append(", bProcessing: true").Append("\n,aoColumnDefs:[\n" ).Append("\n{'aTargets': [ 4 ]").Append(", 'bSearchable': false }").Append("\n, {'sType':'numeric', 'aTargets': [ 0 ]" ).Append(", 'mRender': parseHadoopAttemptID }").Append("\n, {'sType':'numeric', 'aTargets': [ 5, 6" ).Append(type == TaskType.Reduce ? ", 7, 8" : string.Empty).Append(" ], 'mRender': renderHadoopDate }" ).Append("\n, {'sType':'numeric', 'aTargets': [").Append(type == TaskType.Reduce ? "9, 10, 11, 12" : "7").Append(" ], 'mRender': renderHadoopElapsedTime }]").Append ("\n, aaSorting: [[0, 'asc']]").Append("}"); //logs column should not filterable (it includes container ID which may pollute searches) //Column numbers are different for maps and reduces // Sort by id upon page load return(b.ToString()); }
//TODO We need a way to move all of the javascript/CSS that is for a subview // into that subview. /// <returns> /// The end of a javascript map that is the jquery datatable /// configuration for the jobs table. the Jobs table is assumed to be /// rendered by the class returned from /// <see cref="Content()"/> /// /// </returns> private string JobsTableInit() { return(JQueryUI.TableInit().Append(", 'aaData': jobsTableData").Append(", bDeferRender: true" ).Append(", bProcessing: true").Append(", aaSorting: [[3, 'desc']]").Append(", aoColumnDefs:[" ).Append("{'sType':'numeric', 'bSearchable': false" + ", 'aTargets': [ 8, 9, 10, 11 ] }" ).Append("]}").ToString()); }
public static string AppsTableInit(bool isFairSchedulerPage) { // id, user, name, queue, starttime, finishtime, state, status, progress, ui // FairSchedulerPage's table is a bit different return(JQueryUI.TableInit().Append(", 'aaData': appsTableData").Append(", bDeferRender: true" ).Append(", bProcessing: true").Append("\n, aoColumnDefs: ").Append(GetAppsTableColumnDefs (isFairSchedulerPage)).Append(", aaSorting: [[0, 'desc']]}").ToString()); }
private string AttemptsTableInit() { return(JQueryUI.TableInit().Append(", 'aaData': attemptsTableData").Append(", bDeferRender: true" ).Append(", bProcessing: true").Append("\n,aoColumnDefs:[\n").Append("\n{'aTargets': [ 5 ]" ).Append(", 'bSearchable': false }").Append("\n, {'sType':'numeric', 'aTargets': [ 6, 7" ).Append(" ], 'mRender': renderHadoopDate }").Append("\n, {'sType':'numeric', 'aTargets': [ 8" ).Append(" ], 'mRender': renderHadoopElapsedTime }]").Append("\n, aaSorting: [[0, 'asc']]" ).Append("}").ToString()); }
private string TasksTableInit() { return(JQueryUI.TableInit().Append(", 'aaData': tasksTableData").Append(", bDeferRender: true" ).Append(", bProcessing: true").Append("\n, aoColumnDefs: [\n").Append("{'sType':'string', 'aTargets': [0]" ).Append(", 'mRender': parseHadoopID }").Append("\n, {'sType':'numeric', bSearchable:false, 'aTargets': [1]" ).Append(", 'mRender': parseHadoopProgress }").Append("\n, {'sType':'numeric', 'aTargets': [4, 5]" ).Append(", 'mRender': renderHadoopDate }").Append("\n, {'sType':'numeric', 'aTargets': [6]" ).Append(", 'mRender': renderHadoopElapsedTime }]").Append(", aaSorting: [[0, 'asc']] }" ).ToString()); }
private string NodesTableInit() { StringBuilder b = JQueryUI.TableInit().Append(", aoColumnDefs: ["); b.Append("{'bSearchable': false, 'aTargets': [ 7 ]}"); b.Append(", {'sType': 'title-numeric', 'bSearchable': false, " + "'aTargets': [ 8, 9 ] }" ); b.Append(", {'sType': 'title-numeric', 'aTargets': [ 5 ]}"); b.Append("]}"); return(b.ToString()); }
protected internal override void Render(Hamlet.HTML <HtmlPage._> html) { Set(JQueryUI.DatatablesId, "t1 t2 t3 t4"); Set(JQueryUI.InitID(JQueryUI.Datatables, "t1"), JQueryUI.TableInit().Append("}"). ToString()); Set(JQueryUI.InitID(JQueryUI.Datatables, "t2"), StringHelper.Join("{bJQueryUI:true, sDom:'t'," , "aoColumns:[null, {bSortable:false, bSearchable:false}]}")); Set(JQueryUI.InitID(JQueryUI.Datatables, "t3"), "{bJQueryUI:true, sDom:'t'}"); Set(JQueryUI.InitID(JQueryUI.Datatables, "t4"), "{bJQueryUI:true, sDom:'t'}"); html.Title("Test DataTables").Link("/static/yarn.css").(typeof(JQueryUI)).Style(".wrapper { padding: 1em }" , ".wrapper h2 { margin: 0.5em 0 }", ".dataTables_wrapper { min-height: 1em }"). Div(".wrapper").H2("Default table init").Table("#t1").Thead().Tr().Th("Column1") .Th("Column2").().().Tbody().Tr().Td("c1r1").Td("c2r1").().Tr().Td("c1r2").Td("c2r2" ).().().().H2("Nested tables").Div(JQueryUI.InfoWrap).Table("#t2").Thead().Tr(). Th(JQueryUI.Th, "Column1").Th(JQueryUI.Th, "Column2").().().Tbody().Tr().Td("r1" ).Td().$class(JQueryUI.CTable).Table("#t3").Thead().Tr().Th("SubColumn1").Th("SubColumn2" ).().().Tbody().Tr().Td("subc1r1").Td("subc2r1").().Tr().Td("subc1r2").Td("subc2r2" ).().().().().().Tr().Td("r2").Td().$class(JQueryUI.CTable).Table("#t4").Thead() .Tr().Th("SubColumn1").Th("SubColumn2").().().Tbody().Tr().Td("subc1r1").Td("subc2r1" ).().Tr().Td("subc1r2").Td("subc2r2").().().().().().().().().().(); }
/// <returns> /// the end of the JS map that is the jquery datatable configuration /// for the tasks table. /// </returns> private string TasksTableInit() { TaskType type = null; string symbol = $(AMParams.TaskType); if (!symbol.IsEmpty()) { type = MRApps.TaskType(symbol); } StringBuilder b = JQueryUI.TableInit().Append(", 'aaData': tasksTableData").Append (", bDeferRender: true").Append(", bProcessing: true").Append("\n, aoColumnDefs: [\n" ).Append("{'sType':'string', 'aTargets': [ 0 ]").Append(", 'mRender': parseHadoopID }" ).Append(", {'sType':'numeric', 'aTargets': [ 4").Append(type == TaskType.Reduce ? ", 9, 10, 11, 12" : ", 7").Append(" ], 'mRender': renderHadoopElapsedTime }") .Append("\n, {'sType':'numeric', 'aTargets': [ 2, 3, 5").Append(type == TaskType .Reduce ? ", 6, 7, 8" : ", 6").Append(" ], 'mRender': renderHadoopDate }]").Append ("\n, aaSorting: [[0, 'asc']]").Append("}"); // Sort by id upon page load return(b.ToString()); }
private string JobsTableInit() { return(JQueryUI.TableInit().Append(", aaSorting: [[0, 'asc']]").Append(",aoColumns:[{sType:'title-numeric'}," ).Append("null,null,{sType:'title-numeric', bSearchable:false},null,").Append("null,{sType:'title-numeric',bSearchable:false}, null, null]}" ).ToString()); }
/// <returns> /// The end of a javascript map that is the jquery datatable /// configuration for the jobs table. the Jobs table is assumed to be /// rendered by the class returned from /// <see cref="Content()"/> /// /// </returns> private string CounterTableInit() { return(JQueryUI.TableInit().Append(",aoColumnDefs:[").Append("{'sType':'title-numeric', 'aTargets': [ 1 ] }" ).Append("]}").ToString()); }
private string ContainersTableInit() { return(JQueryUI.TableInit().Append(",aoColumns:[null]}").ToString()); }
private string AppsTableInit() { return(JQueryUI.TableInit().Append(", aaSorting: [[0, 'asc']]").Append(", aoColumns:[null, null]} " ).ToString()); }
/// <returns> /// the end of the JS map that is the jquery datatable config for the /// conf table. /// </returns> private string ConfTableInit() { return(JQueryUI.TableInit().Append("}").ToString()); }
private string ContainersTableInit() { return(JQueryUI.TableInit().Append(", aoColumns:[null, null, {bSearchable:false}]} " ).ToString()); }
public static string ContainersTableInit() { return(JQueryUI.TableInit().Append(", 'aaData': containersTableData").Append(", bDeferRender: true" ).Append(", bProcessing: true").Append("\n, aoColumnDefs: ").Append(GetContainersTableColumnDefs ()).Append(", aaSorting: [[0, 'desc']]}").ToString()); }