// GETS // // GET: Api public ActionResult Index() { ViewData["Message"] = "This is an overview of all the API's that are getting checked."; Checks.getDB check = new Checks.getDB(); List <ApiModel> Apis = check.GetObjects <List <ApiModel> >("/apis"); return(View(Apis)); }
// GETS // // GET: config public ActionResult Index() { ViewData["Message"] = "This is an configuration for the background worker to periodically check the api's and websites."; Checks.getDB check = new Checks.getDB(); List <ConfigModel> Config = check.GetObjects <List <ConfigModel> >("/configurations"); return(View(Config)); }
public IActionResult Index() { ViewData["Message"] = "This is an overview of all the websites that are getting checked."; Checks.getDB check = new Checks.getDB(); List <WebsiteModel> Websites = check.GetObjects <List <WebsiteModel> >("/websites"); return(View(Websites)); }
public IActionResult Edit(int id) { ViewData["Message"] = "Here you can edit an existing configuration."; ViewData["id"] = id; Checks.getDB check = new Checks.getDB(); ConfigModel Model = check.GetObject <ConfigModel>("/configurations/" + id); return(View(Model)); }
// GET: /config/details/{id} public IActionResult Details(int id) { ViewData["id"] = id; Checks.getDB check = new Checks.getDB(); ConfigModel Model = check.GetObject <ConfigModel>("/configurations/" + id); if (Model.ConfigName == null) { return(View("../shared/page404")); } return(View(Model)); }
// GET: /api/details/{id} public IActionResult Details(int id) { ViewData["id"] = id; Checks.getDB check = new Checks.getDB(); ApiModel Model = check.GetObject <ApiModel>("/apis/" + id); if (Model.Url == null) { return(View("../shared/page404")); } return(View(Model)); }
public IActionResult Index() { Checks.getDB check = new Checks.getDB(); //List of all the websites List <WebsiteModel> Websites = check.GetObjects <List <WebsiteModel> >("/websites"); //List of all the Apis List <ApiModel> Apis = check.GetObjects <List <ApiModel> >("/apis"); HomeCombinedModel Model = new HomeCombinedModel(); //Model to return to the view Model.apiModel = Apis; Model.websiteModel = Websites; return(View(Model)); }
public IActionResult Edit(int id) { ViewData["Message"] = "Here you can update an existing websites configuration."; ViewData["id"] = id; Checks.getDB check = new Checks.getDB(); WebsiteModel Model = check.GetObject <WebsiteModel>("/websites/" + id); if (Model.Url == null) { return(View("../shared/page404")); } return(View(Model)); }
public IActionResult Details(int id) { ViewData["id"] = id; Checks.getDB check = new Checks.getDB(); WebsiteModel Website = check.GetObject <WebsiteModel>("/websites/" + id); List <WebsiteLogModel> Log = check.GetObject <List <WebsiteLogModel> >("/websites/logs/" + id); WebsiteDetailModel Model = new WebsiteDetailModel(); Model.Website = Website; Model.WebsiteLog = Log; if (Model.Website.Url == null) { return(View("../shared/page404")); } return(View(Model)); }