Line | |
---|
1 | using HeuristicLab.Clients.Hive.WebJobManager.Services;
|
---|
2 | using Microsoft.AspNet.Hosting;
|
---|
3 | using Microsoft.AspNet.Mvc;
|
---|
4 | using System;
|
---|
5 | using System.Collections.Generic;
|
---|
6 | using System.Linq;
|
---|
7 | using System.ServiceModel.Security;
|
---|
8 | using System.Threading.Tasks;
|
---|
9 |
|
---|
10 | namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers
|
---|
11 | {
|
---|
12 | public class ResourceController : Controller
|
---|
13 | {
|
---|
14 | private HiveServiceClient client;
|
---|
15 | private IHostingEnvironment _environment;
|
---|
16 |
|
---|
17 | public ResourceController(IHostingEnvironment env)
|
---|
18 | {
|
---|
19 | HiveServiceLocatorWebManagerService hiveServiceLocator = (HiveServiceLocatorWebManagerService)HiveServiceLocatorWebManagerService.Instance;
|
---|
20 | client = hiveServiceLocator.getHiveServiceClient();
|
---|
21 |
|
---|
22 | _environment = env;
|
---|
23 | }
|
---|
24 | public IActionResult Index()
|
---|
25 | {
|
---|
26 | if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
|
---|
27 | {
|
---|
28 |
|
---|
29 | ViewBag.Title = "Resources";
|
---|
30 | return View("Index");
|
---|
31 | }
|
---|
32 | else
|
---|
33 | {
|
---|
34 | HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
|
---|
35 | return RedirectToAction("Index", "Home");
|
---|
36 | }
|
---|
37 | }
|
---|
38 | }
|
---|
39 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.