Skip to content

Commit

Permalink
Merge pull request os-autoinst#4086 from os-autoinst/k/dead_helper
Browse files Browse the repository at this point in the history
Remove two dead helpers
  • Loading branch information
mergify[bot] authored Jul 29, 2021
2 parents ceabc2b + 85285f4 commit d2165b3
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions lib/OpenQA/WebAPI/Plugin/Helpers.pm
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ sub register ($self, $app, $config) {
return render_escaped_refs($text);
});

$app->helper(
rendered_refs => sub {
my ($c, $text) = @_;
return href_to_bugref(render_escaped_refs($text));
});

$app->helper(
current_job_group => sub {
my ($c) = @_;
Expand Down Expand Up @@ -167,8 +161,6 @@ sub register ($self, $app, $config) {
}
});

$app->helper(step_thumbnail => \&_step_thumbnail);

$app->helper(
icon_url => sub {
my ($c, $icon) = @_;
Expand Down Expand Up @@ -445,32 +437,6 @@ sub _find_job_or_render_not_found {
return undef;
}

sub _step_thumbnail {
my ($c, $screenshot, $ref_width, $testid, $module, $step_num) = @_;

my $ref_height = int($ref_width / 4 * 3);

my $imgurl;
if ($screenshot->{md5_dirname}) {
$imgurl = $c->url_for(
'thumb_image',
md5_dirname => $screenshot->{md5_dirname},
md5_basename => $screenshot->{md5_basename});
}
else {
$imgurl = $c->url_for('test_thumbnail', testid => $testid, filename => $screenshot->{screenshot});
}
my $result = lc $screenshot->{result};
$result = 'softfailed' if grep { $_ eq 'workaround' } (@{$screenshot->{properties} || []});
my $content = $c->image(
$imgurl => width => $ref_width,
height => $ref_height,
alt => $screenshot->{name},
class => "resborder resborder_$result"
);
return $content;
}

sub _validation_error {
my ($c, $args) = @_;
my $format = $args->{format} // 'text';
Expand Down

0 comments on commit d2165b3

Please sign in to comment.