Some settings could not be applied automatically. Review the per-setting details below.
{{ $item['policy_identifier'] ?? $item['policy_id'] ?? 'Policy' }}
{{ $item['policy_type'] ?? '' }}
@php
$status = $item['status'] ?? 'unknown';
$statusColor = match ($status) {
'applied' => 'text-green-700 bg-green-100 border-green-200',
'dry_run' => 'text-blue-700 bg-blue-100 border-blue-200',
'partial' => 'text-amber-900 bg-amber-50 border-amber-200',
'manual_required' => 'text-amber-900 bg-amber-100 border-amber-200',
'failed' => 'text-red-700 bg-red-100 border-red-200',
default => 'text-gray-700 bg-gray-100 border-gray-200',
};
@endphp
{{ $status }}
@if (! empty($item['reason']))
{{ $item['reason'] }}
@endif
@if (! empty($item['assignment_summary']) && is_array($item['assignment_summary']))
@php
$summary = $item['assignment_summary'];
$assignmentOutcomes = $item['assignment_outcomes'] ?? [];
$assignmentIssues = collect($assignmentOutcomes)
->filter(fn ($outcome) => in_array($outcome['status'] ?? null, ['failed', 'skipped'], true))
->values();
@endphp
Assignments: {{ (int) ($summary['success'] ?? 0) }} success •
{{ (int) ($summary['failed'] ?? 0) }} failed •
{{ (int) ($summary['skipped'] ?? 0) }} skipped
@if ($assignmentIssues->isNotEmpty())
Assignment details
@foreach ($assignmentIssues as $outcome)
@php
$outcomeStatus = $outcome['status'] ?? 'unknown';
$outcomeColor = match ($outcomeStatus) {
'failed' => 'text-red-700 bg-red-100 border-red-200',
'skipped' => 'text-amber-900 bg-amber-100 border-amber-200',
default => 'text-gray-700 bg-gray-100 border-gray-200',
};
$assignmentGroupId = $outcome['group_id']
?? ($outcome['assignment']['target']['groupId'] ?? null);
@endphp
Assignment {{ $assignmentGroupId ?? 'unknown group' }}
{{ $outcomeStatus }}
@if (! empty($outcome['mapped_group_id']))
Mapped to: {{ $outcome['mapped_group_id'] }}
@endif
@if (! empty($outcome['reason']))
{{ $outcome['reason'] }}
@endif
@if (! empty($outcome['graph_error_message']) || ! empty($outcome['graph_error_code']))
{{ $outcome['graph_error_message'] ?? 'Unknown error' }}
@if (! empty($outcome['graph_error_code']))
Code: {{ $outcome['graph_error_code'] }}
@endif
@endif
@endforeach
@endif
@endif
@if (! empty($item['created_policy_id']))
@php
$createdMode = $item['created_policy_mode'] ?? null;
$createdMessage = $createdMode === 'metadata_only'
? 'New policy created (metadata only). Apply settings manually.'
: 'New policy created (manual cleanup required).';
@endphp
{{ $createdMessage }} ID: {{ $item['created_policy_id'] }}
@endif
@if (! empty($item['graph_error_message']) || ! empty($item['graph_error_code']))
Graph error
{{ $item['graph_error_message'] ?? 'Unknown error' }}
@if (! empty($item['graph_error_code']))
Code: {{ $item['graph_error_code'] }}
@endif
@if (! empty($item['graph_request_id']) || ! empty($item['graph_client_request_id']))
Details
@if (! empty($item['graph_request_id']))
request-id: {{ $item['graph_request_id'] }}
@endif
@if (! empty($item['graph_client_request_id']))
client-request-id: {{ $item['graph_client_request_id'] }}
@endif
@endif
@endif
@if (! empty($item['settings_apply']) && is_array($item['settings_apply']))
@php
$apply = $item['settings_apply'];
$total = (int) ($apply['total'] ?? 0);
$applied = (int) ($apply['applied'] ?? 0);
$failed = (int) ($apply['failed'] ?? 0);
$manual = (int) ($apply['manual_required'] ?? 0);
$issues = $apply['issues'] ?? [];
@endphp
Settings applied: {{ $applied }}/{{ $total }}
@if ($failed > 0 || $manual > 0)
• {{ $failed }} failed • {{ $manual }} manual
@endif
@if (! empty($issues))
Settings requiring attention
@foreach ($issues as $issue)
@php
$issueStatus = $issue['status'] ?? 'unknown';
$issueColor = match ($issueStatus) {
'failed' => 'text-red-700 bg-red-100 border-red-200',
'manual_required' => 'text-amber-900 bg-amber-100 border-amber-200',
default => 'text-gray-700 bg-gray-100 border-gray-200',
};
@endphp
Setting {{ $issue['setting_id'] ?? 'unknown' }}
{{ $issueStatus }}
@if (! empty($issue['reason']))
{{ $issue['reason'] }}
@endif
@if (! empty($issue['graph_error_message']) || ! empty($issue['graph_error_code']))
{{ $issue['graph_error_message'] ?? 'Unknown error' }}
@if (! empty($issue['graph_error_code']))
Code: {{ $issue['graph_error_code'] }}
@endif
@if (! empty($issue['graph_request_id']) || ! empty($issue['graph_client_request_id']))
@if (! empty($issue['graph_request_id']))
request-id: {{ $issue['graph_request_id'] }}
@endif
@if (! empty($issue['graph_client_request_id']))
client-request-id: {{ $issue['graph_client_request_id'] }}
@endif
@endif
@endif
@endforeach
@endif
@endif
@if (! empty($item['platform']))
Platform: {{ $item['platform'] }}
@endif