aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Updates/DefaultUpdatesManager.cs6
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/App_Start/RouteConfig.cs11
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs60
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Images/fse/abstract1.pngbin0 -> 11647 bytes
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Images/fse/abstract2.pngbin0 -> 153795 bytes
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Images/fse/download.pngbin0 -> 2382 bytes
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Images/fse/machine_full.pngbin0 -> 16884 bytes
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Images/fse/twine_logo_colored.pngbin0 -> 27285 bytes
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj8
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Views/FSEDownloads/Index.cshtml246
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Views/FSEDownloads/IndexViewModel.cs27
11 files changed, 357 insertions, 1 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Updates/DefaultUpdatesManager.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Updates/DefaultUpdatesManager.cs
index f953ecf47..b236532bd 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Updates/DefaultUpdatesManager.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Updates/DefaultUpdatesManager.cs
@@ -9,6 +9,7 @@ using Tango.Core.DI;
using Tango.Core.ExtensionMethods;
using Tango.FSE.BL.Web;
using Tango.FSE.Common;
+using Tango.FSE.Common.Authentication;
using Tango.FSE.Common.FSEApplication;
using Tango.FSE.Common.Notifications;
using Tango.FSE.Common.Threading;
@@ -41,6 +42,9 @@ namespace Tango.FSE.UI.Updates
[TangoInject]
private IDispatcherProvider DispatcherProvider { get; set; }
+ [TangoInject]
+ private IAuthenticationProvider AuthenticationProvider { get; set; }
+
/// <summary>
/// Gets or sets a value indicating whether to perform an automatic update checks.
@@ -181,7 +185,7 @@ namespace Tango.FSE.UI.Updates
if (vm.DialogResult)
{
- Process.Start(response.InstallerCdnAddress);
+ Process.Start(AuthenticationProvider.CurrentEnvironment.MachineServiceAddress + "/fse");
}
});
}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/App_Start/RouteConfig.cs b/Software/Visual_Studio/Web/Tango.MachineService/App_Start/RouteConfig.cs
index 613e83e72..51f476be5 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/App_Start/RouteConfig.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/App_Start/RouteConfig.cs
@@ -14,6 +14,17 @@ namespace Tango.MachineService
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
+ name: "fse",
+ url: "fse",
+ defaults: new
+ {
+ controller = "FSEDownloads",
+ action = "Index",
+ id = UrlParameter.Optional
+ }
+ );
+
+ routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Downloads", action = "Index", id = UrlParameter.Optional }
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs
new file mode 100644
index 000000000..52eb2bbb5
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using Tango.BL;
+using Tango.MachineService.Filters;
+using Tango.MachineService.Models;
+using Tango.Web.Helpers;
+using System.Data.Entity;
+using Tango.Web.Storage;
+using System.IO;
+using Microsoft.WindowsAzure.Storage.Blob;
+using System.Net.Http;
+using System.Net;
+using System.Net.Http.Headers;
+using System.Net.Mime;
+using Tango.MachineService.Views.FSEDownloads;
+
+namespace Tango.MachineService.Controllers
+{
+ public class FSEDownloadsController : Controller
+ {
+ public ActionResult Index()
+ {
+ IndexViewModel model = new IndexViewModel();
+
+ using (var db = ObservablesContextHelper.CreateContext())
+ {
+ var versions = db.FseVersions.ToList().OrderByDescending(x => Version.Parse(x.Version)).Take(6).ToList();
+
+ var manager = new BlobStorageManager();
+ var container = manager.GetContainer(MachineServiceConfig.FSE_VERSIONS_CONTAINER);
+
+ foreach (var item in versions)
+ {
+ var installerBlob = container.GetBlockBlobReference(item.InstallerBlobName);
+
+ model.Downloads.Add(new FSEDownload()
+ {
+ Name = $"Tango FSE v{Version.Parse(item.Version).ToString(3)}",
+ Version = Version.Parse(item.Version).ToString(3),
+ Comments = item.Comments,
+ Date = item.LastUpdated.ToString("dddd, dd MMMM yyyy"),
+ Address = MachineServiceConfig.CDN_ENDPOINT + installerBlob.Uri.AbsolutePath
+ });
+ }
+
+ if (model.Downloads.Count > 0)
+ {
+ var latest = model.Downloads.First();
+ model.Downloads.Remove(latest);
+ model.LatestDownload = latest;
+ }
+ }
+
+ return View(model);
+ }
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/abstract1.png b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/abstract1.png
new file mode 100644
index 000000000..236545ae9
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/abstract1.png
Binary files differ
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/abstract2.png b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/abstract2.png
new file mode 100644
index 000000000..2742c71e5
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/abstract2.png
Binary files differ
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/download.png b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/download.png
new file mode 100644
index 000000000..b5d626701
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/download.png
Binary files differ
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/machine_full.png b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/machine_full.png
new file mode 100644
index 000000000..ec4890e2e
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/machine_full.png
Binary files differ
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/twine_logo_colored.png b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/twine_logo_colored.png
new file mode 100644
index 000000000..2204585dc
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Images/fse/twine_logo_colored.png
Binary files differ
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj b/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj
index ee5f3440e..67617ec7f 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj
@@ -313,6 +313,7 @@
</Compile>
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="App_Start\FilterConfig.cs" />
+ <Compile Include="Controllers\FSEDownloadsController.cs" />
<Compile Include="Controllers\DownloadsController.cs" />
<Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\FSEController.cs" />
@@ -333,6 +334,7 @@
</Compile>
<Compile Include="Models\SessionVariables.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Views\FSEDownloads\IndexViewModel.cs" />
<None Include="Security\RefreshTokenEncoder.cs" />
<None Include="Security\RefreshTokenEntity.cs" />
<None Include="Security\RefreshTokensManager.cs" />
@@ -340,6 +342,12 @@
<Compile Include="Security\TokenManager.cs" />
<Compile Include="Startup.cs" />
<Compile Include="Views\Downloads\IndexViewModel.cs" />
+ <Content Include="Images\fse\abstract1.png" />
+ <Content Include="Images\fse\abstract2.png" />
+ <Content Include="Images\fse\download.png" />
+ <Content Include="Images\fse\machine_full.png" />
+ <Content Include="Images\fse\twine_logo_colored.png" />
+ <Content Include="Views\FSEDownloads\Index.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Global.asax" />
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Views/FSEDownloads/Index.cshtml b/Software/Visual_Studio/Web/Tango.MachineService/Views/FSEDownloads/Index.cshtml
new file mode 100644
index 000000000..fb64c18a1
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Views/FSEDownloads/Index.cshtml
@@ -0,0 +1,246 @@
+@model Tango.MachineService.Views.FSEDownloads.IndexViewModel
+
+@{
+ Layout = null;
+}
+
+<!DOCTYPE html>
+
+<html>
+<head>
+ <meta name="viewport" content="width=device-width" />
+
+ <style>
+
+ body {
+ margin: 0;
+ padding: 0;
+ overflow-x: hidden;
+ font-family: 'Segoe UI';
+ }
+
+ .fse_primary_background {
+ background-color: #303030;
+ }
+
+ .fse_primary_accent_background {
+ background-color: #009FE7;
+ }
+
+ .fse_border_background {
+ background-color: #404040;
+ }
+
+ .fse_gray_foreground {
+ color: #808080;
+ }
+
+ .fse_primary_background_light {
+ background-color: #404040;
+ }
+
+ .fse_primary_foreground {
+ color: #EEEEEE;
+ }
+
+ .fse_primary_accent {
+ color: #009FE7;
+ }
+
+ .fse_header_back {
+ position:fixed;
+ padding: 20px;
+ box-shadow: black 1px 1px 10px 1px;
+ z-index: 100;
+ width: 100%;
+ }
+
+ .fse_machine_logo {
+ position: absolute;
+ left: 20px;
+ top: 20px;
+ width: 120px;
+ float: left;
+ }
+
+ .fse_twine_logo {
+ height: 80px;
+ display: block;
+ margin: auto auto;
+ }
+
+ .fse_container {
+ position: absolute;
+ margin-top: 100px;
+ overflow: hidden;
+ clear: both;
+ }
+
+ .fse_side_abstract {
+ position: fixed;
+ width: 60px;
+ height: 100%;
+ float: left;
+ background-image: url('../../Images/fse/abstract1.png');
+ background-repeat: repeat;
+ }
+
+ .fse_side_abstract_top {
+ position:absolute;
+ box-shadow: black 0px 3px 10px 2px;
+ width:100%;
+ }
+
+ .fse_history_downloads_container {
+ float: left;
+ margin-left: 150px;
+ margin-top: 20px;
+ width: 500px;
+ }
+
+ .fse_history_download {
+ clear: both;
+ margin-top: 60px;
+ }
+
+ .fse_download_title {
+ vertical-align: baseline middle;
+ }
+
+ .fse_download_image {
+ height: 32px;
+ }
+
+ .fse_download_name {
+ margin-top: 5px;
+ margin-left: 5px;
+ vertical-align: top;
+ display: inline-block;
+ }
+
+ .fse_download_date {
+ float: right;
+ margin-top: 5px;
+ vertical-align: top;
+ display: inline-block;
+ }
+
+ .fse_download_separator {
+ clear: both;
+ height: 1px;
+ margin-top: 5px;
+ }
+
+ .fse_download_commets {
+ font-size: 12px;
+ margin-top: 10px;
+ }
+
+ .fse_download_link {
+ float: right;
+ text-decoration: none;
+ padding: 3px 15px;
+ border-radius: 2px;
+ font-size: 14px;
+ }
+
+ .fse_latest_version_container {
+ border-radius: 5px;
+ float: left;
+ margin-top: 100px;
+ margin-left: 200px;
+ width: 400px;
+ text-align: center;
+ box-shadow: black 0px 0px 5px 0px;
+ }
+
+ .fse_download_image_latest {
+ width: 64px;
+ margin-top: 20px;
+ }
+
+ .fse_download_title_latest {
+ margin-top: 10px;
+ font-size: 20px;
+ font-weight: 400;
+ text-align: center;
+ }
+
+ .fse_download_button_latest {
+ display: block;
+ padding: 15px 20px;
+ margin: 30px;
+ margin-top: 90px;
+ font-weight: 700;
+ border-radius: 25px;
+ text-decoration: none;
+ box-shadow: black 0px 0px 5px 0px;
+ }
+
+ .fse_title {
+ position: absolute;
+ display: inline-block;
+ float: left;
+ margin-left: 140px;
+ margin-top: 20px;
+ font-size: 25px;
+ font-weight: 400;
+ }
+ </style>
+
+ <title>Tango FSE</title>
+</head>
+<body class="fse_primary_background fse_primary_foreground">
+ <div>
+
+ <div id="fseAbstract" class="fse_side_abstract">
+ <div class="fse_side_abstract_top">
+
+ </div>
+ </div>
+
+ <div class="fse_header_back fse_primary_background_light">
+ <img src="~/Images/fse/machine_full.png" class="fse_machine_logo" />
+ <span class="fse_title">Tango FSE</span>
+ <img src="~/Images/fse/twine_logo_colored.png" class="fse_twine_logo" />
+ </div>
+
+ <div>
+ <div class="fse_container">
+
+ <div class="fse_history_downloads_container">
+
+ @foreach (var item in Model.Downloads)
+ {
+ <div class="fse_history_download">
+ <div class="fse_download_title">
+ <img class="fse_download_image" src="~/Images/fse/download.png" />
+ <span class="fse_download_name">@item.Name</span>
+ <span class="fse_download_date">@item.Date</span>
+ </div>
+ <div class="fse_download_separator fse_border_background">
+
+ </div>
+ <div class="fse_download_commets fse_gray_foreground">
+ @item.Comments
+ </div>
+
+ <a class="fse_download_link fse_primary_background_light fse_primary_accent" href="@item.Address">
+ Download
+ </a>
+ </div>
+ }
+ </div>
+
+ <div class="fse_latest_version_container fse_primary_background_light">
+ <img class="fse_download_image_latest" src="~/Images/fse/download.png" />
+ <div class="fse_download_title_latest">Download Latest Version</div>
+ <div class="fse_download_title_latest fse_primary_accent" style="margin-top:5px;">v@(Model.LatestDownload.Version)</div>
+ <div class="fse_download_commets fse_gray_foreground">@Model.LatestDownload.Comments</div>
+ <a class="fse_download_button_latest fse_primary_accent_background fse_primary_foreground" href="@Model.LatestDownload.Address">DOWNLOAD</a>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Views/FSEDownloads/IndexViewModel.cs b/Software/Visual_Studio/Web/Tango.MachineService/Views/FSEDownloads/IndexViewModel.cs
new file mode 100644
index 000000000..398b5fcc1
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Views/FSEDownloads/IndexViewModel.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace Tango.MachineService.Views.FSEDownloads
+{
+ public class IndexViewModel
+ {
+ public List<FSEDownload> Downloads { get; set; }
+ public FSEDownload LatestDownload { get; set; }
+
+ public IndexViewModel()
+ {
+ Downloads = new List<FSEDownload>();
+ }
+ }
+
+ public class FSEDownload
+ {
+ public String Name { get; set; }
+ public String Version { get; set; }
+ public String Date { get; set; }
+ public String Comments { get; set; }
+ public String Address { get; set; }
+ }
+} \ No newline at end of file