aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
committerMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
commit00a491d93733d4625ad329b2ba8237f445364b3f (patch)
tree4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/Web/Tango.MachineService/Controllers/FSEDownloadsController.cs
parent124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff)
downloadTango-00a491d93733d4625ad329b2ba8237f445364b3f.tar.gz
Tango-00a491d93733d4625ad329b2ba8237f445364b3f.zip
merge
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