-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add status page and table #175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small things I noticed. Aside from those the page seems to mirror everything else nicely as intended.
|
||
$detail = optional_param('detail', '', PARAM_TEXT); // Show detailed info about one check only. | ||
|
||
$url = '/report/status/status.php'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This url means the check link and more info are going to report/status/status.php?xxx
which doesn't exist, instead of report/status/index.php?xxx
. Is this intended for future functionality or does it need to be updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be admin/tool/heartbeat/status.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested that and it works, so +1 for changing it to /admin/tool/heartbeat/status.php
get_string('status'), | ||
get_string('check'), | ||
get_string('summary'), | ||
'Exemption', | ||
get_string('action'), | ||
]; | ||
$table->colclasses = [ | ||
'rightalign status', | ||
'leftalign check', | ||
'leftalign summary', | ||
'leftalign exemption', | ||
'leftalign action', | ||
]; | ||
$table->id = $this->type . 'reporttable'; | ||
$table->attributes = ['class' => 'admintable ' . $this->type . 'report generaltable']; | ||
|
||
foreach ($this->checks as $check) { | ||
$ref = $check->get_ref(); | ||
$result = $check->get_result(); | ||
$component = $check->get_component(); | ||
$actionlink = $check->get_action_link(); | ||
|
||
$link = new \moodle_url($this->url, ['detail' => $ref]); | ||
|
||
$row = []; | ||
$row[] = $output->check_result($result); | ||
$row[] = $output->action_link($link, $check->get_name()); | ||
|
||
$row[] = $result->get_summary() | ||
. '<br>' | ||
. \html_writer::start_tag('small') | ||
. $output->action_link($link, get_string('moreinfo')) | ||
. \html_writer::end_tag('small'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a couple of potential indenting issues here which were fixed in the following branch. Nothing serious so will depend on if you want to update it now or just wait until the later branch is merged in.
closing this in favor of 171 |
Pull request was closed
Pull request checks