From 2006920427e67b47e17a4d958f65048da5a7251a Mon Sep 17 00:00:00 2001 From: kasper Franz Date: Mon, 17 Apr 2017 18:03:11 +0200 Subject: [PATCH] added a check if the task has run yet (#385) * added a null check on the last_run * corrected a mistake made when changing the file * another mistake :/ * changed to be less specific and so it checks against the value instead of > --- CHANGELOG.md | 2 ++ resources/lang/en/strings.php | 1 + resources/themes/pterodactyl/server/tasks/index.blade.php | 8 +++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4688b596..440d21e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,9 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ## v0.6.0-beta.3 (Courageous Carniadactylus) ### Fixed +* `[beta.2]` — Corrected the information when a task has not run yet. * `[beta.2]` — Fixes filemanager 404 when editing a file within a directory. +* `[beta.2]` — Fixes exception in tasks when deleting a server. ## v0.6.0-beta.2 (Courageous Carniadactylus) ### Fixed diff --git a/resources/lang/en/strings.php b/resources/lang/en/strings.php index 5cfaf102..507cf4b8 100644 --- a/resources/lang/en/strings.php +++ b/resources/lang/en/strings.php @@ -57,6 +57,7 @@ return [ 'queued' => 'Queued', 'last_run' => 'Last Run', 'next_run' => 'Next Run', + 'not_run_yet' => 'Not Run Yet', 'yes' => 'Yes', 'no' => 'No', 'delete' => 'Delete', diff --git a/resources/themes/pterodactyl/server/tasks/index.blade.php b/resources/themes/pterodactyl/server/tasks/index.blade.php index 5505d22e..4ed9654c 100644 --- a/resources/themes/pterodactyl/server/tasks/index.blade.php +++ b/resources/themes/pterodactyl/server/tasks/index.blade.php @@ -65,7 +65,13 @@ @lang('strings.no') @endif - {{ Carbon::parse($task->last_run)->toDayDateTimeString() }}
({{ Carbon::parse($task->last_run)->diffForHumans() }}) + + @if($task->last_run) + {{ Carbon::parse($task->last_run)->toDayDateTimeString() }}
({{ Carbon::parse($task->last_run)->diffForHumans() }}) + @else + @lang('strings.not_run_yet') + @endif + @if($task->active !== 0) {{ Carbon::parse($task->next_run)->toDayDateTimeString() }}
({{ Carbon::parse($task->next_run)->diffForHumans() }})