feat:시스템 알림 AI 분석용 복사 버튼 추가

- StatAlert 모델에 ai_analysis_summary accessor 추가
- 알림 상세 아코디언에 'AI 분석용 복사' 버튼 추가
- 클립보드 복사 시 심각도/도메인/유형/메시지 등 포맷팅

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 11:20:47 +09:00
parent 430e59b241
commit a559fa2303
2 changed files with 61 additions and 3 deletions

View File

@@ -67,4 +67,36 @@ public function getDomainLabelAttribute(): string
default => $this->domain,
};
}
/**
* AI 분석용 요약 텍스트
*/
public function getAiAnalysisSummaryAttribute(): string
{
$lines = [];
$lines[] = "=== SAM 시스템 알림 분석 요청 ===";
$lines[] = "";
$lines[] = "■ 심각도: {$this->severity} ({$this->severity_label})";
$lines[] = "■ 도메인: {$this->domain} ({$this->domain_label})";
$lines[] = "■ 알림 유형: {$this->alert_type}";
$lines[] = "■ 제목: {$this->title}";
$lines[] = "■ 발생 시간: {$this->created_at?->format('Y-m-d H:i:s')}";
if ($this->message) {
$lines[] = "";
$lines[] = "■ 상세 메시지:";
$lines[] = $this->message;
}
if ($this->current_value || $this->threshold_value) {
$lines[] = "";
$lines[] = "■ 현재값: {$this->current_value}";
$lines[] = "■ 임계값: {$this->threshold_value}";
}
$lines[] = "";
$lines[] = "위 시스템 알림의 원인과 해결 방법을 분석해주세요.";
return implode("\n", $lines);
}
}