Files
rockfish/Controllers/OpsController.cs
2018-07-26 00:44:46 +00:00

68 lines
2.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.EntityFrameworkCore;
using rockfishCore.Models;
using rockfishCore.Util;
namespace rockfishCore.Controllers
{
[Produces("application/json")]
[Route("api/ops")]
[Authorize]
public class OpsController : Controller
{
private readonly rockfishContext _context;
public OpsController(rockfishContext context)
{
_context = context;
}
//status of ops
[HttpGet("status")]
public dtoOpsStatus GetOpsStatus()
{
dtoOpsStatus ret= new dtoOpsStatus();
ret.MailMirrorOK=RfMail.MailIsMirroringProperly();
//PING?
//Can ping Spaces and all the servers we have, maybe do that first then proceed
//https://docs.microsoft.com/en-us/dotnet/framework/network-programming/how-to-ping-a-host
//using System.Net.NetworkInformation;
//AyaNova website: https://www.ayanova.com/
//API website: https://api.ayanova.com/
//Contact form: https://contact.ayanova.com/contact
//Request form: https://contact.ayanova.com/request
//Request lite form: https://contact.ayanova.com/requestlite
//subversion: https://svn.helloayanova.com:18080/svn/GZTWREPO/ (requires login)
//subversion admin: http://svn.helloayanova.com:3343/csvn/login/auth
//Forum: http://forum.ayanova.com/
//devops: https://test.helloayanova.com/api/v8/
//Spaces and backup: https://gztw1.nyc3.digitaloceanspaces.com/
//Need S3 library for c#
return ret;
}
public class dtoOpsStatus
{
public bool MailMirrorOK;
public bool ForumOK;
public bool AyaNovaWebsiteOK;
public bool APIWebsiteOK;
}
}//eoc
}//eons