Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(annotations): update field names
Browse files Browse the repository at this point in the history
Closes #555, #484, #491, #535
  • Loading branch information
Christine Yu committed Mar 13, 2015
1 parent d2e50aa commit 616ff86
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 30 deletions.
5 changes: 2 additions & 3 deletions app/scripts/annotations/annotations.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module ngApp.annotations.controllers {
class AnnotationsController implements IAnnotationsController {
annotations: IAnnotations;


/* @ngInject */
constructor(private $scope: IAnnotationsScope, private AnnotationsService: IAnnotationsService,
private CoreService: ICoreService, private AnnotationsTableModel:TableiciousConfig) {
Expand All @@ -37,13 +36,13 @@ module ngApp.annotations.controllers {
this.AnnotationsService.getAnnotations({
fields: this.AnnotationsTableModel.fields,
facets: [
"annotation_id",
"classification",
"category",
"created_datetime",
"creator",
"status",
"item_type",
"item",
"entity_type",
"classification",
"project.primary_site",
"project.program.name",
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/annotations/annotations.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module ngApp.annotations.services {
var defaults = {
size: paging.size,
from: paging.from,
sort: paging.sort || 'item_type:asc',
sort: paging.sort || 'entity_type:asc',
filters: this.LocationService.filters()
};

Expand Down
29 changes: 15 additions & 14 deletions app/scripts/annotations/annotations.table.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module ngApp.projects.models {

var AnnotationsTableModel:TableiciousConfig = {
title: "Annotations",
order: ['annotation_id', 'participant_id', 'project.program.name', 'project.project_id', 'barcode', 'item_type', 'category', 'classification', 'dateCreated', 'creator', 'status'],
order: ['annotation_id', 'participant_id', 'project.program.name', 'project.project_id', 'entity_id', 'entity_type', 'category', 'classification', 'dateCreated', 'creator', 'status', 'submitter_id'],
headings: [{
displayName: "ID",
id: "annotation_id",
Expand Down Expand Up @@ -52,27 +52,27 @@ module ngApp.projects.models {
sortable: true
},
{
displayName: "Item Type",
id: "item_type",
displayName: "Entity Type",
id: "entity_type",
template: function (field, row, scope, $filter) {
return $filter("humanify")(field && field.val || "tbc");
return $filter("humanify")(field && field.val || "--");
},
sortable: true
},
{
displayName: "Item ID",
id: "item_id",
template: function (x) {
return x && x.val || "tbc";
displayName: "Entity ID",
id: "entity_id",
template: function (field) {
return field && field.val || "--";
},
sortable: true
},
{
displayName: "Item Barcode",
id: "barcode",
displayName: "Entity Barcode",
id: "submitter_id",
sortable: true,
template: function() {
return "tbd";
template: function(field) {
return field && field.val || "--";
}
},
{
Expand Down Expand Up @@ -116,8 +116,9 @@ module ngApp.projects.models {
"created_datetime",
"creator",
"status",
"item_type",
"item_id",
"entity_type",
"entity_id",
"submitter_id",
"notes",
"classification",
"project.program.name",
Expand Down
5 changes: 3 additions & 2 deletions app/scripts/annotations/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ module ngApp.annotations {
"category",
"creator",
"status",
"item_type",
"item_id",
"entity_type",
"entity_id",
"submitter_id",
"classification",
"notes",
"created_datetime",
Expand Down
12 changes: 6 additions & 6 deletions app/scripts/annotations/templates/annotation.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ <h3 class="panel-title" data-translate>Summary</h3>
<td>{{ ::ac.annotation.annotation_id }}</td>
</tr>
<tr>
<th data-translate scope="row">Item UUID</th>
<td>{{ ::ac.annotation.item_id }}</td>
<th data-translate scope="row">Entity ID</th>
<td>{{ ::ac.annotation.entity_id || "--" }}</td>
</tr>
<tr>
<th data-translate scope="row">Item Barcode</th>
<td>tbd {{ ::ac.annotation.barcode }}</td>
<th data-translate scope="row">Entity Barcode</th>
<td>{{ ::ac.annotation.submitter_id || "--" }}</td>
</tr>
<tr>
<th data-translate scope="row">Item Type</th>
<td>{{ ::ac.annotation.item_type | humanify }}</td>
<th data-translate scope="row">Entity Type</th>
<td>{{ ::ac.annotation.entity_type | humanify }}</td>
</tr>
<tr>
<th data-translate scope="row">Participant ID</th>
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/annotations/templates/annotations.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ <h3 class="panel-title pull-left">Facets</h3>
<terms data-name="annotations.project.primary_site"
data-title="Primary Site"
data-facet="asc.annotations.aggregations['project.primary_site']" data-collapsed="true"></terms>
<terms data-name="annotations.item_type"
data-title="Item Type"
data-facet="asc.annotations.aggregations.item_type"></terms>
<terms data-name="annotations.entity_type"
data-title="Entity Type"
data-facet="asc.annotations.aggregations['entity_type']"></terms>
<terms data-name="annotations.category"
data-title="Annotation Category"
data-facet="asc.annotations.aggregations.category"></terms>
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/annotations/tests/annotations.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Annotations:', function () {
sinon.spy(AnnotationsService.ds, 'get');

var fs = {hits: [], facets: [], pagination: {}};
httpBackend.whenGET("/annotations?filters=%7B%7D&from=1&size=10&sort=item_type:asc").respond(fs);
httpBackend.whenGET("/annotations?filters=%7B%7D&from=1&size=10&sort=entity_type:asc").respond(fs);

AnnotationsService.getAnnotations();
httpBackend.flush();
Expand Down

0 comments on commit 616ff86

Please sign in to comment.