Merge branch 'master' into master

This commit is contained in:
Shaun Walker
2020-04-26 13:27:16 -04:00
committed by GitHub
83 changed files with 1461 additions and 4096 deletions

View File

@ -0,0 +1,10 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Oqtane.Services
{
public interface ISystemService
{
Task<Dictionary<string, string>> GetSystemInfoAsync();
}
}

View File

@ -0,0 +1,32 @@
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Oqtane.Shared;
using System.Collections.Generic;
namespace Oqtane.Services
{
public class SystemService : ServiceBase, ISystemService
{
private readonly SiteState _siteState;
private readonly NavigationManager _navigationManager;
public SystemService(HttpClient http, SiteState siteState, NavigationManager navigationManager) : base(http)
{
_siteState = siteState;
_navigationManager = navigationManager;
}
private string Apiurl
{
get { return CreateApiUrl(_siteState.Alias, _navigationManager.Uri, "System"); }
}
public async Task<Dictionary<string, string>> GetSystemInfoAsync()
{
return await GetJsonAsync<Dictionary<string, string>>(Apiurl);
}
}
}