File tree Expand file tree Collapse file tree
support/pipeline-visualiser/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 <% if pipeline . is_running? %>
3535 <%= pipeline . running_duration . human_str %> ago
3636 <% else %>
37- <%= pipeline . last_started_at . strftime ( "%H:%M, %A %d %b %Y " ) %>
37+ <%= erb :'partials/time' , :locals => { time : pipeline . last_started_at } %>
3838 <% end %>
3939 </ time >
4040 </ td >
Original file line number Diff line number Diff line change 1818 background-color : # F2F3F3 ;
1919 padding : 2px 5px ;
2020 }
21-
22- time {
23- text-decoration : underline;
24- text-decoration-style : dashed;
25- text-underline-offset : 8px ;
26- }
2721 </ style >
2822</ head >
2923
121115 } from '/javascript/govuk-frontend-5.8.0.min.js'
122116 initAll ( )
123117 </ script >
118+
119+ < script type ="module ">
120+ document . querySelectorAll ( "time" ) . forEach ( ( time ) => {
121+ if ( time . dateTime != null ) {
122+ let globalTime = new Date ( time . dateTime ) ;
123+ let localTime = globalTime . toLocaleString ( ) ;
124+ time . innerText = localTime ;
125+ }
126+ } ) ;
127+ </ script >
124128</ body >
125129
126130</ html >
Original file line number Diff line number Diff line change 1+ < time datetime ="<%= time . strftime ( '%Y-%m-%dT%H:%M:%S.%L%z' ) %> "> <%= time . strftime ( "%H:%M, %A %d %b %Y " ) %> </ time >
Original file line number Diff line number Diff line change 1111</ h1 >
1212
1313< p class ="govuk-body ">
14- < strong > Last execution time</ strong > <%= pipeline . last_started_at . strftime ( "%H:%M, %A %d %b %Y " ) %>
14+ < strong > Last execution time</ strong > <%= erb :'partials/time' , :locals => { time : pipeline . last_started_at } %>
1515</ p >
1616< p class ="govuk-body ">
1717 < strong > Execution id</ strong > <%= pipeline . execution_id %>
You can’t perform that action at this time.
0 commit comments