This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/pods/protected/compare/results/results-table/component.js
2015-11-11 20:29:50 -07:00

19 lines
632 B
JavaScript

import Ember from 'ember';
const { Component, computed, inject: { service } } = Ember;
export default Component.extend({
session: service(),
strains: null,
characteristics: null,
strain_ids: null,
characteristic_ids: null,
csvLink: computed('strain_ids', 'characteristic_ids', function() {
const token = encodeURIComponent(this.get('session.data.authenticated.access_token'));
return `${this.get('globals.apiURL')}/api/${this.get('globals.genus')}/` +
`compare?token=${token}&strain_ids=${this.get('strain_ids')}&` +
`characteristic_ids=${this.get('characteristic_ids')}&mimeType=csv`;
}),
});