- relay: raise /api/collab-attachments + /api/attachments/upload POST size limit from 256KB to 15MB, matching /api/attachments. Previous limit silently dropped any collab image >~100KB as 413 (envelope overhead pushes even modest JPEGs past the cap), leaving puller clients with broken <img src="uploads/..."> references. - oumta-dashboard: centre overview tiles, bump value font to 56px, introduce .oumta-fail alarm state that paints the full tile red with white text. Toggled from JS for cluster state=down, workloads down >0, and open incidents >0. Fail colour uses --t-danger so it stays in sync with the "unavailable" workload labels. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
21 lines
983 B
PHP
21 lines
983 B
PHP
<?php
|
|
|
|
define('APP_NAME', 'hyprcrd');
|
|
define('APP_VERSION', '2.0.1');
|
|
|
|
// APP_DEBUG: gates verbose error responses (curl traces, upstream bodies).
|
|
// Off by default; enable via env for local troubleshooting only.
|
|
define('APP_DEBUG', getenv('APP_DEBUG') === '1' || getenv('APP_DEBUG') === 'true');
|
|
|
|
// Database path — writable directory, outside webroot
|
|
// DB_PATH / UPLOAD_DIR can be pre-defined by the Electron router for app isolation
|
|
if (!defined('DB_PATH')) define('DB_PATH', __DIR__ . '/data/hyprcrd.db');
|
|
if (!defined('UPLOAD_DIR')) define('UPLOAD_DIR', __DIR__ . '/public/uploads');
|
|
|
|
// Base URL auto-detection (works in Docker and hosted environments)
|
|
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
|
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
|
|
$scriptDir = dirname($_SERVER['SCRIPT_NAME']);
|
|
$basePath = ($scriptDir === '/' || $scriptDir === '\\') ? '' : $scriptDir;
|
|
define('BASE_URL', $protocol . '://' . $host . $basePath);
|