+
Refresh Data
diff --git a/MP.Land/Startup.cs b/MP.Land/Startup.cs
index 50e8e855..02ec482e 100644
--- a/MP.Land/Startup.cs
+++ b/MP.Land/Startup.cs
@@ -10,6 +10,8 @@ using Microsoft.AspNetCore.Localization;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
+using MP.AppAuth.Services;
+using MP.Data.Services;
using MP.Land.Data;
using StackExchange.Redis;
using System;
@@ -133,9 +135,11 @@ namespace MP.Land
services.AddSingleton(Configuration);
services.AddSingleton();
services.AddSingleton();
+ services.AddSingleton();
services.AddScoped();
- services.AddScoped();
+ services.AddScoped();
+ services.AddScoped();
services.AddSingleton(redisMultiplexer);
services.AddBlazoredLocalStorage();
diff --git a/MP.Land/appsettings.json b/MP.Land/appsettings.json
index e0a19832..1140ab43 100644
--- a/MP.Land/appsettings.json
+++ b/MP.Land/appsettings.json
@@ -57,6 +57,7 @@
"appVers": "stable",
"ConnectionStrings": {
"DefaultConnection": "Server=SQL2016DEV;Database=MoonPro;Trusted_Connection=True;MultipleActiveResultSets=true",
+ "MP.All": "Server=SQL2016DEV;Database=MoonPro;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
"MP.Land": "Server=SQL2016DEV;Database=MoonPro;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
"MP.Land.Auth": "Server=SQL2016DEV;Database=MoonPro_Anagrafica;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
//"MP.Land": "Server=SQL2016DEV;Database=MoonPro_ONE;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
@@ -68,8 +69,10 @@
"ServerConf": {
"BaseUrl": "https://localhost:44309/",
"CodApp": "MP-LAND",
+ "CodModulo": "MP-LAND",
"IobUploadPath": "C:\\inetpub\\wwwroot\\MP\\fileUpload",
"Modulo": "MoonPro",
- "downloadPath": "C:\\Steamware\\installers\\MP"
+ "downloadPath": "C:\\Steamware\\installers\\MP",
+ "Prog.ApiUrl": "https://office.egalware.com/MP/PROG"
}
}
\ No newline at end of file
diff --git a/MP.Prog/Components/ArchiveStatus.razor.cs b/MP.Prog/Components/ArchiveStatus.razor.cs
index 6630245e..d464a198 100644
--- a/MP.Prog/Components/ArchiveStatus.razor.cs
+++ b/MP.Prog/Components/ArchiveStatus.razor.cs
@@ -162,7 +162,7 @@ namespace MP.Prog.Components
sw.Restart();
// recupero elenco macchine
percLoading += 100 / numMacchine;
- numChecks = await FDService.UpdateMachineArchive(idxMacchina, numDays, true, false, MServ.UserName);
+ numChecks = await FDService.UpdateMachineArchive(idxMacchina, numDays, true, false, MServ.UserName, false);
await Task.Delay(1);
setupMessages.Add($"{idxMacchina}: {numChecks} files");
await InvokeAsync(StateHasChanged);
diff --git a/MP.Prog/Components/DiffView.razor b/MP.Prog/Components/DiffView.razor
index f1c3b368..76624666 100644
--- a/MP.Prog/Components/DiffView.razor
+++ b/MP.Prog/Components/DiffView.razor
@@ -6,7 +6,7 @@
@@ -18,7 +18,14 @@
diff --git a/MP.Prog/Components/DiffView.razor.cs b/MP.Prog/Components/DiffView.razor.cs
index 73e490dc..098e1d94 100644
--- a/MP.Prog/Components/DiffView.razor.cs
+++ b/MP.Prog/Components/DiffView.razor.cs
@@ -12,23 +12,32 @@ namespace MP.Prog.Components
{
#region Public Properties
+ [Parameter]
+ public bool CompareVers { get; set; } = false;
+
[Parameter]
public EventCallback diffDone { get; set; }
[Parameter]
- public string newText
+ public string NewText
{
get => _newText;
set => _newText = value;
}
[Parameter]
- public string oldText
+ public string NewTitle { get; set; } = "Attuale";
+
+ [Parameter]
+ public string OldText
{
get => _oldText;
set => _oldText = value;
}
+ [Parameter]
+ public string OldTitle { get; set; } = "Archivio";
+
#endregion Public Properties
#region Protected Fields
@@ -69,7 +78,7 @@ namespace MP.Prog.Components
numChanges = 0;
// calcolo diff
diff_match_patch dmp = new diff_match_patch();
- List diff = dmp.diff_main(oldText, newText);
+ List diff = dmp.diff_main(OldText, NewText);
//List diff = dmp.diff_main(oldTextFix, newTextFix);
dmp.diff_cleanupSemantic(diff);
@@ -86,12 +95,12 @@ namespace MP.Prog.Components
switch (item.operation)
{
case Operation.DELETE:
- sbOld.Append($"{HttpUtility.HtmlEncode(item.text)}");
+ sbOld.Append($"{HttpUtility.HtmlEncode(item.text)}");
numChanges++;
break;
case Operation.INSERT:
- sbNew.Append($"{HttpUtility.HtmlEncode(item.text)}");
+ sbNew.Append($"{HttpUtility.HtmlEncode(item.text)}");
numChanges++;
break;
@@ -129,8 +138,6 @@ namespace MP.Prog.Components
string fixVal = origVal.Trim()
.Replace(" ", " ")
.Replace(Environment.NewLine, sepDest);
- //.Replace("\r", sepDest)
- //.Replace("\n", sepDest);
return new MarkupString(fixVal);
}
diff --git a/MP.Prog/Components/FileEditor.razor b/MP.Prog/Components/FileEditor.razor
index be370606..8f4b4f58 100644
--- a/MP.Prog/Components/FileEditor.razor
+++ b/MP.Prog/Components/FileEditor.razor
@@ -1,43 +1,86 @@

@Body
diff --git a/MP.Land/Shared/NavMenu.razor b/MP.Land/Shared/NavMenu.razor
index 547e2abb..58b2fa2d 100644
--- a/MP.Land/Shared/NavMenu.razor
+++ b/MP.Land/Shared/NavMenu.razor
@@ -53,6 +53,14 @@
System Info
+ @if (IsSuperAdmin)
+ {
+
+
+ Task Scheduler
+
+
+ }
-
Archivio
+@OldTitle
-
Attuale
+ @if(CompareVers) + { +@NewTitle
+ } + else + { +@NewTitle
+ }
-
-
+
+
-
-
Dettaglio modifiche
+
+
+
+ Dettaglio modifiche
+
- @if (_currItem.Active)
- {
- @if (_currItem.DiskStatus != FileData.FileState.Ok)
+ ListRevSx
+ {
+ get
+ {
+ List answ = new List() { 0 };
+ for (int i = 1; i < SelRevDx; i++)
+ {
+ answ.Add(i);
+ }
+ return answ;
+ }
+ }
+ private List ListRevDx
+ {
+ get
+ {
+ List answ = new List();
+ for (int i = 0; i <= _currItem.Rev; i++)
+ {
+ answ.Add(i);
+ }
+ return answ;
+ }
+ }
+
+
+ private async Task DoCompare()
+ {
+ CompareRev = !CompareRev;
+ await LoadRevision();
+ FixTitles();
+ }
+
+ private void FixTitles()
+ {
+ // sistemo titoli
+ TitleSx = CompareRev ? $"Rev. {SelRevSx}" : "Archivio";
+ TitleDx = CompareRev ? $"Rev. {SelRevDx}" : "Attuale";
+ }
+
#region Public Methods
public string CurrFileContent(string fullPath)
@@ -91,12 +172,6 @@ namespace MP.Prog.Components
#endregion Protected Methods
- //private string userName = "";
- //protected override void OnInitialized()
- //{
- // userName = MServ.UserName;
- //}
-
#region Private Methods
private async Task ApproveChange()
@@ -106,7 +181,7 @@ namespace MP.Prog.Components
if (_currItem != null)
{
- await FDService.FileApprove(_currItem, MServ.UserName);
+ await FDService.FileModApprove(_currItem, MServ.UserName);
await DataUpdated.InvokeAsync(1);
}
else
@@ -150,7 +225,7 @@ namespace MP.Prog.Components
await DataReset.InvokeAsync(0);
await FDService.FileExport(_currItem);
await DataReset.InvokeAsync(0);
- await FDService.UpdateMachineArchive(_currItem.IdxMacchina, 1, false, false,MServ.UserName);
+ await FDService.UpdateMachineArchive(_currItem.IdxMacchina, 1, false, false, MServ.UserName, true);
await DataUpdated.InvokeAsync(1);
}
else
@@ -188,6 +263,38 @@ namespace MP.Prog.Components
}
}
+ private string FileContSx { get; set; } = "";
+ private string FileContDx { get; set; } = "";
+
+ private string TitleSx { get; set; } = "Archivio";
+ private string TitleDx { get; set; } = "Attuale";
+
+
+ protected override void OnParametersSet()
+ {
+ FileContSx = _currItem.FileStringContent;
+ FileContDx = CurrFileContent(_currItem.Path);
+ SelRevDx = _currItem.Rev;
+ FixTitles();
+ }
+
+ private async Task LoadRevision()
+ {
+ if (CompareRev)
+ {
+ var reqSx = await FDService.FileGetByKeyRev(_currItem.FileId, SelRevSx);
+ var reqDx = await FDService.FileGetByKeyRev(_currItem.FileId, SelRevDx);
+ FileContSx = reqSx.FileStringContent;
+ FileContDx = reqDx.FileStringContent;
+ }
+ else
+ {
+ FileContSx = _currItem.FileStringContent;
+ FileContDx = CurrFileContent(_currItem.Path);
+ }
+ FixTitles();
+ }
+
#endregion Private Methods
}
}
\ No newline at end of file
diff --git a/MP.Prog/Components/SearchMod.razor b/MP.Prog/Components/SearchMod.razor
index 1e5d7677..b1d4e49e 100644
--- a/MP.Prog/Components/SearchMod.razor
+++ b/MP.Prog/Components/SearchMod.razor
@@ -6,10 +6,7 @@
-
-
@code {
diff --git a/MP.Prog/Components/TagSearch.razor b/MP.Prog/Components/TagSearch.razor
index d1bf7e85..c16def20 100644
--- a/MP.Prog/Components/TagSearch.razor
+++ b/MP.Prog/Components/TagSearch.razor
@@ -14,7 +14,7 @@
-
+ @if (_currItem.Rev > 0)
{
-
\ No newline at end of file
diff --git a/MP.Prog/Components/FileEditor.razor.cs b/MP.Prog/Components/FileEditor.razor.cs
index 20f5e634..de286318 100644
--- a/MP.Prog/Components/FileEditor.razor.cs
+++ b/MP.Prog/Components/FileEditor.razor.cs
@@ -30,6 +30,7 @@ namespace MP.Prog.Components
set
{
_currItem = value;
+ CompareRev = false;
}
}
@@ -47,6 +48,86 @@ namespace MP.Prog.Components
#endregion Public Properties
+ private bool CompareRev = false;
+ protected int SelRevSx
+ {
+ get => _selRevSx;
+ set
+ {
+ if (_selRevSx != value)
+ {
+ _selRevSx = value;
+ // ricarico file SX
+ var pUpd = Task.Run(async () =>
+ {
+ await LoadRevision();
+ });
+ pUpd.Wait();
+ FixTitles();
+ }
+ }
+ }
+ protected int SelRevDx
+ {
+ get => _selRevDx;
+ set
+ {
+ if (_selRevDx != value)
+ {
+ _selRevDx = value;
+ // ricarico file DX
+ var pUpd = Task.Run(async () =>
+ {
+ await LoadRevision();
+ });
+ pUpd.Wait();
+ FixTitles();
+ }
+ }
+ }
+ private int _selRevSx = 0;
+ private int _selRevDx = 0;
+
+ private List
-
-
+
-
+ @if (CompareRev)
+ {
+
+ }
+ @if (_currItem.Active)
+ {
+ @if (_currItem.DiskStatus != FileData.FileState.Ok)
+ {
+
+ SX
+
+ DX
+
+
+
+ }
+ else
+ {
+
+ }
+
+
-
+
+
+
+
+
+
+
-
+ }
+ }
+ else
+ {
+
+
}
- }
- else
- {
-
+
+
+
+
+
-
- }
+
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
@if (!string.IsNullOrEmpty(SelFileName))
{
- @TextReduce(SelFileName, 20)
+ @TextReduce(SelFileName, 25)
+ }
+ @if (!string.IsNullOrEmpty(SelUserName))
+ {
+ @TextReduce(SelUserName, 20)
}
-
+
Tags
OpenDialog()" title="Aggiunta Tag">
-
+
ResetTag()" title="Reset Tag">
-
+
@@ -108,13 +114,20 @@
@if (!string.IsNullOrEmpty(SelTag))
{
@SelTag
}
- else
- {
- ...
- }
| + |
+ @if (currRecord != null)
+ {
+ |
File | -Rev / State / Size | +Rev | +Size / User | Macchina | Tags | Modificato | - @*Controllo | *@|
|---|---|---|---|---|---|---|---|---|---|---|
|
- @if (currRecord == null)
- {
- |
@record.Name
- @record.Path
+ |
-
-
-
- @record.Rev
-
-
-
-
- @record.DiskStatus
+
+ @record.Rev
+ |
+
+
+
+ @record.DiskStatus
+
-
-
-
- @CalcSize(record.Size)
-
+
+ |
+ @CalcSize(record.Size)
+
+
+ @if (!string.IsNullOrEmpty(record.UserAppr))
+ {
+
-
- @record.UserAppr
+
|
- @record.Macchina.Nome
@record.Macchina.Descrizione
+ |
@foreach (var item in record.Tags)
{
|
|
+ @record.LastMod.ToString("yyyy.MM.dd")
@record.LastMod.ToString("ddd HH:mm.ss")
+
+
+ @if (string.IsNullOrEmpty(record.UserAppr))
+ {
+ |
|
-
- @if (@record.IsError)
- {
-
- }
- else
- {
-
- }
+
+
+ @if (@record.IsError)
+ {
+
+ }
+ else
+ {
+
+ }
+
+
+ @($"{record.Duration:N3}") sec
+
@record.Result
|
diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj
index f45e6145..b25a603b 100644
--- a/MP.Stats/MP.Stats.csproj
+++ b/MP.Stats/MP.Stats.csproj
@@ -4,8 +4,8 @@