Issue #5
This commit is contained in:
@@ -3,16 +3,31 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Dashboard Module class that holds all the information that gets displayed
|
||||
/// </summary>
|
||||
class DashboardModule {
|
||||
//The name the user gives the module
|
||||
public string ModuleName { get; set; }
|
||||
//The user who created it
|
||||
public string Creator { get; set; }
|
||||
//All the information that the server had
|
||||
public ServerInformation ServerInfo { get; set; }
|
||||
//The status indicator
|
||||
public string StatusIndicator { get; set; }
|
||||
//The background color of the status indicator
|
||||
public string StatusIndicatorBG { get; set; }
|
||||
//If the server is avaibale or not
|
||||
public bool ServerAvailable { get; set; }
|
||||
//The Module icon the user give the server, defaults to a generic server symbol
|
||||
public string ModuleIcon { get; set; }
|
||||
//Creation date with System.DateTime.Now
|
||||
public string CreationDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This will set the Module status indicator red or green if the server is available or not
|
||||
/// </summary>
|
||||
/// <param name="serverAvailable"></param>
|
||||
public DashboardModule(bool serverAvailable) {
|
||||
ServerAvailable = serverAvailable;
|
||||
StatusIndicator = ServerAvailable ? "#20c657" : "#e53935";
|
||||
|
||||
@@ -3,10 +3,19 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard.DashboardModules {
|
||||
/// <summary>
|
||||
/// The Information the user puts into the CreateNewModule form
|
||||
/// </summary>
|
||||
class NewModuleInformation {
|
||||
//The Name of the Module
|
||||
public string ModuleName { get; set; }
|
||||
//The Name of the Server
|
||||
public string ServerName { get; set; }
|
||||
//The Username
|
||||
public string Username { get; set; }
|
||||
//IPv4 Adress
|
||||
public string IPAdress { get; set; }
|
||||
//Port, defaults to 22
|
||||
public int Port { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,16 +4,30 @@ using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Server information class, this will probably scale pretty big later on
|
||||
/// This will hold all the information the socket will gather
|
||||
/// </summary>
|
||||
class ServerInformation {
|
||||
//The ServerName
|
||||
public string ServerName { get; set; }
|
||||
//The unix or windows username
|
||||
public string OSUserName { get; set; }
|
||||
//Cpu Temp in C
|
||||
public string CpuTemp { get; set; }
|
||||
//Gpu Temp in C
|
||||
public string GpuTemp { get; set; }
|
||||
//Server uptime
|
||||
public string Uptime { get; set; }
|
||||
//When the server was first deployed
|
||||
public string DeployDate { get; set; }
|
||||
//Public IPv4 Adress
|
||||
public string PublicIpAdress { get; set; }
|
||||
//Private IP adress from the servers network
|
||||
public string PrivateIpAdress { get; set; }
|
||||
//GPU usage in %
|
||||
public string GpuUsage { get; set; }
|
||||
//CPU usage in %
|
||||
public string CpuUsage { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user