Update controller x aggiunta sendReboot da IOB + test fix yaml nuget

This commit is contained in:
Samuele Locatelli
2022-04-21 08:31:28 +02:00
parent 4f89000a0c
commit 4eba76ba58
2 changed files with 38 additions and 1 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ SDK:
script:
- '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m'
- '& Remove-Item *.nupkg'
- '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL'
- '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF,owners=EgalWare,authors=S.E.Locatelli -Version $env:NEW_REL'
- '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted'
- '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted'
# - *sendSDK
+37
View File
@@ -1195,6 +1195,43 @@ namespace MP_IO.Controllers
return answ;
}
/// <summary>
/// Salva MAC adress + IP dopo il reboot
/// GET: IOB/sendReboot?idxMacchina=5&mac=18:C0:4D:37:3C:8C
/// </summary>
/// <param name="GWIP">IP del Gateway</param>
/// <returns></returns>
public string sendReboot(string idxMacchina, string mac)
{
string answ = "NO";
string IPv4 = "";
string agent = "";
try
{
// recupero IP del client remoto
IPv4 = Request.UserHostName;
agent = Request.UserAgent;
}
catch
{ }
try
{
// ora salvo che la macchina è stata (ri)avviata...
MapoDb.MapoDb MapoDbObj = new MapoDb.MapoDb();
MapoDbObj.registraStartup(idxMacchina, IPv4, agent, mac);
answ = "OK";
}
catch (Exception exc)
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
string errore = string.Format("Errore: {0}{1}", Environment.NewLine, exc);
logger.lg.scriviLog(errore, tipoLog.EXCEPTION);
}
}
return answ;
}
/// <summary>
/// Salva IP del gateway dopo il reboot
/// </summary>