mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Fix HostNamePrompt. Add server info to Server Config page.
This commit is contained in:
parent
0a19a72f05
commit
739f15432c
@ -15,11 +15,15 @@
|
||||
<Platforms>AnyCPU;x86;x64</Platforms>
|
||||
<AssemblyName>Remotely_Agent</AssemblyName>
|
||||
<RootNamespace>Remotely.Agent</RootNamespace>
|
||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||
<ApplicationIcon>Assets\favicon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="favicon.ico" />
|
||||
<None Remove="Assets\favicon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\favicon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -46,10 +50,6 @@
|
||||
<ProjectReference Include="..\Shared\Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="favicon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Services\WindowsService.cs" />
|
||||
|
||||
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
@ -7,7 +7,7 @@
|
||||
xmlns:local="clr-namespace:Remotely.Desktop.Win.Controls"
|
||||
xmlns:ViewModels="clr-namespace:Remotely.Desktop.Win.ViewModels" x:Name="PromptWindow"
|
||||
mc:Ignorable="d"
|
||||
Title="Remotely Host Name" Height="150" Width="350" WindowStartupLocation="CenterOwner" Icon="/Remotely_Icon.png">
|
||||
Title="Remotely Host Name" Height="150" Width="350" WindowStartupLocation="CenterOwner" Icon="/Assets/Remotely_Icon.png">
|
||||
<Window.DataContext>
|
||||
<ViewModels:HostNamePromptViewModel/>
|
||||
</Window.DataContext>
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
@page
|
||||
@using Remotely.Server.Hubs
|
||||
@inject Remotely.Server.Services.DataService DataService
|
||||
@model ServerConfigModel
|
||||
@{
|
||||
ViewData["Title"] = "Server Config";
|
||||
@ -8,18 +10,41 @@
|
||||
|
||||
@if (Model.IsServerAdmin)
|
||||
{
|
||||
<partial name="_StatusMessage" for="StatusMessage" />
|
||||
<h5 class="mt-3">Server Info</h5>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-4" style="display:flex; justify-content: space-evenly">
|
||||
<div class="d-inline-block text-center mr-2">
|
||||
<label>Devices Online</label>
|
||||
<br />
|
||||
<span class="badge badge-primary p-2">@AgentHub.ServiceConnections.Count</span>
|
||||
</div>
|
||||
<div class="d-inline-block text-center mr-2">
|
||||
<label>Devices Total</label>
|
||||
<br />
|
||||
<span class="badge badge-primary p-2">@DataService.GetTotalDevices()</span>
|
||||
</div>
|
||||
<div class="d-inline-block text-center">
|
||||
<label>Environment</label>
|
||||
<br />
|
||||
<span class="badge badge-primary p-2">@Model.Environment</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<form id="serverConfigForm" method="post" autocomplete="off">
|
||||
<div class="text-right">
|
||||
<span class="badge badge-info p-2">Environment: @Model.Environment</span>
|
||||
</div>
|
||||
|
||||
<h5>Application Settings</h5>
|
||||
|
||||
<partial name="_StatusMessage" for="StatusMessage" />
|
||||
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
|
||||
<h4>Application Settings</h4>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label asp-for="AppSettingsInput.AllowApiLogin"></label>
|
||||
<br />
|
||||
|
||||
@ -772,6 +772,11 @@ namespace Remotely.Server.Services
|
||||
return RemotelyContext.SharedFiles.Find(fileID);
|
||||
}
|
||||
|
||||
public int GetTotalDevices()
|
||||
{
|
||||
return RemotelyContext.Devices.Count();
|
||||
}
|
||||
|
||||
public RemotelyUser GetUserByID(string userID)
|
||||
{
|
||||
if (userID == null)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user