Skip to content

Commit

Permalink
#195 Sort the list of report templates in admin section
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed May 9, 2017
1 parent d5aaff3 commit d9055b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ui/app/scripts/controllers/admin/AdminReportTemplatesCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

this.templates = [];
this.analyzers = [];
this.analyzerIds = [];
this.analyzerCount = 0;


Expand Down Expand Up @@ -51,7 +52,8 @@
}
});

self.analyzerCount = _.keys(analyzersMap).length;
self.analyzerIds = _.keys(analyzersMap);
self.analyzerCount = self.analyzerIds.length;
});
};

Expand Down
2 changes: 1 addition & 1 deletion ui/app/views/partials/admin/report-templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3 class="box-title">Report template management</h3>
</tr>
</thead>
<tbody>
<tr ng-repeat="analyzer in vm.analyzers">
<tr ng-repeat="analyzerId in vm.analyzerIds | orderBy:'toString()'" ng-init="analyzer=vm.analyzers[analyzerId]">
<td>
{{::analyzer.id}}<br>
<small class="text-muted">{{::analyzer.description}}</small>
Expand Down

0 comments on commit d9055b8

Please sign in to comment.