[ "Heading" => "Date", "DefaultToDescendingSort" => true, "DefaultSortField" => true, "ValueFunction" => function ($Item, $FieldId) { return StdLib::getPrettyTimestamp($Item["Date"]); } ], "Url" => [ "Heading" => "Url", "AllowHTML" => true, "Sortable" => false, "ValueFunction" => function ($Item, $FieldId) { return '' .StdLib::neatlyTruncateString($Item["Url"], 50).''; } ], "Resource" => [ "Heading" => "Resource", "AllowHTML" => true, "Sortable" => false, "ValueFunction" => function ($Item, $FieldId) { $RecordId = $Item["RecordId"]; $Resource = new Record($RecordId); return '' .htmlspecialchars($Resource->getMapped("Title")).''; }, ], "Error" => [ "Heading" => "Error", ], ]; $ErrorList = new ItemListUI($ErrorListFields); $ErrorList->setTransportControls($H_TransportUIs[TAB_ERRORS]); $ErrorList->setHeading("Fetch Errors"); $ErrorList->setItemsPerPage($H_ResultsPerPage); $ErrorList->setBaseLink($H_BaseLink."&AT=".TAB_ERRORS); $FetchLogFields = [ "FetchDate" => [ "Heading" => "Date", "DefaultToDescendingSort" => true, "DefaultSortField" => true, "ValueFunction" => function ($Item, $FieldId) { return StdLib::getPrettyTimestamp($Item["FetchDate"]); } ], "Url" => [ "Heading" => "File", "AllowHTML" => true, "Sortable" => false, "ValueFunction" => function ($Item, $FieldId) { $FileId = $Item["FileId"]; $File = new File($FileId); return '' .htmlspecialchars($File->name()).''; } ], "Resource" => [ "Heading" => "Resource", "AllowHTML" => true, "Sortable" => false, "ValueFunction" => function ($Item, $FieldId) { $FileId = $Item["FileId"]; $File = new File($FileId); $RecordId = $File->resourceId(); $Resource = new Record($RecordId); return '' .htmlspecialchars($Resource->getMapped("Title")).''; }, ], ]; $FetchLog = new ItemListUI($FetchLogFields); $FetchLog->setTransportControls($H_TransportUIs[TAB_FETCHES]); $FetchLog->setHeading("Successful Fetch Log"); $FetchLog->setItemsPerPage($H_ResultsPerPage); $FetchLog->setBaseLink($H_BaseLink."&AT=".TAB_FETCHES); $RPOptionList = new HtmlOptionList( "RP", [ 50 => 50, 100 => 100, 250 => 250, 500 => 500, 750 => 750 ], $H_ResultsPerPage ); $RPOptionList->submitOnChange(true); # pull out the currently active tab $TabParameter = "{active: ".$H_ActiveTab."}"; $AF = ApplicationFramework::getInstance(); # load the js and css necessary for a tabbed interface $AF->requireUIFile( 'jquery-ui.css', ApplicationFramework::ORDER_FIRST ); $AF->requireUIFile('jquery-ui.js'); # ----- DISPLAY -------------------------------------------------------------- ?>
Monitoring URLs Entries Per Page: getHtml(); ?>
display($H_ErrorList, $H_TotalErrors, $H_StartIndexes[TAB_ERRORS]); ?>
display($H_FetchList, $H_TotalFetches, $H_StartIndexes[TAB_FETCHES]); ?>