refs #1967. Sync ogBoot API when put template
testing/ogcore-api/pipeline/head This commit looks good
Details
testing/ogcore-api/pipeline/head This commit looks good
Details
parent
927e38102e
commit
ef9aee0368
|
@ -30,7 +30,7 @@ class InstallOgLiveResponseAction extends AbstractController
|
|||
{
|
||||
public CONST string OG_LIVE_INSTALL_SUCCESS = 'success';
|
||||
public CONST string OG_LIVE_INSTALL_FAILED = 'failure';
|
||||
const string OG_BOOT_DIRECTORY = '/opt/opengnsys/ogboot/tftpboot//';
|
||||
const string OG_BOOT_DIRECTORY = '/opt/opengnsys/ogboot/tftpboot/';
|
||||
|
||||
public function __construct(
|
||||
protected readonly EntityManagerInterface $entityManager,
|
||||
|
@ -94,7 +94,7 @@ class InstallOgLiveResponseAction extends AbstractController
|
|||
private function updateOgLive (OgLive $ogLive, mixed $details, string $status): void
|
||||
{
|
||||
if ( is_array($details) && $status === self::OG_LIVE_INSTALL_SUCCESS) {
|
||||
$ogLive->setName($this->simplifyOgLiveFilenameService->__invoke($details['directory']));
|
||||
$ogLive->setName($this->simplifyOgLiveFilenameService->__invoke(str_replace(self::OG_BOOT_DIRECTORY, '', $details['directory'])));
|
||||
$ogLive->setDate(new \DateTime($this->extractOgLiveFilenameDateService->__invoke($details['directory'])));
|
||||
$ogLive->setFilename(str_replace(self::OG_BOOT_DIRECTORY, '', $details['directory']));
|
||||
$ogLive->setInstalled(true);
|
||||
|
|
Loading…
Reference in New Issue