The Cache warming row of the VITEC SSR module now shows a Bootstrap progress bar with a running counter instead of asking for a reload. New ajax route vitec_ssr_health (SsrController::healthJson) returns the node /__health JSON; ssr-warm-progress.js polls it every 2 s while a warm run is active and every 15 s otherwise (pauses in background tabs) and also refreshes the Cache: N pages / M MB line. The health fetch moved into SsrController::fetchHealth, shared by indexAction and the ajax route; its error text is English now. Verified live in the backend: bar, counter and cache line advance during a run. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
43 lines
1.7 KiB
PHP
Executable File
43 lines
1.7 KiB
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Evomedien\Vitec\Controller\Backend\ProductTextImportController;
|
|
use Evomedien\Vitec\Controller\Backend\StructuredDataController;
|
|
|
|
/**
|
|
* Backend AJAX routes for the VITEC extension.
|
|
*
|
|
* vitec_structureddata_generate — generate schema.org JSON-LD for a product;
|
|
* called by the FormEngine "Structured Data generieren" button. The URL is
|
|
* available to JS via TYPO3.settings.ajaxUrls['vitec_structureddata_generate'].
|
|
*/
|
|
return [
|
|
'vitec_structureddata_generate' => [
|
|
'path' => '/vitec/structureddata/generate',
|
|
'target' => StructuredDataController::class . '::generate',
|
|
],
|
|
// Click-to-edit in the product text import's "Current value" column:
|
|
// read the full raw value / write one field through DataHandler.
|
|
'vitec_product_field_get' => [
|
|
'path' => '/vitec/product/field/get',
|
|
'target' => ProductTextImportController::class . '::fieldGet',
|
|
],
|
|
'vitec_product_field_save' => [
|
|
'path' => '/vitec/product/field/save',
|
|
'target' => ProductTextImportController::class . '::fieldSave',
|
|
],
|
|
// Context menu "Purge from SSR cache" (SsrPurgeItemProvider +
|
|
// Resources/Public/Javascript/ssr-context-menu.js).
|
|
'vitec_ssr_purge_page' => [
|
|
'path' => '/vitec/ssr/purge-page',
|
|
'target' => \Evomedien\Vitec\Controller\Backend\SsrController::class . '::purgePage',
|
|
],
|
|
// Live "Cache warming" progress bar in the VITEC SSR module
|
|
// (Resources/Public/Javascript/ssr-warm-progress.js polls it).
|
|
'vitec_ssr_health' => [
|
|
'path' => '/vitec/ssr/health',
|
|
'target' => \Evomedien\Vitec\Controller\Backend\SsrController::class . '::healthJson',
|
|
],
|
|
];
|