@extends('layouts.app') @section('title', 'Permissions - Détail') @section('header', 'Permissions des dossiers') @push('styles') @endpush @section('content') @php $statutLabels = ['pending' => ['En attente…', 'text-yellow-600'], 'running' => ['Scan en cours…', 'text-blue-600'], 'stopped' => ['Arrêté (partiel)', 'text-orange-600'], 'failed' => ['Échec', 'text-red-600'], 'completed' => ['Terminé', 'text-green-600']]; $enCours = false; $sections = [ 'sharepoint' => ['scan' => $spScan, 'enCours' => $spEnCours, 'folders' => $spFolders, 'name' => 'SharePoint SRVPG', 'empty' => 'Aucun scan. Cliquez sur "Scan SP" dans le connecteur M365.'], 'partage' => ['scan' => $partageScan, 'enCours' => $partageEnCours, 'folders' => $partageFolders, 'name' => 'Serveur de fichiers', 'empty' => 'Aucun scan. Lancez-le depuis les connecteurs.'], ]; @endphp @foreach($sections as $type => $section) @php $s = $section['scan']; $ec = $section['enCours']; $folders = $section['folders']; $running = $ec && in_array($ec->statut, ['pending', 'running']); $frozen = $ec && $ec->statut === 'running' && $ec->updated_at->diffInMinutes(now()) > 3; $stuck = $ec && $ec->statut === 'pending' && $ec->updated_at->diffInSeconds(now()) > 30; if ($running) $enCours = true; @endphp
Scan en cours — les nouvelles données remplaceront l'ancien scan à la fin. @if($s && $s->id !== $ec->id) Résultats précédents conservés jusqu'à la fin du scan. @endif
{{ $section['empty'] }}
@elseif($s->total_entrees_acl === 0) @if($running)Aucun dossier scanné.
@endif @else{{ $folders['total'] }} dossier(s) racine — cliquez pour explorer les permissions.
@include('permissions._folder_list', [ 'items' => $folders['items'], 'total' => $folders['total'], 'page' => $folders['page'], 'perPage' => $folders['perPage'], 'dossier' => $folders['dossier'], 'detailRoute' => 'admin.permissions.' . $type . '.detail', 'scanId' => $s->id, ])