Started adding node setup page
This commit is contained in:
parent
9bf129f1ad
commit
f172d765e3
3 changed files with 13 additions and 2 deletions
|
@ -6,6 +6,9 @@ namespace Moonlight.Core.Configuration;
|
|||
|
||||
public class CoreConfiguration
|
||||
{
|
||||
[JsonProperty("AppUrl")]
|
||||
[Description("This defines the public url of moonlight. This will be used by the nodes to communicate with moonlight")]
|
||||
public string AppUrl { get; set; } = "";
|
||||
[JsonProperty("Database")] public DatabaseData Database { get; set; } = new();
|
||||
[JsonProperty("Features")] public FeaturesData Features { get; set; } = new();
|
||||
[JsonProperty("Authentication")] public AuthenticationData Authentication { get; set; } = new();
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
@using Moonlight.Features.Servers.Entities
|
||||
@using MoonCore.Services
|
||||
@using Moonlight.Core.Configuration
|
||||
|
||||
@inject ConfigService<CoreConfiguration> ConfigService
|
||||
|
||||
<div class="card card-body p-8 fs-5">
|
||||
In order to setup this node, make sure you have a clean linux (tested with ubuntu 22.04) server with the capabilities to run docker.
|
||||
|
@ -15,8 +19,12 @@
|
|||
{
|
||||
[Parameter] public ServerNode Node { get; set; }
|
||||
|
||||
private string Channel = "custom";
|
||||
|
||||
private string GenerateSetupCommand()
|
||||
{
|
||||
return $"echo Do somthing smart here with {Node.Name}";
|
||||
var appUrl = ConfigService.Get().AppUrl;
|
||||
|
||||
return $"curl https://get-moonlight.app/install.sh | bash; mlcli daemon install {Channel} {appUrl} {Node.Token} {Node.HttpPort} {Node.Fqdn} {Node.Ssl.ToString().ToLower()}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<CrudColumn TItem="ServerNode" Field="@(x => x.Fqdn)" Title="Fqdn"/>
|
||||
<CrudColumn TItem="ServerNode" Field="@(x => x.Id)" Title="Status">
|
||||
<Template>
|
||||
<span class="text-success">Online</span>
|
||||
<span class="text-muted">N/A</span>
|
||||
</Template>
|
||||
</CrudColumn>
|
||||
</View>
|
||||
|
|
Loading…
Reference in a new issue