Aggiunto health check generale: .../api/health + update insomnia call
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,80 @@
|
||||
using LiMan.APi.Data;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.APi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Controller livello Health
|
||||
/// </summary>
|
||||
[Route("api/health")]
|
||||
[ApiController]
|
||||
public class HealthController : ControllerBase
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init generico
|
||||
/// </summary>
|
||||
/// <param name="DataService"></param>
|
||||
public HealthController(ApiDataService DataService)
|
||||
{
|
||||
dataService = DataService;
|
||||
Log.Info("Avviata classe HealthController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// GET api/health
|
||||
/// <summary>
|
||||
/// Recupera elenco applicativi dati cliente
|
||||
/// </summary>
|
||||
/// <param name="id">Codice cliente/Installazione</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<string> Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
/// GET api/health/id
|
||||
/// <summary>
|
||||
/// Restituisce info riguardo allo stato di salute di un servizio
|
||||
/// </summary>
|
||||
/// <param name="id">Tipo di servizio: db/redis/...</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public async Task<string> Get(string id)
|
||||
{
|
||||
string result = "NA";
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2204.2215</h4>
|
||||
<h4>Versione: 1.1.2204.2216</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2204.2215
|
||||
1.1.2204.2216
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2204.2215</version>
|
||||
<version>1.1.2204.2216</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>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.1.2204.2215</Version>
|
||||
<Version>1.1.2204.2216</Version>
|
||||
<RootNamespace>LiMan.UI</RootNamespace>
|
||||
<AssemblyName>LiMan.UI</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2204.2215</h4>
|
||||
<h4>Versione: 1.1.2204.2216</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2204.2215
|
||||
1.1.2204.2216
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2204.2215</version>
|
||||
<version>1.1.2204.2216</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>
|
||||
|
||||
Reference in New Issue
Block a user