You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/IoTCenter/Controllers/HomeController.cs

79 lines
2.2 KiB

using Application.Domain.Entities;
using Infrastructure.Data;
using Infrastructure.Extensions;
using IoTCenter.Application.Domain;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using Vibrant.InfluxDB.Client;
using Vibrant.InfluxDB.Client.Rows;
namespace IoTCenter.Controllers
{
[Authorize]
//[Device]
[ApiExplorerSettings(IgnoreApi = true)]
public class HomeController : Controller
{
private readonly IConfiguration _cfg;
private readonly IRepository<Scene> _sceneRepo;
private readonly IRepository<Node> _nodeRepo;
private readonly IRepository<Device> _deviceRepo;
private readonly IRepository<Data> _dataRepo;
private readonly IRepository<Category> _categoryRepo;
private readonly IRepository<NodeCategoryNode> _nodeCategoryNodeRepo;
public HomeController(
IConfiguration cfg,
IRepository<Scene> sceneRepo,
IRepository<Node> nodeRepo,
IRepository<Device> deviceRepo,
IRepository<Data> dataRepo,
IRepository<Category> categoryRepo,
IRepository<NodeCategoryNode> nodeCategoryNodeRepo)
{
this._cfg = cfg;
this._sceneRepo = sceneRepo;
this._nodeRepo = nodeRepo;
this._deviceRepo = deviceRepo;
this._dataRepo = dataRepo;
this._categoryRepo = categoryRepo;
this._nodeCategoryNodeRepo = nodeCategoryNodeRepo;
}
public IActionResult Index()
{
return View();
}
public IActionResult Product()
{
return View();
}
public IActionResult Device(string productNumber)
{
return View();
}
public IActionResult Nodes()
{
return View();
}
public IActionResult Node()
{
return View();
}
[Route("/Device")]
public IActionResult Device(Guid id)
{
return View();
}
}
}