def get(self): """Show the sample summary page""" study_id = int(self.get_argument('study_id')) email = self.current_user.id res = sample_template_meta_cats_get_req(study_id, email) if res['status'] == 'error': if 'does not exist' in res['message']: raise HTTPError(404, reason=res['message']) elif 'User does not have access to study' in res['message']: raise HTTPError(403, reason=res['message']) else: raise HTTPError(500, reason=res['message']) categories = res['categories'] columns, rows = _build_sample_summary(study_id, email) _, alert_type, alert_msg = get_sample_template_processing_status( study_id) self.render('study_ajax/sample_prep_summary.html', rows=rows, columns=columns, categories=categories, study_id=study_id, alert_type=alert_type, alert_message=alert_msg, user_can_edit=Study(study_id).can_edit(self.current_user))
def get(self): """Show the sample summary page""" study_id = self.get_argument('study_id') res = sample_template_meta_cats_get_req(int(study_id), self.current_user.id) if res['status'] == 'error': if 'does not exist' in res['message']: raise HTTPError(404, res['message']) elif 'User does not have access to study' in res['message']: raise HTTPError(403, res['message']) else: raise HTTPError(500, res['message']) meta_cats = res['categories'] cols, samps_table = _build_sample_summary(study_id, self.current_user.id) _, alert_type, alert_msg = get_sample_template_processing_status( study_id) self.render('study_ajax/sample_prep_summary.html', table=samps_table, cols=cols, meta_available=meta_cats, study_id=study_id, alert_type=alert_type, alert_message=alert_msg, user_can_edit=Study(study_id).can_edit(self.current_user))
def get(self): """Show the sample summary page""" study_id = int(self.get_argument('study_id')) email = self.current_user.id res = sample_template_meta_cats_get_req(study_id, email) if res['status'] == 'error': if 'does not exist' in res['message']: raise HTTPError(404, reason=res['message']) elif 'User does not have access to study' in res['message']: raise HTTPError(403, reason=res['message']) else: raise HTTPError(500, reason=res['message']) categories = res['categories'] columns, rows = _build_sample_summary(study_id, email) _, alert_type, alert_msg = get_sample_template_processing_status( study_id) self.render('study_ajax/sample_prep_summary.html', rows=rows, columns=columns, categories=categories, study_id=study_id, alert_type=alert_type, alert_message=alert_msg, user_can_edit=Study(study_id).can_edit(self.current_user))
def get(self): """Show the sample summary page""" study_id = self.get_argument('study_id') res = sample_template_meta_cats_get_req( int(study_id), self.current_user.id) if res['status'] == 'error': if 'does not exist' in res['message']: raise HTTPError(404, res['message']) elif 'User does not have access to study' in res['message']: raise HTTPError(403, res['message']) else: raise HTTPError(500, res['message']) meta_cats = res['categories'] cols, samps_table = _build_sample_summary(study_id, self.current_user.id) _, alert_type, alert_msg = get_sample_template_processing_status( study_id) self.render('study_ajax/sample_prep_summary.html', table=samps_table, cols=cols, meta_available=meta_cats, study_id=study_id, alert_type=alert_type, alert_message=alert_msg, user_can_edit=Study(study_id).can_edit(self.current_user))