Skip to content

Commit

Permalink
MDL-72969 output: correct ansi colour format codes for check results.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Nov 1, 2021
1 parent ee1c3d9 commit 78f2c07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/outputrenderers.php
Expand Up @@ -4871,17 +4871,17 @@ public function header() {
* To aid in CLI consistency this status is NOT translated and the visual
* width is always exactly 10 chars.
*
* @param result $result
* @param core\check\result $result
* @return string HTML fragment
*/
protected function render_check_result(core\check\result $result) {
$status = $result->get_status();

$labels = [
core\check\result::NA => ' ' . cli_ansi_format('<colour:gray>' ) . ' NA ',
core\check\result::NA => ' ' . cli_ansi_format('<colour:darkGray>' ) . ' NA ',
core\check\result::OK => ' ' . cli_ansi_format('<colour:green>') . ' OK ',
core\check\result::INFO => ' ' . cli_ansi_format('<colour:blue>' ) . ' INFO ',
core\check\result::UNKNOWN => ' ' . cli_ansi_format('<colour:grey>' ) . ' UNKNOWN ',
core\check\result::UNKNOWN => ' ' . cli_ansi_format('<colour:darkGray>' ) . ' UNKNOWN ',
core\check\result::WARNING => ' ' . cli_ansi_format('<colour:black><bgcolour:yellow>') . ' WARNING ',
core\check\result::ERROR => ' ' . cli_ansi_format('<bgcolour:red>') . ' ERROR ',
core\check\result::CRITICAL => '' . cli_ansi_format('<bgcolour:red>') . ' CRITICAL ',
Expand Down

0 comments on commit 78f2c07

Please sign in to comment.