mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
- Updated ModelTable component to use more specific types for records and edit actions. - Enhanced NavItem component to extend MUI ListItemProps for better type safety. - Refactored normalizeLuaStructure to improve type handling with JsonValue. - Updated LuaUIComponent and related types to use JsonValue for props and handler arguments. - Modified AuditLog interface to use JsonObject for metadata. - Improved importUIPages function to use a more specific database interface. - Refactored builder-types to use JsonValue for component props and default values. - Updated package index.json to reflect changes in package descriptions, dependencies, and added minLevel attributes. - Enhanced permissions in Lua scripts to include new roles (moderator, supergod). - Renamed and updated metadata for UI level packages to reflect new roles and functionalities. - Added new UI level package (Level 6 - Supergod Panel) with associated scripts and components. - Updated permissions check script to include new moderator role checks.
48 lines
1.1 KiB
Lua
48 lines
1.1 KiB
Lua
-- System administration for supergod
|
|
local M = {}
|
|
|
|
function M.system_stats()
|
|
return {
|
|
type = "system_stats",
|
|
metrics = {
|
|
{ id = "tenants", label = "Total Tenants" },
|
|
{ id = "users", label = "Total Users" },
|
|
{ id = "storage", label = "Storage Used" },
|
|
{ id = "requests", label = "API Requests (24h)" }
|
|
}
|
|
}
|
|
end
|
|
|
|
function M.system_health()
|
|
return {
|
|
type = "system_health",
|
|
services = {
|
|
{ id = "database", label = "Database" },
|
|
{ id = "cache", label = "Cache" },
|
|
{ id = "queue", label = "Job Queue" },
|
|
{ id = "storage", label = "Object Storage" }
|
|
}
|
|
}
|
|
end
|
|
|
|
function M.system_logs()
|
|
return {
|
|
type = "system_logs",
|
|
filters = {
|
|
{ id = "level", options = { "error", "warn", "info", "debug" } },
|
|
{ id = "service", options = { "api", "worker", "scheduler" } },
|
|
{ id = "tenant", type = "tenant_select" }
|
|
}
|
|
}
|
|
end
|
|
|
|
function M.maintenance_mode(enabled)
|
|
return {
|
|
type = "maintenance_toggle",
|
|
enabled = enabled,
|
|
warningMessage = "Enabling maintenance mode will prevent all non-supergod users from accessing the system."
|
|
}
|
|
end
|
|
|
|
return M
|