This commit is contained in:
@@ -41,7 +41,7 @@ namespace AyaNova.Api.Controllers
|
||||
//https://superuser.com/questions/361297/what-colour-is-the-dark-green-on-old-fashioned-green-screen-computer-displays
|
||||
var errorBlock = string.Empty;
|
||||
if (serverState.IsSystemLocked)
|
||||
errorBlock = $@"<div class=""error""><h1>SERVER ERROR</h1><h2>{serverState.Reason}</h2></div>";
|
||||
errorBlock = $@"<div class=""error""><h1>SERVER LOCKED</h1><h2>{serverState.Reason}</h2></div>";
|
||||
var resp = $@"<!DOCTYPE html>
|
||||
<html lang=""en"">
|
||||
<head>
|
||||
@@ -444,7 +444,7 @@ namespace AyaNova.Api.Controllers
|
||||
DBSchemaVersion = AySchema.currentSchema,
|
||||
ServerLocalTime = DateUtil.ServerDateTimeString(System.DateTime.UtcNow),
|
||||
ServerTimeZone = TimeZoneInfo.Local.Id,
|
||||
ServerDbId= AyaNova.Core.License.ServerDbId,
|
||||
ServerDbId = AyaNova.Core.License.ServerDbId,
|
||||
License = AyaNova.Core.License.LicenseInfoAsJson
|
||||
}
|
||||
});
|
||||
|
||||
@@ -9,6 +9,7 @@ using AyaNova.Biz;
|
||||
using AyaNova.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using AyaNova.Util;
|
||||
|
||||
|
||||
namespace AyaNova.Api.Controllers
|
||||
@@ -135,8 +136,38 @@ namespace AyaNova.Api.Controllers
|
||||
return Accepted();
|
||||
|
||||
}
|
||||
//------------
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get server configuration
|
||||
/// </summary>
|
||||
/// <returns>Active server configuration</returns>
|
||||
[HttpGet("active-configuration")]
|
||||
public ActionResult GetActiveConfiguration()
|
||||
{
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.ServerState))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
|
||||
return Ok(ApiOkResponse.Response(
|
||||
new
|
||||
{
|
||||
AYANOVA_DEFAULT_TRANSLATION = ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION,
|
||||
AYANOVA_USE_URLS = ServerBootConfig.AYANOVA_USE_URLS,
|
||||
AYANOVA_DB_CONNECTION = ServerBootConfig.AYANOVA_DB_CONNECTION,
|
||||
AYANOVA_FOLDER_USER_FILES = ServerBootConfig.AYANOVA_FOLDER_USER_FILES,
|
||||
AYANOVA_FOLDER_BACKUP_FILES = ServerBootConfig.AYANOVA_FOLDER_BACKUP_FILES,
|
||||
AYANOVA_BACKUP_PG_DUMP_PATH = ServerBootConfig.AYANOVA_BACKUP_PG_DUMP_PATH,
|
||||
AYANOVA_LOG_PATH = ServerBootConfig.AYANOVA_LOG_PATH,
|
||||
AYANOVA_LOG_LEVEL = ServerBootConfig.AYANOVA_LOG_LEVEL,
|
||||
AYANOVA_LOG_ENABLE_LOGGER_DIAGNOSTIC_LOG = ServerBootConfig.AYANOVA_LOG_ENABLE_LOGGER_DIAGNOSTIC_LOG
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
//------------
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user