[CHANGE] Services view

This commit is contained in:
max
2025-09-09 19:51:07 +02:00
parent 2593d02a73
commit 9ff4fcded2
6 changed files with 66 additions and 17 deletions

View File

@@ -1,5 +1,3 @@
using Manager.App.Models.System;
namespace Manager.App.Services.System;
public class BackgroundServiceManager
@@ -11,13 +9,8 @@ public class BackgroundServiceManager
_backgroundServices.Add(service);
}
public ListResult<ExtendedBackgroundService> GetServices(string serviceName, int total = 20, int skip = 0)
public List<ExtendedBackgroundService> GetServices()
{
var filtered = string.IsNullOrWhiteSpace(serviceName) ? _backgroundServices.ToArray() : _backgroundServices.Where(x => x.Name.Equals(serviceName, StringComparison.OrdinalIgnoreCase)).ToArray();
var results = filtered.OrderDescending()
.Skip(skip)
.Take(total);
return new ListResultReturn<ExtendedBackgroundService>(results.ToList(), filtered.Length);
return _backgroundServices.ToList();
}
}