Started adding node setup page
This commit is contained in:
@@ -6,6 +6,9 @@ namespace Moonlight.Core.Configuration;
|
|||||||
|
|
||||||
public class CoreConfiguration
|
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("Database")] public DatabaseData Database { get; set; } = new();
|
||||||
[JsonProperty("Features")] public FeaturesData Features { get; set; } = new();
|
[JsonProperty("Features")] public FeaturesData Features { get; set; } = new();
|
||||||
[JsonProperty("Authentication")] public AuthenticationData Authentication { get; set; } = new();
|
[JsonProperty("Authentication")] public AuthenticationData Authentication { get; set; } = new();
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
@using Moonlight.Features.Servers.Entities
|
@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">
|
<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.
|
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; }
|
[Parameter] public ServerNode Node { get; set; }
|
||||||
|
|
||||||
|
private string Channel = "custom";
|
||||||
|
|
||||||
private string GenerateSetupCommand()
|
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.Fqdn)" Title="Fqdn"/>
|
||||||
<CrudColumn TItem="ServerNode" Field="@(x => x.Id)" Title="Status">
|
<CrudColumn TItem="ServerNode" Field="@(x => x.Id)" Title="Status">
|
||||||
<Template>
|
<Template>
|
||||||
<span class="text-success">Online</span>
|
<span class="text-muted">N/A</span>
|
||||||
</Template>
|
</Template>
|
||||||
</CrudColumn>
|
</CrudColumn>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user