From 7f2c8a6286b87455bf12cbbb7bcb899352b61314 Mon Sep 17 00:00:00 2001
From: Roardom
+ + + Histories + +
diff --git a/resources/views/Staff/history/index.blade.php b/resources/views/Staff/history/index.blade.php
new file mode 100644
index 000000000..4a89e9121
--- /dev/null
+++ b/resources/views/Staff/history/index.blade.php
@@ -0,0 +1,22 @@
+@extends('layout.default')
+
+@section('title')
+ {{ __('common.search') }}
+ Histories
+
+
+
+ @break
+ @default
+
+
+
+
+ @foreach ($histories as $history)
+
+ {{ __('user.user') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.user_id'])
+
+
+ {{ __('torrent.torrents') }}
+ @include('livewire.includes._sort-icon', ['field' => 'torrent_count'])
+
+
+ {{ __('user.credited-upload') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.uploaded_sum'])
+
+
+ {{ __('user.upload-true') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.actual_uploaded_sum'])
+
+
+ Client Upload
+ @include('livewire.includes._sort-icon', ['field' => 'histories.client_uploaded_sum'])
+
+
+ {{ __('user.credited-download') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.downloaded_sum'])
+
+
+ {{ __('user.download-true') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.actual_downloaded_sum'])
+
+
+ Client Download
+ @include('livewire.includes._sort-icon', ['field' => 'histories.client_downloaded_sum'])
+
+
+ {{ __('torrent.refunded') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.refunded_downloaded_sum'])
+
+
+ {{ __('torrent.started') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.created_at_min'])
+
+
+ Announced
+ @include('livewire.includes._sort-icon', ['field' => 'histories.updated_at_max'])
+
+
+ {{ __('user.avg-seedtime') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.seedtime_avg'])
+
+
+ {{ __('torrent.seeding') }}
+ @include('livewire.includes._sort-icon', ['field' => 'seeding_count'])
+
+
+ {{ __('torrent.leeching') }}
+ @include('livewire.includes._sort-icon', ['field' => 'leeching_count'])
+
+
+
+
+
+
+
+
+
+
+
+
+ @endforeach
+
+
+
+
+ {{ $history->torrent_count }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->uploaded_sum, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->actual_uploaded_sum, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->client_uploaded_sum, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->downloaded_sum, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->actual_downloaded_sum, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->client_downloaded_sum, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->refunded_downloaded_sum, 2) }}
+
+
+
+
+
+
+
+ @if ($history->seedtime < config('hitrun.seedtime'))
+
+ {{ $weeks = intdiv($history->seedtime_avg ?? 0, 3600 * 24 * 7) }}w {{ intdiv(($history->seedtime_avg ?? 0) - $weeks * 3600 * 24 * 7, 3600) }}h
+
+ @else
+
+ {{ $weeks = intdiv($history->seedtime_avg ?? 0, 3600 * 24 * 7) }}w {{ intdiv(($history->seedtime_avg ?? 0) - $weeks * 3600 * 24 * 7, 3600) }}h
+
+ @endif
+ {{ $history->seeding_count }}
+ {{ $history->leeching_count }}
+ {{ $history->immune_count }}
+ {{ $history->hitrun_count }}
+ {{ $history->prewarn_count }}
+
+
+
+ @endswitch
+ {{ $histories->links('partials.pagination') }}
+
+
+
+
+ @foreach ($histories as $history)
+
+ {{ __('user.user') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.user_id'])
+
+
+ {{ __('torrent.torrent') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.torrent_id'])
+
+
+ {{ __('torrent.agent') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.agent'])
+
+
+ {{ __('user.credited-upload') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.uploaded'])
+
+
+ {{ __('user.upload-true') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.actual_uploaded'])
+
+
+ Client Upload
+ @include('livewire.includes._sort-icon', ['field' => 'histories.client_uploaded'])
+
+
+ {{ __('user.credited-download') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.downloaded'])
+
+
+ {{ __('user.download-true') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.actual_downloaded'])
+
+
+ Client Download
+ @include('livewire.includes._sort-icon', ['field' => 'histories.client_downloaded'])
+
+
+ {{ __('torrent.refunded') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.refunded_downloaded'])
+
+
+ {{ __('torrent.started') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.created_at'])
+
+
+ Announced
+ @include('livewire.includes._sort-icon', ['field' => 'histories.updated_at'])
+
+
+ {{ __('torrent.completed_at') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.completed_at'])
+
+
+ {{ __('torrent.seedtime') }}
+ @include('livewire.includes._sort-icon', ['field' => 'histories.seedtime'])
+
+
+ {{ __('torrent.seeding') }}
+ @include('livewire.includes._sort-icon', ['field' => 'seeding'])
+
+
+ {{ __('torrent.leeching') }}
+ @include('livewire.includes._sort-icon', ['field' => 'leeching'])
+
+
+
+
+
+
+
+
+
+
+
+
+ @endforeach
+
+
+
+
+
+ {{ $history->torrent->name ?? '' }}
+
+
+ {{ $history->agent }}
+
+ {{ App\Helpers\StringHelper::formatBytes($history->uploaded, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->actual_uploaded, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->client_uploaded, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->downloaded, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->actual_downloaded, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->client_downloaded, 2) }}
+
+
+ {{ App\Helpers\StringHelper::formatBytes($history->refunded_downloaded, 2) }}
+
+
+
+
+
+
+
+
+
+
+ @if ($history->seedtime < config('hitrun.seedtime'))
+
+ {{ $weeks = intdiv($history->seedtime ?? 0, 3600 * 24 * 7) }}w {{ intdiv(($history->seedtime ?? 0) - $weeks * 3600 * 24 * 7, 3600) }}h
+
+ @else
+
+ {{ $weeks = intdiv($history->seedtime ?? 0, 3600 * 24 * 7) }}w {{ intdiv(($history->seedtime ?? 0) - $weeks * 3600 * 24 * 7, 3600) }}h
+
+ @endif
+
+ @if ($history->active)
+
+ @else
+
+ @endif
+
+
+ @if ($history->seeder)
+
+ @else
+
+ @endif
+
+
+ @if ($history->immune)
+
+ @else
+
+ @endif
+
+
+ @if ($history->hitrun)
+
+ @else
+
+ @endif
+
+
+ @if ($history->prewarn)
+
+ @else
+
+ @endif
+
+