remove dead UploadBundle code and fix Lenovo model detection

- Remove UploadBundleRequest, UploadBundleResponse classes (ApiModels.cs)
- Remove UploadBundle API endpoint constant (Constants.cs)
- Remove GetBundleUploadUrlAsync method (BackendApiClient.cs) — no callers anywhere
- Fix HardwareInfo: Lenovo devices report the marketing model name in
  Win32_ComputerSystemProduct.Version, not Win32_ComputerSystem.Model;
  add Lenovo-specific WMI fallback for correct model string

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Oliver Kieselbach
2026-02-24 23:28:53 +01:00
parent 1b066ba634
commit bbf815f739
3 changed files with 1 additions and 34 deletions
@@ -135,16 +135,6 @@ namespace AutopilotMonitor.Agent.Core.Monitoring.Network
return result;
}
/// <summary>
/// Gets a SAS URL for uploading a troubleshooting bundle
/// </summary>
public async Task<UploadBundleResponse> GetBundleUploadUrlAsync(UploadBundleRequest request)
{
var url = $"{_baseUrl}{Constants.ApiEndpoints.UploadBundle}";
var response = await PostAsync<UploadBundleRequest, UploadBundleResponse>(url, request);
return response;
}
/// <summary>
/// Requests a short-lived SAS URL for diagnostics package upload.
/// Called just before upload so the URL is never stored in config or on disk.
@@ -69,8 +69,7 @@ namespace AutopilotMonitor.Shared
{
public const string RegisterSession = "/api/sessions/register";
public const string IngestEvents = "/api/events/ingest";
public const string UploadBundle = "/api/bundles/upload";
public const string GetAgentConfig = "/api/agent/config";
public const string GetAgentConfig = "/api/agent/config";
public const string GatherRules = "/api/gather-rules";
public const string AnalyzeRules = "/api/analyze-rules";
public const string GetDiagnosticsUploadUrl = "/api/diagnostics/upload-url";
@@ -86,28 +86,6 @@ namespace AutopilotMonitor.Shared.Models
public int RetryAfterSeconds { get; set; }
}
/// <summary>
/// Request to upload a troubleshooting bundle
/// </summary>
public class UploadBundleRequest
{
public string SessionId { get; set; }
public string TenantId { get; set; }
public string BundleFileName { get; set; }
}
/// <summary>
/// Response with SAS URL for bundle upload
/// </summary>
public class UploadBundleResponse
{
public bool Success { get; set; }
public string SasUrl { get; set; }
public string BlobPath { get; set; }
public DateTime ExpiresAt { get; set; }
public string Message { get; set; }
}
/// <summary>
/// Request to get a short-lived SAS URL for diagnostics package upload.
/// Called by the agent just before upload — the URL is never cached in config.