mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
move around half the dashboard controllers to a subdirectory
This commit is contained in:
parent
e108997376
commit
34c0d6019e
12 changed files with 64 additions and 69 deletions
33
src/controllers/dashboard/logs.js
Normal file
33
src/controllers/dashboard/logs.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
define(["datetime", "loading", "apphost", "listViewStyle", "emby-button", "flexStyles"], function(datetime, loading, appHost) {
|
||||
"use strict";
|
||||
return function(view, params) {
|
||||
view.addEventListener("viewbeforeshow", function() {
|
||||
loading.show();
|
||||
var apiClient = ApiClient;
|
||||
apiClient.getJSON(apiClient.getUrl("System/Logs")).then(function(logs) {
|
||||
var html = "";
|
||||
html += '<div class="paperList">';
|
||||
html += logs.map(function(log) {
|
||||
var logUrl = apiClient.getUrl("System/Logs/Log", {
|
||||
name: log.Name
|
||||
});
|
||||
logUrl += "&api_key=" + apiClient.accessToken();
|
||||
var logHtml = "";
|
||||
logHtml += '<a is="emby-linkbutton" href="' + logUrl + '" target="_blank" class="listItem listItem-border" style="color:inherit;">';
|
||||
logHtml += '<div class="listItemBody two-line">';
|
||||
logHtml += "<h3 class='listItemBodyText'>" + log.Name + "</h3>";
|
||||
var date = datetime.parseISO8601Date(log.DateModified, true);
|
||||
var text = datetime.toLocaleDateString(date);
|
||||
text += " " + datetime.getDisplayTime(date);
|
||||
logHtml += '<div class="listItemBodyText secondary">' + text + "</div>";
|
||||
logHtml += "</div>";
|
||||
logHtml += "</a>";
|
||||
return logHtml;
|
||||
}).join("");
|
||||
html += "</div>";
|
||||
view.querySelector(".serverLogs").innerHTML = html;
|
||||
loading.hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue