Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cronlog-viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Cronlog-viewer
Commits
e6e38b3e
Commit
e6e38b3e
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
show execution time of running job
parent
3cf0409e
No related branches found
No related tags found
1 merge request
!17
show execution time of a currently running job
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
classes/cronlog-renderer.class.php
+11
-3
11 additions, 3 deletions
classes/cronlog-renderer.class.php
with
11 additions
and
3 deletions
classes/cronlog-renderer.class.php
+
11
−
3
View file @
e6e38b3e
...
@@ -209,6 +209,13 @@ class cronlogrenderer extends cronlog{
...
@@ -209,6 +209,13 @@ class cronlogrenderer extends cronlog{
$bIsRunning
=
true
;
$bIsRunning
=
true
;
$sColStatus
.
=
$this
->
t
(
'status-running'
);
$sColStatus
.
=
$this
->
t
(
'status-running'
);
}
}
// execution time of time of currently running job
$iExectime
=
$aEntry
[
'SCRIPTEXECTIME'
]
?
(
int
)
$aEntry
[
'SCRIPTEXECTIME'
]
:
date
(
'U'
)
-
$aEntry
[
'SCRIPTSTARTTIME'
]
;
// render table of last logfile per cron job
// render table of last logfile per cron job
$sHtml
.
=
'<tr onclick="showFile(\''
.
$aEntry
[
'logfile'
]
.
'\');" title="'
.
sprintf
(
$this
->
t
(
'row-click-show-logfile'
),
$aEntry
[
'logfile'
])
.
'"'
$sHtml
.
=
'<tr onclick="showFile(\''
.
$aEntry
[
'logfile'
]
.
'\');" title="'
.
sprintf
(
$this
->
t
(
'row-click-show-logfile'
),
$aEntry
[
'logfile'
])
.
'"'
.
(
$bIsRunning
?
' class="message-running"'
:
''
)
.
(
$bIsRunning
?
' class="message-running"'
:
''
)
...
@@ -218,11 +225,12 @@ class cronlogrenderer extends cronlog{
...
@@ -218,11 +225,12 @@ class cronlogrenderer extends cronlog{
.
'<td>'
.
$aEntry
[
'SCRIPTLABEL'
]
.
'</td>'
.
'<td>'
.
$aEntry
[
'SCRIPTLABEL'
]
.
'</td>'
.
'<td>'
.
$aEntry
[
'server'
]
.
'</td>'
.
'<td>'
.
$aEntry
[
'server'
]
.
'</td>'
.
'<td'
.
'<td'
.
(
$aEntry
[
'SCRIPTEXECTIME'
]
>
$this
->
_iMinTime4Timeline
?
' class="message-warning"'
:
''
)
.
(
(
int
)
$aEntry
[
'SCRIPTEXECTIME'
]
>
$this
->
_iMinTime4Timeline
?
' class="message-warning"'
:
''
)
.
'>'
.
'>'
.
'<span style="display: none">'
.
str_pad
((
int
)
$aEntry
[
'SCRIPTEXECTIME'
],
6
,
'0'
,
STR_PAD_LEFT
)
.
'</span>'
.
'<span style="display: none">'
.
str_pad
((
int
)
$aEntry
[
'SCRIPTEXECTIME'
],
6
,
'0'
,
STR_PAD_LEFT
)
.
'</span>'
.
(
int
)
$aEntry
[
'SCRIPTEXECTIME'
]
.
's'
.
((
int
)
$aEntry
[
'SCRIPTEXECTIME'
]
>
100
?
' ('
.
round
((
int
)
$aEntry
[
'SCRIPTEXECTIME'
]
/
60
)
.
'min)'
:
''
)
.
$iExectime
.
's'
.
(
$iExectime
>
100
?
' ('
.
round
(
$iExectime
/
60
)
.
'min)'
:
''
)
.
'</td>'
.
'</td>'
.
'<td'
.
'<td'
.
(
$aEntry
[
'SCRIPTTTL'
]
<
$this
->
_iMinTtl
?
' class="message-warning" title="(using minimal TTL = '
.
$this
->
_iMinTtl
.
' min)"'
:
''
)
.
(
$aEntry
[
'SCRIPTTTL'
]
<
$this
->
_iMinTtl
?
' class="message-warning" title="(using minimal TTL = '
.
$this
->
_iMinTtl
.
' min)"'
:
''
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment