Merge branch 'develop'
This commit is contained in:
Vendored
+1
-1
@@ -17,7 +17,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=235']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=237']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
|
||||
@@ -43,19 +43,22 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
// var base
|
||||
string answ = "";
|
||||
// recupero da REDIS!
|
||||
string redKey = $"{ComLib.machineUnloadArea(sheetID)}:Css";
|
||||
// se vuoto scrivo VUOTO...
|
||||
if (!memLayer.ML.redKeyPresent(redKey))
|
||||
if (sheetID > 0)
|
||||
{
|
||||
memLayer.ML.setRSV(redKey, answ);
|
||||
}
|
||||
answ = memLayer.ML.getRSV(redKey);
|
||||
// RICALCOLO SOLO SE non trovo in REDIS (perché invalidato)
|
||||
if (answ == "")
|
||||
// se vuoto lo calcolo...
|
||||
{
|
||||
answ = ComLib.getCurrentCss(sheetID);
|
||||
// recupero da REDIS!
|
||||
string redKey = $"{ComLib.machineUnloadArea(sheetID)}:Css";
|
||||
// se vuoto scrivo VUOTO...
|
||||
if (!memLayer.ML.redKeyPresent(redKey))
|
||||
{
|
||||
memLayer.ML.setRSV(redKey, answ);
|
||||
}
|
||||
answ = memLayer.ML.getRSV(redKey);
|
||||
// RICALCOLO SOLO SE non trovo in REDIS (perché invalidato)
|
||||
if (answ == "")
|
||||
// se vuoto lo calcolo...
|
||||
{
|
||||
answ = ComLib.getCurrentCss(sheetID);
|
||||
}
|
||||
}
|
||||
// restituisco css
|
||||
return answ;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using AppData;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace NKC_WF.Controllers
|
||||
@@ -25,26 +26,34 @@ namespace NKC_WF.Controllers
|
||||
/// <returns></returns>
|
||||
private static int getRevBySheet(int SheetID)
|
||||
{
|
||||
int answ;
|
||||
// recupero da REDIS!
|
||||
string redKey = $"{ComLib.machineUnloadArea(SheetID)}:Css";
|
||||
string redKeyRev = $"{ComLib.machineUnloadArea(SheetID)}:CssRev";
|
||||
// se vuoto scrivo 1...
|
||||
if (!memLayer.ML.redKeyPresent(redKeyRev))
|
||||
int answ = 0;
|
||||
if (SheetID > 0)
|
||||
{
|
||||
memLayer.ML.setRCntI(redKeyRev);
|
||||
}
|
||||
// SE fosse scaduto CSS --> aggiorno revisione...
|
||||
if (!memLayer.ML.redKeyPresent(redKey))
|
||||
{
|
||||
// incremento...
|
||||
memLayer.ML.setRCntI(redKeyRev);
|
||||
}
|
||||
answ = memLayer.ML.getRCnt(redKeyRev);
|
||||
// se > 999 --> resetto
|
||||
if (answ > 999)
|
||||
{
|
||||
memLayer.ML.resetRCnt(redKeyRev);
|
||||
// recupero da REDIS!
|
||||
string redKeyExp = memLayer.ML.redHash($"DataExp");
|
||||
string redKey = $"{ComLib.machineUnloadArea(SheetID)}:Css";
|
||||
string redKeyRev = $"{ComLib.machineUnloadArea(SheetID)}:CssRev";
|
||||
// controllo expiry globale... se manca SVUOTO area
|
||||
string rawData = memLayer.ML.getRSV(redKeyExp);
|
||||
if (string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
// svuoto e scrivo...
|
||||
memLayer.ML.redFlushKey(memLayer.ML.redHash($"MachineUnload"));
|
||||
memLayer.ML.redFlushKey(memLayer.ML.redHash($"TabSheets"));
|
||||
memLayer.ML.setRSV(redKeyExp, $"Reload Data {DateTime.Now}", 3600);
|
||||
}
|
||||
// SE fosse scaduto CSS --> aggiorno revisione...
|
||||
if (!memLayer.ML.redKeyPresent(redKey))
|
||||
{
|
||||
// incremento...
|
||||
memLayer.ML.setRCntI(redKeyRev);
|
||||
}
|
||||
answ = memLayer.ML.getRCnt(redKeyRev);
|
||||
// se > 999 --> resetto
|
||||
if (answ > 999)
|
||||
{
|
||||
memLayer.ML.resetRCnt(redKeyRev);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -3,11 +3,16 @@
|
||||
<div id="uplTavola">
|
||||
<link href="../api/getMUCss" rel="stylesheet" id="dynCss" />
|
||||
</div>
|
||||
<asp:HiddenField ID="hfSheetId" runat="server" Value="0" />
|
||||
<asp:HiddenField ID="hfFilename" runat="server" Value="" />
|
||||
<asp:HiddenField ID="hfCurrRev" runat="server" Value="0" />
|
||||
<script type="text/javascript">
|
||||
lastVal = 0;
|
||||
setInterval("my_function();", 300);
|
||||
my_function();
|
||||
setInterval("my_function();", 1000);
|
||||
function my_function() {
|
||||
SheetId = document.getElementById('<%=hfSheetId.ClientID%>').value;
|
||||
lastVal = document.getElementById('<%=hfCurrRev.ClientID%>').value;
|
||||
document.getElementById("dynCss").href = "../api/getMUCss/" + SheetId;
|
||||
$.ajax({
|
||||
url: "../api/getMUCssRev/" + SheetId
|
||||
@@ -15,12 +20,11 @@
|
||||
// se è cambiato...
|
||||
if (data != lastVal) {
|
||||
$('#uplTavola').load(location.href + ' #dynCss');
|
||||
lastVal = data;
|
||||
document.getElementById('<%=hfCurrRev.ClientID%>').value = data;
|
||||
//lastVal = document.getElementById('<%=hfCurrRev.ClientID%>').value;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<svg width="2000" height="1000" xmlns='http://www.w3.org/2000/svg' runat="server" id="svgTable" class="img-fluid">
|
||||
</svg>
|
||||
<asp:HiddenField ID="hfSheetId" runat="server" Value="0" />
|
||||
<asp:HiddenField ID="hfFilename" runat="server" Value="" />
|
||||
|
||||
+18
-9
@@ -14,15 +14,6 @@ namespace NKC_WF.WebUserControls
|
||||
public partial class cmp_MU_svgViewer
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo svgTable.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl svgTable;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfSheetId.
|
||||
/// </summary>
|
||||
@@ -40,5 +31,23 @@ namespace NKC_WF.WebUserControls
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfFilename;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfCurrRev.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfCurrRev;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo svgTable.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl svgTable;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user