Skip to content

Commit 326ce4b

Browse files
author
George
committed
merge
2 parents a408ba1 + 6aab017 commit 326ce4b

File tree

5 files changed

+70
-9
lines changed

5 files changed

+70
-9
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:7}" > ${HOMEROOT}/version.env
139139
fi

static/js/image_search.js

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,7 +2504,7 @@ require([
25042504
checkBox.indeterminate = false;
25052505
}
25062506

2507-
if ( (checked) && (filtnm ==='tcga_clinical')){
2507+
if ( (checked) && (filtnm ==='tcga_clinical') && !is_cohort){
25082508
checkTcga();
25092509
}
25102510

@@ -2797,9 +2797,9 @@ require([
27972797
_.each(filters, function(group){
27982798
_.each(group['filters'], function(filter){
27992799
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']+'"]';
2800+
$(selector).parents('.collection-list').collapse('show');
28002801
$(selector).collapse('show');
28012802
$(selector).find('.show-more').triggerHandler('click');
2802-
$(selector).parents('.collection-list').collapse('show');
28032803
$(selector).parents('.tab-pane.search-set').length > 0 && $('a[href="#'+$(selector).parents('.tab-pane.search-set')[0].id + '"]').tab('show');
28042804
if($(selector).children('.ui-slider').length > 0) {
28052805
sliders.push({
@@ -2818,7 +2818,6 @@ require([
28182818
if(sliders.length > 0) {
28192819
load_sliders(sliders, false);
28202820
}
2821-
console.debug("Making filter text...");
28222821
mkFiltText();
28232822
return updateFacetsData(true).promise();
28242823
};
@@ -2844,6 +2843,30 @@ require([
28442843

28452844
// Get all checked filters
28462845
var filters = [];
2846+
2847+
// For collection list
2848+
$('.collection-list').each(function() {
2849+
var $group = $(this);
2850+
2851+
var checkboxes = $group.find("input:checked");
2852+
if (checkboxes.length > 0)
2853+
{
2854+
var values = [];
2855+
var my_id = "";
2856+
checkboxes.each(function() {
2857+
var $checkbox = $(this);
2858+
var my_value = $checkbox[0].value;
2859+
my_id = $checkbox.data('filter-attr-id');
2860+
values.push(my_value);
2861+
});
2862+
filters.push({
2863+
'id': my_id,
2864+
'values': values,
2865+
});
2866+
}
2867+
});
2868+
2869+
// For other list item groups
28472870
$('.list-group-item__body').each(function() {
28482871
var $group = $(this);
28492872
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;">

templates/idc/landing.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@
114114
</div>
115115
<div class="summary col-lg-8 col-md-12 col-sm-12">
116116
<div class="summary-contents panel-body">
117-
<div class="summary-block col-lg-3 col-md-3 col-sm-3"><div class="img-container"><img src="{% static 'img/collex_icon_2.png' %}" alt="" /></div> <div>27<br/> Collections</div></div>
118-
<div class="summary-block col-lg-3 col-md-3 col-sm-3"><div class="img-container"><img src="{% static 'img/cases_icon.png' %}" alt="" /></div> <div>3,230<br/> Cases</div></div>
119-
<div class="summary-block col-lg-3 col-md-3 col-sm-3"><div class="img-container"><img src="{% static 'img/volume_icon.png' %}" alt="" /></div> <div>1.03 TB<br/> Data Volume</div></div>
120-
<div class="summary-block col-lg-3 col-md-3 col-sm-3"><div class="img-container"><img src="{% static 'img/img_series_icon.png' %}" alt="" /></div> <div>49,818<br/> Image Series</div></div>
117+
<div class="summary-block col-lg-3 col-md-3 col-sm-3"><div class="img-container"><img src="{% static 'img/collex_icon_2.png' %}" alt="" /></div> <div>28<br/> Collections</div></div>
118+
<div class="summary-block col-lg-3 col-md-3 col-sm-3"><div class="img-container"><img src="{% static 'img/cases_icon.png' %}" alt="" /></div> <div>3,652<br/> Cases</div></div>
119+
<div class="summary-block col-lg-3 col-md-3 col-sm-3"><div class="img-container"><img src="{% static 'img/volume_icon.png' %}" alt="" /></div> <div>1.04 TB<br/> Data Volume</div></div>
120+
<div class="summary-block col-lg-3 col-md-3 col-sm-3"><div class="img-container"><img src="{% static 'img/img_series_icon.png' %}" alt="" /></div> <div>51,247<br/> Image Series</div></div>
121121
</div>
122122
</div>
123123
</div>

0 commit comments

Comments
 (0)