From 54ef796c5afa8d1ccb4b8b148d765f590b4de03a Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 20 May 2020 17:46:21 +0300 Subject: Improved Gateway environments handling. --- .../Tango.MachineService.Gateway/Controllers/GatewayController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs') diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs index e3391cd5d..e393c7264 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs @@ -20,7 +20,7 @@ namespace Tango.MachineService.Gateway.Controllers using (GatewayDbContext db = GatewayDbContext.CreateDefault()) { - var envs = db.Environments.ToList(); + var envs = db.Environments.Where(x => x.Active).ToList(); foreach (var env in envs) { @@ -29,7 +29,8 @@ namespace Tango.MachineService.Gateway.Controllers ID = env.ID.ToString(), Name = env.Name, Description = env.Description, - MachineServiceAddress = env.MachineServiceAddress + MachineServiceAddress = env.MachineServiceAddress, + DisplayIndex = env.DisplayIndex }); } } -- cgit v1.3.1