diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9aecf6ee..771c7769 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,13 +1,12 @@
variables:
-# NUGET_PATH: 'C:\Tools\nuget.exe'
-# MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
-# ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools'
-# EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\GPW\Release'
-# DEPLOY_FOLDER: 'c:\Projects\Deploy\GPW\Builds'
-# NEW_REL: ''
- VERS_MAIN: '1.0'
- NEXUS_PATH: 'MP-STATS'
- APP_NAME: 'MP.Stats'
+ NUGET_PATH: 'C:\Tools\nuget.exe'
+ MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
+ ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools'
+ EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\MP-CORE\Release'
+ DEPLOY_FOLDER: 'c:\Projects\Deploy\MP-CORE\Builds'
+ VERS_MAIN: '1.1'
+ NEXUS_PATH: 'MP-STATS'
+ APP_NAME: 'MP.Stats'
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
.nuget-fix: &nuget-fix
@@ -74,9 +73,11 @@ build:
- win
before_script:
- *nuget-fix
- - dotnet restore
+ - dotnet restore MP-STATS.sln
+ - dotnet restore MP-PROG.sln
script:
- - dotnet build
+ - dotnet build MP.Stats/MP.Stats.csproj
+ - dotnet build MP.Prog/MP.Prog.csproj
test:
stage: test
@@ -86,7 +87,8 @@ test:
- develop
needs: ["build"]
script:
- - dotnet test
+ - dotnet test MP.Stats/MP.Stats.csproj
+ - dotnet test MP.Prog/MP.Prog.csproj
IIS01:deploy:
stage: deploy
@@ -100,6 +102,7 @@ IIS01:deploy:
# - dotnet restore
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj
+ - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj
IIS02:deploy:
@@ -115,8 +118,10 @@ IIS02:deploy:
script:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj
- dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj
+ - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj
+ - dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj
-installer:
+STA:installer:
stage: installer
tags:
- win
@@ -124,6 +129,9 @@ installer:
- develop
- master
needs: ["build"]
+ variables:
+ APP_NAME: MP-STATS
+ ZIP_NAME: STATS
before_script:
# - *nuget-fix
# - dotnet restore
@@ -132,6 +140,26 @@ installer:
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
+
+STA:installer:
+ stage: installer
+ tags:
+ - win
+ only:
+ - develop
+ - master
+ needs: ["build"]
+ variables:
+ APP_NAME: MP-PROG
+ ZIP_NAME: PROG
+ before_script:
+ # - *nuget-fix
+ # - dotnet restore
+ script:
+ - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Prog/MP.Prog.csproj -o:publish
+ # qui il deploy su nexus...
+ - *hashBuild
+ - *nexusUpload
release:
stage: release
@@ -149,5 +177,6 @@ release:
- publish/
script:
- dotnet publish -c Release -o ./publish MP.Stats/MP.Stats.csproj
+ - dotnet publish -c Release -o ./publish MP.Prog/MP.Prog.csproj
diff --git a/MP.Prog/.config/dotnet-tools.json b/MP.Prog/.config/dotnet-tools.json
new file mode 100644
index 00000000..b0e38abd
--- /dev/null
+++ b/MP.Prog/.config/dotnet-tools.json
@@ -0,0 +1,5 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {}
+}
\ No newline at end of file
diff --git a/MP.Prog/Components/ArchiveStatus.razor b/MP.Prog/Components/ArchiveStatus.razor
index 8fa1a2f8..2a8f5230 100644
--- a/MP.Prog/Components/ArchiveStatus.razor
+++ b/MP.Prog/Components/ArchiveStatus.razor
@@ -1,6 +1,6 @@
-
diff --git a/MP.Prog/Components/TagSearch.razor b/MP.Prog/Components/TagSearch.razor
new file mode 100644
index 00000000..d1bf7e85
--- /dev/null
+++ b/MP.Prog/Components/TagSearch.razor
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/MP.Prog/Components/TagSearch.razor.cs b/MP.Prog/Components/TagSearch.razor.cs
new file mode 100644
index 00000000..573da33f
--- /dev/null
+++ b/MP.Prog/Components/TagSearch.razor.cs
@@ -0,0 +1,141 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components;
+using MP.FileData.DatabaseModels;
+using MP.Prog;
+using MP.Prog.Data;
+
+namespace MP.Prog.Components
+{
+ public partial class TagSearch
+ {
+ #region Protected Fields
+
+ protected string _SearchTag;
+ protected string defTag = "###";
+
+ protected string LastSelTag = "";
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ [Inject]
+ protected MessageService AppMService { get; set; }
+
+ [Inject]
+ protected FileArchDataService DataService { get; set; }
+
+ protected string SearchTag
+ {
+ get
+ {
+ return _SearchTag;
+ }
+ set
+ {
+ _SearchTag = value;
+ // se son > 3 char... debounce...
+ if (string.IsNullOrEmpty(value))
+ {
+ _SearchTag = defTag;
+ }
+ if (value.Length >= defTag.Length)
+ {
+ var pUpd = Task.Run(async () =>
+ {
+ TagList = await DataService.TagGetSearch(_SearchTag, 50);
+ });
+ pUpd.Wait();
+ }
+ }
+ }
+
+ protected List
TagList { get; set; } = new List();
+
+ #endregion Protected Properties
+
+ #region Public Properties
+
+ [Parameter]
+ public EventCallback OnClose { get; set; }
+
+ [Parameter]
+ public EventCallback searchUpdated { get; set; }
+
+ [Parameter]
+ public string SelTag
+ {
+ get
+ {
+ string answ = "";
+ if (AppMService.File_Filter != null)
+ {
+ answ = AppMService.File_Filter.Tag;
+ }
+ return answ;
+ }
+ set
+ {
+ if (!AppMService.File_Filter.Tag.Equals(value))
+ {
+ AppMService.File_Filter.Tag = value;
+ }
+ reportChange();
+ }
+ }
+
+ [Parameter]
+ public string Text { get; set; }
+
+ [Parameter]
+ public string Title { get; set; }
+
+ #endregion Public Properties
+
+ #region Private Methods
+
+ private Task ModalCancel()
+ {
+ // resetto ricerca
+ SelTag = LastSelTag;
+ return OnClose.InvokeAsync(false);
+ }
+
+ private Task ModalOk()
+ {
+ return OnClose.InvokeAsync(true);
+ }
+
+ private void reportChange()
+ {
+ searchUpdated.InvokeAsync(SelTag);
+ }
+
+ #endregion Private Methods
+
+ #region Protected Methods
+
+ protected override async Task OnInitializedAsync()
+ {
+ LastSelTag = SelTag;
+ await ReloadAllData();
+ _SearchTag = defTag;
+ }
+
+ protected async Task ReloadAllData()
+ {
+ SelTag = defTag;
+ TagList = await DataService.TagGetSearch(SearchTag, 20);
+ }
+
+ protected async Task ResetSearchTag()
+ {
+ SearchTag = defTag;
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/MP.Prog/Data/FileArchDataService.cs b/MP.Prog/Data/FileArchDataService.cs
index 47982bb4..6e8005e2 100644
--- a/MP.Prog/Data/FileArchDataService.cs
+++ b/MP.Prog/Data/FileArchDataService.cs
@@ -135,80 +135,6 @@ namespace MP.Prog.Data
#endregion Internal Methods
-#if false
- protected string getCacheKey(string TableName, SelectData CurrFilter)
- {
- string answ = $"{TableName}:M_{CurrFilter.IdxMacchina}:A_{CurrFilter.CodArticolo}:K_{CurrFilter.KeyRichiesta}:O_{CurrFilter.IdxOdl}:D_{CurrFilter.DateStart:yyyyMMddHHmm}_{CurrFilter.DateEnd:yyyyMMddHHmm}";
- return answ;
- }
-
- protected string getCacheKeyPaged(string TableName, SelectData CurrFilter)
- {
- string answ = $"{TableName}:M_{CurrFilter.IdxMacchina}:A_{CurrFilter.CodArticolo}:K_{CurrFilter.KeyRichiesta}:O_{CurrFilter.IdxOdl}:D_{CurrFilter.DateStart:yyMMddHHmm}_{CurrFilter.DateEnd:yyMMddHHmm}:R_{CurrFilter.FirstRecord}_{CurrFilter.FirstRecord + CurrFilter.NumRecord}";
- return answ;
- }
-#endif
-
-#if false
- public async Task> ActionsGetAll()
- {
- //return Task.FromResult(dbController.ActionsGetAll());
- List dbResult = new List();
- string cacheKey = "MP:STATS:AZIONI_ALL";
- string rawData;
- var redisDataList = await distributedCache.GetAsync(cacheKey);
- if (redisDataList != null)
- {
- rawData = Encoding.UTF8.GetString(redisDataList);
- dbResult = JsonConvert.DeserializeObject>(rawData);
- }
- else
- {
- Stopwatch stopWatch = new Stopwatch();
- stopWatch.Start();
- dbResult = dbController.ActionsGetAll();
- rawData = JsonConvert.SerializeObject(dbResult);
- redisDataList = Encoding.UTF8.GetBytes(rawData);
- await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt);
- stopWatch.Stop();
- TimeSpan ts = stopWatch.Elapsed;
- Log.Info($"Effettuata lettura da DB + caching per AzioniUL: {ts.TotalMilliseconds} ms");
- }
- return await Task.FromResult(dbResult);
- }
-
- public Task> ArticoliGetSearch(int numRecord, string searchVal = "")
- {
- List answ = new List();
- answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" });
- if (numRecord > -1)
- {
- answ.AddRange(dbController.ArticoliGetSearch(numRecord, searchVal).Select(x => new AutocompleteModel { LabelField = $"{x.CodArticolo} {x.DescArticolo} {x.Disegno}", ValueField = x.CodArticolo }).ToList());
- }
- return Task.FromResult(answ);
- }
-
- public async Task> ArticoliList(string searchVal)
- {
- List answ = new List();
- answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" });
- var listMacchine = dbController.MacchineGetAll();
- answ.AddRange(listMacchine.Select(x => new AutocompleteModel { LabelField = x.IdxMacchina, ValueField = x.IdxMacchina }).ToList());
- return await Task.FromResult(answ);
- }
-
- public Task> CommesseGetSearch(int numRecord, string searchVal = "")
- {
- List answ = new List();
- answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" });
- if (numRecord > -1)
- {
- answ.AddRange(dbController.CommesseGetSearch(numRecord, searchVal).GroupBy(x => x.KeyRichiesta).Select(x => new AutocompleteModel { LabelField = $"{x.First().CodArticolo} | {x.First().KeyRichiesta}", ValueField = x.First().KeyRichiesta }).ToList());
- }
- return Task.FromResult(answ);
- }
-#endif
-
#region Public Methods
public void Dispose()
@@ -287,6 +213,91 @@ namespace MP.Prog.Data
return await Task.FromResult(dbController.TagGetFilt(SearchVal, 200).ToList());
}
+ public Task> TagGetSearch(string searchVal, int numRecord)
+ {
+ List answ = new List();
+ answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" });
+ if (numRecord > -1)
+ {
+ answ.AddRange(dbController.TagGetFilt(searchVal, numRecord).Select(x => new AutocompleteModel { LabelField = $"{x.TagId}", ValueField = x.TagId }).ToList());
+ }
+ return Task.FromResult(answ);
+ }
+
+#if false
+ protected string getCacheKey(string TableName, SelectData CurrFilter)
+ {
+ string answ = $"{TableName}:M_{CurrFilter.IdxMacchina}:A_{CurrFilter.CodArticolo}:K_{CurrFilter.KeyRichiesta}:O_{CurrFilter.IdxOdl}:D_{CurrFilter.DateStart:yyyyMMddHHmm}_{CurrFilter.DateEnd:yyyyMMddHHmm}";
+ return answ;
+ }
+
+ protected string getCacheKeyPaged(string TableName, SelectData CurrFilter)
+ {
+ string answ = $"{TableName}:M_{CurrFilter.IdxMacchina}:A_{CurrFilter.CodArticolo}:K_{CurrFilter.KeyRichiesta}:O_{CurrFilter.IdxOdl}:D_{CurrFilter.DateStart:yyMMddHHmm}_{CurrFilter.DateEnd:yyMMddHHmm}:R_{CurrFilter.FirstRecord}_{CurrFilter.FirstRecord + CurrFilter.NumRecord}";
+ return answ;
+ }
+#endif
+
+#if false
+ public async Task> ActionsGetAll()
+ {
+ //return Task.FromResult(dbController.ActionsGetAll());
+ List dbResult = new List();
+ string cacheKey = "MP:STATS:AZIONI_ALL";
+ string rawData;
+ var redisDataList = await distributedCache.GetAsync(cacheKey);
+ if (redisDataList != null)
+ {
+ rawData = Encoding.UTF8.GetString(redisDataList);
+ dbResult = JsonConvert.DeserializeObject>(rawData);
+ }
+ else
+ {
+ Stopwatch stopWatch = new Stopwatch();
+ stopWatch.Start();
+ dbResult = dbController.ActionsGetAll();
+ rawData = JsonConvert.SerializeObject(dbResult);
+ redisDataList = Encoding.UTF8.GetBytes(rawData);
+ await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt);
+ stopWatch.Stop();
+ TimeSpan ts = stopWatch.Elapsed;
+ Log.Info($"Effettuata lettura da DB + caching per AzioniUL: {ts.TotalMilliseconds} ms");
+ }
+ return await Task.FromResult(dbResult);
+ }
+
+ public Task> ArticoliGetSearch(int numRecord, string searchVal = "")
+ {
+ List answ = new List();
+ answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" });
+ if (numRecord > -1)
+ {
+ answ.AddRange(dbController.ArticoliGetSearch(numRecord, searchVal).Select(x => new AutocompleteModel { LabelField = $"{x.CodArticolo} {x.DescArticolo} {x.Disegno}", ValueField = x.CodArticolo }).ToList());
+ }
+ return Task.FromResult(answ);
+ }
+
+ public async Task> ArticoliList(string searchVal)
+ {
+ List answ = new List();
+ answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" });
+ var listMacchine = dbController.MacchineGetAll();
+ answ.AddRange(listMacchine.Select(x => new AutocompleteModel { LabelField = x.IdxMacchina, ValueField = x.IdxMacchina }).ToList());
+ return await Task.FromResult(answ);
+ }
+
+ public Task> CommesseGetSearch(int numRecord, string searchVal = "")
+ {
+ List answ = new List();
+ answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" });
+ if (numRecord > -1)
+ {
+ answ.AddRange(dbController.CommesseGetSearch(numRecord, searchVal).GroupBy(x => x.KeyRichiesta).Select(x => new AutocompleteModel { LabelField = $"{x.First().CodArticolo} | {x.First().KeyRichiesta}", ValueField = x.First().KeyRichiesta }).ToList());
+ }
+ return Task.FromResult(answ);
+ }
+#endif
+
///
/// Aggiorna intero archivio scansionando dati x tutte le macchine che hanno un path valido
///
diff --git a/MP.Prog/Pages/Archive.razor b/MP.Prog/Pages/Archive.razor
index d6f94a7e..20bbd1f1 100644
--- a/MP.Prog/Pages/Archive.razor
+++ b/MP.Prog/Pages/Archive.razor
@@ -5,7 +5,7 @@