Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | require_once(__DIR__."/../core.php"); |
| 3 | security::checkType(security::ADMIN, security::METHOD_NOTFOUND); |
| 4 | |
| 5 | if (!isset($_GET["id"])) { |
| 6 | security::notFound(); |
| 7 | } |
| 8 | |
| 9 | $id = (int)$_GET["id"]; |
| 10 | |
| 11 | $log = registry::getLog($id); |
| 12 | if ($log === false) security::notFound(); |
| 13 | ?> |
| 14 | |
| 15 | <style> |
| 16 | #dynDialog { |
| 17 | max-width: 500px; |
| 18 | width: auto; |
| 19 | } |
| 20 | |
| 21 | .log { |
| 22 | white-space: pre-wrap; |
| 23 | } |
| 24 | </style> |
| 25 | |
| 26 | <h4 class="mdl-dialog__title"> |
| 27 | Log |
| 28 | <?php |
| 29 | if ($log["warningpos"] > 0) { |
| 30 | visual::addTooltip("warning", "El log contiene mensajes de advertencia"); |
| 31 | ?> |
| 32 | <i class="material-icons mdl-color-text--orange help" id="warning">warning</i> |
| 33 | <?php |
| 34 | } |
| 35 | |
| 36 | if ($log["errorpos"] > 0) { |
| 37 | visual::addTooltip("error", "El log contiene mensajes de error"); |
| 38 | ?> |
| 39 | <i class="material-icons mdl-color-text--red help" id="error">error</i> |
| 40 | <?php |
| 41 | } |
| 42 | |
| 43 | if ($log["fatalerrorpos"] > 0) { |
| 44 | visual::addTooltip("fatalerror", "El log contiene errores fatales"); |
| 45 | ?> |
| 46 | <i class="material-icons mdl-color-text--red help-900" id="fatalerror">error</i> |
| 47 | <?php |
| 48 | } |
| 49 | ?> |
| 50 | </h4> |
| 51 | <div class="mdl-dialog__content"> |
| 52 | <pre class="log"><?=registry::beautifyLog(security::htmlsafe($log["logdetails"]))?></pre> |
| 53 | </div> |
| 54 | <div class="mdl-dialog__actions"> |
| 55 | <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--primary">Cerrar</button> |
| 56 | </div> |
| 57 | <?php |
| 58 | visual::renderTooltips(); |
| 59 | ?> |