File tree Expand file tree Collapse file tree 10 files changed +86
-36
lines changed
Expand file tree Collapse file tree 10 files changed +86
-36
lines changed Original file line number Diff line number Diff line change @@ -364,6 +364,15 @@ sub evals_GET {
364364 );
365365}
366366
367+ sub errors :Chained(' jobsetChain' ) :PathPart(' errors' ) :Args(0) :ActionClass(' REST' ) { }
368+
369+ sub errors_GET {
370+ my ($self , $c ) = @_ ;
371+
372+ $c -> stash-> {template } = ' eval-error.tt' ;
373+
374+ $self -> status_ok($c , entity => $c -> stash-> {jobset });
375+ }
367376
368377# Redirect to the latest finished evaluation of this jobset.
369378sub latest_eval : Chained(' jobsetChain' ) PathPart(' latest-eval' ) {
Original file line number Diff line number Diff line change @@ -86,6 +86,15 @@ sub view_GET {
8686 );
8787}
8888
89+ sub errors :Chained(' evalChain' ) :PathPart(' errors' ) :Args(0) :ActionClass(' REST' ) { }
90+
91+ sub errors_GET {
92+ my ($self , $c ) = @_ ;
93+
94+ $c -> stash-> {template } = ' eval-error.tt' ;
95+
96+ $self -> status_ok($c , entity => $c -> stash-> {eval });
97+ }
8998
9099sub create_jobset : Chained(' evalChain' ) PathPart(' create-jobset' ) Args(0) {
91100 my ($self , $c ) = @_ ;
Original file line number Diff line number Diff line change 1+ [% PROCESS common.tt %]
2+ <!DOCTYPE html>
3+
4+ <html lang="en">
5+
6+ <head>
7+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8+ <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
9+ [% INCLUDE style.tt %]
10+ </head>
11+
12+ <body>
13+
14+ <div class="tab-content tab-pane">
15+ <div id="tabs-errors" class="">
16+ [% IF jobset %]
17+ <p>Errors occurred at [% INCLUDE renderDateTime timestamp=(jobset.errortime || jobset.lastcheckedtime) %].</p>
18+ <div class="card bg-light"><div class="card-body"><pre>[% HTML.escape(jobset.fetcherrormsg || jobset.errormsg) %]</pre></div></div>
19+ [% ELSIF eval %]
20+ <p>Errors occurred at [% INCLUDE renderDateTime timestamp=(eval.evaluationerror.errortime || eval.timestamp) %].</p>
21+ <div class="card bg-light"><div class="card-body"><pre>[% HTML.escape(eval.evaluationerror.errormsg) %]</pre></div></div>
22+ [% END %]
23+ </div>
24+ </div>
25+ </body>
26+ </html>
Original file line number Diff line number Diff line change @@ -108,13 +108,6 @@ c.uri_for(c.controller('JobsetEval').action_for('view'),
108108
109109<div class="tab-content">
110110
111- [% IF eval.evaluationerror.errormsg %]
112- <div id="tabs-errors" class="tab-pane">
113- <p>Errors occurred at [% INCLUDE renderDateTime timestamp=(eval.evaluationerror.errortime || eval.timestamp) %].</p>
114- <div class="card bg-light"><div class="card-body"><pre>[% HTML.escape(eval.evaluationerror.errormsg) %]</pre></div></div>
115- </div>
116- [% END %]
117-
118111 <div id="tabs-aborted" class="tab-pane">
119112 [% INCLUDE renderSome builds=aborted tabname="#tabs-aborted" %]
120113 </div>
@@ -174,8 +167,7 @@ c.uri_for(c.controller('JobsetEval').action_for('view'),
174167
175168 [% IF eval.evaluationerror.errormsg %]
176169 <div id="tabs-errors" class="tab-pane">
177- <p>Errors occurred at [% INCLUDE renderDateTime timestamp=(eval.evaluationerror.errortime || eval.timestamp) %].</p>
178- <div class="card bg-light"><div class="card-body"><pre>[% HTML.escape(eval.evaluationerror.errormsg) %]</pre></div></div>
170+ <iframe src="[% c.uri_for(c.controller('JobsetEval').action_for('errors'), [eval.id], params) %]" loading="lazy" frameBorder="0" width="100%"></iframe>
179171 </div>
180172 [% END %]
181173</div>
Original file line number Diff line number Diff line change 119119
120120 [% IF jobset.errormsg || jobset.fetcherrormsg %]
121121 <div id="tabs-errors" class="tab-pane">
122- <p>Errors occurred at [% INCLUDE renderDateTime timestamp=(jobset.errortime || jobset.lastcheckedtime) %].</p>
123- <div class="card bg-light"><div class="card-body"><pre>[% HTML.escape(jobset.fetcherrormsg || jobset.errormsg) %]</pre></div></div>
122+ <iframe src="[% c.uri_for('/jobset' project.name jobset.name "errors") %]" loading="lazy" frameBorder="0" width="100%"></iframe>
124123 </div>
125124 [% END %]
126125
Original file line number Diff line number Diff line change 1010
1111 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1212 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
13-
14- <script type="text/javascript" src="[% c.uri_for("/static/js/jquery/jquery-3.4.1.min.js") %]"></script>
15- <script type="text/javascript" src="[% c.uri_for("/static/js/jquery/jquery-ui-1.10.4.min.js") %]"></script>
16- <script type="text/javascript" src="[% c.uri_for("/static/js/moment/moment-2.24.0.min.js") %]"></script>
17-
18- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19-
20- <link href="[% c.uri_for("/static/fontawesome/css/all.css") %]" rel="stylesheet" />
21- <script type="text/javascript" src="[% c.uri_for("/static/js/popper.min.js") %]"></script>
22- <script type="text/javascript" src="[% c.uri_for("/static/bootstrap/js/bootstrap.min.js") %]"></script>
23- <link href="[% c.uri_for("/static/bootstrap/css/bootstrap.min.css") %]" rel="stylesheet" />
24-
25- <!-- hydra.css may need to be moved to before boostrap to make the @media rule work. -->
26- <link rel="stylesheet" href="[% c.uri_for("/static/css/hydra.css") %]" type="text/css" />
27- <link rel="stylesheet" href="[% c.uri_for("/static/css/rotated-th.css") %]" type="text/css" />
28-
29- <style>
30- .popover { max-width: 40%; }
31- </style>
32-
33- <script type="text/javascript" src="[% c.uri_for("/static/js/bootbox.min.js") %]"></script>
34-
35- <link rel="stylesheet" href="[% c.uri_for("/static/css/tree.css") %]" type="text/css" />
36-
37- <script type="text/javascript" src="[% c.uri_for("/static/js/common.js") %]"></script>
13+ [% INCLUDE style.tt %]
3814
3915 [% IF c.config.enable_google_login %]
4016 <meta name="google-signin-client_id" content="[% c.config.google_client_id %]">
Original file line number Diff line number Diff line change @@ -129,6 +129,12 @@ $(document).ready(function() {
129129 el . addClass ( "is-local" ) ;
130130 }
131131 } ) ;
132+
133+ [ ...document . getElementsByTagName ( "iframe" ) ] . forEach ( ( element ) => {
134+ element . contentWindow . addEventListener ( "DOMContentLoaded" , ( _ ) => {
135+ element . style . height = element . contentWindow . document . body . scrollHeight + 'px' ;
136+ } )
137+ } )
132138} ) ;
133139
134140var tabsLoaded = { } ;
Original file line number Diff line number Diff line change 1+ <script type="text/javascript" src="[% c.uri_for("/static/js/jquery/jquery-3.4.1.min.js") %]"></script>
2+ <script type="text/javascript" src="[% c.uri_for("/static/js/jquery/jquery-ui-1.10.4.min.js") %]"></script>
3+ <script type="text/javascript" src="[% c.uri_for("/static/js/moment/moment-2.24.0.min.js") %]"></script>
4+
5+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
7+ <link href="[% c.uri_for("/static/fontawesome/css/all.css") %]" rel="stylesheet" />
8+ <script type="text/javascript" src="[% c.uri_for("/static/js/popper.min.js") %]"></script>
9+ <script type="text/javascript" src="[% c.uri_for("/static/bootstrap/js/bootstrap.min.js") %]"></script>
10+ <link href="[% c.uri_for("/static/bootstrap/css/bootstrap.min.css") %]" rel="stylesheet" />
11+
12+ <!-- hydra.css may need to be moved to before boostrap to make the @media rule work. -->
13+ <link rel="stylesheet" href="[% c.uri_for("/static/css/hydra.css") %]" type="text/css" />
14+ <link rel="stylesheet" href="[% c.uri_for("/static/css/rotated-th.css") %]" type="text/css" />
15+
16+ <style>
17+ .popover { max-width: 40%; }
18+ </style>
19+
20+ <script type="text/javascript" src="[% c.uri_for("/static/js/bootbox.min.js") %]"></script>
21+
22+ <link rel="stylesheet" href="[% c.uri_for("/static/css/tree.css") %]" type="text/css" />
23+
24+ <script type="text/javascript" src="[% c.uri_for("/static/js/common.js") %]"></script>
Original file line number Diff line number Diff line change @@ -32,4 +32,9 @@ subtest "/jobset/PROJECT/JOBSET/evals" => sub {
3232 ok($jobsetevals -> is_success, " The page showing the jobset evals returns 200." );
3333};
3434
35+ subtest " /jobset/PROJECT/JOBSET/errors" => sub {
36+ my $jobsetevals = request(GET ' /jobset/' . $project -> name . ' /' . $jobset -> name . ' /errors' );
37+ ok($jobsetevals -> is_success, " The page showing the jobset eval errors returns 200." );
38+ };
39+
3540done_testing;
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ subtest "Fetching the eval's overview" => sub {
3535 is($fetch -> code, 200, " channel page is 200" );
3636};
3737
38+ subtest " Fetching the eval's overview" => sub {
39+ my $fetch = request(GET ' /eval/' . $eval -> id, ' /errors' );
40+ is($fetch -> code, 200, " errors page is 200" );
41+ };
3842
3943
4044done_testing;
You can’t perform that action at this time.
0 commit comments