using HeuristicLab.Clients.Hive.WebJobManager.Services; using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Security; using System.Threading.Tasks; namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers { public class ResourceController : Controller { private HiveServiceClient client; private IHostingEnvironment _environment; public ResourceController(IHostingEnvironment env) { HiveServiceLocatorWebManagerService hiveServiceLocator = (HiveServiceLocatorWebManagerService)HiveServiceLocatorWebManagerService.Instance; client = hiveServiceLocator.getHiveServiceClient(); _environment = env; } public IActionResult Index() { if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin()) { ViewBag.Title = "Resources"; return View("Index"); } else { HiveServiceLocatorWebManagerService.SetLoginErrorMessage(); return RedirectToAction("Index", "Home"); } } } }