Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Commit

Permalink
Feature/tool title match ga4gh (#80)
Browse files Browse the repository at this point in the history
* Modify titles to match ga4gh ids for tools

* Fix registration default

* Simplify homepage view of paths
  • Loading branch information
denis-yuen authored and Janice Patricia committed Aug 17, 2016
1 parent 36189f8 commit 75b45f4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
7 changes: 4 additions & 3 deletions app/scripts/controllers/containereditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ angular.module('dockstore.ui')
return -1;
};
for (var i = 0; i < containers.length; i++) {
var pos = getNSIndex(containers[i].namespace);
var prefix = containers[i].tool_path.split('/',2).join('/');
var pos = getNSIndex(prefix);
if (pos < 0) {
nsContainers.push({
namespace: containers[i].namespace,
namespace: prefix,
containers: []
});
pos = nsContainers.length - 1;
Expand Down Expand Up @@ -244,7 +245,7 @@ angular.module('dockstore.ui')
mode: 'MANUAL_IMAGE_PATH',
name: '',
toolname: '',
namespace: namespace ? namespace : '',
namespace: namespace ? namespace.split('/')[1] : '',
registry: '',
gitUrl: '',
default_dockerfile_path: '/Dockerfile',
Expand Down
22 changes: 7 additions & 15 deletions app/templates/containerdetails.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@
<h3>
<!--<span class="glyphicon glyphicon-lock" ng-if="!containerObj.is_public"></span>-->
{{
(containerObj.namespace !== '_' ? containerObj.namespace + '/' : '') +
containerObj.name +
(containerObj.toolname ? ' (' + containerObj.toolname + ')' : '')
(containerObj.tool_path)
}}
</h3>
<div ng-if="containerObj" id="label-holder">
Expand Down Expand Up @@ -149,14 +147,6 @@ <h3 class="pull-right">
<uib-tab active="activeTabs[0]">
<uib-tab-heading>Info</uib-tab-heading>
<ul class="list-unstyled container-info">
<li>
<strong>Name</strong>:
{{containerObj.name + (containerObj.toolname ? ' (' + containerObj.toolname + ')' : '')}}
</li>
<li>
<strong>Path</strong>:
{{containerObj.path}}
</li>
<li>
<strong>Author</strong>:
{{ containerObj.author ? containerObj.author : 'n/a' }}
Expand Down Expand Up @@ -367,10 +357,10 @@ <h3 class="pull-right">
</span>
</div>
</li>
<li ng-show="showLaunchWith()">
<li ng-show="showLaunchWith()">
<strong>Launch With:</strong>
<div class="pull-right" style="margin-left:5px">
<select id="descType"
<select id="descType"
ng-model="desc"
ng-options="descType for descType in descAvailable"
ng-change="descLaunchWith(desc)">
Expand All @@ -379,17 +369,19 @@ <h3 class="pull-right">
<div class="pull-right" style="margin-left:5px">
<select id="tagVersion"
ng-model="toolTag"
ng-options="tag.id as tag.name for tag in validTags"
ng-options="tag.id as tag.name for tag in validTags"
ng-change="tagLaunchWith(toolTag)">
</select>
</div>

<div class="well well-sm">
<div>
<pre>{{launchWith}}</pre>
</div>
</div>
</li>


</ul>
<div ng-if="!editMode">
<hr />
Expand Down
2 changes: 1 addition & 1 deletion app/templates/containersgrid.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<!-- need a to write a 'smart search' filter -->
<tr ng-repeat="container in ((filteredContainers = (containers | PreviewFilter:contLimit | filter: searchQueryContainer)) | orderBy:sortColumn:sortReverse | PaginationFilter:getListRange())">
<td>
<a href="/containers/{{container.path + (container.toolname ? '/' + container.toolname : '')}}">{{container.name + (container.toolname ? ' (' + container.toolname + ')' : '')}}</a>
<a href="/containers/{{container.tool_path}}">{{container.name + (container.toolname ? '/' + container.toolname : '')}}</a>
</td>
<td>
{{ container.author ? container.author : 'n/a' }}
Expand Down
4 changes: 2 additions & 2 deletions app/views/containereditor.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ <h3 class="available-containers">
ng-class="{selected: selContainerObj.id === containerObj.id}"
ng-repeat="containerObj in nsObj.containers">
<div class="container-name-oflw pull-left"
title="{{containerObj.name + (containerObj.toolname ? ' (' + containerObj.toolname + ')' : '')}}"
title="{{containerObj.name + (containerObj.toolname ? '/' + containerObj.toolname : '')}}"
data-toggle="tooltip">
<a href ng-click="selectContainer(containerObj.id)">
{{containerObj.name + (containerObj.toolname ? ' (' + containerObj.toolname + ')' : '')}}
{{containerObj.name + (containerObj.toolname ? '/' + containerObj.toolname : '')}}
</a>
</div>
<div class="pull-right">
Expand Down

0 comments on commit 75b45f4

Please sign in to comment.