Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I4c741e4b36708f2078fed8154d7341de6a6a6964
132 lines
3.1 KiB
JSON
132 lines
3.1 KiB
JSON
{
|
|
"id": "stats",
|
|
"title": "Library Statistics",
|
|
"route": "/plugins/media-stats-ui/stats",
|
|
"icon": "chart-bar",
|
|
"layout": {
|
|
"type": "tabs",
|
|
"default_tab": 0,
|
|
"tabs": [
|
|
{
|
|
"label": "Overview",
|
|
"content": {
|
|
"type": "container",
|
|
"gap": 24,
|
|
"children": [
|
|
{
|
|
"type": "heading",
|
|
"level": 2,
|
|
"content": "Library Statistics"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"content": "Live summary of your media library. Refreshes every 30 seconds.",
|
|
"variant": "secondary"
|
|
},
|
|
{
|
|
"type": "card",
|
|
"title": "Summary",
|
|
"content": [
|
|
{
|
|
"type": "description_list",
|
|
"data": "stats",
|
|
"horizontal": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "chart",
|
|
"chart_type": "bar",
|
|
"data": "type-breakdown",
|
|
"title": "Files by Type",
|
|
"x_axis_label": "Media Type",
|
|
"y_axis_label": "Count",
|
|
"height": 280
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"label": "Recent Files",
|
|
"content": {
|
|
"type": "container",
|
|
"gap": 16,
|
|
"children": [
|
|
{
|
|
"type": "heading",
|
|
"level": 2,
|
|
"content": "Recently Added"
|
|
},
|
|
{
|
|
"type": "data_table",
|
|
"data": "recent",
|
|
"sortable": true,
|
|
"filterable": true,
|
|
"page_size": 10,
|
|
"columns": [
|
|
{
|
|
"key": "file_name",
|
|
"header": "Filename"
|
|
},
|
|
{
|
|
"key": "title",
|
|
"header": "Title"
|
|
},
|
|
{
|
|
"key": "media_type",
|
|
"header": "Type"
|
|
},
|
|
{
|
|
"key": "file_size",
|
|
"header": "Size",
|
|
"data_type": "file_size"
|
|
},
|
|
{
|
|
"key": "created_at",
|
|
"header": "Added",
|
|
"data_type": "date_time"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"label": "Media Grid",
|
|
"content": {
|
|
"type": "container",
|
|
"gap": 16,
|
|
"children": [
|
|
{
|
|
"type": "heading",
|
|
"level": 2,
|
|
"content": "Browse Media"
|
|
},
|
|
{
|
|
"type": "media_grid",
|
|
"data": "recent",
|
|
"columns": 4,
|
|
"gap": 12
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"data_sources": {
|
|
"stats": {
|
|
"type": "endpoint",
|
|
"path": "/api/v1/statistics",
|
|
"poll_interval": 30
|
|
},
|
|
"recent": {
|
|
"type": "endpoint",
|
|
"path": "/api/v1/media"
|
|
},
|
|
"type-breakdown": {
|
|
"type": "transform",
|
|
"source": "stats",
|
|
"expression": "stats.media_by_type"
|
|
}
|
|
}
|
|
}
|