Completo review pagine x gestioen report su pag diverse
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
var labelsTS = dataTS.map(function (item) {
|
||||
return item['x'];
|
||||
});
|
||||
//console.log('labels data', labels);
|
||||
//console.log('labels data', labelsTS);
|
||||
|
||||
var myOptions = {
|
||||
responsive: true,
|
||||
@@ -42,15 +42,17 @@
|
||||
};
|
||||
|
||||
// recupero obj chart
|
||||
//console.log('ctx ID: ', document.getElementById('myChartTS'));
|
||||
var ctx = document.getElementById('myChartTS').getContext('2d');
|
||||
|
||||
var sLeg = document.getElementById('<%=hfLegend.ClientID %>').value;
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labelsTS,
|
||||
|
||||
datasets: [{
|
||||
label: '<%=hfLegend.Value %>',
|
||||
label: sLeg,
|
||||
borderColor: 'rgb(7, 173, 236)',
|
||||
lineTension: 0,
|
||||
//steppedLine: false,
|
||||
@@ -66,22 +68,31 @@
|
||||
}
|
||||
// effettuo plotting grafico TimeSerie!
|
||||
function plotTS() {
|
||||
//console.log("api/BatchStats/<%=hfShowLast.Value %>?PlotType=<%=hfPlotType.Value%>");
|
||||
// caricamento pagina
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "../api/BatchStats/<%=hfShowLast.Value %>?PlotType=<%=hfPlotType.Value%>",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: OnSuccess_,
|
||||
error: OnErrorCall_
|
||||
});
|
||||
var hfSL = document.getElementById('<%=hfShowLast.ClientID %>');
|
||||
if (hfSL != null) {
|
||||
var lastNum = document.getElementById('<%=hfShowLast.ClientID %>').value ?? "";
|
||||
var plotType = document.getElementById('<%=hfPlotType.ClientID %>').value ?? "";
|
||||
//console.log("../api/BatchStats/"+lastNum+"?PlotType="+plotType);
|
||||
// caricamento pagina
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "../api/BatchStats/" + lastNum + "?PlotType=" + plotType,
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: OnSuccess_,
|
||||
error: OnErrorCall_
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// funzione di drawing ad OGNI pageload!
|
||||
function pageLoad() {
|
||||
// chiamo recupero dati + plot della TS
|
||||
plotTS();
|
||||
//console.log('pageLoad!');
|
||||
try {
|
||||
console.log('pageLoad BatchStats! | ID: <%= this.ID %> ');
|
||||
plotTS();
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -53,10 +53,7 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 px-2">
|
||||
<h4>Batch Stats Plot</h4>
|
||||
<h4>Daily Stats Plot</h4>
|
||||
</div>
|
||||
<div class="col-12 px-2">
|
||||
<div id="divLoading" class="alert alert-primary text-center">
|
||||
<%--<i class="fa fa-5x fa-circle-o-notch fa-spin" aria-hidden="true"></i>--%>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped progress-bar-animated" style="width: 40%"></div>
|
||||
</div>
|
||||
@@ -23,6 +22,7 @@
|
||||
<canvas id="myChartTS" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// funzione eseguita se successo al caricamento
|
||||
function OnSuccess_(reponse) {
|
||||
@@ -65,7 +65,11 @@
|
||||
};
|
||||
|
||||
// recupero obj chart
|
||||
//console.log('ctx ID: ', document.getElementById('myChartTS'));
|
||||
var ctx = document.getElementById('myChartTS').getContext('2d');
|
||||
//var ctx = document.getElementById('myChartTS').getContext('2d');
|
||||
|
||||
var sLeg = document.getElementById('<%=hfLegend.ClientID %>').value;
|
||||
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
@@ -74,21 +78,21 @@
|
||||
|
||||
datasets: [
|
||||
{
|
||||
label: 'NE01: <%=hfLegend.Value %>',
|
||||
label: 'NE01: ' + sLeg,
|
||||
borderColor: 'rgb(7, 173, 236)',
|
||||
lineTension: 0,
|
||||
//steppedLine: false,
|
||||
data: dataNE01
|
||||
},
|
||||
{
|
||||
label: 'NE02: <%=hfLegend.Value %>',
|
||||
label: 'NE02: ' + sLeg,
|
||||
borderColor: 'rgb(7, 173, 26)',
|
||||
lineTension: 0,
|
||||
//steppedLine: false,
|
||||
data: dataNE02
|
||||
},
|
||||
{
|
||||
label: 'NE03: <%=hfLegend.Value %>',
|
||||
label: 'NE03: ' + sLeg,
|
||||
borderColor: 'rgb(7, 203, 126)',
|
||||
lineTension: 0,
|
||||
//steppedLine: false,
|
||||
@@ -99,10 +103,15 @@
|
||||
options: myOptions
|
||||
});
|
||||
|
||||
// nascondo panel loading
|
||||
var currDiv = document.getElementById("divLoading");
|
||||
currDiv.style.display = "none";
|
||||
console.log("style: " + currDiv.style.display);
|
||||
try {
|
||||
// nascondo panel loading
|
||||
var currDiv = document.getElementById('divLoading');
|
||||
currDiv.style.display = "none";
|
||||
console.log("style: " + currDiv.style.display);
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
// errore in reload!
|
||||
function OnErrorCall_(repo) {
|
||||
@@ -110,11 +119,20 @@
|
||||
}
|
||||
// effettuo plotting grafico TimeSerie!
|
||||
function plotTS() {
|
||||
console.log("api/DayStats/<%=hfPlaceCod.Value %>?StartDate=<%=hfDateStart.Value %>&EndDate=<%=hfDateEnd.Value %>&PlotType=<%=hfPlotType.Value%>");
|
||||
//console.log("Start plotTS");
|
||||
var placeCod = document.getElementById('<%=hfPlaceCod.ClientID %>').value;
|
||||
//console.log("placeCod: " + placeCod);
|
||||
var dtStart = document.getElementById('<%=hfDateStart.ClientID %>').value;
|
||||
//console.log("dtStart: " + dtStart);
|
||||
var dtEnd = document.getElementById('<%=hfDateEnd.ClientID %>').value;
|
||||
//console.log("dtEnd: " + dtEnd);
|
||||
var plotType = document.getElementById('<%=hfPlotType.ClientID %>').value;
|
||||
//console.log("plotType: " + plotType);
|
||||
//console.log("../api/DayStats/" + placeCod + "?StartDate=" + dtStart + "&EndDate=" + dtEnd + "&PlotType=" + plotType);
|
||||
// caricamento pagina
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "../api/DayStats/<%=hfPlaceCod.Value %>?StartDate=<%=hfDateStart.Value %>&EndDate=<%=hfDateEnd.Value %>&PlotType=<%=hfPlotType.Value%>",
|
||||
url: "../api/DayStats/" + placeCod + "?StartDate=" + dtStart + "&EndDate=" + dtEnd + "&PlotType=" + plotType,
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: OnSuccess_,
|
||||
@@ -124,11 +142,22 @@
|
||||
|
||||
// funzione di drawing ad OGNI pageload!
|
||||
function pageLoad() {
|
||||
// mostro panel loading
|
||||
var currDiv = document.getElementById("divLoading");
|
||||
currDiv.style.display = "block";
|
||||
// chiamo recupero dati + plot della TS
|
||||
plotTS();
|
||||
//console.log('pageLoad!');
|
||||
//console.log('pageLoad DailyStats! | ID: <%= this.ID %> ');
|
||||
try {
|
||||
try {
|
||||
// mostro panel loading
|
||||
var currDiv = document.getElementById('divLoading');
|
||||
currDiv.style.display = "block";
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
// chiamo recupero dati + plot della TS
|
||||
plotTS();
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,21 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_DailyStatsPlot : System.Web.UI.UserControl
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected string dateFormat = "yyyy-MM-dd";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public DateTime DateEnd
|
||||
@@ -84,11 +74,14 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected string dateFormat = "yyyy-MM-dd";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<asp:LinkButton runat="server" ID="lbtBatchPreview" CssClass="btn btn-block btn-outline-primary" OnClick="lbtBatchPreview_Click"><%: traduci("RepBatchPreview") %></asp:LinkButton>
|
||||
</li>
|
||||
<li class="nav-item mx-2">
|
||||
<asp:LinkButton runat="server" ID="lbtUnloadPart" CssClass="btn btn-block btn-outline-primary" OnClick="lbtUnloadPart_Click"><%: traduci("RepUnloadPart") %></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtUnloadPart" CssClass="btn btn-block btn-outline-primary" OnClick="lbtUnloadPart_Click" Enabled="false"><%: traduci("RepUnloadPart") %></asp:LinkButton>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<asp:LinkButton runat="server" ID="lbtDayStats" CssClass="btn btn-block btn-outline-primary" OnClick="lbtDailyStats_Click"><%: traduci("RepDayStats") %></asp:LinkButton>
|
||||
|
||||
Reference in New Issue
Block a user