fedi-feed-router/resources/views/livewire/dashboard.blade.php

154 lines
8.4 KiB
PHP
Raw Permalink Normal View History

<div class="p-6">
<div class="mb-8">
<h1 class="text-2xl font-bold text-gray-900">Dashboard</h1>
<p class="mt-1 text-sm text-gray-500">
Overview of your feed management system
</p>
</div>
<!-- System Statistics -->
<div class="mb-8">
<h2 class="text-lg font-semibold text-gray-900 mb-4">System Overview</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<!-- Active Feeds -->
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center">
<div class="shrink-0">
<svg class="h-8 w-8 text-orange-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M12.75 19.5v-.75a7.5 7.5 0 0 0-7.5-7.5H4.5m0-6.75h.75c7.87 0 14.25 6.38 14.25 14.25v.75M6 18.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z" />
</svg>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Active Feeds</p>
<p class="text-2xl font-semibold text-gray-900">
{{ $systemStats['active_feeds'] }}
<span class="text-sm font-normal text-gray-500">/{{ $systemStats['total_feeds'] }}</span>
</p>
</div>
</div>
</div>
<!-- Platform Accounts -->
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center">
<div class="shrink-0">
<svg class="h-8 w-8 text-indigo-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" />
</svg>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Platform Accounts</p>
<p class="text-2xl font-semibold text-gray-900">
{{ $systemStats['active_platform_accounts'] }}
<span class="text-sm font-normal text-gray-500">/{{ $systemStats['total_platform_accounts'] }}</span>
</p>
</div>
</div>
</div>
<!-- Platform Channels -->
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center">
<div class="shrink-0">
<svg class="h-8 w-8 text-cyan-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5" />
</svg>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Platform Channels</p>
<p class="text-2xl font-semibold text-gray-900">
{{ $systemStats['active_platform_channels'] }}
<span class="text-sm font-normal text-gray-500">/{{ $systemStats['total_platform_channels'] }}</span>
</p>
</div>
</div>
</div>
<!-- Active Routes -->
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center">
<div class="shrink-0">
<svg class="h-8 w-8 text-pink-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" />
</svg>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Active Routes</p>
<p class="text-2xl font-semibold text-gray-900">
{{ $systemStats['active_routes'] }}
<span class="text-sm font-normal text-gray-500">/{{ $systemStats['total_routes'] }}</span>
</p>
</div>
</div>
</div>
</div>
</div>
<!-- Article Statistics -->
<div>
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold text-gray-900">Article Statistics</h2>
<select
wire:model.live="period"
class="rounded-md border-gray-300 text-sm focus:border-blue-500 focus:ring-blue-500"
>
@foreach ($availablePeriods as $value => $label)
<option value="{{ $value }}">{{ $label }}</option>
@endforeach
</select>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<!-- Articles Fetched -->
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center">
<div class="shrink-0">
<svg class="h-8 w-8 text-blue-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
</svg>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Articles Fetched</p>
<p class="text-2xl font-semibold text-gray-900">
{{ $articleStats['articles_fetched'] }}
</p>
</div>
</div>
</div>
<!-- Articles Published -->
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center">
<div class="shrink-0">
<svg class="h-8 w-8 text-green-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
</svg>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Articles Published</p>
<p class="text-2xl font-semibold text-gray-900">
{{ $articleStats['articles_published'] }}
</p>
</div>
</div>
</div>
<!-- Published Rate -->
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center">
<div class="shrink-0">
<svg class="h-8 w-8 text-purple-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941" />
</svg>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Published Rate</p>
<p class="text-2xl font-semibold text-gray-900">
{{ $articleStats['published_percentage'] }}%
</p>
</div>
</div>
</div>
</div>
</div>
</div>