@extends('admin.layouts.app') @php $metrics = [ ['label' => 'Total Hero', 'value' => $stats['total_heroes'], 'note' => 'Terkatalog', 'icon' => 'stars', 'color' => 'info'], ['label' => 'Total Item', 'value' => $stats['total_items'], 'note' => 'Build & counter', 'icon' => 'box-seam', 'color' => 'success'], ['label' => 'Battle Spell', 'value' => $stats['total_spells'], 'note' => 'Spell utama', 'icon' => 'lightning-charge', 'color' => 'warning'], ['label' => 'Emblem Talent', 'value' => $stats['total_emblems'], 'note' => '7 set emblem', 'icon' => 'layers', 'color' => 'primary'], ['label' => 'Skin Hero', 'value' => $stats['total_skins'] ?? 0, 'note' => 'Splash art & tier', 'icon' => 'image', 'color' => 'danger'], ]; $tasks = [ [ 'task' => 'live', 'color' => 'info', 'icon' => 'cloud-download', 'title' => 'Scrape live stats (MLBBHub)', 'source' => 'Sumber publik: mlbbhub.com/heroes', 'desc' => 'Mengunduh statistik terbaru secara live: win rate, tier list (S/A/B/C/D), dan klasifikasi role untuk seluruh hero.', 'last' => $stats['last_live_scrape'], 'eta' => '~2–4 detik', 'button' => 'Mulai scraping', 'confirm' => 'Unduh statistik terbaru (Win Rate, Tier, Role) dari MLBBHub untuk seluruh hero?', ], [ 'task' => 'sync', 'color' => 'primary', 'icon' => 'arrow-repeat', 'title' => 'Sinkronisasi master dataset', 'source' => 'Sumber lokal: public/data.js & academy.js', 'desc' => 'Menyelaraskan seluruh hero lengkap (builds, matchups, weaknesses, counters), item, spell, dan emblem dari master dataset.', 'last' => $stats['last_local_sync'], 'eta' => '~1–3 detik', 'button' => 'Mulai sinkronisasi', 'confirm' => 'Selaraskan seluruh hero, item, spell, dan emblem dari master dataset?', ], [ 'task' => 'skins', 'color' => 'warning', 'icon' => 'images', 'title' => 'Scrape skin hero', 'source' => 'Sumber publik: Fandom Wiki', 'desc' => 'Mengumpulkan seluruh skin hero Mobile Legends: nama, tier, rarity, harga, dan gambar splash art ke database.', 'last' => $stats['last_skins_scrape'], 'eta' => 'beberapa menit', 'button' => 'Mulai scrape skin', 'confirm' => 'Kumpulkan seluruh skin hero (nama, tier, rarity, harga, splash art) dari Fandom Wiki? Proses ini bisa memakan waktu beberapa menit.', ], ]; @endphp @section('title', 'Scraper & Sinkronisasi Master Data') @section('content') @if ($result = session('scrape_result'))
{{ $task['desc'] }}