diff --git a/DnsServerCore/www/js/main.js b/DnsServerCore/www/js/main.js index 0a9bca7e..e8e67aec 100644 --- a/DnsServerCore/www/js/main.js +++ b/DnsServerCore/www/js/main.js @@ -782,8 +782,6 @@ function loadDnsSettings() { for (var i = 0; i < responseJSON.response.tsigKeys.length; i++) { addTsigKeyRow(responseJSON.response.tsigKeys[i].keyName, responseJSON.response.tsigKeys[i].sharedSecret, responseJSON.response.tsigKeys[i].algorithmName); } - - updateTsigKeyNamesDropdowns(responseJSON.response.tsigKeys); } $("#txtDefaultRecordTtl").val(responseJSON.response.defaultRecordTtl); @@ -1402,8 +1400,6 @@ function saveDnsSettings() { for (var i = 0; i < responseJSON.response.tsigKeys.length; i++) { addTsigKeyRow(responseJSON.response.tsigKeys[i].keyName, responseJSON.response.tsigKeys[i].sharedSecret, responseJSON.response.tsigKeys[i].algorithmName); } - - updateTsigKeyNamesDropdowns(responseJSON.response.tsigKeys); } //fix custom block list url in case port changes @@ -1483,17 +1479,6 @@ function addTsigKeyRow(keyName, sharedSecret, algorithmName) { $("#tableTsigKeys").append(tableHtmlRows); } -function updateTsigKeyNamesDropdowns(tsigKeys) { - var optionsHtml = ""; - - for (var i = 0; i < tsigKeys.length; i++) { - optionsHtml += ""; - } - - $("#optAddZoneTsigKeyName").html(optionsHtml); - $("#optEditRecordDataSoaTsigKeyName").html(optionsHtml); -} - function checkForReverseProxy(responseJSON) { if (window.location.protocol == "https:") { var currentPort = window.location.port; @@ -1721,7 +1706,7 @@ function refreshDashboard(hideLoader) { } HTTPRequest({ - url: "/api/dashboard/stats/get?token=" + sessionData.token + "&type=" + type + custom, + url: "/api/dashboard/stats/get?token=" + sessionData.token + "&type=" + type +"&utc=true" + custom, success: function (responseJSON) { //stats @@ -1768,6 +1753,12 @@ function refreshDashboard(hideLoader) { } //main chart + + //fix labels + for (var i = 0; i < responseJSON.response.mainChartData.labels.length; i++) { + responseJSON.response.mainChartData.labels[i] = moment(responseJSON.response.mainChartData.labels[i]).local().format(responseJSON.response.mainChartData.labelFormat); + } + if (window.chartDashboardMain == null) { var contextDashboardMain = document.getElementById("canvasDashboardMain").getContext('2d'); @@ -1864,13 +1855,16 @@ function refreshDashboard(hideLoader) { var topDomains = responseJSON.response.topDomains; if (topDomains.length < 1) { - tableHtmlRows = "