diff --git a/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj b/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj index 8d85658..1eed6a2 100644 --- a/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj +++ b/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj @@ -6,7 +6,7 @@ enable enable AnyCPU;x86;x64 - 1.12206.2015 + 1.12206.2016 diff --git a/MP.MONO.ANALYZER/Resources/ChangeLog.html b/MP.MONO.ANALYZER/Resources/ChangeLog.html index 4483736..9f6a39f 100644 --- a/MP.MONO.ANALYZER/Resources/ChangeLog.html +++ b/MP.MONO.ANALYZER/Resources/ChangeLog.html @@ -1,6 +1,6 @@ MAPO-MONO - Version: 1.12206.2015 + Version: 1.12206.2016 Release Note: diff --git a/MP.MONO.ANALYZER/Resources/VersNum.txt b/MP.MONO.ANALYZER/Resources/VersNum.txt index 69c2fcf..8571577 100644 --- a/MP.MONO.ANALYZER/Resources/VersNum.txt +++ b/MP.MONO.ANALYZER/Resources/VersNum.txt @@ -1 +1 @@ -1.12206.2015 +1.12206.2016 diff --git a/MP.MONO.ANALYZER/Resources/manifest.xml b/MP.MONO.ANALYZER/Resources/manifest.xml index b040d66..e8e6f95 100644 --- a/MP.MONO.ANALYZER/Resources/manifest.xml +++ b/MP.MONO.ANALYZER/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.12206.2015 + 1.12206.2016 http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/MP.Mon.zip http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/ChangeLog.html false diff --git a/MP.MONO.DECODER/MP.MONO.DECODER.csproj b/MP.MONO.DECODER/MP.MONO.DECODER.csproj index aabbb2b..faa8cd4 100644 --- a/MP.MONO.DECODER/MP.MONO.DECODER.csproj +++ b/MP.MONO.DECODER/MP.MONO.DECODER.csproj @@ -6,7 +6,7 @@ enable enable AnyCPU;x86;x64 - 1.12206.2015 + 1.12206.2016 diff --git a/MP.MONO.DECODER/Resources/ChangeLog.html b/MP.MONO.DECODER/Resources/ChangeLog.html index 4483736..9f6a39f 100644 --- a/MP.MONO.DECODER/Resources/ChangeLog.html +++ b/MP.MONO.DECODER/Resources/ChangeLog.html @@ -1,6 +1,6 @@ MAPO-MONO - Version: 1.12206.2015 + Version: 1.12206.2016 Release Note: diff --git a/MP.MONO.DECODER/Resources/VersNum.txt b/MP.MONO.DECODER/Resources/VersNum.txt index 69c2fcf..8571577 100644 --- a/MP.MONO.DECODER/Resources/VersNum.txt +++ b/MP.MONO.DECODER/Resources/VersNum.txt @@ -1 +1 @@ -1.12206.2015 +1.12206.2016 diff --git a/MP.MONO.DECODER/Resources/manifest.xml b/MP.MONO.DECODER/Resources/manifest.xml index f8d8ec4..c3b9dc2 100644 --- a/MP.MONO.DECODER/Resources/manifest.xml +++ b/MP.MONO.DECODER/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.12206.2015 + 1.12206.2016 http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/MP.Mon.zip http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/ChangeLog.html false diff --git a/MP.MONO.SIM/MP.MONO.SIM.csproj b/MP.MONO.SIM/MP.MONO.SIM.csproj index 7ae655a..2834b45 100644 --- a/MP.MONO.SIM/MP.MONO.SIM.csproj +++ b/MP.MONO.SIM/MP.MONO.SIM.csproj @@ -6,7 +6,7 @@ enable enable AnyCPU;x86;x64 - 1.12206.2015 + 1.12206.2016 diff --git a/MP.MONO.SIM/Resources/ChangeLog.html b/MP.MONO.SIM/Resources/ChangeLog.html index 4483736..9f6a39f 100644 --- a/MP.MONO.SIM/Resources/ChangeLog.html +++ b/MP.MONO.SIM/Resources/ChangeLog.html @@ -1,6 +1,6 @@ MAPO-MONO - Version: 1.12206.2015 + Version: 1.12206.2016 Release Note: diff --git a/MP.MONO.SIM/Resources/VersNum.txt b/MP.MONO.SIM/Resources/VersNum.txt index 69c2fcf..8571577 100644 --- a/MP.MONO.SIM/Resources/VersNum.txt +++ b/MP.MONO.SIM/Resources/VersNum.txt @@ -1 +1 @@ -1.12206.2015 +1.12206.2016 diff --git a/MP.MONO.SIM/Resources/manifest.xml b/MP.MONO.SIM/Resources/manifest.xml index 86bd7f1..b78c8ef 100644 --- a/MP.MONO.SIM/Resources/manifest.xml +++ b/MP.MONO.SIM/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.12206.2015 + 1.12206.2016 http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/MP.Mon.zip http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/ChangeLog.html false diff --git a/MP.MONO.UI/Components/AlarmsSetupRawList.razor b/MP.MONO.UI/Components/AlarmsSetupRawList.razor index b5bd3e4..542b95b 100644 --- a/MP.MONO.UI/Components/AlarmsSetupRawList.razor +++ b/MP.MONO.UI/Components/AlarmsSetupRawList.razor @@ -15,7 +15,7 @@ - + search @@ -43,9 +43,12 @@ @foreach (var item in ListRecords) { - toggleMute(item)"> - @item.FullValue - + if (okShow(item.FullValue)) + { + toggleMute(item)"> + @item.FullValue + + } } diff --git a/MP.MONO.UI/Components/AlarmsSetupRawList.razor.cs b/MP.MONO.UI/Components/AlarmsSetupRawList.razor.cs index 38b6676..ba26404 100644 --- a/MP.MONO.UI/Components/AlarmsSetupRawList.razor.cs +++ b/MP.MONO.UI/Components/AlarmsSetupRawList.razor.cs @@ -8,6 +8,7 @@ namespace MP.MONO.UI.Components #region Protected Fields protected List? ListRecords = null; + protected List? DisplayRecords = null; #endregion Protected Fields @@ -28,21 +29,26 @@ namespace MP.MONO.UI.Components { ListRecords = null; await Task.Delay(1); - var allData = await MMDataService.getAlarmRawSetup(); - // filtro... - if (string.IsNullOrEmpty(SearchVal)) - { - ListRecords = allData; - } - else - { - ListRecords = allData - .Where(x => x.FullValue.ToLower().Contains(SearchVal.ToLower())) - .ToList(); - } + ListRecords = await MMDataService.getAlarmRawSetup(); await Task.Delay(1); } + /// + /// Verifica se sia da mostrare (filtro SearchVal attivo e rispettato) + /// + /// + /// + protected bool okShow(string fullVal) + { + bool answ = string.IsNullOrEmpty(SearchVal); + // se c'è filtro + if (!answ) + { + answ = fullVal.ToLower().Contains(SearchVal.ToLower()); + } + return answ; + } + protected async Task resetAlarmSetup() { diff --git a/MP.MONO.UI/Components/UserAuthCheck.razor b/MP.MONO.UI/Components/UserAuthCheck.razor new file mode 100644 index 0000000..a332002 --- /dev/null +++ b/MP.MONO.UI/Components/UserAuthCheck.razor @@ -0,0 +1,14 @@ +@inject IConfiguration Configuration; + + + User Auth + + Please enter authorization code + + Auth Code + + + + + + diff --git a/MP.MONO.UI/Components/UserAuthCheck.razor.cs b/MP.MONO.UI/Components/UserAuthCheck.razor.cs new file mode 100644 index 0000000..f0ee5a9 --- /dev/null +++ b/MP.MONO.UI/Components/UserAuthCheck.razor.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP.MONO.UI; +using MP.MONO.UI.Shared; +using MP.MONO.UI.Components; + +namespace MP.MONO.UI.Components +{ + public partial class UserAuthCheck + { + private string _authCode { get; set; } = ""; + private string passCode { get; set; } = ""; + + protected override void OnInitialized() + { + passCode = Configuration.GetValue("OptPar:AuthCode"); + } + + private string authCode + { + get + { + return _authCode; + } + set + { + _authCode = value; + checkCode(); + } + } + + private void checkCode() + { + // se il codice corrisponde a quello da config... + if (!string.IsNullOrEmpty(authCode)) + { + if (authCode.Equals(passCode)) + { + checkOk.InvokeAsync(true); + } + } + } + + [Parameter] + public EventCallback checkOk { get; set; } + } +} \ No newline at end of file diff --git a/MP.MONO.UI/MP.MONO.UI.csproj b/MP.MONO.UI/MP.MONO.UI.csproj index 2fee214..353e6c6 100644 --- a/MP.MONO.UI/MP.MONO.UI.csproj +++ b/MP.MONO.UI/MP.MONO.UI.csproj @@ -5,7 +5,7 @@ enable enable AnyCPU;x86;x64 - 1.12206.2015 + 1.12206.2016 diff --git a/MP.MONO.UI/Pages/Alarms.razor b/MP.MONO.UI/Pages/Alarms.razor index 5049dc3..32bf347 100644 --- a/MP.MONO.UI/Pages/Alarms.razor +++ b/MP.MONO.UI/Pages/Alarms.razor @@ -43,7 +43,7 @@ - SetupAlarms()"> + CheckAuth()"> Setup @@ -55,7 +55,11 @@ - @if (doSetup) + @if (reqPassw) + { + + } + else if (doSetup) { } diff --git a/MP.MONO.UI/Pages/Alarms.razor.cs b/MP.MONO.UI/Pages/Alarms.razor.cs index dbefeb4..21fc959 100644 --- a/MP.MONO.UI/Pages/Alarms.razor.cs +++ b/MP.MONO.UI/Pages/Alarms.razor.cs @@ -7,6 +7,7 @@ namespace MP.MONO.UI.Pages #region Protected Fields protected bool doSetup = false; + protected bool reqPassw = false; #endregion Protected Fields @@ -86,10 +87,28 @@ namespace MP.MONO.UI.Pages }); } - protected async Task SetupAlarms() + protected async Task ShowSetup() { await Task.Delay(1); doSetup = !doSetup; + reqPassw = false; + await Task.Delay(1); + } + + + protected async Task CheckAuth() + { + await Task.Delay(1); + // se non sono già in edit mostro auth... + if (reqPassw || doSetup) + { + reqPassw = false; + } + else + { + reqPassw = !reqPassw; + } + doSetup = false; await Task.Delay(1); } diff --git a/MP.MONO.UI/Resources/ChangeLog.html b/MP.MONO.UI/Resources/ChangeLog.html index 4483736..9f6a39f 100644 --- a/MP.MONO.UI/Resources/ChangeLog.html +++ b/MP.MONO.UI/Resources/ChangeLog.html @@ -1,6 +1,6 @@ MAPO-MONO - Version: 1.12206.2015 + Version: 1.12206.2016 Release Note: diff --git a/MP.MONO.UI/Resources/VersNum.txt b/MP.MONO.UI/Resources/VersNum.txt index 69c2fcf..8571577 100644 --- a/MP.MONO.UI/Resources/VersNum.txt +++ b/MP.MONO.UI/Resources/VersNum.txt @@ -1 +1 @@ -1.12206.2015 +1.12206.2016 diff --git a/MP.MONO.UI/Resources/manifest.xml b/MP.MONO.UI/Resources/manifest.xml index dbf9086..e8635e0 100644 --- a/MP.MONO.UI/Resources/manifest.xml +++ b/MP.MONO.UI/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.12206.2015 + 1.12206.2016 http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/MP.Mon.zip http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/ChangeLog.html false diff --git a/MP.MONO.UI/appsettings.json b/MP.MONO.UI/appsettings.json index 41251da..75e9e38 100644 --- a/MP.MONO.UI/appsettings.json +++ b/MP.MONO.UI/appsettings.json @@ -32,6 +32,7 @@ } }, "OptPar": { - "MaintPendingRefreshVetoMin": 5 + "MaintPendingRefreshVetoMin": 5, + "AuthCode": "MultiaxD5" } }
Please enter authorization code