Skip to content

Commit

Permalink
Add browser history imlementation to ES
Browse files Browse the repository at this point in the history
  • Loading branch information
almasaeed2010 committed Feb 5, 2018
1 parent 463a84d commit cdbe81e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,16 @@ class local__feature_search_formatter extends ChadoFieldFormatter {
return NULL;
}
} catch (Exception $exception) {
return NULL;
$element[] = [
'#type' => 'markup',
'#markup' => t('<p>Search service is not available at this time. Please
contact us to fix this issue.</p>'),
];
$message = "Feature search in organism {$organism->genus}
{$organism->species} has failed with the following
message. " . $exception->getMessage();
tripal_report_error('tripal_elasticsearch', TRIPAL_ERROR, $message);
return;
}

$organism_name = "$organism->genus $organism->species";
Expand All @@ -107,6 +116,8 @@ class local__feature_search_formatter extends ChadoFieldFormatter {
'#type' => 'markup',
'#markup' => $content,
];

return;
}

/**
Expand Down
4 changes: 4 additions & 0 deletions includes/tripal_elasticsearch.gene_search.form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ function tripal_elasticsearch_gene_search_form($form, &$form_state, $local = TRU
'#type' => 'hidden',
'#value' => $organism,
];
$form['tripal_pane'] = [
'#type' => 'hidden',
'#value' => 'group_feature_search',
];
}
else {
$default_organism = ['' => 'Any Organism'];
Expand Down
1 change: 0 additions & 1 deletion includes/tripal_elasticsearch.search_forms.form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ function table_search_interface_building_form($form, &$form_state) {
url (https://www.ncbi.nim.nih.gov) or a dynamic field
(organism/[genus]/[species]'),
'#default_value' => $settings["url"],

];
}

Expand Down

0 comments on commit cdbe81e

Please sign in to comment.