From 75b45f4feff7173513270ae1612b125b80a61ca6 Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Wed, 17 Aug 2016 16:47:13 -0400 Subject: [PATCH] Feature/tool title match ga4gh (#80) * Modify titles to match ga4gh ids for tools * Fix registration default * Simplify homepage view of paths --- app/scripts/controllers/containereditor.js | 7 ++++--- app/templates/containerdetails.html | 22 +++++++--------------- app/templates/containersgrid.html | 2 +- app/views/containereditor.html | 4 ++-- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/app/scripts/controllers/containereditor.js b/app/scripts/controllers/containereditor.js index 8272163..8978f97 100644 --- a/app/scripts/controllers/containereditor.js +++ b/app/scripts/controllers/containereditor.js @@ -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; @@ -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', diff --git a/app/templates/containerdetails.html b/app/templates/containerdetails.html index 9a3e31f..838d2d8 100644 --- a/app/templates/containerdetails.html +++ b/app/templates/containerdetails.html @@ -48,9 +48,7 @@

{{ - (containerObj.namespace !== '_' ? containerObj.namespace + '/' : '') + - containerObj.name + - (containerObj.toolname ? ' (' + containerObj.toolname + ')' : '') + (containerObj.tool_path) }}

@@ -149,14 +147,6 @@

Info
    -
  • - Name: - {{containerObj.name + (containerObj.toolname ? ' (' + containerObj.toolname + ')' : '')}} -
  • -
  • - Path: - {{containerObj.path}} -
  • Author: {{ containerObj.author ? containerObj.author : 'n/a' }} @@ -367,10 +357,10 @@

-
  • +
  • Launch With:
    -
    - +
    {{launchWith}}
  • + +

    diff --git a/app/templates/containersgrid.html b/app/templates/containersgrid.html index 7907c52..7995419 100644 --- a/app/templates/containersgrid.html +++ b/app/templates/containersgrid.html @@ -36,7 +36,7 @@ - {{container.name + (container.toolname ? ' (' + container.toolname + ')' : '')}} + {{container.name + (container.toolname ? '/' + container.toolname : '')}} {{ container.author ? container.author : 'n/a' }} diff --git a/app/views/containereditor.html b/app/views/containereditor.html index c32cedf..21aac1d 100644 --- a/app/views/containereditor.html +++ b/app/views/containereditor.html @@ -76,10 +76,10 @@

    ng-class="{selected: selContainerObj.id === containerObj.id}" ng-repeat="containerObj in nsObj.containers">