mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-05 16:30:24 +08:00
Revert changes at analysis.html and player.html
This commit is contained in:
parent
8186f06d96
commit
8121bb758d
@ -43,11 +43,15 @@ public class DataCacheHandler extends SessionCache {
|
||||
|
||||
// Cache
|
||||
private final HashMap<UUID, UserData> dataCache;
|
||||
|
||||
// Plan
|
||||
private final Plan plugin;
|
||||
private final Database db;
|
||||
|
||||
//Cache
|
||||
private Map<String, Integer> commandUse;
|
||||
private List<List<TPS>> unsavedTPSHistory;
|
||||
|
||||
// Queues
|
||||
private DataCacheSaveQueue saveTask;
|
||||
private DataCacheClearQueue clearTask;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,17 +17,14 @@
|
||||
background-color: #348e0f;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
padding: 5px 20px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Verdana, sans-serif;
|
||||
background-color: #ddd;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sidenav {
|
||||
height: 100%;
|
||||
width: 15%;
|
||||
@ -40,7 +37,6 @@
|
||||
padding-top: 88px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.sidenav p {
|
||||
width: 100%;
|
||||
padding: 8px 8px 8px 16px;
|
||||
@ -64,10 +60,10 @@
|
||||
}
|
||||
|
||||
.sidenav a.active {
|
||||
background-color: #5da341;
|
||||
background-color: #5da341
|
||||
}
|
||||
|
||||
.sidenav a:hover, .offcanvas a:focus {
|
||||
.sidenav a:hover, .offcanvas a:focus{
|
||||
background-color: #5da341;
|
||||
}
|
||||
|
||||
@ -107,31 +103,25 @@
|
||||
text-align: left;
|
||||
align-content: flex-start;
|
||||
}
|
||||
|
||||
.row {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.columns {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.column {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.box-area {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.infobox {
|
||||
margin-left: 3px;
|
||||
color: white;
|
||||
@ -140,28 +130,23 @@
|
||||
border-radius: 10px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.info-text {
|
||||
float: right;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.info-number {
|
||||
font-size: x-large;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
float: right;
|
||||
font-size: medium;
|
||||
}
|
||||
|
||||
.info-icon {
|
||||
font-size: xx-large;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.headerbox {
|
||||
color: #348e0f;
|
||||
display: inline-block;
|
||||
@ -171,35 +156,29 @@
|
||||
border-radius: 10px;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
font-size: xx-large;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
font-size: x-large;
|
||||
}
|
||||
|
||||
.header-label {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 8px 14px;
|
||||
background-color: #348e0f;
|
||||
border: none;
|
||||
color: white;
|
||||
outline: 0;
|
||||
text-decoration: none !important;
|
||||
text-decoration:none!important;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: #267F00;
|
||||
}
|
||||
|
||||
.table {
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
@ -208,164 +187,128 @@
|
||||
padding: 8px 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
line-height: 270%;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #348e0f;
|
||||
text-decoration: none !important;
|
||||
text-decoration:none!important;
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
color: #267F00;
|
||||
}
|
||||
|
||||
table.sortable thead {
|
||||
background-color: #348e0f;
|
||||
color: #fff;
|
||||
color:#fff;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
table.sortable tbody {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sorttable_nosort):after {
|
||||
content: " \25B4\25BE"
|
||||
}
|
||||
|
||||
.plugin-container {
|
||||
color: #000;
|
||||
height: 100%;
|
||||
max-height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.plugin-data {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.black {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.darkblue {
|
||||
color: #0000AA;
|
||||
}
|
||||
|
||||
.darkgreen {
|
||||
color: #00AA00;
|
||||
}
|
||||
|
||||
.darkaqua {
|
||||
color: #00AAAA;
|
||||
}
|
||||
|
||||
.darkred {
|
||||
color: #AA0000;
|
||||
}
|
||||
|
||||
.darkpurple {
|
||||
color: #AA00AA;
|
||||
}
|
||||
|
||||
.gold {
|
||||
color: #FFAA00;
|
||||
}
|
||||
|
||||
.gray {
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
.darkgray {
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: #5555FF;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #55FF55;
|
||||
}
|
||||
|
||||
.aqua {
|
||||
color: #55FFFF;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: #FF5555;
|
||||
}
|
||||
|
||||
.pink {
|
||||
color: #FF55FF;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: #FFFF55;
|
||||
}
|
||||
|
||||
.white {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
#navbutton {
|
||||
display: none;
|
||||
font-size: 40px;
|
||||
cursor: pointer;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 850px) {
|
||||
#navbutton {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.sidenav p {
|
||||
display: none;
|
||||
}
|
||||
|
||||
header {
|
||||
margin: 0px;
|
||||
padding 0px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
header img {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
header p {
|
||||
margin: 0px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.tab {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.columns {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.row {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sidenav {
|
||||
width: 0%;
|
||||
transition: 0s;
|
||||
}
|
||||
|
||||
.main-limiter {
|
||||
margin-left: 0%;
|
||||
width: 100%;
|
||||
@ -615,28 +558,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var serverTime = new Date( % currenttime %
|
||||
)
|
||||
;
|
||||
var serverTime = new Date(%currenttime%);
|
||||
var now = new Date();
|
||||
var timediff = serverTime.getTime() - now.getTime();
|
||||
|
||||
var timediff = serverTime.getTime()-now.getTime();
|
||||
function openNav() {
|
||||
document.getElementById("sidenav").style.width = "100%";
|
||||
document.getElementById("limiter").style.display = "none";
|
||||
document.getElementById("navbutton").onclick = function () {
|
||||
closeNav();
|
||||
};
|
||||
document.getElementById("navbutton").onclick = function () { closeNav(); };
|
||||
}
|
||||
|
||||
function closeNav() {
|
||||
document.getElementById("sidenav").style.width = "0%";
|
||||
document.getElementById("limiter").style.display = "block";
|
||||
document.getElementById("navbutton").onclick = function () {
|
||||
openNav();
|
||||
};
|
||||
document.getElementById("navbutton").onclick = function () { openNav(); };
|
||||
}
|
||||
|
||||
var navButtons = document.getElementsByClassName("nav-button");
|
||||
var tabs = document.getElementsByClassName("tab");
|
||||
var slideIndex = window.sessionStorage.getItem("InspectSlideIndex");
|
||||
@ -646,18 +580,18 @@
|
||||
var x = document.getElementById("main");
|
||||
|
||||
x.style.transform = "translate3d(0px,0px,0)";
|
||||
x.style.width = "" + navButtons.length * 100 + "%";
|
||||
x.style.width = ""+navButtons.length*100+"%";
|
||||
|
||||
for (i = 0; i < navButtons.length; i++) {
|
||||
for (i=0; i < navButtons.length; i++) {
|
||||
navButtons[i].onclick = openFunc(i)
|
||||
tabs[i].style.width = "" + 100 / navButtons.length + "%";
|
||||
tabs[i].style.width = ""+100/navButtons.length+"%";
|
||||
}
|
||||
x.style.opacity = "1";
|
||||
openFunc(slideIndex)();
|
||||
countUpTimer();
|
||||
|
||||
function openFunc(i) {
|
||||
return function () {
|
||||
return function() {
|
||||
if (window.getComputedStyle(document.getElementById("navbutton")).getPropertyValue('display') == "inline") {
|
||||
closeNav();
|
||||
}
|
||||
@ -673,26 +607,18 @@
|
||||
}
|
||||
var perc = -100 / navButtons.length;
|
||||
slideIndex = i;
|
||||
if (slideIndex > max) {
|
||||
slideIndex = 0
|
||||
}
|
||||
;
|
||||
if (slideIndex < 0) {
|
||||
slideIndex = max
|
||||
}
|
||||
;
|
||||
if (slideIndex>max) {slideIndex=0};
|
||||
if (slideIndex<0) {slideIndex=max};
|
||||
window.sessionStorage.setItem("InspectSlideIndex", slideIndex);
|
||||
var value = slideIndex * perc;
|
||||
var value = slideIndex*perc;
|
||||
x.style.transition = "0.5s";
|
||||
x.style.transform = "translate3d(" + value + "%,0px,0)";
|
||||
x.style.transform = "translate3d("+value+"%,0px,0)";
|
||||
};
|
||||
}
|
||||
|
||||
function countUpTimer() {
|
||||
var now = new Date();
|
||||
var begin = new Date( % refreshlong % -timediff
|
||||
)
|
||||
;
|
||||
var begin = new Date(%refreshlong%-timediff);
|
||||
var out = "";
|
||||
|
||||
var seconds = now.getTime() - begin.getTime();
|
||||
@ -739,10 +665,9 @@
|
||||
case -5:
|
||||
return '';
|
||||
default:
|
||||
return i + ':00';
|
||||
return i+':00';
|
||||
}
|
||||
}
|
||||
|
||||
function day(i) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
@ -764,21 +689,14 @@
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
// Script for All charts using Chart.js
|
||||
var ctxgmpie = document.getElementById("gmPie");
|
||||
var dataGmPie = {
|
||||
labels: % gmlabels %,
|
||||
datasets
|
||||
:
|
||||
[{
|
||||
data: % gmdata %,
|
||||
backgroundColor
|
||||
:
|
||||
[ % gmcolors %
|
||||
],
|
||||
hoverBackgroundColor: [ % gmcolors %
|
||||
]
|
||||
labels: %gmlabels% ,
|
||||
datasets: [{
|
||||
data: %gmdata% ,
|
||||
backgroundColor: [ %gmcolors% ],
|
||||
hoverBackgroundColor: [ %gmcolors% ]
|
||||
}]
|
||||
}
|
||||
var GMPie = new Chart(ctxgmpie, {
|
||||
@ -815,22 +733,19 @@
|
||||
pointRadius: 1,
|
||||
pointHitRadius: 10,
|
||||
spanGaps: false,
|
||||
data: % dataweek %,
|
||||
}
|
||||
]
|
||||
}
|
||||
;
|
||||
data: %dataweek% ,
|
||||
}]};
|
||||
var playersChartWeek = new Chart(ctxweek, {
|
||||
type: 'scatter',
|
||||
data: dataweek,
|
||||
options: {
|
||||
tooltips: {
|
||||
callbacks: {
|
||||
label: function (tooltipItems, data) {
|
||||
label: function(tooltipItems, data) {
|
||||
var newDate = new Date();
|
||||
newDate.setTime(tooltipItems.xLabel);
|
||||
dateString = newDate.toUTCString();
|
||||
return dateString + ': ' + tooltipItems.yLabel + ' Players';
|
||||
return dateString +': '+ tooltipItems.yLabel+ ' Players';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -838,7 +753,7 @@
|
||||
yAxes: [{
|
||||
display: true,
|
||||
ticks: {
|
||||
callback: function (value, index, values) {
|
||||
callback: function(value, index, values) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return '0';
|
||||
@ -846,44 +761,36 @@
|
||||
return '1';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
;
|
||||
};
|
||||
},
|
||||
suggestedMax: % graphmaxplayers %,
|
||||
suggestedMax: %graphmaxplayers%,
|
||||
suggestedMin: 0
|
||||
}
|
||||
}
|
||||
],
|
||||
}],
|
||||
xAxes: [{
|
||||
type: 'linear',
|
||||
display: false
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
;
|
||||
});
|
||||
var ctxpunch = document.getElementById("punchcard");
|
||||
var datapunch = {
|
||||
datasets: [
|
||||
{
|
||||
label: 'Player Join Punchcard',
|
||||
data: % datapunchcard %,
|
||||
backgroundColor
|
||||
:
|
||||
"#222",
|
||||
hoverBackgroundColor
|
||||
:
|
||||
"#333",
|
||||
data: %datapunchcard%,
|
||||
backgroundColor: "#222",
|
||||
hoverBackgroundColor: "#333",
|
||||
}]
|
||||
}
|
||||
;
|
||||
};
|
||||
var punchcardChart = new Chart(ctxpunch, {
|
||||
type: 'bubble',
|
||||
data: datapunch,
|
||||
options: {
|
||||
tooltips: {
|
||||
callbacks: {
|
||||
label: function (tooltipItems, data) {
|
||||
label: function(tooltipItems, data) {
|
||||
function day(i) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
@ -904,7 +811,6 @@
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function hour(i) {
|
||||
switch (i) {
|
||||
case 25:
|
||||
@ -915,18 +821,17 @@
|
||||
case -5:
|
||||
return '';
|
||||
default:
|
||||
return i + ':00';
|
||||
return i+':00';
|
||||
}
|
||||
}
|
||||
|
||||
return day(tooltipItems.yLabel) + ': ' + hour(tooltipItems.xLabel);
|
||||
return day(tooltipItems.yLabel)+': '+hour(tooltipItems.xLabel);
|
||||
}
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
ticks: {
|
||||
callback: function (value, index, values) {
|
||||
callback: function(value, index, values) {
|
||||
return hour(value);
|
||||
},
|
||||
suggestedMax: 25,
|
||||
@ -935,7 +840,7 @@
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
callback: function (value, index, values) {
|
||||
callback: function(value, index, values) {
|
||||
return day(value);
|
||||
},
|
||||
suggestedMax: 7,
|
||||
@ -947,83 +852,46 @@
|
||||
});
|
||||
var ctxDistribution = document.getElementById("sessiondistribution");
|
||||
var dataDistr = {
|
||||
labels: % labelssessiondistribution %,
|
||||
datasets
|
||||
:
|
||||
[
|
||||
labels: %labelssessiondistribution%,
|
||||
datasets: [
|
||||
{
|
||||
label: 'Session Length Distribution',
|
||||
data: % datasessiondistribution %,
|
||||
backgroundColor
|
||||
:
|
||||
"#89c471",
|
||||
fill
|
||||
:
|
||||
true,
|
||||
borderColor
|
||||
:
|
||||
"#348e0f",
|
||||
borderCapStyle
|
||||
:
|
||||
'butt',
|
||||
borderDash
|
||||
:
|
||||
[],
|
||||
borderDashOffset
|
||||
:
|
||||
0.0,
|
||||
borderJoinStyle
|
||||
:
|
||||
'miter',
|
||||
pointBorderColor
|
||||
:
|
||||
"#348e0f",
|
||||
pointBackgroundColor
|
||||
:
|
||||
"#fff",
|
||||
pointBorderWidth
|
||||
:
|
||||
1,
|
||||
pointHoverRadius
|
||||
:
|
||||
5,
|
||||
pointHoverBackgroundColor
|
||||
:
|
||||
"#348e0f",
|
||||
pointHoverBorderColor
|
||||
:
|
||||
"#348e0f",
|
||||
pointHoverBorderWidth
|
||||
:
|
||||
2,
|
||||
pointRadius
|
||||
:
|
||||
1,
|
||||
pointHitRadius
|
||||
:
|
||||
10,
|
||||
spanGaps
|
||||
:
|
||||
false,
|
||||
data: %datasessiondistribution%,
|
||||
backgroundColor: "#89c471",
|
||||
fill: true,
|
||||
borderColor: "#348e0f",
|
||||
borderCapStyle: 'butt',
|
||||
borderDash: [],
|
||||
borderDashOffset: 0.0,
|
||||
borderJoinStyle: 'miter',
|
||||
pointBorderColor: "#348e0f",
|
||||
pointBackgroundColor: "#fff",
|
||||
pointBorderWidth: 1,
|
||||
pointHoverRadius: 5,
|
||||
pointHoverBackgroundColor: "#348e0f",
|
||||
pointHoverBorderColor: "#348e0f",
|
||||
pointHoverBorderWidth: 2,
|
||||
pointRadius: 1,
|
||||
pointHitRadius: 10,
|
||||
spanGaps: false,
|
||||
}]
|
||||
}
|
||||
;
|
||||
};
|
||||
var sessionDistributions = new Chart(ctxDistribution, {
|
||||
type: 'bar',
|
||||
data: dataDistr,
|
||||
options: {
|
||||
tooltips: {
|
||||
callbacks: {
|
||||
label: function (tooltipItems, data) {
|
||||
return tooltipItems.xLabel + 'utes: ' + tooltipItems.yLabel + ' sessions';
|
||||
label: function(tooltipItems, data) {
|
||||
return tooltipItems.xLabel+'utes: '+tooltipItems.yLabel+' sessions';
|
||||
}
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
callback: function (value, index, values) {
|
||||
return value + '';
|
||||
callback: function(value, index, values) {
|
||||
return value+'';
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
Loading…
Reference in New Issue
Block a user