diff --git a/CMS-SC-Data/obj/Debug/CMS-SC-Data.csprojResolveAssemblyReference.cache b/CMS-SC-Data/obj/Debug/CMS-SC-Data.csprojResolveAssemblyReference.cache index add01bf..802db75 100644 Binary files a/CMS-SC-Data/obj/Debug/CMS-SC-Data.csprojResolveAssemblyReference.cache and b/CMS-SC-Data/obj/Debug/CMS-SC-Data.csprojResolveAssemblyReference.cache differ diff --git a/CMS_SC/About.aspx b/CMS_SC/About.aspx index 455803f..e613fff 100644 --- a/CMS_SC/About.aspx +++ b/CMS_SC/About.aspx @@ -11,65 +11,14 @@
-
+
- - Usage data +
-
-
-
-
-
-
General usage Data
- <%--3 days ago--%> -
-

-

    -
  • pareto chiamate x browser size
  • -
  • dati globali (uptime globale, da refresh, num chiamate (a redis? a iis?)
  • -
-

- <%--Donec id elit non mi porta.--%> -
-
-
-
Redis usage Data
- <%--3 days ago--%> -
-

-

    -
  • pareto chiamate x browser size
  • -
  • dati globali (uptime globale, da refresh, num chiamate (a redis? a iis?)
  • -
-

- <%--Donec id elit non mi porta.--%> -
-
-
-
Browser size data
- <%--3 days ago--%> -
-

-

<%: paretoBrowserSize %>
-

- <%--Donec id elit non mi porta.--%> -
-
-
-
-
-
-
-
- -
-
-
+
@@ -101,14 +50,99 @@
-
+
-
+
+
+
+
+
+
+
Server Stats
+ <%--3 days ago--%> +
+

+

<%: ServerStats %>
+

+ <%--Donec id elit non mi porta.--%> +
+
+
+
IIS Stats
+ <%--3 days ago--%> +
+

+

<%: IISStats %>
+

+ <%--Donec id elit non mi porta.--%> +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
Redis Servers Data
+ <%--3 days ago--%> +
+

+

<%: redisServersData %>
+

+ <%--Donec id elit non mi porta.--%> +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
Browser size data
+ <%--3 days ago--%> +
+

+

<%: paretoBrowserSize %>
+

+ <%--Donec id elit non mi porta.--%> +
+
+
+
+
+
+
+
+
-
+
@@ -126,14 +160,14 @@
-
+
-
-
+

diff --git a/CMS_SC/About.aspx.cs b/CMS_SC/About.aspx.cs index 1cf1219..7c85000 100644 --- a/CMS_SC/About.aspx.cs +++ b/CMS_SC/About.aspx.cs @@ -1,12 +1,15 @@ using SteamWare; using System; +using System.CodeDom.Compiler; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Reflection; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using Microsoft.VisualBasic.Devices; namespace CMS_SC { @@ -81,11 +84,135 @@ namespace CMS_SC get { StringBuilder sb = new StringBuilder(); - string redHash = memLayer.ML.redHash("COUNT:wh:"); + string redHash = memLayer.ML.redHash("COUNT:wh:*"); int numRec = memLayer.ML.redCountKey(redHash); - Dictionary kvp = memLayer.ML.redGetHashDict(redHash); - sb.AppendLine(string.Format("Trovate {0} combinazioni", numRec)); + List> kvp = memLayer.ML.redGetCounterByKey(redHash, memLayer.kvpOrderBy.ValDesc); + // riordino elenco + sb.AppendLine(string.Format("Trovate {0} combinazioni", numRec)); + foreach (var item in kvp) + { + sb.AppendLine(string.Format("{0}: {1}", item.Key.Replace(memLayer.ML.redHash("COUNT:wh:"), ""), item.Value)); + } + return sb.ToString(); + } + } + /// + /// Formatta un numero da int a size in Kb/Mb/Gb/Tb + /// + /// + /// + public string memFormat(double rawSize) + { + string[] sizes = { "B", "KB", "MB", "GB", "TB" }; + int order = 0; + while (rawSize >= 1024 && order < sizes.Length - 1) + { + order++; + rawSize = rawSize / 1024; + } + + // Adjust the format string to your preferences. For example "{0:0.#}{1}" would + // show a single decimal place, and no space. + return String.Format("{0:0.##} {1}", rawSize, sizes[order]); + } + /// + /// Dati sui server redis... + /// + public string redisServersData + { + get + { + StringBuilder sb = new StringBuilder(); + try + { + var servData = memLayer.ML.redServInfo(); + foreach (var item in servData) + { + sb.AppendLine(string.Format("Server: {0} | {1} | {2}", item, item.Version, item.ServerType)); + // da completare con altre info?!? + var srvInfo = item.Info(); + // esporto un pò di info x gruppo... + foreach (IGrouping> capitolo in srvInfo) + { + sb.AppendLine("----------------------------------------------"); + sb.AppendLine(string.Format("Capitolo: {0}", capitolo.Key)); + sb.AppendLine("----------------------------------------------"); + foreach (var kvp in capitolo) + { + sb.AppendLine(string.Format("{0}:{1}", kvp.Key, kvp.Value)); + } + + sb.AppendLine(); + } + } + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("Errore in redisServersData{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + } + return sb.ToString(); + } + } + /// + /// Stringa timing + /// + /// + /// + public string ToDateString(TimeSpan time) + { + return string.Format("{0}gg, {1:00}:{2:00}:{3:00} (h:m:s)", time.Days, time.Hours, time.Minutes, time.Seconds); + } + /// + /// Statistiche server + /// + public string ServerStats + { + get + { + StringBuilder sb = new StringBuilder(); + try + { + // calcoli preliminari + TimeSpan uptime; + using (var uptimeCounter = new PerformanceCounter("System", "System Up Time")) + { + uptimeCounter.NextValue(); + uptime = TimeSpan.FromSeconds(uptimeCounter.NextValue()); + } + var computer = new ComputerInfo(); + + // compongo output + sb.AppendLine(string.Format("NAME: {0}", Environment.MachineName)); + sb.AppendLine(Environment.OSVersion.VersionString); + sb.AppendLine(string.Format("OS 64bit: {0} | PROC 64bit: {1}", Environment.Is64BitOperatingSystem, Environment.Is64BitProcess)); + sb.AppendLine(string.Format("SYS UPTIME: {0}", ToDateString(uptime))); + sb.AppendLine(string.Format("CPU: {0}", Environment.ProcessorCount)); + sb.AppendLine(string.Format("RAM: {0}", memFormat(computer.TotalPhysicalMemory))); + sb.AppendLine(string.Format("Virtual Memory: {0}", memFormat(computer.TotalVirtualMemory))); + sb.AppendLine(string.Format("Available RAM: {0}", memFormat(computer.AvailablePhysicalMemory))); + sb.AppendLine(string.Format("Available Virtual Memory: {0}", memFormat(computer.AvailableVirtualMemory))); + sb.AppendLine(string.Format("DIR: {0}", Environment.CurrentDirectory)); + sb.AppendLine(string.Format("USER: {0} | USER: {1}", Environment.UserDomainName, Environment.UserName)); + } + catch + { } + return sb.ToString(); + } + } + public string IISStats + { + get + { + StringBuilder sb = new StringBuilder(); + using (var iis = Process.GetCurrentProcess()) + { + //Process iis = Process.GetCurrentProcess(); + sb.AppendLine(string.Format("UPTIME: {0}", ToDateString(DateTime.Now - iis.StartTime))); + sb.AppendLine(string.Format("Priority: {0}", iis.PriorityClass)); + sb.AppendLine(string.Format("Physical Memory Used: {0}", memFormat(iis.WorkingSet64))); + sb.AppendLine(string.Format("Virtual Memory Used: {0}", memFormat(iis.VirtualMemorySize64))); + } return sb.ToString(); } } diff --git a/CMS_SC/About.aspx.designer.cs b/CMS_SC/About.aspx.designer.cs index 487fe80..2662c28 100644 --- a/CMS_SC/About.aspx.designer.cs +++ b/CMS_SC/About.aspx.designer.cs @@ -12,6 +12,15 @@ namespace CMS_SC { public partial class About { + /// + /// Controllo lbtGrp01. + /// + /// + /// 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.LinkButton lbtGrp01; + /// /// Controllo LinkButton1. /// @@ -22,13 +31,22 @@ namespace CMS_SC { protected global::System.Web.UI.WebControls.LinkButton LinkButton1; /// - /// Controllo lbtGrp01. + /// Controllo LinkButton2. /// /// /// 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.LinkButton lbtGrp01; + protected global::System.Web.UI.WebControls.LinkButton LinkButton2; + + /// + /// Controllo LinkButton3. + /// + /// + /// 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.LinkButton LinkButton3; /// /// Controllo lbtGrp02. diff --git a/CMS_SC/CMS_SC.csproj b/CMS_SC/CMS_SC.csproj index 90e2510..80a8337 100644 --- a/CMS_SC/CMS_SC.csproj +++ b/CMS_SC/CMS_SC.csproj @@ -118,6 +118,7 @@ ..\packages\Microsoft.AspNet.ScriptManager.WebForms.5.0.0\lib\net45\Microsoft.ScriptManager.WebForms.dll True + ..\packages\Microsoft.Web.RedisSessionStateProvider.2.2.6\lib\net40\Microsoft.Web.RedisSessionStateProvider.dll diff --git a/CMS_SC/bin/CMS-SC-Data.dll b/CMS_SC/bin/CMS-SC-Data.dll index 9866107..1b2a0d9 100644 Binary files a/CMS_SC/bin/CMS-SC-Data.dll and b/CMS_SC/bin/CMS-SC-Data.dll differ diff --git a/CMS_SC/bin/SteamWare.dll b/CMS_SC/bin/SteamWare.dll index 22a12b3..38ea530 100644 Binary files a/CMS_SC/bin/SteamWare.dll and b/CMS_SC/bin/SteamWare.dll differ diff --git a/CMS_SC/bin/SteamWare.xml b/CMS_SC/bin/SteamWare.xml index 9c21d44..4b340af 100644 --- a/CMS_SC/bin/SteamWare.xml +++ b/CMS_SC/bin/SteamWare.xml @@ -4124,11 +4124,27 @@ Connessione lazy a redis... + + + Connessione lazy a redis... + + Oggetto statico connessione redis + + + Oggetto statico connessione redis + + + + + Restituisce info dei server connessi... + + + Restituisce una chiave salvata in RedisCache @@ -4291,6 +4307,71 @@ Restituisce numero record in Redis DB + + + Restituisce oggetti cache redis che rispondono a pattern + + ** = tutti + Tipo di ordinamento per kvp + + + + + Effettua comaprazione x CHIAVE in KVP ASC + + + + + + + + Effettua comaprazione x VALORE in KVP ASC + + + + + + + + Effettua comaprazione x CHIAVE in KVP DESC + + + + + + + + Effettua comaprazione x VALORE in KVP DESC + + + + + + + + Tipologia di ordinamento x liste KVP + + + + + Ordinamento ASCending per KEY + + + + + Ordinamento DESCending per KEY + + + + + Ordinamento ASCending per VAL + + + + + Ordinamento DESCending per VAL + + Formattazione stringa URL immagini con gestione "base url" diff --git a/Jenkinsfile b/Jenkinsfile index a710d25..2859c5a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=4231']) { + withEnv(['NEXT_BUILD_NUMBER=4232']) { // env.versionNumber = VersionNumber(versionNumberString : '3.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '3.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'CMS-SC'