using invalid_client_template.Models;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
using System.Collections.Generic;
using System.Web.Mvc;

namespace invalid_client_template.Controllers
{
    public class ReportController : Controller
    {
        private readonly List<Report> _reports = new List<Report>()
        {
            new Report() { Id = 1, Name = "report1", ReportPath = "https://www.youtube.com/" }, 
            new Report() { Id = 2, Name = "report2", ReportPath = "report1" }, 
        };

        public ActionResult Index()
        {
            return View(_reports);
        }

        public ActionResult Read([DataSourceRequest] DataSourceRequest request)
        {
            var data = _reports;
            return Json(data.ToDataSourceResult(request));
        }
    }
}