<?php
/**
 * @author    Agence Dn'D <contact@dnd.fr>
 * @copyright 2019 Agence Dn'D
 * @license   https://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @link      https://www.dnd.fr/
 */

/** @var Akeneo\Connector\Block\Adminhtml\Log\View $block **/
?>

<div class="page-main-actions">
    <div class="page-actions-placeholder"></div>
    <div class="page-actions" data-ui-id="page-actions-toolbar-content-header">
        <div class="page-actions-inner" data-title="Performance">
            <div class="page-actions-buttons">
                <button type="button" class="action-default scalable action-back" onclick="setLocation('<?= $block->getBackUrl() ?>')" data-ui-id="page-actions-toolbar-back-button">
                    <span><?= $block->escapeHtml(__('Back')) ?></span>
                </button>
            </div>
        </div>
    </div>
</div>

<ul class="akeneo-connector-console">
    <?php $log = $block->getLog(); ?>
    <li><?= $log->getCode() ?> <?= $log->getFile() ?></li>
    <?php $steps = $block->getSteps(); ?>
    <?php $previous = null; ?>
    <?php foreach ($steps as $step): ?>
        <li class="<?= !$step['status'] ? 'error' : ($previous == $step['number'] ? 'success' : '') ?>"><?= $step['message'] ?></li>
        <?php $previous = $step['number'] ?>
    <?php endforeach; ?>
</ul>
