- 2026-04-10 1.1.13 Se corrige tsNotificacionesClient
This commit is contained in:
@@ -43,7 +43,7 @@ Public Class TsNotificacionesClient
|
|||||||
' ============================================================
|
' ============================================================
|
||||||
' MÉTODO PRINCIPAL: REGISTRAR NOTIFICACIÓN
|
' MÉTODO PRINCIPAL: REGISTRAR NOTIFICACIÓN
|
||||||
' ============================================================
|
' ============================================================
|
||||||
Public Shared Async Function RegistrarAsync(titulo As String, descripcion As String, TipoNotificacion As TipoNotificacionEnum, Optional Fichero As Byte() = Nothing, Optional IncluirMensajeEnLogDelSistema As Boolean = True) As Task
|
Public Shared Async Function RegistrarAsync(titulo As String, descripcion As String, Tipo As TipoNotificacionEnum, Optional Fichero As Byte() = Nothing, Optional IncluirMensajeEnLogDelSistema As Boolean = True) As Task
|
||||||
Try
|
Try
|
||||||
Dim logger = LogProvider.CreateLogger(Of TsNotificacionesClient)()
|
Dim logger = LogProvider.CreateLogger(Of TsNotificacionesClient)()
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ Public Class TsNotificacionesClient
|
|||||||
|
|
||||||
|
|
||||||
Dim ele As EventLogEntryType
|
Dim ele As EventLogEntryType
|
||||||
Select Case TipoNotificacion
|
Select Case Tipo
|
||||||
Case TipoNotificacionEnum.INFO
|
Case TipoNotificacionEnum.INFO
|
||||||
ele = EventLogEntryType.Information
|
ele = EventLogEntryType.Information
|
||||||
Case TipoNotificacionEnum.ADVERTENCIA
|
Case TipoNotificacionEnum.ADVERTENCIA
|
||||||
@@ -87,7 +87,7 @@ Public Class TsNotificacionesClient
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
' --- LINUX: ILogger → journald ---
|
' --- LINUX: ILogger → journald ---
|
||||||
Select Case TipoNotificacion
|
Select Case Tipo
|
||||||
Case TipoNotificacionEnum.INFO
|
Case TipoNotificacionEnum.INFO
|
||||||
logger.LogInformation($"{titulo} {descripcion}")
|
logger.LogInformation($"{titulo} {descripcion}")
|
||||||
Case TipoNotificacionEnum.ADVERTENCIA
|
Case TipoNotificacionEnum.ADVERTENCIA
|
||||||
@@ -103,7 +103,7 @@ Public Class TsNotificacionesClient
|
|||||||
' ============================================================
|
' ============================================================
|
||||||
Dim http = New HttpClient() With {.BaseAddress = New Uri(apiUrl)}
|
Dim http = New HttpClient() With {.BaseAddress = New Uri(apiUrl)}
|
||||||
|
|
||||||
Dim Tipo = CInt(TipoNotificacion)
|
Dim tipoNotificacion As Integer = CInt(Tipo)
|
||||||
Dim request = New HttpRequestMessage(HttpMethod.Post, "/api/alertas/registrar")
|
Dim request = New HttpRequestMessage(HttpMethod.Post, "/api/alertas/registrar")
|
||||||
request.Headers.Add("X-Api-Key", apiKey)
|
request.Headers.Add("X-Api-Key", apiKey)
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ Public Class TsNotificacionesClient
|
|||||||
ipServidor,
|
ipServidor,
|
||||||
titulo,
|
titulo,
|
||||||
descripcion,
|
descripcion,
|
||||||
Tipo
|
tipoNotificacion
|
||||||
})
|
})
|
||||||
|
|
||||||
Dim response = Await http.SendAsync(request)
|
Dim response = Await http.SendAsync(request)
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<PackageId>tsUtilidades</PackageId>
|
<PackageId>tsUtilidades</PackageId>
|
||||||
<PackageTags>net8.0, libreria</PackageTags>
|
<PackageTags>net8.0, libreria</PackageTags>
|
||||||
<Version>1.1.12</Version>
|
<Version>1.1.13</Version>
|
||||||
<Authors>Manuel</Authors>
|
<Authors>Manuel</Authors>
|
||||||
<Company>Tecnosis S.A</Company>
|
<Company>Tecnosis S.A</Company>
|
||||||
<Description>Utilidades Varias</Description>
|
<Description>Utilidades Varias</Description>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
- 2026-04-10 1.1.12 Se corrige tsNotificacionesClient
|
- 2026-04-10 1.1.13 Se corrige tsNotificacionesClient
|
||||||
- 2026-04-28 1.1.11 Se añade log del sistema a tsNotificacionesClient
|
- 2026-04-28 1.1.11 Se añade log del sistema a tsNotificacionesClient
|
||||||
- 2026-04-10 1.1.10 Se corrige tsNotificacionesClient
|
- 2026-04-10 1.1.10 Se corrige tsNotificacionesClient
|
||||||
- 2026-04-10 1.1.9 Se corrige tsNotificacionesClient
|
- 2026-04-10 1.1.9 Se corrige tsNotificacionesClient
|
||||||
|
|||||||
Reference in New Issue
Block a user