Files
Gnuboard7/templates/_bundled/sirsoft-admin_basic/layouts/admin_dashboard.json
T
2026-07-01 10:30:32 +09:00

1566 lines
95 KiB
JSON

{
"version": "1.0.0",
"layout_name": "admin_dashboard",
"permissions": [
"core.dashboard.read"
],
"extends": "_admin_base",
"meta": {
"title": "$t:admin.dashboard.title",
"description": "$t:admin.dashboard.description",
"auth_required": true
},
"data_sources": [
{
"id": "dashboard_stats",
"label_key": "$t:editor.data_source.dashboard_stats",
"type": "api",
"endpoint": "/api/admin/dashboard/stats",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive",
"fallback": {
"data": {
"total_users": {
"count": 0,
"change_display": "-"
},
"installed_modules": {
"total": 0,
"active": 0
},
"active_plugins": {
"total": 0,
"active": 0
},
"installed_templates": {
"total": 0,
"active": 0
},
"language_packs": {
"total": 0,
"active": 0
},
"system_status": {
"label": "-"
}
}
}
},
{
"id": "dashboard_activities",
"label_key": "$t:editor.data_source.dashboard_activities",
"type": "api",
"endpoint": "/api/admin/dashboard/activities",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive",
"fallback": {
"data": []
}
},
{
"id": "dashboard_modules",
"label_key": "$t:editor.data_source.dashboard_modules",
"type": "api",
"endpoint": "/api/admin/modules/installed",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive",
"params": {
"per_page": "5"
},
"fallback": {
"data": {
"data": [],
"current_page": 1,
"last_page": 1,
"per_page": 5,
"total": 0
}
}
},
{
"id": "dashboard_plugins",
"label_key": "$t:editor.data_source.dashboard_plugins",
"type": "api",
"endpoint": "/api/admin/plugins/installed",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive",
"params": {
"per_page": "5"
},
"fallback": {
"data": {
"data": [],
"current_page": 1,
"last_page": 1,
"per_page": 5,
"total": 0
}
}
},
{
"id": "dashboard_templates",
"label_key": "$t:editor.data_source.dashboard_templates",
"type": "api",
"endpoint": "/api/admin/templates",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive",
"params": {
"per_page": "5"
},
"fallback": {
"data": {
"data": [],
"current_page": 1,
"last_page": 1,
"per_page": 5,
"total": 0
}
}
},
{
"id": "dashboard_alerts",
"label_key": "$t:editor.data_source.dashboard_alerts",
"type": "api",
"endpoint": "/api/admin/dashboard/alerts",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "background",
"fallback": {
"data": []
}
},
{
"id": "dashboard_recent_notifications",
"label_key": "$t:editor.data_source.dashboard_recent_notifications",
"type": "api",
"endpoint": "/api/admin/dashboard/recent-notifications",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive",
"fallback": {
"data": []
}
},
{
"id": "dashboard_stats_ws",
"label_key": "$t:editor.data_source.dashboard_stats_ws",
"type": "websocket",
"channel": "core.admin.dashboard",
"event": "dashboard.stats.updated",
"channel_type": "private",
"target_source": "dashboard_stats"
}
],
"slots": {
"content": [
{
"id": "dashboard_content",
"type": "basic",
"name": "Div",
"props": {
"className": "admin-page-content-responsive-fluid"
},
"children": [
{
"id": "page_header",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-between mb-6"
},
"children": [
{
"id": "page_title",
"type": "basic",
"name": "H1",
"props": {
"className": "text-primary text-xl sm:text-2xl font-semibold"
},
"text": "$t:admin.dashboard.title"
},
{
"id": "refresh_button",
"type": "basic",
"name": "Button",
"props": {
"className": "btn-icon",
"aria-label": "$t:admin.dashboard.refresh"
},
"actions": [
{
"type": "click",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_stats"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_activities"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_modules"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_plugins"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_templates"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_alerts"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_recent_notifications"
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.dashboard.refreshed"
}
}
]
}
}
],
"children": [
{
"id": "refresh_icon",
"type": "basic",
"name": "Icon",
"props": {
"name": "refresh",
"size": "md"
}
}
]
}
]
},
{
"id": "quick_menu",
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-wrap gap-2 md:gap-3 mb-4 md:mb-6 lg:mb-8"
},
"children": [
{
"id": "qm_users",
"type": "basic",
"name": "A",
"props": {
"href": "/admin/users",
"className": "flex-center flex-col justify-center gap-1 w-16 h-16 md:w-20 md:h-20 text-[10px] md:text-xs font-medium rounded-xl bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 hover:bg-slate-700 hover:text-white dark:hover:bg-slate-200 dark:hover:text-slate-800 hover:-translate-y-0.5 focus:outline-none focus:ring-2 focus:ring-slate-400 dark:focus:ring-slate-500 transition-all duration-200"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "users",
"className": "text-lg md:text-xl"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-center leading-tight"
},
"text": "$t:admin.dashboard.quick_menu.users"
}
]
},
{
"id": "qm_settings",
"type": "basic",
"name": "A",
"props": {
"href": "/admin/settings",
"className": "flex-center flex-col justify-center gap-1 w-16 h-16 md:w-20 md:h-20 text-[10px] md:text-xs font-medium rounded-xl bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 hover:bg-slate-700 hover:text-white dark:hover:bg-slate-200 dark:hover:text-slate-800 hover:-translate-y-0.5 focus:outline-none focus:ring-2 focus:ring-slate-400 dark:focus:ring-slate-500 transition-all duration-200"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "cog",
"className": "text-lg md:text-xl"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-center leading-tight"
},
"text": "$t:admin.dashboard.quick_menu.settings"
}
]
},
{
"id": "qm_modules",
"type": "basic",
"name": "A",
"props": {
"href": "/admin/modules",
"className": "flex-center flex-col justify-center gap-1 w-16 h-16 md:w-20 md:h-20 text-[10px] md:text-xs font-medium rounded-xl bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 hover:bg-slate-700 hover:text-white dark:hover:bg-slate-200 dark:hover:text-slate-800 hover:-translate-y-0.5 focus:outline-none focus:ring-2 focus:ring-slate-400 dark:focus:ring-slate-500 transition-all duration-200"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "puzzle-piece",
"className": "text-lg md:text-xl"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-center leading-tight"
},
"text": "$t:admin.dashboard.quick_menu.modules"
}
]
},
{
"type": "extension_point",
"name": "admin_dashboard_quick_menu",
"default": [],
"props": {
"className": "contents"
}
}
]
},
{
"type": "extension_point",
"name": "admin_dashboard_commerce",
"default": []
},
{
"type": "extension_point",
"name": "admin_dashboard_community",
"default": []
},
{
"id": "secondary_stats_badges",
"type": "basic",
"name": "Div",
"blur_until_loaded": {
"enabled": true,
"data_sources": "dashboard_stats"
},
"props": {
"className": "flex-center flex-wrap gap-2 md:gap-3 mb-2"
},
"children": [
{
"id": "modules_badge",
"permissions": [
"core.modules.read"
],
"type": "basic",
"name": "Div",
"props": {
"className": "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-white dark:bg-slate-700 text-sm font-medium text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600 transition-colors"
},
"children": [
{
"id": "modules_badge_icon",
"type": "basic",
"name": "Icon",
"props": {
"name": "cube",
"size": "sm"
}
},
{
"id": "modules_badge_label",
"type": "basic",
"name": "Span",
"text": "$t:admin.dashboard.stats.installed_modules"
},
{
"id": "modules_badge_value",
"type": "basic",
"name": "Span",
"props": {
"className": "font-bold"
},
"text": "{{dashboard_stats?.data?.installed_modules?.active ?? 0}}/{{dashboard_stats?.data?.installed_modules?.total ?? 0}}"
}
],
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/modules"
}
}
]
},
{
"id": "plugins_badge",
"permissions": [
"core.plugins.read"
],
"type": "basic",
"name": "Div",
"props": {
"className": "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-white dark:bg-slate-700 text-sm font-medium text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600 transition-colors"
},
"children": [
{
"id": "plugins_badge_icon",
"type": "basic",
"name": "Icon",
"props": {
"name": "puzzle-piece",
"size": "sm"
}
},
{
"id": "plugins_badge_label",
"type": "basic",
"name": "Span",
"text": "$t:admin.dashboard.stats.active_plugins"
},
{
"id": "plugins_badge_value",
"type": "basic",
"name": "Span",
"props": {
"className": "font-bold"
},
"text": "{{dashboard_stats?.data?.active_plugins?.active ?? 0}}/{{dashboard_stats?.data?.active_plugins?.total ?? 0}}"
}
],
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/plugins"
}
}
]
},
{
"id": "templates_badge",
"permissions": [
"core.templates.read"
],
"type": "basic",
"name": "Div",
"props": {
"className": "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-white dark:bg-slate-700 text-sm font-medium text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600 transition-colors"
},
"children": [
{
"id": "templates_badge_icon",
"type": "basic",
"name": "Icon",
"props": {
"name": "palette",
"size": "sm"
}
},
{
"id": "templates_badge_label",
"type": "basic",
"name": "Span",
"text": "$t:admin.dashboard.stats.active_templates"
},
{
"id": "templates_badge_value",
"type": "basic",
"name": "Span",
"props": {
"className": "font-bold"
},
"text": "{{dashboard_stats?.data?.installed_templates?.active ?? 0}}/{{dashboard_stats?.data?.installed_templates?.total ?? 0}}"
}
],
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/templates/admin"
}
}
]
},
{
"id": "language_packs_badge",
"permissions": [
"core.language_packs.read"
],
"type": "basic",
"name": "Div",
"props": {
"className": "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-white dark:bg-slate-700 text-sm font-medium text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600 transition-colors"
},
"children": [
{
"id": "language_packs_badge_icon",
"type": "basic",
"name": "Icon",
"props": {
"name": "language",
"size": "sm"
}
},
{
"id": "language_packs_badge_label",
"type": "basic",
"name": "Span",
"text": "$t:admin.dashboard.stats.active_language_packs"
},
{
"id": "language_packs_badge_value",
"type": "basic",
"name": "Span",
"props": {
"className": "font-bold"
},
"text": "{{dashboard_stats?.data?.language_packs?.active ?? 0}}/{{dashboard_stats?.data?.language_packs?.total ?? 0}}"
}
],
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/settings?tab=language_packs"
}
}
]
}
]
},
{
"id": "middle_section_grid",
"type": "basic",
"name": "Div",
"props": {
"className": "grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6 mb-6"
},
"children": [
{
"id": "recent_notifications_card",
"permissions": [
"core.notification-logs.read"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
"enabled": true,
"data_sources": "dashboard_recent_notifications"
},
"props": {
"className": "bg-slate-100 dark:bg-slate-800 rounded-xl md:rounded-2xl p-4 md:p-6"
},
"children": [
{
"id": "recent_notifications_header",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-start justify-between mb-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"children": [
{
"id": "recent_notifications_title",
"type": "basic",
"name": "H2",
"props": {
"className": "section-heading"
},
"text": "$t:admin.dashboard.recent_notifications.title"
},
{
"id": "recent_notifications_subtitle",
"type": "basic",
"name": "P",
"props": {
"className": "text-label-subtle"
},
"text": "$t:admin.dashboard.recent_notifications.subtitle"
}
]
},
{
"id": "recent_notifications_more_btn",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-tertiary hover:text-gray-700 dark:hover:text-gray-200 transition-colors cursor-pointer"
},
"text": "$t:admin.dashboard.extension_status.more",
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/notification-logs"
}
}
]
}
]
},
{
"id": "recent_notifications_empty",
"type": "basic",
"name": "P",
"if": "{{(dashboard_recent_notifications?.data ?? []).length === 0}}",
"props": {
"className": "text-sm text-slate-500 dark:text-slate-400 text-center py-6"
},
"text": "$t:admin.dashboard.recent_notifications.empty"
},
{
"id": "recent_notifications_list",
"type": "basic",
"name": "Div",
"if": "{{(dashboard_recent_notifications?.data ?? []).length > 0}}",
"props": {
"className": "mb-4"
},
"children": [
{
"id": "recent_notification_item_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-start gap-3"
},
"iteration": {
"source": "dashboard_recent_notifications?.data",
"item_var": "notification",
"index_var": "$idx"
},
"children": [
{
"id": "recent_notification_dot_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "{{notification?.status === 'failed' ? 'w-2 h-2 mt-2 rounded-full bg-rose-500 flex-shrink-0' : (notification?.status === 'skipped' ? 'w-2 h-2 mt-2 rounded-full bg-slate-400 flex-shrink-0' : 'w-2 h-2 mt-2 rounded-full bg-emerald-500 flex-shrink-0')}}"
}
},
{
"id": "recent_notification_content_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 min-w-0"
},
"children": [
{
"id": "recent_notification_subject_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-heading truncate"
},
"text": "{{notification?.subject ?? ''}}"
},
{
"id": "recent_notification_recipient_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-label-subtle truncate"
},
"text": "{{notification?.recipient ?? ''}}"
}
]
},
{
"id": "recent_notification_time_{{$idx}}",
"type": "basic",
"name": "Span",
"props": {
"className": "text-hint whitespace-nowrap"
},
"text": "{{notification?.time ?? ''}}"
}
]
}
]
}
]
},
{
"id": "recent_activity_card",
"permissions": [
"core.dashboard.activities"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
"enabled": true,
"data_sources": "dashboard_activities"
},
"props": {
"className": "bg-slate-100 dark:bg-slate-800 rounded-xl md:rounded-2xl p-4 md:p-6"
},
"children": [
{
"id": "recent_activity_header",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-start justify-between mb-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"children": [
{
"id": "recent_activity_title",
"type": "basic",
"name": "H2",
"props": {
"className": "section-heading"
},
"text": "$t:admin.dashboard.recent_activity.title"
},
{
"id": "recent_activity_subtitle",
"type": "basic",
"name": "P",
"props": {
"className": "text-label-subtle"
},
"text": "$t:admin.dashboard.recent_activity.subtitle"
}
]
},
{
"id": "activity_more_btn",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-tertiary hover:text-gray-700 dark:hover:text-gray-200 transition-colors cursor-pointer"
},
"text": "$t:admin.dashboard.extension_status.more",
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/activity-logs"
}
}
]
}
]
},
{
"id": "activity_list",
"type": "basic",
"name": "Div",
"props": {
},
"children": [
{
"id": "activity_item_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-start gap-3"
},
"iteration": {
"source": "dashboard_activities?.data",
"item_var": "activity",
"index_var": "$idx"
},
"children": [
{
"id": "activity_dot_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "w-2 h-2 mt-2 rounded-full bg-blue-500 flex-shrink-0"
}
},
{
"id": "activity_content_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 min-w-0"
},
"children": [
{
"id": "activity_title_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-heading"
},
"text": "{{activity.title}}"
},
{
"id": "activity_desc_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-label-subtle"
},
"text": "{{activity.description}}"
}
]
},
{
"id": "activity_time_{{$idx}}",
"type": "basic",
"name": "Span",
"props": {
"className": "text-hint whitespace-nowrap"
},
"text": "{{activity.time}}"
}
]
}
]
}
]
}
]
},
{
"id": "extension_status_grid",
"type": "basic",
"name": "Div",
"props": {
"className": "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6"
},
"children": [
{
"id": "module_status_card",
"permissions": [
"core.modules.read"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
"enabled": true,
"data_sources": "dashboard_modules"
},
"props": {
"className": "bg-slate-100 dark:bg-slate-800 rounded-xl md:rounded-2xl p-4 md:p-6"
},
"children": [
{
"id": "module_status_header",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-between mb-4"
},
"children": [
{
"id": "module_header_left",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center gap-2"
},
"children": [
{
"id": "module_header_text",
"type": "basic",
"name": "Div",
"children": [
{
"id": "module_status_title",
"type": "basic",
"name": "H2",
"props": {
"className": "section-heading"
},
"text": "$t:admin.dashboard.module_status.title"
},
{
"id": "module_status_subtitle",
"type": "basic",
"name": "P",
"props": {
"className": "text-label-subtle"
},
"text": "$t:admin.dashboard.module_status.subtitle"
}
]
}
]
},
{
"id": "module_more_btn",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-tertiary hover:text-gray-700 dark:hover:text-gray-200 transition-colors cursor-pointer"
},
"text": "$t:admin.dashboard.extension_status.more",
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/modules"
}
}
]
}
]
},
{
"id": "module_list",
"type": "basic",
"name": "Div",
"props": {
},
"children": [
{
"id": "module_item_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-between py-2"
},
"iteration": {
"source": "dashboard_modules?.data?.data",
"item_var": "module",
"index_var": "$idx"
},
"children": [
{
"id": "module_info_{{$idx}}",
"type": "basic",
"name": "Div",
"children": [
{
"id": "module_name_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-heading"
},
"text": "{{module.name}}"
},
{
"id": "module_version_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-tertiary"
},
"text": "v{{module.version}}"
}
]
},
{
"id": "module_badge_{{$idx}}",
"type": "basic",
"name": "Span",
"props": {
"className": "{{module.status === 'active' ? 'badge badge-green' : 'badge badge-gray'}}"
},
"text": "{{module.status === 'active' ? '$t:admin.dashboard.module_status.active' : '$t:admin.dashboard.module_status.inactive'}}"
}
]
}
]
}
]
},
{
"id": "plugin_status_card",
"permissions": [
"core.plugins.read"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
"enabled": true,
"data_sources": "dashboard_plugins"
},
"props": {
"className": "bg-slate-100 dark:bg-slate-800 rounded-xl md:rounded-2xl p-4 md:p-6"
},
"children": [
{
"id": "plugin_status_header",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-between mb-4"
},
"children": [
{
"id": "plugin_header_left",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center gap-2"
},
"children": [
{
"id": "plugin_header_text",
"type": "basic",
"name": "Div",
"children": [
{
"id": "plugin_status_title",
"type": "basic",
"name": "H2",
"props": {
"className": "section-heading"
},
"text": "$t:admin.dashboard.plugin_status.title"
},
{
"id": "plugin_status_subtitle",
"type": "basic",
"name": "P",
"props": {
"className": "text-label-subtle"
},
"text": "$t:admin.dashboard.plugin_status.subtitle"
}
]
}
]
},
{
"id": "plugin_more_btn",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-tertiary hover:text-gray-700 dark:hover:text-gray-200 transition-colors cursor-pointer"
},
"text": "$t:admin.dashboard.extension_status.more",
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/plugins"
}
}
]
}
]
},
{
"id": "plugin_list",
"type": "basic",
"name": "Div",
"props": {
},
"children": [
{
"id": "plugin_item_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-between py-2"
},
"iteration": {
"source": "dashboard_plugins?.data?.data",
"item_var": "plugin",
"index_var": "$idx"
},
"children": [
{
"id": "plugin_info_{{$idx}}",
"type": "basic",
"name": "Div",
"children": [
{
"id": "plugin_name_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-heading"
},
"text": "{{plugin.name}}"
},
{
"id": "plugin_version_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-tertiary"
},
"text": "v{{plugin.version}}"
}
]
},
{
"id": "plugin_badge_{{$idx}}",
"type": "basic",
"name": "Span",
"props": {
"className": "{{plugin.status === 'active' ? 'badge badge-green' : 'badge badge-gray'}}"
},
"text": "{{plugin.status === 'active' ? '$t:admin.dashboard.plugin_status.active' : '$t:admin.dashboard.plugin_status.inactive'}}"
}
]
}
]
}
]
},
{
"id": "template_status_card",
"permissions": [
"core.templates.read"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
"enabled": true,
"data_sources": "dashboard_templates"
},
"props": {
"className": "bg-slate-100 dark:bg-slate-800 rounded-xl md:rounded-2xl p-4 md:p-6"
},
"children": [
{
"id": "template_status_header",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-between mb-4"
},
"children": [
{
"id": "template_header_left",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center gap-2"
},
"children": [
{
"id": "template_header_text",
"type": "basic",
"name": "Div",
"children": [
{
"id": "template_status_title",
"type": "basic",
"name": "H2",
"props": {
"className": "section-heading"
},
"text": "$t:admin.dashboard.template_status.title"
},
{
"id": "template_status_subtitle",
"type": "basic",
"name": "P",
"props": {
"className": "text-label-subtle"
},
"text": "$t:admin.dashboard.template_status.subtitle"
}
]
}
]
},
{
"id": "template_more_btn",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-tertiary hover:text-gray-700 dark:hover:text-gray-200 transition-colors cursor-pointer"
},
"text": "$t:admin.dashboard.extension_status.more",
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/templates/admin"
}
}
]
}
]
},
{
"id": "template_list",
"type": "basic",
"name": "Div",
"props": {
},
"children": [
{
"id": "template_item_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-between py-2"
},
"iteration": {
"source": "dashboard_templates?.data?.data",
"item_var": "template",
"index_var": "$idx"
},
"children": [
{
"id": "template_info_{{$idx}}",
"type": "basic",
"name": "Div",
"children": [
{
"id": "template_name_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-heading"
},
"text": "{{template.name}}"
},
{
"id": "template_version_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-tertiary"
},
"text": "v{{template.version}}"
}
]
},
{
"id": "template_badge_{{$idx}}",
"type": "basic",
"name": "Span",
"props": {
"className": "{{template.status === 'active' ? 'badge badge-green' : 'badge badge-gray'}}"
},
"text": "{{template.status === 'active' ? '$t:admin.dashboard.template_status.active' : '$t:admin.dashboard.template_status.inactive'}}"
}
]
}
]
}
]
}
]
},
{
"id": "bottom_section_grid",
"type": "basic",
"name": "Div",
"props": {
"className": "mt-4 sm:mt-6"
},
"children": [
{
"id": "system_alerts_card",
"if": "{{(dashboard_alerts?.data?.data ? dashboard_alerts.data.data.length : (dashboard_alerts?.data?.length ?? 0)) > 0}}",
"permissions": [
"core.dashboard.alerts"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
"enabled": true,
"data_sources": "dashboard_alerts"
},
"props": {
"className": "bg-slate-100 dark:bg-slate-800 rounded-xl md:rounded-2xl p-4 md:p-6"
},
"children": [
{
"id": "system_alerts_header",
"type": "basic",
"name": "Div",
"props": {
"className": "mb-4"
},
"children": [
{
"id": "system_alerts_title",
"type": "basic",
"name": "H2",
"props": {
"className": "section-heading"
},
"text": "$t:admin.dashboard.system_alerts.title"
},
{
"id": "system_alerts_subtitle",
"type": "basic",
"name": "P",
"props": {
"className": "text-label-subtle"
},
"text": "$t:admin.dashboard.system_alerts.subtitle"
}
]
},
{
"id": "alerts_list",
"type": "basic",
"name": "Div",
"props": {
},
"children": [
{
"id": "alert_item_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "{{alert.subtype === 'incompatible_core' ? 'flex items-start gap-3 p-3 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800' : (alert.subtype === 'recovery_available' ? 'flex items-start gap-3 p-3 rounded-lg bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800' : 'flex items-start gap-3 p-3 rounded-lg bg-gray-50 dark:bg-gray-700')}}"
},
"iteration": {
"source": "{{dashboard_alerts?.data?.data ? dashboard_alerts.data.data : (dashboard_alerts?.data ?? [])}}",
"item_var": "alert",
"index_var": "$idx"
},
"children": [
{
"id": "alert_icon_{{$idx}}",
"type": "basic",
"name": "Icon",
"props": {
"name": "{{alert.icon ?? 'info-circle'}}",
"className": "{{alert.subtype === 'incompatible_core' ? 'text-amber-600 dark:text-amber-400 mt-0.5 shrink-0' : (alert.subtype === 'recovery_available' ? 'text-blue-600 dark:text-blue-400 mt-0.5 shrink-0' : 'text-gray-500 dark:text-gray-400 mt-0.5 shrink-0')}}"
}
},
{
"id": "alert_content_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 min-w-0"
},
"children": [
{
"id": "alert_title_{{$idx}}",
"type": "basic",
"name": "P",
"props": {
"className": "text-heading"
},
"text": "{{alert.title ?? ''}}"
},
{
"id": "alert_message_{{$idx}}",
"type": "basic",
"name": "P",
"if": "{{alert.message}}",
"props": {
"className": "text-secondary text-xs mt-0.5"
},
"text": "{{alert.message ?? ''}}"
},
{
"id": "alert_time_{{$idx}}",
"type": "basic",
"name": "P",
"if": "{{alert.time}}",
"props": {
"className": "form-hint"
},
"text": "{{alert.time ?? ''}}"
},
{
"id": "alert_actions_{{$idx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center gap-2 mt-2"
},
"children": [
{
"id": "alert_recover_button_{{$idx}}",
"type": "basic",
"name": "Button",
"if": "{{alert.subtype === 'recovery_available'}}",
"props": {
"type": "button",
"className": "inline-flex items-center gap-1 px-3 py-1 text-xs bg-blue-600 dark:bg-blue-500 hover:bg-blue-700 dark:hover:bg-blue-600 text-white rounded"
},
"actions": [
{
"type": "click",
"handler": "apiCall",
"auth_required": true,
"target": "{{alert.recover_endpoint}}",
"params": {
"method": "POST"
},
"onSuccess": [
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:extensions.alerts.recovered_success"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_alerts"
}
}
],
"onError": [
{
"handler": "toast",
"params": {
"type": "error",
"message": "{{error.message}}"
}
}
]
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "check-circle",
"size": "xs"
}
},
{
"type": "basic",
"name": "Span",
"text": "$t:extensions.alerts.recover_action"
}
]
},
{
"id": "alert_dismiss_button_{{$idx}}",
"type": "basic",
"name": "Button",
"if": "{{alert.extension_type && alert.identifier}}",
"props": {
"type": "button",
"className": "inline-flex items-center gap-1 px-3 py-1 text-xs text-gray-600 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 rounded",
"aria-label": "$t:extensions.alerts.dismiss_action"
},
"actions": [
{
"type": "click",
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/extensions/{{alert.extension_type}}/{{alert.identifier}}/dismiss",
"params": {
"method": "POST"
},
"onSuccess": [
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "dashboard_alerts"
}
}
]
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "times",
"size": "xs"
}
},
{
"type": "basic",
"name": "Span",
"text": "$t:extensions.alerts.dismiss_action"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
},
"transition_overlay": {
"wait_for": [
"dashboard_stats",
"dashboard_activities",
"dashboard_modules",
"dashboard_plugins",
"dashboard_templates",
"dashboard_recent_notifications"
]
}
}