Skip to content

Commit 28a9902

Browse files
committed
adding total of samples
1 parent 9bd1166 commit 28a9902

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ env:
88
- TEST_ADD_STUDIES=True
99
before_install:
1010
- redis-server --version
11+
- redis-server /etc/redis/redis.conf --port 7777 &
1112
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
1213
- chmod +x miniconda.sh
1314
- ./miniconda.sh -b
@@ -36,7 +37,6 @@ install:
3637
- popd
3738
- travis_retry pip install . --process-dependency-links
3839
before_script:
39-
- redis-server /etc/redis/redis.conf --port 7777 &
4040
- export MOI_CONFIG_FP=`pwd`/qiita_core/support_files/config_test.cfg
4141
- if [ ${TRAVIS_PULL_REQUEST} == "false" ]; then
4242
export QIITA_CONFIG_FP=`pwd`/qiita_core/support_files/config_test_travis.cfg;

qiita_pet/templates/redbiom.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@
1111
moi.init(null, window.location.host + '{% raw qiita_config.portal_dir %}/study/list/socket/', function(){}, error, error);
1212
moi.add_callback('sel', show_alert);
1313
$("#redbiom-table").dataTable({
14+
"dom": 'lfrt<"footer">ip',
15+
'footerCallback': function ( row, data, start, end, display ) {
16+
var api = this.api(), data;
17+
var total_samples = api
18+
.column(4)
19+
.data()
20+
.reduce( function (a, b) { return a + b.samples.length; }, 0);
21+
22+
$('.footer').addClass("col-md-12 text-right");
23+
if (total_samples == 0) {
24+
text = ''
25+
} else {
26+
text = 'Found ' + total_samples + ' samples.';
27+
}
28+
$('.footer').html(text)
29+
},
1430
"columns": [
1531
{ "data": null, "orderable": false, "width": "10%" },
1632
{ "data": null, "width": "40%" },
@@ -110,7 +126,7 @@
110126
</select>
111127
</div>
112128
<div class="col-xs-6">
113-
<input type="text" class="form-control" name="search" id="search" placeholder="Search" required value="Diesel">
129+
<input type="text" class="form-control" name="search" id="search" placeholder="Search" required>
114130
</div>
115131

116132
<div class="col-xs-2">

0 commit comments

Comments
 (0)