Skip to content

Commit a98ea25

Browse files
committed
Merge branch 'master' of https://github.com/ImagingDataCommons/IDC-WebApp into idc-test
2 parents e4a0768 + d875433 commit a98ea25

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Vagrantfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# vi: set ft=ruby :
33
Vagrant.configure(2) do |config|
44

5-
config.vagrant.plugins = ["vagrant-vbguest"]
6-
75
config.vm.provider "virtualbox" do |vb|
86
# Display the VirtualBox GUI when booting the machine
97
# vb.gui = true

idc/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@
182182
if IS_APP_ENGINE:
183183
print("[STATUS] AppEngine Flex detected.", file=sys.stdout)
184184
SITE_ID = int(os.environ.get('SITE_ID', '3'))
185+
else:
186+
print("[STATUS] AppEngine not detected, so site ID is set to local or development platform")
185187

186188

187189
BQ_MAX_ATTEMPTS = int(os.environ.get('BQ_MAX_ATTEMPTS', '10'))

idc/settings_unit_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@
9999
DB_SOCKET = DATABASES['default']['HOST'] if 'cloudsql' in DATABASES['default']['HOST'] else None
100100

101101
IS_DEV = (os.environ.get('IS_DEV', 'False') == 'True')
102-
IS_APP_ENGINE_FLEX = os.getenv('GAE_INSTANCE', '').startswith(APP_ENGINE_FLEX)
103-
IS_APP_ENGINE = os.getenv('SERVER_SOFTWARE', '').startswith(APP_ENGINE)
102+
# AppEngine var is set in the app.yaml so this should be false for CI and local dev apps
103+
IS_APP_ENGINE = bool(os.getenv('IS_APP_ENGINE', 'False') == 'True')
104104

105105
# If this is a GAE-Flex deployment, we don't need to specify SSL; the proxy will take
106106
# care of that for us
107-
if 'DB_SSL_CERT' in os.environ and not IS_APP_ENGINE_FLEX:
107+
if 'DB_SSL_CERT' in os.environ and not IS_APP_ENGINE:
108108
DATABASES['default']['OPTIONS'] = {
109109
'ssl': {
110110
'ca': os.environ.get('DB_SSL_CA'),
@@ -116,7 +116,7 @@
116116
# Default to localhost for the site ID
117117
SITE_ID = 3
118118

119-
if IS_APP_ENGINE_FLEX or IS_APP_ENGINE:
119+
if IS_APP_ENGINE:
120120
print("[STATUS] AppEngine Flex detected.", file=sys.stdout)
121121
SITE_ID = 4
122122

idc/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,6 @@ def explore_data_page(request, filter_path=False, path_filters=None):
814814
if ref:
815815
request.session.create()
816816

817-
818817
is_dicofdic = (req.get('is_dicofdic', "False").lower() == "true")
819818
source = req.get('data_source_type', DataSource.SOLR)
820819
versions = json.loads(req.get('versions', '[]'))
@@ -823,7 +822,8 @@ def explore_data_page(request, filter_path=False, path_filters=None):
823822

824823
fields = json.loads(req.get('fields', '[]'))
825824
order_docs = json.loads(req.get('order_docs', '[]'))
826-
counts_only = (req.get('counts_only', "False").lower() == "true")
825+
counts_only = (req.get('counts_only', "true").lower() == "true")
826+
print("Explore data page call, counts only: {}".format(counts_only))
827827
with_related = (req.get('with_clinical', "True").lower() == "true")
828828
with_derived = (req.get('with_derived', "True").lower() == "true")
829829
collapse_on = req.get('collapse_on', 'SeriesInstanceUID')

static/js/image_search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ require([
121121
$('#search_def_stats').html(isFiltered ? "Gathering cohort statistics...": " ");
122122
ndic = {
123123
'totals': JSON.stringify(["PatientID", "StudyInstanceUID", "SeriesInstanceUID"]),
124-
'counts_only': 'False',
124+
'counts_only': 'True',
125125
'is_json': 'True',
126126
'is_dicofdic': 'True',
127127
'data_source_type': ($("#data_source_type option:selected").val() || 'S'),

0 commit comments

Comments
 (0)