1.1.4, added clientAppUrl property to config, passed through to DDVC01 EISC

This commit is contained in:
Heath Volmer
2018-04-27 14:44:54 -06:00
parent 62e2c3d19f
commit 4defea55f0
6 changed files with 41 additions and 4 deletions

View File

@@ -4,5 +4,6 @@
[assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyCompany("PepperDash Technology Corp")]
[assembly: AssemblyProduct("PepperDashEssentials")] [assembly: AssemblyProduct("PepperDashEssentials")]
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")] [assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")]
[assembly: AssemblyVersion("1.1.1.*")] [assembly: AssemblyVersion("1.1.4.*")]

View File

@@ -17,6 +17,9 @@ namespace PepperDash.Essentials
{ {
[JsonProperty("serverUrl")] [JsonProperty("serverUrl")]
public string ServerUrl { get; set; } public string ServerUrl { get; set; }
[JsonProperty("clientAppUrl")]
public string ClientAppUrl { get; set; }
} }
/// <summary> /// <summary>

View File

@@ -70,8 +70,41 @@ namespace PepperDash.Essentials
"mobileauth", "Authorizes system to talk to cotija server", ConsoleAccessLevelEnum.AccessOperator); "mobileauth", "Authorizes system to talk to cotija server", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s => ShowInfo(), CrestronConsole.AddNewConsoleCommand(s => ShowInfo(),
"mobileinfo", "Shows information for current mobile control session", ConsoleAccessLevelEnum.AccessOperator); "mobileinfo", "Shows information for current mobile control session", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s => { HttpDebugEnabled = (s.Trim() != "0"); }, CrestronConsole.AddNewConsoleCommand(s => {
s = s.Trim();
if(!string.IsNullOrEmpty(s))
{
HttpDebugEnabled = (s.Trim() != "0");
}
CrestronConsole.ConsoleCommandResponse("HTTP Debug {0}", HttpDebugEnabled ? "Enabled" : "Disabled");
},
"mobilehttpdebug", "1 enables more verbose HTTP response debugging", ConsoleAccessLevelEnum.AccessOperator); "mobilehttpdebug", "1 enables more verbose HTTP response debugging", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s =>
{
s = s.Trim();
if (string.IsNullOrEmpty(s))
{
CrestronConsole.ConsoleCommandResponse("Command must include http URL");
return;
}
try
{
var resp = new HttpClient().Get(s);
CrestronConsole.ConsoleCommandResponse("RESPONSE:\r{0}", resp);
}
catch (HttpException e)
{
CrestronConsole.ConsoleCommandResponse("Exception in request:");
CrestronConsole.ConsoleCommandResponse("Response URL: {0}", e.Response.ResponseUrl);
CrestronConsole.ConsoleCommandResponse("Response Error Code: {0}", e.Response.Code);
CrestronConsole.ConsoleCommandResponse("Response body: {0}", e.Response.ContentString);
}
},
"mobilehttprequest", "Tests an HTTP get to URL given", ConsoleAccessLevelEnum.AccessOperator);
} }
/// <summary> /// <summary>

View File

@@ -520,7 +520,7 @@ namespace PepperDash.Essentials.Room.Cotija
{ {
Debug.Console(1, this, "Server user code changed: {0}", UserCode); Debug.Console(1, this, "Server user code changed: {0}", UserCode);
EISC.StringInput[StringJoin.UserCodeToSystem].StringValue = UserCode; EISC.StringInput[StringJoin.UserCodeToSystem].StringValue = UserCode;
EISC.StringInput[StringJoin.ServerUrl].StringValue = Parent.Config.ServerUrl; EISC.StringInput[StringJoin.ServerUrl].StringValue = Parent.Config.ClientAppUrl;
} }
/// <summary> /// <summary>