Beispiel #1
0
 def delete(self, dashboard_id):
     if dashboard_id == '1':
         return abort(400, detail='cannot delete the main dashboard')
     dashboard = DBSession.query(Dashboard).filter_by(
         uid=dashboard_id).one()
     DBSession.delete(dashboard)
     return redirect('/dashboard')
Beispiel #2
0
 def delete(self, uid=None):
     e_filter = DBSession.query(ExtractionFilter).get(uid)
     if not e_filter:
         abort(404)
     extraction_id = e_filter.extraction_id
     DBSession.delete(e_filter)
     return redirect('/extractions/view/%s' % extraction_id)
Beispiel #3
0
 def delete_extraction(self, dashboard_id):
     uid = request.json['uid']
     try:
         de = DBSession.query(DashboardExtractionAssociation).filter(
             DashboardExtractionAssociation.uid == uid, ).one()
         DBSession.delete(de)
     except NoResultFound:
         pass
     return dict()
Beispiel #4
0
 def delete(self, uid):
     extraction = DBSession.query(Extraction).get(uid) or abort(404)
     DBSession.delete(extraction)
     flash('Extraction correctly deleted')
     return redirect(tg.url('/extractions'))
Beispiel #5
0
 def delete(self, uid=None, **kwargs):
     step = DBSession.query(ExtractionStep).get(uid) or abort(
         404, passthrough='json')
     DBSession.delete(step)
     return dict()
Beispiel #6
0
 def delete(self, uid, **kwargs):
     dataset = DBSession.query(ExtractionDataSet).filter_by(uid=uid).first()
     if dataset:
         DBSession.delete(dataset)
     return dict()