(function () { $(document).on('pagebeforeshow', "#logPage", function () { var page = this; Dashboard.showLoadingMsg(); require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () { var apiClient = ApiClient; apiClient.getJSON(apiClient.getUrl('System/Logs')).then(function (logs) { var html = ''; html += '
'; html += logs.map(function (log) { var logUrl = apiClient.getUrl('System/Logs/Log', { name: log.Name }); logUrl += "&api_key=" + apiClient.accessToken(); var logHtml = ''; logHtml += ''; logHtml += ''; logHtml += ''; logHtml += ""; logHtml += ''; logHtml += ''; logHtml += "
" + log.Name + "
"; var date = parseISO8601Date(log.DateModified, { toLocal: true }); var text = date.toLocaleDateString(); text += ' ' + LibraryBrowser.getDisplayTime(date); logHtml += '
' + text + '
'; logHtml += "
"; logHtml += '
'; logHtml += '
'; return logHtml; }) .join(''); html += '
'; $('.serverLogs', page).html(html); Dashboard.hideLoadingMsg(); }); }); }); })();