mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
fixes for clockwork web UI
This commit is contained in:
parent
6a585857b0
commit
ca1e5ebb8a
|
|
@ -1,3 +1,10 @@
|
|||
# v1.7.47
|
||||
## mm/dd/2024
|
||||
|
||||
1. [](#improved)
|
||||
* Fixed an issue with Clockwork Debugger to allow web UI
|
||||
* Updated vendor libs to latest versions
|
||||
|
||||
# v1.7.46
|
||||
## 05/15/2024
|
||||
|
||||
|
|
|
|||
|
|
@ -279,11 +279,7 @@ class Debugger
|
|||
->withHeader('X-Clockwork-Id', $clockworkRequest->id)
|
||||
->withHeader('X-Clockwork-Version', $clockwork::VERSION);
|
||||
|
||||
$grav = Grav::instance();
|
||||
$basePath = $this->grav['base_url_relative'] . $grav['pages']->base();
|
||||
if ($basePath) {
|
||||
$response = $response->withHeader('X-Clockwork-Path', $basePath . '/__clockwork/');
|
||||
}
|
||||
$response = $response->withHeader('X-Clockwork-Path', Utils::url('/__clockwork/'));
|
||||
|
||||
return $response->withHeader('Server-Timing', ServerTiming::fromRequest($clockworkRequest)->value());
|
||||
}
|
||||
|
|
@ -307,7 +303,7 @@ class Debugger
|
|||
}
|
||||
|
||||
$id = $matches['id'] ?? null;
|
||||
$direction = $matches['direction'] ?? null;
|
||||
$direction = $matches['direction'] ?? 'latest';
|
||||
$count = $matches['count'] ?? null;
|
||||
|
||||
$storage = $clockwork->getStorage();
|
||||
|
|
@ -316,7 +312,7 @@ class Debugger
|
|||
$data = $storage->previous($id, $count);
|
||||
} elseif ($direction === 'next') {
|
||||
$data = $storage->next($id, $count);
|
||||
} elseif ($id === 'latest') {
|
||||
} elseif ($direction === 'latest' || $id === 'latest') {
|
||||
$data = $storage->latest();
|
||||
} else {
|
||||
$data = $storage->find($id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user