mirror of
https://gitlab.com/JKANetwork/CheckServer.git
synced 2026-02-18 19:21:35 +01:00
More info for checks activated
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
|
||||
<div class="wrapper recent-updated">
|
||||
<div id="new-updates" class="card-header d-flex justify-content-between align-items-center">
|
||||
<h2 class="h5 display"><a data-toggle="collapse" data-parent="#accordion" href="#upadtes-box" aria-expanded="true" aria-controls="upadtes-box">Ultimos fallos</a></h2>
|
||||
<h2 class="h5 display"><a data-toggle="collapse" data-parent="#accordion" href="#upadtes-box" aria-expanded="true" aria-controls="upadtes-box">{{T_.lastest_fails}}</a></h2>
|
||||
</div>
|
||||
<div id="upadtes-box" role="tabpanel" class="collapse show">
|
||||
<ul class="news list-unstyled">
|
||||
@@ -48,9 +48,9 @@
|
||||
<li class="d-flex justify-content-between">
|
||||
<div class="left-col d-flex">
|
||||
<div class="icon"><i class="icon-times"></i></div>
|
||||
<div class="title">{{fail.name}} - <strong>{{fail.groupName}}</strong>
|
||||
<div class="title"><a href="?page=viewhist&ID_C={{fail.ID_C}}">{{fail.name}} - <strong>{{fail.groupName}}</strong>
|
||||
<p>{{fail.typeCheck}}</p>
|
||||
</div>
|
||||
</a></div>
|
||||
</div>
|
||||
<div class="right-col text-right">
|
||||
<div class="update-date">{{fail.date}}<span class="month">{{fail.hour}}</span></div>
|
||||
|
||||
84
assets/html/panel/p_viewhist.twig
Executable file
84
assets/html/panel/p_viewhist.twig
Executable file
@@ -0,0 +1,84 @@
|
||||
{% include 'panel/p_header.twig' %}
|
||||
<script src="assets/js/Chart.min.js"></script>
|
||||
<!-- Checks -->
|
||||
<section>
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<h2 class="h5 display">Historial de los últimos {{pagedata.cant}} checks de {{pagedata.name}} - {{pagedata.group}}</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div style="width:75%;">
|
||||
<canvas id="canvas"></canvas>
|
||||
</div>
|
||||
<!-- Lastest fails -->
|
||||
<h2>{{T_.lastest_fails}}</h2>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Fecha</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for err in pagedata.fails %}
|
||||
<tr>
|
||||
<td>{{err}}</td>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- Script Chartjs -->
|
||||
<script>
|
||||
var barChartData = {
|
||||
//labels: ["Correctos", "Errores"],
|
||||
datasets: [{
|
||||
label: "Correctos",
|
||||
backgroundColor: "#2B86FF",
|
||||
borderColor: "#2B86FF",
|
||||
data: [ {{ pagedata.cgood }} ]
|
||||
},{
|
||||
label: "Errores",
|
||||
backgroundColor: "#ff2a2a",
|
||||
borderColor: "#ff2a2a",
|
||||
data: [ {{ pagedata.cbad }} ]
|
||||
}]
|
||||
};
|
||||
var config = {
|
||||
type: 'bar',
|
||||
data: barChartData,
|
||||
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: {
|
||||
position: 'top',
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Checks correctos y erroneos'
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.onload = function() {
|
||||
var ctx = document.getElementById("canvas").getContext("2d");
|
||||
window.myBar = new Chart(ctx, config);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% include 'footer.twig' %}
|
||||
@@ -38,4 +38,5 @@ $T_['VISIT_COUNT'] = 'Visit counter';
|
||||
$T_['DATABASE'] = 'Database check';
|
||||
$T_['add_grp_to_add_chk'] = 'Add a group for start adding checks';
|
||||
$T_['view_hist'] = 'View history';
|
||||
$T_['lastest_fails'] = 'Lastest fails';
|
||||
?>
|
||||
@@ -38,4 +38,5 @@ $T_['VISIT_COUNT'] = 'Contador de visitas';
|
||||
$T_['DATABASE'] = 'Conexión a base de datos';
|
||||
$T_['add_grp_to_add_chk'] = 'Añade un grupo para empezar a añadir checks';
|
||||
$T_['view_hist'] = 'Ver histórico';
|
||||
$T_['lastest_fails'] = 'Ultimos errores';
|
||||
?>
|
||||
Reference in New Issue
Block a user