Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
pipelet
Pipelet
Commits
146655d4
Commit
146655d4
authored
Feb 10, 2011
by
Maude Le Jeune
Browse files
Bug #1274 exception if no computed pipeline
parent
33fdd1a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
pipelet/web.py
pipelet/web.py
+13
-6
No files found.
pipelet/web.py
View file @
146655d4
...
...
@@ -237,17 +237,23 @@ class Web:
"""
conn
=
sqlite3
.
connect
(
self
.
db_file
,
check_same_thread
=
True
)
conn
.
text_factory
=
str
html
=
html_tmp
html
+=
'<a class="icon home" href="/%s/"><small>Home</small></a>'
%
(
self
.
name
)
html
+=
'<h1>Pipelines in %s </h1>'
%
self
.
name
# get all instances
with
conn
:
l
=
conn
.
execute
(
'select seg, curr_dir, seg_id, param from segments order by curr_dir'
).
fetchall
()
tcounts
=
conn
.
execute
(
'select seg_id, status, count() from tasks group by seg_id, status order by seg_id'
).
fetchall
()
sindex
=
[
e
[
0
]
for
e
in
tcounts
]
index
=
[[]
for
i
in
range
(
max
(
sindex
)
+
1
)]
for
i
,
s
in
enumerate
(
sindex
):
index
[
s
].
append
(
i
)
html
=
html_tmp
html
+=
'<a class="icon home" href="/%s/"><small>Home</small></a>'
%
(
self
.
name
)
html
+=
'<h1>Pipelines in %s </h1>'
%
self
.
name
try
:
sindex
=
[
e
[
0
]
for
e
in
tcounts
]
index
=
[[]
for
i
in
range
(
max
(
sindex
)
+
1
)]
for
i
,
s
in
enumerate
(
sindex
):
index
[
s
].
append
(
i
)
except
ValueError
:
html
+=
'No computed pipeline !</div></body></html>'
return
html
## Filter fieldset
html
+=
'<fieldset id="filters"><legend><span class="text">Filters</span></legend>'
...
...
@@ -286,6 +292,7 @@ class Web:
log_dir
=
l
[
0
][
1
].
split
(
"_"
)[
0
]
seg_1
=
log_dir
.
split
(
"/"
)[
-
1
]
log_dir
=
log_dir
[
0
:
len
(
log_dir
)
-
len
(
seg_1
)]
+
"log"
## Buttons
html
+=
'<tr></tr>'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment