Skip to content

Commit b750ca2

Browse files
committed
Merge branch 'master' of https://github.com/ImagingDataCommons/IDC-WebApp into idc-test-sp
2 parents 5bd135d + 1cbc697 commit b750ca2

File tree

4 files changed

+66
-5
lines changed

4 files changed

+66
-5
lines changed

shell/index.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
CORE=${1:-test_core}
2+
SKIP_DOWNLOAD=${2:-true}
3+
4+
echo ""
5+
echo "Beginning index run for core ${CORE}"
6+
echo "-------------------------------------------------------"
7+
echo ""
8+
9+
if [[ "$SKIP_DOWNLOAD" = false ]]; then
10+
echo "Deleting current CSV files."
11+
rm dicom_derived_all_*.csv
12+
13+
echo "Downloading new index data."
14+
gsutil cp gs://idc-dev-files/dicom_derived_all_*.csv ./
15+
else
16+
echo "Skipping download. Files are assumed to be present in the directory."
17+
fi
18+
19+
echo ""
20+
echo "Deleting and re-creating the core."
21+
sudo -u solr /opt/bitnami/apache-solr/bin/solr delete -c $CORE
22+
sudo -u solr /opt/bitnami/apache-solr/bin/solr create -c $CORE -s 2 -rf 2
23+
24+
echo ""
25+
echo "Creating the core schema."
26+
echo '{"add-field":['$(cat core_schema.json)']}' | curl -u idc:$SOLR_PASSWORD -X POST -H 'Content-type:application/json' --data-binary @- https://localhost:8983/solr/$CORE/schema --cacert solr-ssl.pem
27+
28+
echo ""
29+
echo "Indexing the following files:"
30+
ls -l dicom_derived_all_*.csv
31+
32+
echo ""
33+
for CSV in $(ls dicom_derived_all_*.csv)
34+
do
35+
echo "Indexing file ${CSV}..."
36+
curl -u idc:$SOLR_PASSWORD -X POST https://localhost:8983/solr/$CORE/update?commit=yes --data-binary @$CSV -H 'Content-type:application/csv' --cacert solr-ssl.pem
37+
echo "...done."
38+
done

shell/install-deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,5 @@ if [ -n "${CI}" ]; then
135135
TIER=${DEPLOYMENT_TIER,,}
136136
fi
137137
SHA=$(git rev-list -1 HEAD)
138-
echo "APP_VERSION=${TIER}.$(date '+%Y%m%d%H%M').${SHA: -6}" > ${HOMEROOT}/version.env
138+
echo "APP_VERSION=${TIER}.$(date '+%Y%m%d%H%M').${SHA:0:6}" > ${HOMEROOT}/version.env
139139
fi

static/js/image_search.js

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ require([
22582258
checkBox.indeterminate = false;
22592259
}
22602260

2261-
if ( (checked) && (filtnm ==='tcga_clinical')){
2261+
if ( (checked) && (filtnm ==='tcga_clinical') && !is_cohort){
22622262
checkTcga();
22632263
}
22642264

@@ -2551,9 +2551,9 @@ require([
25512551
_.each(filters, function(group){
25522552
_.each(group['filters'], function(filter){
25532553
let selector = 'div.list-group-item__body[data-filter-attr-id="'+filter['id']+'"], '+'div.list-group-sub-item__body[data-filter-attr-id="'+filter['id']+'"]';
2554+
$(selector).parents('.collection-list').collapse('show');
25542555
$(selector).collapse('show');
25552556
$(selector).find('.show-more').triggerHandler('click');
2556-
$(selector).parents('.collection-list').collapse('show');
25572557
$(selector).parents('.tab-pane.search-set').length > 0 && $('a[href="#'+$(selector).parents('.tab-pane.search-set')[0].id + '"]').tab('show');
25582558
if($(selector).children('.ui-slider').length > 0) {
25592559
sliders.push({
@@ -2572,7 +2572,6 @@ require([
25722572
if(sliders.length > 0) {
25732573
load_sliders(sliders, false);
25742574
}
2575-
console.debug("Making filter text...");
25762575
mkFiltText();
25772576
return updateFacetsData(true).promise();
25782577
};
@@ -2598,6 +2597,30 @@ require([
25982597

25992598
// Get all checked filters
26002599
var filters = [];
2600+
2601+
// For collection list
2602+
$('.collection-list').each(function() {
2603+
var $group = $(this);
2604+
2605+
var checkboxes = $group.find("input:checked");
2606+
if (checkboxes.length > 0)
2607+
{
2608+
var values = [];
2609+
var my_id = "";
2610+
checkboxes.each(function() {
2611+
var $checkbox = $(this);
2612+
var my_value = $checkbox[0].value;
2613+
my_id = $checkbox.data('filter-attr-id');
2614+
values.push(my_value);
2615+
});
2616+
filters.push({
2617+
'id': my_id,
2618+
'values': values,
2619+
});
2620+
}
2621+
});
2622+
2623+
// For other list item groups
26012624
$('.list-group-item__body').each(function() {
26022625
var $group = $(this);
26032626
var my_id = $group.data('filter-attr-id');

templates/idc/explore_data_core.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h4 class="panel-title">Search Scope</h4>
3636
<div id="Program_heading" class="list-group-item__heading">
3737
<a role="button" data-toggle="collapse" href="#Program" aria-expanded="false" aria-controls="Program">
3838
<i class="fa fa-caret-right"></i> <i class="fa fa-caret-down"></i>COLLECTION
39-
</a>
39+
</a>
4040
</div>
4141
<div id="Program" class="collapse filter-panel collection-list">
4242
<ul id="Program_list" class="search-checkbox-list" style="list-style: none;">

0 commit comments

Comments
 (0)