aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-20 17:46:21 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-20 17:46:21 +0300
commit54ef796c5afa8d1ccb4b8b148d765f590b4de03a (patch)
treee3b1390c25736abe588048421844f0a17905ba68 /Software/Visual_Studio/Web
parent128a245cf12d7720e0fd0cea8810426ac32bc84d (diff)
downloadTango-54ef796c5afa8d1ccb4b8b148d765f590b4de03a.tar.gz
Tango-54ef796c5afa8d1ccb4b8b148d765f590b4de03a.zip
Improved Gateway environments handling.
Diffstat (limited to 'Software/Visual_Studio/Web')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs5
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs6
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs1
3 files changed, 10 insertions, 2 deletions
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
});
}
}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs
index 66cd2ff0c..7ab5bddbc 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs
@@ -20,5 +20,11 @@ namespace Tango.MachineService.Gateway.DB
[Column("MACHINE_SERVICE_ADDRESS")]
public String MachineServiceAddress { get; set; }
+
+ [Column("DISPLAY_INDEX")]
+ public int DisplayIndex { get; set; }
+
+ [Column("ACTIVE")]
+ public bool Active { get; set; }
}
} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs
index 0da9de5e5..25ba9ba3d 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs
@@ -11,5 +11,6 @@ namespace Tango.MachineService.Gateway.DTO
public String Name { get; set; }
public String Description { get; set; }
public String MachineServiceAddress { get; set; }
+ public int DisplayIndex { get; set; }
}
} \ No newline at end of file