40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Step.Model.DTOModels;
|
|
using System.Web.Http;
|
|
using static Step.Config.ServerConfig;
|
|
|
|
namespace Step.Controllers.WebApi
|
|
{
|
|
[RoutePrefix("api/configuration")]
|
|
public class ConfigurationController : ApiController
|
|
{
|
|
[Route("areas"), 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,
|
|
DefaultLanguage = ServerStartupConfig.Language
|
|
};
|
|
|
|
return Ok(clientConfiguration);
|
|
}
|
|
}
|
|
} |