define(['datetime', 'listViewStyle'], function (datetime) { return function (view, params) { view.querySelector('#chkDebugLog').addEventListener('change', function () { ApiClient.getServerConfiguration().then(function (config) { config.EnableDebugLevelLogging = view.querySelector('#chkDebugLog').checked; ApiClient.updateServerConfiguration(config); }); }); view.addEventListener('viewbeforeshow', function () { Dashboard.showLoadingMsg(); 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 += 'schedule'; logHtml += ""; logHtml += ''; logHtml += '
'; return logHtml; }) .join(''); html += '
'; view.querySelector('.serverLogs').innerHTML = html; Dashboard.hideLoadingMsg(); }); apiClient.getServerConfiguration().then(function (config) { view.querySelector('#chkDebugLog').checked = config.EnableDebugLevelLogging; }); }); }; });