Commit c7d17dbf authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

index routine to update lists

parent 4ca1f5ee
......@@ -38,6 +38,14 @@ class PBView(TreeView):
self.lst_ids = self.get_ids()
self.lst_mjd,self.lst_patch,self.lst_obs = self.get_mjd()
@cherrypy.expose
@auth.pipeauth.read_access()
def index(self, highlight=None, thumbnail=None):
html = TreeView.index(self, highlight=highlight, thumbnail=thumbnail)
self.lst_ids = self.get_ids()
self.lst_mjd,self.lst_patch,self.lst_obs = self.get_mjd()
return html
def get_ids (self):
conn = sqlite3.connect(self.db_file,check_same_thread=True)
conn.text_factory=str
......@@ -51,9 +59,10 @@ class PBView(TreeView):
ll.append (e[1]+'@'+e[2][-41:])
else:
ll.append(e[1]+'@'+str(e[0]))
self.selected_id = l1[0][0]
self.selected_seg= l1[0][1]
self.selected_idtxt= ll[0]
if not hasattr (self, "selected_id") or self.selected_id not in ll:
self.selected_id = l1[0][0]
self.selected_seg= l1[0][1]
self.selected_idtxt= ll[0]
return ll
def get_mjd (self):
......
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