Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 146655d4 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

Bug #1274 exception if no computed pipeline

parent 33fdd1a8
......@@ -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>'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment