🔥 Remove PowerGrid and related dependencies

-  Deleted PowerGrid configuration file.
- 🔄 Removed `power-components/livewire-powergrid` and its dependencies (e.g., `simplesoftwareio/simple-qrcode` and `calebporzio/sushi`) from `composer.json` and `composer.lock`.
- 🧼 Cleaned up references to PowerGrid in CSS, JS, tests, and package files.
- 🛠️ Refactored `SecurityMonitor` to eliminate unused methods (`getAttemptsFromIp` and `isIpSuspicious`) dependent on deprecated functionality.
This commit is contained in:
HolgerHatGarKeineNode
2026-06-29 22:35:54 +02:00
parent f9d16cc57d
commit 911f9e4316
9 changed files with 4 additions and 566 deletions
+2 -26
View File
@@ -5,6 +5,7 @@ namespace App\Services;
use App\Models\SecurityAttempt;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use Throwable;
class SecurityMonitor
@@ -103,23 +104,6 @@ class SecurityMonitor
return false;
}
public function getAttemptsFromIp(string $ip, int $hours = 24): int
{
try {
return SecurityAttempt::query()
->fromIp($ip)
->recent($hours)
->count();
} catch (Throwable) {
return 0;
}
}
public function isIpSuspicious(string $ip, int $threshold = 10, int $hours = 24): bool
{
return $this->getAttemptsFromIp($ip, $hours) >= $threshold;
}
private function extractComponentName(Request $request): ?string
{
try {
@@ -224,14 +208,6 @@ class SecurityMonitor
private function truncate(?string $value, int $length): ?string
{
if ($value === null) {
return null;
}
if (strlen($value) <= $length) {
return $value;
}
return substr($value, 0, $length - 3).'...';
return $value === null ? null : Str::limit($value, $length - 3);
}
}