Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Video AG Infrastruktur
website
Commits
d0afba04
Commit
d0afba04
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Patches
Plain Diff
added delete feature to all jobs
parent
2033dff4
No related branches found
No related tags found
1 merge request
!14
Jobmanagement
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
jobs.py
+4
-1
4 additions, 1 deletion
jobs.py
templates/jobs_overview.html
+22
-9
22 additions, 9 deletions
templates/jobs_overview.html
with
26 additions
and
10 deletions
jobs.py
+
4
−
1
View file @
d0afba04
...
@@ -47,6 +47,9 @@ def jobs_action(action, jobid=None):
...
@@ -47,6 +47,9 @@ def jobs_action(action, jobid=None):
if
action
==
'
copy
'
:
if
action
==
'
copy
'
:
if
jobid
:
if
jobid
:
query
(
"
INSERT INTO jobs SELECT NULL, type, priority,
'
ready
'
,
''
,
''
, ?,
''
, NULL, data,
'
{}
'
FROM jobs where ID=?;
"
,
datetime
.
now
(),
jobid
)
query
(
"
INSERT INTO jobs SELECT NULL, type, priority,
'
ready
'
,
''
,
''
, ?,
''
, NULL, data,
'
{}
'
FROM jobs where ID=?;
"
,
datetime
.
now
(),
jobid
)
if
action
==
'
delete
'
:
if
jobid
:
query
(
'
UPDATE jobs SET state=
"
deleted
"
WHERE id = ?
'
,
jobid
)
if
action
==
'
add
'
:
if
action
==
'
add
'
:
jobtype
=
request
.
values
.
get
(
'
type
'
,
None
)
jobtype
=
request
.
values
.
get
(
'
type
'
,
None
)
if
jobtype
==
'
thumbnail
'
:
if
jobtype
==
'
thumbnail
'
:
...
...
This diff is collapsed.
Click to expand it.
templates/jobs_overview.html
+
22
−
9
View file @
d0afba04
...
@@ -177,18 +177,31 @@
...
@@ -177,18 +177,31 @@
<td>
{{i.data}}
</td>
<td>
{{i.data}}
</td>
<td>
{{i.status}}
</td>
<td>
{{i.status}}
</td>
<td>
<td>
<ul
class=
"list-inline"
style=
"white-space: nowrap;"
>
{% if i.state == "failed" %}
{% if i.state == "failed" %}
<li>
<a
class=
"btn btn-default"
href=
"{{url_for('jobs_action', action='clear_failed', jobid=i.id, ref=request.url)}}"
title=
"Löschen"
style=
"background-color: red;"
>
<a
class=
"btn btn-default"
href=
"{{url_for('jobs_action', action='clear_failed', jobid=i.id, ref=request.url)}}"
title=
"Löschen"
style=
"background-color: red;"
>
<span
class=
"glyphicon glyphicon-trash"
aria-hidden=
"true"
></span>
<span
class=
"glyphicon glyphicon-trash"
aria-hidden=
"true"
></span>
</a>
</a>
</li>
<li>
<a
class=
"btn btn-default"
href=
"{{url_for('jobs_action', action='retry_failed', jobid=i.id, ref=request.url)}}"
title=
"Neustarten"
>
<a
class=
"btn btn-default"
href=
"{{url_for('jobs_action', action='retry_failed', jobid=i.id, ref=request.url)}}"
title=
"Neustarten"
>
<span
class=
"fa fa-refresh"
aria-hidden=
"true"
></span>
<span
class=
"fa fa-refresh"
aria-hidden=
"true"
></span>
</a>
</a>
</li>
{% else %}
{% else %}
<li>
<a
class=
"btn btn-default"
href=
"{{url_for('jobs_action', action='delete', jobid=i.id, ref=request.url)}}"
title=
"Löschen"
style=
"background-color: red;"
>
<span
class=
"glyphicon glyphicon-trash"
aria-hidden=
"true"
></span>
</a>
</li>
<li>
<a
class=
"btn btn-default"
href=
"{{url_for('jobs_action', action='copy', jobid=i.id, ref=request.url)}}"
title=
"Kopie neu einreihen"
>
<a
class=
"btn btn-default"
href=
"{{url_for('jobs_action', action='copy', jobid=i.id, ref=request.url)}}"
title=
"Kopie neu einreihen"
>
<span
class=
"fa fa-refresh"
aria-hidden=
"true"
></span>
<span
class=
"fa fa-refresh"
aria-hidden=
"true"
></span>
</a>
</a>
</li>
{% endif %}
{% endif %}
</ul>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
...
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