From c969b72a822befd7b68dde9196cc7415e5b51663 Mon Sep 17 00:00:00 2001 From: Kim Date: Thu, 25 May 2023 09:18:41 +0200 Subject: [PATCH] Fixed a bug that stopped the updating of installations --- csharp/App/VrmGrabber/Controller.cs | 59 ++++++++++++++++++++++------ csharp/App/VrmGrabber/Database/Db.cs | 41 +++++++++++-------- 2 files changed, 71 insertions(+), 29 deletions(-) diff --git a/csharp/App/VrmGrabber/Controller.cs b/csharp/App/VrmGrabber/Controller.cs index 03006cc92..ea79c157a 100644 --- a/csharp/App/VrmGrabber/Controller.cs +++ b/csharp/App/VrmGrabber/Controller.cs @@ -1,16 +1,15 @@ -using System.Data.Common; -using System.IdentityModel.Tokens.Jwt; -using System.Web; +using CliWrap; +using CliWrap.Buffered; using HandlebarsDotNet; -using InnovEnergy.App.RemoteSupportConsole; using InnovEnergy.App.VrmGrabber.Database; +using InnovEnergy.Lib.Utils; using Microsoft.AspNetCore.Mvc; using FILE=System.IO.File; using VrmInstallation = InnovEnergy.Lib.Victron.VictronVRM.Installation; namespace InnovEnergy.App.VrmGrabber; -public record Install( +public record InstallationToHtmlInterface( String Name, String Ip, Int64 Vrm, @@ -26,12 +25,17 @@ public record Install( [Controller] public class Controller : ControllerBase { + + //Todo automatically grab newest version? + private const String FirmwareVersion = "VERSION"; + + [HttpGet] [Route("/")] [Produces("text/html")] public ActionResult Index() { - String source = @" + const String source = @"