Commit e5fcf121 authored by Severine Duvaud's avatar Severine Duvaud
Browse files

Starting with Michael's comments

parent ffb3fb08
...@@ -83,9 +83,14 @@ function buildMongoQuery(params) { ...@@ -83,9 +83,14 @@ function buildMongoQuery(params) {
var length = 0; var length = 0;
if(params.alternateBases == 'DEL') { if(params.alternateBases == 'DEL') {
length = (params.length.length == 0 ? 0 : parseInt(params.length)); if (typeof params.length != undefined && params.length != null && params.length != '')
{
length = (params.length.length == 0 ? 0 : parseInt(params.length));
}
} }
console.log("*** LENGTH: " + length);
var andConditions = []; var andConditions = [];
var orConditions = []; var orConditions = [];
......
...@@ -23,7 +23,7 @@ arrayMap.controller('BeaconController', ['$scope', '$location', function ($scope ...@@ -23,7 +23,7 @@ arrayMap.controller('BeaconController', ['$scope', '$location', function ($scope
"reference": "GRCh38", "reference": "GRCh38",
"dataset": "all", "dataset": "all",
"alternateBases": "DEL", "alternateBases": "DEL",
"length": '' "length": '1'
} }
$scope.getNewApiUrl = function () { $scope.getNewApiUrl = function () {
......
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="position" class="col-sm-2 control-label">Length</label> <label for="position" class="col-sm-2 control-label">Minimal Length</label>
<div class="col-sm-4"> <div class="col-sm-4">
<input type="text" class="form-control" id="length" ng-model="config.length" placeholder="Length"> <input type="text" class="form-control" id="length" ng-model="config.length">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment