diff --git a/Jenkinsfile b/Jenkinsfile
index c1b59b3..d32561c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -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}')
diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs
index 75bb7f4..6fd410f 100644
--- a/NKC_WF/Controllers/getMUCssController.cs
+++ b/NKC_WF/Controllers/getMUCssController.cs
@@ -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;
diff --git a/NKC_WF/Controllers/getMUCssRevController.cs b/NKC_WF/Controllers/getMUCssRevController.cs
index ae508f7..93f862b 100644
--- a/NKC_WF/Controllers/getMUCssRevController.cs
+++ b/NKC_WF/Controllers/getMUCssRevController.cs
@@ -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
///
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;
}
diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx
index a2d3cd3..2b5c11f 100644
--- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx
+++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx
@@ -3,11 +3,16 @@
+
+
+
-
-
diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs
index 52b6bbd..4fe8c5e 100644
--- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs
+++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs
@@ -14,15 +14,6 @@ namespace NKC_WF.WebUserControls
public partial class cmp_MU_svgViewer
{
- ///
- /// Controllo svgTable.
- ///
- ///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
- ///
- protected global::System.Web.UI.HtmlControls.HtmlGenericControl svgTable;
-
///
/// Controllo hfSheetId.
///
@@ -40,5 +31,23 @@ namespace NKC_WF.WebUserControls
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.HiddenField hfFilename;
+
+ ///
+ /// Controllo hfCurrRev.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hfCurrRev;
+
+ ///
+ /// Controllo svgTable.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl svgTable;
}
}