Skip to content

Commit

Permalink
Merge branch 'plants'
Browse files Browse the repository at this point in the history
  • Loading branch information
nconrad committed Jul 22, 2015
2 parents 4f3fc82 + 995ae91 commit cfac992
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 18 deletions.
4 changes: 3 additions & 1 deletion app/ctrls/data-view-ctrls.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ function($scope, $sParams, MS) {
$scope.loading = true;
MS.getFeature(genome, featureID)
.then(function(res) {

$scope.features = objs;
$scope.loading = false;
}).catch(function(error) {
$scope.error = error;
$scope.loading = false;
})
}])

Expand Down
2 changes: 1 addition & 1 deletion app/ctrls/ms-ctrls.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ function($scope, Patric, $dialog, $timeout, $http, Dialogs, ViewOptions, WS) {
})
*/

WS.listMetas('/plantseed/Genomes/')
WS.listPlantMetas('/plantseed/Genomes/')
.then(function(objs) {
var plants = [];
for (var i=0; i<objs.length; i++) {
Expand Down
13 changes: 12 additions & 1 deletion app/services/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,30 @@ function($http, $q, $cacheFactory, $log, config, Auth) {
})
}

this.listMetas = function(path) {
this.listPlantMetas = function(path) {
return $http.rpc('ws', 'ls', {paths: [path]})
.then(function(d) {
var d = d[path];

var data = [];
for (var i in d) {
var obj = d[i];

if ( !('name' in obj[7]) ) continue;

data.push( {name: obj[0],
path: obj[2]+obj[0],
meta: obj[7]});
}

data.sort(function(a, b){
if (a.meta.organism.toLowerCase() < b.meta.organism.toLowerCase())
return -1;
if (a.meta.organism.toLowerCase() > b.meta.organism.toLowerCase())
return 1;
return 0;
})

return data;
})
}
Expand Down
2 changes: 2 additions & 0 deletions app/views/data/feature.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
table-loading="loading"
table-placeholder="Search thing">
</ng-table>

<div ng-if="error" class="alert alert-danger">{{error}}</div>
2 changes: 1 addition & 1 deletion app/views/plants.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div flex>
<a ui-sref="app.genomePage({path: p.path})">
<md-tooltip md-direction="right" md-delay="800">View Genome</md-tooltip>
{{p.name}}
{{p.meta.name}}
</a>
<br>

Expand Down
16 changes: 6 additions & 10 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@
"tests"
],
"dependencies": {
"react": "~0.12.2",
"ui-router": "~0.2.13",
"bootstrap": "~3.3.2",
"d3": "~3.5.3",
"jquery-ui": "~1.11.2",
"font-awesome": "~4.3.0",
"angular-smoothscroll": "~1.1.1",
"datatables": "~1.10.5",
"datatables-colreorder": "~1.1.2",
"bootstrap": "3.3.4",
"d3": "3.5.5",
"font-awesome": "4.3.0",
"angular-smoothscroll": "1.1.1",
"angular-material": "0.10.0",
"angular-scroll": "~0.6.5",
"angular-scroll": "0.6.5",
"angular": "1.4.0",
"angular-animate": "~1.3.15"
"angular-animate": "1.3.15"
},
"resolutions": {
"angular": "1.4.0"
Expand Down
4 changes: 0 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@

<!-- build:js build/site.js -->
<script src="components/jquery/dist/jquery.min.js"></script>
<script src="components/jquery-ui/jquery-ui.min.js"></script> <!-- to be removed -->
<script src="components/bootstrap/dist/js/bootstrap.min.js"></script> <!-- to be removed -->
<script src="components/d3/d3.min.js"></script>

<!--<script src="components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="lib/datatables-bootstrap/dataTables.bootstrap.js"></script>-->

<script src="lib/modeling/kbwidget.js"></script>
<script src="lib/modeling/kbasePathway.js"></script>
<script src="lib/modeling/KBModeling.js"></script>
Expand Down

0 comments on commit cfac992

Please sign in to comment.