aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs60
1 files changed, 0 insertions, 60 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs
deleted file mode 100644
index 52eb2bbb5..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-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