12 Commits

Author SHA1 Message Date
marco.salvi da56ffcca8 Pagina lista ticket aggiunto filtro per applicazione e installazione 2022-02-11 14:22:01 +01:00
marco.salvi a5ec8f2105 Inserita paginazione lista ticket, modifica visualizzazione e campi relativi 2022-02-09 16:50:34 +01:00
marco.salvi 5a8b618a68 Merge remote-tracking branch 'origin/develop' into NetCore6Up 2022-02-09 15:59:33 +01:00
Samuele Locatelli fcdb96834e Modifica ticketDTO x recupero app/inst 2022-02-09 15:32:12 +01:00
marco.salvi 6b868ee1a0 Merge branch 'feature/NewTicketUI' into NetCore6Up 2022-02-09 14:46:24 +01:00
marco.salvi c35afc82c6 test upgrade core6 2022-02-09 14:44:34 +01:00
marco.salvi 45c5de32a8 Merge remote-tracking branch 'origin/develop' into feature/NewTicketUI 2022-02-09 12:49:31 +01:00
Samuele Locatelli 5d49772dba Merge tag 'AddWindowsAuth' into develop
Aggiunta windows auth
2022-02-09 12:48:13 +01:00
Samuele Locatelli 017f3ea2b1 Merge branch 'release/AddWindowsAuth' 2022-02-09 12:48:08 +01:00
Samuele Locatelli 5eb53c677d Fix gestione autenticazione in progetto 2022-02-09 12:47:20 +01:00
Samuele Locatelli 20fc4f1793 Aggiunta gestione AUTH su pagine 2022-02-09 12:47:12 +01:00
Samuele Locatelli 1239951b72 Merge remote-tracking branch 'origin/feature/NewTicketUI' into develop 2022-02-09 12:30:01 +01:00
26 changed files with 429 additions and 227 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
+3
View File
@@ -6,6 +6,9 @@ namespace Core.DTO
{
#region Public Properties
public string CodApp { get; set; } = "";
public string CodInst { get; set; } = "";
/// <summary>
/// Codice univoco della sub licenza (opzionale)
/// </summary>
+1 -1
View File
@@ -21,7 +21,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
+93 -59
View File
@@ -77,6 +77,28 @@ namespace LiMan.DB.Controllers
return fatto;
}
public bool AttivazioniDelete(int idxSubLic)
{
bool fatto = false;
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
{
// recupero record
var currData = localDbCtx
.DbSetSubLicenze
.Where(x => x.IdxSubLic == idxSubLic)
.FirstOrDefault();
// se ho qualcosa procedo...
if (currData != null)
{
localDbCtx.DbSetSubLicenze.Remove(currData);
// salvo
localDbCtx.SaveChanges();
fatto = true;
}
}
return fatto;
}
/// <summary>
/// Lista attivfazioni x licenza
/// </summary>
@@ -253,29 +275,6 @@ namespace LiMan.DB.Controllers
}
return fatto;
}
public bool AttivazioniDelete(int idxSubLic)
{
bool fatto = false;
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
{
// recupero record
var currData = localDbCtx
.DbSetSubLicenze
.Where(x => x.IdxSubLic == idxSubLic)
.FirstOrDefault();
// se ho qualcosa procedo...
if (currData != null)
{
localDbCtx.DbSetSubLicenze.Remove(currData);
// salvo
localDbCtx.SaveChanges();
fatto = true;
}
}
return fatto;
}
public bool DbForceMigrate()
{
bool answ = false;
@@ -882,6 +881,42 @@ namespace LiMan.DB.Controllers
return fatto;
}
public List<TicketDTO> TicketGetAll(bool onlyOpen, int maxNum)
{
List<TicketDTO> dbResult = new List<TicketDTO>();
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
{
dbResult = localDbCtx
.DbSetTicket
.Where(x => (x.Status <= StatoRichiesta.Valutazione || !onlyOpen))
.OrderByDescending(x => x.IdxTicket)
.Include(l => l.LicenzaNav)
.Take(maxNum)
.Select(x => new TicketDTO
{
CodApp = x.LicenzaNav.CodApp,
CodInst = x.LicenzaNav.CodInst,
IdxTicket = x.IdxTicket,
IdxLic = x.IdxLic,
IdxSubLic = x.IdxSubLic,
CodImpiego = x.CodImpiego,
ContactName = x.ContactName,
ContactEmail = x.ContactEmail,
ContactPhone = x.ContactPhone,
DtReq = x.DtReq,
ReqBody = x.ReqBody,
Status = x.Status,
SupplAnsw = x.SupplAnsw,
SupplEmail = x.SupplEmail,
SupplUserCode = x.SupplUserCode,
Tipo = x.Tipo
})
.ToList();
}
return dbResult;
}
public List<TicketDTO> TicketGetFilt(bool onlyOpen, TipologiaTicket Tipo, string CodApp, string CodInst, string MasterKey, int maxNum)
{
List<TicketDTO> dbResult = new List<TicketDTO>();
@@ -923,6 +958,41 @@ namespace LiMan.DB.Controllers
return dbResult;
}
public List<TicketDTO> TicketGetFilt(bool onlyOpen, string CodApp, string CodInst)
{
List<TicketDTO> dbResult = new List<TicketDTO>();
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
{
dbResult = localDbCtx
.DbSetTicket
.Where(x => (x.Status <= StatoRichiesta.Valutazione || !onlyOpen) && (x.LicenzaNav.CodApp == CodApp || string.IsNullOrEmpty(CodApp)) && (x.LicenzaNav.CodInst == CodInst || string.IsNullOrEmpty(CodInst)))
.OrderByDescending(x => x.IdxTicket)
.Include(l => l.LicenzaNav)
.Select(x => new TicketDTO
{
CodApp = x.LicenzaNav.CodApp,
CodInst = x.LicenzaNav.CodInst,
IdxTicket = x.IdxTicket,
IdxLic = x.IdxLic,
IdxSubLic = x.IdxSubLic,
CodImpiego = x.CodImpiego,
ContactName = x.ContactName,
ContactEmail = x.ContactEmail,
ContactPhone = x.ContactPhone,
DtReq = x.DtReq,
ReqBody = x.ReqBody,
Status = x.Status,
SupplAnsw = x.SupplAnsw,
SupplEmail = x.SupplEmail,
SupplUserCode = x.SupplUserCode,
Tipo = x.Tipo
})
.ToList();
}
return dbResult;
}
public List<TicketDTO> TicketGetFiltAllLic(bool onlyOpen, TipologiaTicket Tipo, string CodApp, string CodInst, int maxNum)
{
List<TicketDTO> dbResult = new List<TicketDTO>();
@@ -963,42 +1033,6 @@ namespace LiMan.DB.Controllers
}
return dbResult;
}
public List<TicketDTO> TicketGetAll(bool onlyOpen, int maxNum)
{
List<TicketDTO> dbResult = new List<TicketDTO>();
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
{
dbResult = localDbCtx
.DbSetTicket
.Where(x => (x.Status <= StatoRichiesta.Valutazione || !onlyOpen))
.OrderByDescending(x => x.IdxTicket)
.Take(maxNum)
.Select(x => new TicketDTO
{
IdxTicket = x.IdxTicket,
IdxLic = x.IdxLic,
IdxSubLic = x.IdxSubLic,
CodImpiego = x.CodImpiego,
ContactName = x.ContactName,
ContactEmail = x.ContactEmail,
ContactPhone = x.ContactPhone,
DtReq = x.DtReq,
ReqBody = x.ReqBody,
Status = x.Status,
SupplAnsw = x.SupplAnsw,
SupplEmail = x.SupplEmail,
SupplUserCode = x.SupplUserCode,
Tipo = x.Tipo
})
.ToList();
}
return dbResult;
}
public bool TicketUpdateState(int IdxTicket, StatoRichiesta NewStatus)
{
bool fatto = false;
+9 -9
View File
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="2.15.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.10">
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
<PackageReference Include="NLog" Version="4.7.11" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
<PackageReference Include="NLog" Version="4.7.13" />
</ItemGroup>
<ItemGroup>
+7 -7
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
@@ -9,15 +9,15 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.10">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
<PackageReference Include="NLog" Version="4.7.11" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
<PackageReference Include="NLog" Version="4.7.13" />
</ItemGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>License Manager</i>
<h4>Versione: 1.1.2202.0907</h4>
<h4>Versione: 1.1.2202.0915</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
1.1.2202.0907
1.1.2202.0915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2202.0907</version>
<version>1.1.2202.0915</version>
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+12 -10
View File
@@ -1,10 +1,12 @@
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>
+3 -1
View File
@@ -8,7 +8,9 @@
<div class="form-row pt-3">
<div class="col-7 col-md-6 col-lg-4 col-xl-3">
@*<LoginDisplay></LoginDisplay>*@
<AuthorizeView>
<LoginDisplay />
</AuthorizeView>
</div>
<div class="col-12 col-lg-4 col-xl-6 d-none d-lg-block text-center h4 text-truncate">
<span class="@PageIcon" aria-hidden="true"></span> @PageName
+151 -123
View File
@@ -5,146 +5,174 @@
@using System.IO
@inject IJSRuntime JS
<div class="row">
<div class="@mainCss">
<div class="card">
<div class="card-header bg-success py-1 text-light">
<h3>Tickets</h3>
<div class="px-2">
<div class="row">
<div class="@mainCss">
<div class="card">
<div class="card-header bg-success py-1 text-light">
<h3>Tickets</h3>
</div>
<div class="col-9">
<div class="d-flex flex-row-reverse justify-content-between">
<div class="p-2">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
Installazione
</span>
</div>
<select @bind="@SelInst" class="form-control form-control-sm">
<option value="">--- Tutti ---</option>
@if (ListInstall != null)
{
foreach (var item in ListInstall)
{
<option value="@item.CodInst">@item.CodInst | @item.Descrizione</option>
}
}
</select>
</div>
</div>
<div class="p-2">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
Applicazione
</span>
</div>
<select @bind="@SelApp" class="form-control form-control-sm">
<option value="">--- Tutti ---</option>
@if (ListApp != null)
{
foreach (var item in ListApp)
{
<option value="@item.CodApp">@item.CodApp | @item.Descrizione</option>
}
}
</select>
</div>
</div>
</div>
</div>
<div class="card-body bg-light p-1">
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
else if (totalCount == 0)
{
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
}
else
{
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
<th>
<button type="button" class="btn btn-sm btn-warning btn-block" @onclick="() => ReloadAllData()"><i class="fas fa-times"></i></button>
</th>
<th>Applicativo</th>
<th>Installazione</th>
<th>#</th>
<th>Stato</th>
<th>Richiedente</th>
<th>Data Richiesta</th>
<th>Email</th>
<th>Telefono</th>
<th>
Descrizione
</th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr>
<td>
<button type="button" class="btn btn-sm btn-primary" @onclick="() => showDet(record)"><i class="fas fa-search"></i></button>
</td>
<td>
@record.CodApp
</td>
<td>
@record.CodInst
</td>
<td>
@record.IdxTicket<br />
</td>
<td>
@record.Status
</td>
<td>
<div><b>@record.ContactName</b></div>
</td>
<td>
<div>@record.DtReq</div>
</td>
<td>
<div>@record.ContactEmail</div>
</td>
<td>
<div>@record.ContactPhone</div>
</td>
<td>
@record.ReqBody
</td>
</tr>
}
</tbody>
</table>
}
</div>
<div class="card-footer">
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="PagerReloadNum" numPageChanged="PagerReloadPage" totalCount="totalCount" showLoading="isLoading" />
</div>
</div>
</div>
<div class="card-body bg-light p-1">
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
else if (totalCount == 0)
{
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
}
else
{
@if (idxTicketSel > 0)
{
<div class="col-3">
<div>
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
<th>
<button type="button" class="btn btn-sm btn-warning btn-block" @onclick="() => ReloadAllData()"><i class="fas fa-times"></i></button>
</th>
<th>#</th>
<th>Richiedente</th>
<th>Contatti</th>
<th>
Descrizione
</th>
<th>Nome File</th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
@foreach (var record in FileAttached)
{
<tr>
<td>
<button type="button" class="btn btn-sm btn-primary" @onclick="() => showDet(record)"><i class="fas fa-search"></i></button>
</td>
<td>
@record.IdxTicket<br />
@record.Status
</td>
<td>
<div><b>@record.ContactName</b></div>
<div>@record.DtReq</div>
</td>
<td>
<div>@record.ContactEmail</div>
<div>@record.ContactPhone</div>
</td>
<td>
@record.ReqBody
@*<button @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</button>*@
<a href="@(Configuration["ApiUrl"]+"/ELM.API/api/filesave/"+@record.FullStoragePath+"/"+@record.OriginalName)" target="_blank">@record.OriginalName</a>
@*<a @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</a>*@
</td>
</tr>
}
</tbody>
</table>
}
@* <button @onclick="DownloadFileFromURL">
Download File From URL
</button>*@
</div>
</div>
</div>
}
</div>
@if (idxTicketSel > 0)
{
<div class="col-3">
<div>
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
<th>Nome File</th>
<th>FullStoragePath</th>
</tr>
</thead>
<tbody>
@foreach (var record in FileAttached)
{
<tr>
<td>
@*<button @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</button>*@
<a href="@(Configuration["ApiUrl"]+"/ELM.API/api/filesave/"+@record.FullStoragePath+"/"+@record.OriginalName)" target="_blank">@record.OriginalName</a>
@*<a @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</a>*@
</td>
<td>
<div>@record.FullStoragePath</div>
</td>
</tr>
}
</tbody>
</table>
@* <button @onclick="DownloadFileFromURL">
Download File From URL
</button>*@
</div>
</div>
}
</div>
@*<div class="card-body bg-light p-2">
@if (idxTicketSel > 0)
{
<div>
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
<th>#</th>
<th>OriginalName</th>
@*<th>FullStoragePath</th>
</tr>
</thead>
<tbody>
@foreach (var record in FileAttached)
{
<tr>
<td>
@record.OriginalName<br />
</td>
@*<td>
<div>@record.FullStoragePath</div>
</td>
</tr>
}
</tbody>
</table>
</div>
}
</div>
*@
+99 -4
View File
@@ -18,6 +18,9 @@ namespace LiMan.UI.Components
private List<SubLicenzaModel> ListActivations;
private List<TicketDTO> ListRecords;
private List<TicketDTO> SearchRecords;
private List<InstallazioneModel> ListInstall;
private List<ApplicativoModel> ListApp;
protected int totalCount = 0;
private List<FileAttachModel> FileAttached;
@@ -98,6 +101,9 @@ namespace LiMan.UI.Components
#region Private Methods
[Inject]
protected MessageService AppMService { get; set; }
private async Task fullReload()
{
await DataService.InvalidateAllCache();
@@ -115,14 +121,103 @@ namespace LiMan.UI.Components
ListActivations = null;
idxTicketSel = 0;
await Task.Delay(1);
ListApp = await DataService.ApplicazioniNextGetAll();
ListInstall = await DataService.InstallazioniNextGetAll();
//bool StatoRichiesta = true;
ListRecords = await DataService.TicketsGetAll();
totalCount = ListRecords.Count();
//SearchRecords = await DataService.LicenzeNextGetFilt(AppMService.DetailDBFilter);
SearchRecords = await DataService.TicketsGetFilt(true, SelApp, SelInst);
//totalCount = SearchRecords.Count();
//ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
//ListRecords = await DataService.TicketsGetAll();
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
totalCount = SearchRecords.Count();
isLoading = false;
}
private string SelInst
{
get
{
string answ = "";
if (AppMService.DetailDBFilter != null)
{
answ = AppMService.DetailDBFilter.InstallazioneSel;
}
return answ;
}
set
{
if (!AppMService.DetailDBFilter.InstallazioneSel.Equals(value))
{
AppMService.DetailDBFilter.InstallazioneSel = value;
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
}
private string SelApp
{
get
{
string answ = "";
if (AppMService.DetailDBFilter != null)
{
answ = AppMService.DetailDBFilter.ApplicazioneSel;
}
return answ;
}
set
{
if (!AppMService.DetailDBFilter.ApplicazioneSel.Equals(value))
{
AppMService.DetailDBFilter.ApplicazioneSel = value;
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
}
private int numRecord
{
get
{
return AppMService.PageSize;
}
set
{
AppMService.PageSize = value;
}
}
private int currPage
{
get
{
return AppMService.PageNum;
}
set
{
AppMService.PageNum = value;
}
}
protected async Task PagerReloadNum(int newNum)
{
numRecord = newNum;
await ReloadAllData();
isLoading = false;
}
protected async Task PagerReloadPage(int newNum)
{
currPage = newNum;
await ReloadAllData();
isLoading = false;
}
//private async void DownloadFileFromURL(string fileName, string rawUrl)
//{
// rawUrl = rawUrl.Replace("\\", "/");
+19
View File
@@ -650,6 +650,25 @@ namespace LiMan.UI.Data
return await Task.FromResult(dbResult);
}
/// <summary>
/// Ricerca ticket filtrati
/// </summary>
/// <param name="onlyOpen"></param>
/// <param name="CodApp"></param>
/// <param name="CodInst"></param>
/// <returns></returns>
public async Task<List<TicketDTO>> TicketsGetFilt(bool onlyOpen,string CodApp, string CodInst)
{
Stopwatch stopWatch = new Stopwatch();
List<TicketDTO> dbResult = new List<TicketDTO>();
stopWatch.Start();
dbResult = dbControllerNext.TicketGetFilt(onlyOpen,CodApp,CodInst);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per TicketsGetFilt: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
#endregion Public Methods
}
}
+4 -3
View File
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Version>1.1.2202.0907</Version>
<TargetFramework>net6.0</TargetFramework>
<Version>1.1.2202.1113</Version>
<RootNamespace>LiMan.UI</RootNamespace>
<AssemblyName>LiMan.UI</AssemblyName>
</PropertyGroup>
@@ -37,7 +37,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.10">
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
+1
View File
@@ -1,4 +1,5 @@
@page "/Applicazioni"
@attribute [Authorize]
@using LiMan.UI.Components
@using LiMan.UI.Data
+1
View File
@@ -1,4 +1,5 @@
@page "/Installazioni"
@attribute [Authorize]
@using LiMan.UI.Components
@using LiMan.UI.Data
+1
View File
@@ -1,4 +1,5 @@
@page "/LiManDB"
@attribute [Authorize]
@using LiMan.UI.Components
+1
View File
@@ -1,4 +1,5 @@
@page "/LiManGLS"
@attribute [Authorize]
@using LiMan.UI.Components
+1
View File
@@ -1,4 +1,5 @@
@page "/LicenseManager"
@attribute [Authorize]
@using LiMan.UI.Components
+1
View File
@@ -1,4 +1,5 @@
@page "/ListaTicket"
@attribute [Authorize]
@using LiMan.UI.Components
@using LiMan.UI.Data
+2 -2
View File
@@ -1,7 +1,7 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:61247",
"sslPort": 44392
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>License Manager</i>
<h4>Versione: 1.1.2202.0907</h4>
<h4>Versione: 1.1.2202.1113</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
1.1.2202.0907
1.1.2202.1113
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2202.0907</version>
<version>1.1.2202.1113</version>
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+12
View File
@@ -16,6 +16,7 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.Extensions.FileProviders;
using Microsoft.AspNetCore.Authentication.Negotiate;
using Microsoft.AspNetCore.Http;
namespace LiMan.UI
@@ -85,6 +86,9 @@ namespace LiMan.UI
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
@@ -96,6 +100,14 @@ namespace LiMan.UI
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
.AddNegotiate();
services.AddAuthorization(options =>
{
// By default, all incoming requests will be authorized according to the default policy.
options.FallbackPolicy = options.DefaultPolicy;
});
// cookie applicazione da 14 gg (defaul) a 30
services.ConfigureApplicationCookie(o =>
{