Loading app/Config/App.php +5 −0 Original line number Diff line number Diff line Loading @@ -457,5 +457,10 @@ class App extends BaseConfig */ public ?int $storageLimit = null; /** * Bandwidth limit (per month) in Gigabytes */ public ?int $bandwidthLimit = null; public ?string $legalNoticeURL = null; } app/Views/Components/Charts/ChartsComponent.php +8 −0 Original line number Diff line number Diff line Loading @@ -10,15 +10,23 @@ class ChartsComponent extends Component { protected string $title = ''; protected string $subtitle = ''; protected string $dataUrl = ''; protected string $type = ''; public function render(): string { $subtitleBlock = ''; if ($this->subtitle !== '') { $subtitleBlock = '<p class="px-6 -mt-4 text-sm text-skin-muted">' . $this->subtitle . '</p>'; } return <<<HTML <div class="bg-elevated border-3 rounded-xl border-subtle {$this->class}"> <h2 class="px-6 py-4 text-xl">{$this->title}</h2> {$subtitleBlock} <div class="w-full h-[500px]" data-chart-type="{$this->type}" data-chart-url="{$this->dataUrl}"></div> </div> HTML; Loading modules/Admin/Controllers/DashboardController.php +4 −0 Original line number Diff line number Diff line Loading @@ -70,10 +70,14 @@ class DashboardController extends BaseController ->id; } $bandwidthLimit = config('App') ->bandwidthLimit; $data = [ 'podcastsData' => $podcastsData, 'episodesData' => $episodesData, 'storageData' => $storageData, 'bandwidthLimit' => $bandwidthLimit === null ? null : formatBytes($bandwidthLimit * 1000000000), 'onlyPodcastId' => $onlyPodcastId, ]; Loading modules/Admin/Language/en/Charts.php +1 −0 Original line number Diff line number Diff line Loading @@ -37,4 +37,5 @@ return [ 'podcast_by_bandwidth' => 'Daily used bandwidth (in MB)', 'total_storage_by_month' => 'Monthly storage (in MB)', 'total_bandwidth_by_month' => 'Monthly used bandwidth (in MB)', 'total_bandwidth_by_month_limit' => 'Limited to {totalBandwidth} per month', ]; themes/cp_admin/dashboard.php +3 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ 'Podcast', 'TotalStorageByMonth', ) ?>" /> <Charts.XY class="col-span-1" title="<?= lang('Charts.total_bandwidth_by_month') ?>" dataUrl="<?= route_to( <Charts.XY class="col-span-1" title="<?= lang('Charts.total_bandwidth_by_month') ?>" subtitle="<?= $bandwidthLimit !== null ? lang('Charts.total_bandwidth_by_month_limit', [ 'totalBandwidth' => $bandwidthLimit, ]) : '' ?>" dataUrl="<?= route_to( 'analytics-data-instance', 'Podcast', 'TotalBandwidthByMonth', Loading Loading
app/Config/App.php +5 −0 Original line number Diff line number Diff line Loading @@ -457,5 +457,10 @@ class App extends BaseConfig */ public ?int $storageLimit = null; /** * Bandwidth limit (per month) in Gigabytes */ public ?int $bandwidthLimit = null; public ?string $legalNoticeURL = null; }
app/Views/Components/Charts/ChartsComponent.php +8 −0 Original line number Diff line number Diff line Loading @@ -10,15 +10,23 @@ class ChartsComponent extends Component { protected string $title = ''; protected string $subtitle = ''; protected string $dataUrl = ''; protected string $type = ''; public function render(): string { $subtitleBlock = ''; if ($this->subtitle !== '') { $subtitleBlock = '<p class="px-6 -mt-4 text-sm text-skin-muted">' . $this->subtitle . '</p>'; } return <<<HTML <div class="bg-elevated border-3 rounded-xl border-subtle {$this->class}"> <h2 class="px-6 py-4 text-xl">{$this->title}</h2> {$subtitleBlock} <div class="w-full h-[500px]" data-chart-type="{$this->type}" data-chart-url="{$this->dataUrl}"></div> </div> HTML; Loading
modules/Admin/Controllers/DashboardController.php +4 −0 Original line number Diff line number Diff line Loading @@ -70,10 +70,14 @@ class DashboardController extends BaseController ->id; } $bandwidthLimit = config('App') ->bandwidthLimit; $data = [ 'podcastsData' => $podcastsData, 'episodesData' => $episodesData, 'storageData' => $storageData, 'bandwidthLimit' => $bandwidthLimit === null ? null : formatBytes($bandwidthLimit * 1000000000), 'onlyPodcastId' => $onlyPodcastId, ]; Loading
modules/Admin/Language/en/Charts.php +1 −0 Original line number Diff line number Diff line Loading @@ -37,4 +37,5 @@ return [ 'podcast_by_bandwidth' => 'Daily used bandwidth (in MB)', 'total_storage_by_month' => 'Monthly storage (in MB)', 'total_bandwidth_by_month' => 'Monthly used bandwidth (in MB)', 'total_bandwidth_by_month_limit' => 'Limited to {totalBandwidth} per month', ];
themes/cp_admin/dashboard.php +3 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ 'Podcast', 'TotalStorageByMonth', ) ?>" /> <Charts.XY class="col-span-1" title="<?= lang('Charts.total_bandwidth_by_month') ?>" dataUrl="<?= route_to( <Charts.XY class="col-span-1" title="<?= lang('Charts.total_bandwidth_by_month') ?>" subtitle="<?= $bandwidthLimit !== null ? lang('Charts.total_bandwidth_by_month_limit', [ 'totalBandwidth' => $bandwidthLimit, ]) : '' ?>" dataUrl="<?= route_to( 'analytics-data-instance', 'Podcast', 'TotalBandwidthByMonth', Loading