Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

brendanheywood
Copy link
Contributor

@brendanheywood brendanheywood commented Feb 15, 2024

Pull request checks

  • I have checked the version numbers are correct as per the README

@brendanheywood brendanheywood enabled auto-merge (rebase) February 15, 2024 01:15
Copy link
Contributor

@bwalkerl bwalkerl left a 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';
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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

Comment on lines +52 to +84
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');
Copy link
Contributor

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.

@brendanheywood
Copy link
Contributor Author

closing this in favor of 171

auto-merge was automatically disabled February 21, 2024 01:23

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants