fec3d00ff9
+ Added client configuration api * Refactored serverconfig
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using Step.Model.DTOModels;
|
|
using System.Web.Http;
|
|
using static Step.Config.StartupConfig;
|
|
|
|
namespace Step.Controllers.WebApi
|
|
{
|
|
[RoutePrefix("api/configuration")]
|
|
public class ConfigurationController : ApiController
|
|
{
|
|
[Route("base"), HttpGet]
|
|
public IHttpActionResult GetStartupConfiguration()
|
|
{
|
|
DTOStartupConfigurationModel startupConfiguration = new DTOStartupConfigurationModel()
|
|
{
|
|
ProductionConfig = ProductionConfig,
|
|
AlarmsConfig = AlarmsConfig,
|
|
ScadaConfig = ScadaConfig,
|
|
MaintenanceConfig = MaintenanceConfig,
|
|
ReportConfig = ReportConfig,
|
|
ToolingConfig = ToolingConfig,
|
|
UtilitiesConfig = UtilitiesConfig
|
|
};
|
|
|
|
return Ok(startupConfiguration);
|
|
}
|
|
|
|
[Route("client"), HttpGet]
|
|
public IHttpActionResult GetInfoConfiguration()
|
|
{
|
|
DTOClientConfigurationModel clientConfiguration = new DTOClientConfigurationModel()
|
|
{
|
|
NcVendor = NcConfig.NcVendor,
|
|
showHMI = NcConfig.showNcHMI
|
|
};
|
|
|
|
return Ok(clientConfiguration);
|
|
}
|
|
}
|
|
}
|