Pods, pods, everywhere

This commit is contained in:
Matthew Dillon 2015-06-04 12:18:59 -08:00
parent 33f783bc42
commit e623d52f34
66 changed files with 53 additions and 113 deletions

View file

@ -1,9 +1,4 @@
{ {
/** "disableAnalytics": true,
Ember CLI sends analytics information by default. The data is completely "usePods": true
anonymous, but there are times when you might want to disable this behavior.
Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": true
} }

View file

@ -1,4 +0,0 @@
import Ember from 'ember';
export default Ember.Component.extend({
});

View file

@ -1,5 +0,0 @@
import SortableController from '../sortable';
export default SortableController.extend({
sortBy: 'characteristic',
});

View file

@ -1,5 +0,0 @@
import SortableController from '../sortable';
export default SortableController.extend({
sortBy: 'fullName',
});

View file

@ -1,6 +1,6 @@
import DS from 'ember-data'; import DS from 'ember-data';
import Ember from 'ember'; import Ember from 'ember';
import config from '../config/environment'; import config from '../../config/environment';
export default DS.RESTAdapter.extend({ export default DS.RESTAdapter.extend({
namespace: 'api/' + config.genus, namespace: 'api/' + config.genus,

View file

@ -1,4 +1,4 @@
import SortableController from '../sortable'; import SortableController from '../../controllers/sortable';
export default SortableController.extend({ export default SortableController.extend({
sortBy: 'characteristicName', sortBy: 'characteristicName',

View file

@ -0,0 +1,8 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
model: function() {
return this.store.findAll('characteristic');
}
});

View file

@ -1,5 +1,5 @@
import Ember from 'ember'; import Ember from 'ember';
import config from '../config/environment'; import config from '../../../config/environment';
export default Ember.Component.extend({ export default Ember.Component.extend({
tagName: 'em', tagName: 'em',

View file

@ -1,8 +1,6 @@
import Ember from 'ember'; import Ember from 'ember';
import layout from '../templates/components/scientific-name';
export default Ember.Component.extend({ export default Ember.Component.extend({
layout: layout,
tagName: 'span', tagName: 'span',
strain: null, // passed in strain: null, // passed in
}); });

View file

@ -1,4 +1,4 @@
import SortableController from '../sortable'; import SortableController from '../../../controllers/sortable';
export default SortableController.extend({ export default SortableController.extend({
sortBy: 'speciesName', sortBy: 'speciesName',

View file

@ -0,0 +1,8 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
model: function() {
return this.store.findAll('species');
}
});

View file

@ -1,5 +1,5 @@
{{ {{
species/species-details species-details
species=model species=model
isEditing=true isEditing=true
save="save" save="save"

View file

@ -1,5 +1,5 @@
{{ {{
species/species-details species-details
species=model species=model
isEditing=isEditing isEditing=isEditing
save="save" save="save"

View file

@ -0,0 +1,8 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
model: function() {
return this.store.findAll('strain');
}
});

View file

@ -19,7 +19,7 @@
{{#each strain in controller}} {{#each strain in controller}}
<tr> <tr>
<td> <td>
{{#link-to 'measurements' strain.id}} {{#link-to 'strains.show' strain.id}}
{{scientific-name strain=strain}} {{scientific-name strain=strain}}
{{/link-to}} {{/link-to}}
</td> </td>

View file

@ -1,5 +1,5 @@
{{ {{
strains/strain-details strain-details
strain=strain strain=strain
species=species species=species
isEditing=true isEditing=true

View file

@ -1,12 +1,8 @@
{{ {{
strains/strain-details strain-details
strain=strain strain=strain
species=species species=species
isEditing=isEditing isEditing=isEditing
save="save" save="save"
cancel="cancel" cancel="cancel"
}} }}
<div class="measurements-container">
{{outlet}}
</div>

View file

@ -1,5 +1,5 @@
import DS from 'ember-data'; import DS from 'ember-data';
import config from '../config/environment'; import config from '../../config/environment';
export default DS.RESTAdapter.extend({ export default DS.RESTAdapter.extend({
namespace: 'api', namespace: 'api',

8
app/pods/users/route.js Normal file
View file

@ -0,0 +1,8 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
model: function() {
return this.store.findAll('user');
}
});

View file

@ -8,18 +8,18 @@ var Router = Ember.Router.extend({
Router.map(function() { Router.map(function() {
this.route('login'); this.route('login');
this.route('about'); this.route('about');
this.resource('species', function() { this.route('characteristics');
this.route('users');
this.route('species', function() {
this.route('new');
this.route('show', { path: ':species_id' }); this.route('show', { path: ':species_id' });
this.route('new');
}); });
this.resource('strains', function() { this.route('strains', function() {
this.route('new'); this.route('new');
this.route('show', { path: ':strain_id' }, function() { this.route('show', { path: ':strain_id' });
this.resource('measurements', function() {});
});
}); });
this.resource('characteristics', function() {});
this.resource('users', function() {});
}); });
export default Router; export default Router;

View file

View file

@ -1,7 +0,0 @@
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.findAll('characteristic');
}
});

View file

@ -1,4 +0,0 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin);

View file

@ -1,7 +0,0 @@
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.modelFor('strains/show').strain.get('measurements');
}
});

View file

@ -1,4 +0,0 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin);

View file

@ -1,7 +0,0 @@
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.findAll('species');
}
});

View file

@ -1,4 +0,0 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin);

View file

@ -1,7 +0,0 @@
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.findAll('strain');
}
});

View file

@ -1,4 +0,0 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin);

View file

@ -1,7 +0,0 @@
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.findAll('user');
}
});

View file

@ -1,16 +0,0 @@
<table class="flakes-table">
<thead>
<tr>
<th {{action "setSortBy" "characteristic"}}>Characteristic</th>
<th {{action "setSortBy" "computedType"}}>Measurement Type</th>
<th {{action "setSortBy" "computedValue"}}>Measurement</th>
<th {{action "setSortBy" "notes"}}>Notes</th>
<th {{action "setSortBy" "testMethod"}}>Test Method</th>
</tr>
</thead>
<tbody>
{{#each measurement in controller}}
{{measurements/measurement-row measurement=measurement}}
{{/each}}
</tbody>
</table>

View file

@ -1 +0,0 @@
{{outlet}}

View file

View file

@ -17,6 +17,7 @@ module.exports = function(environment) {
// when it is created // when it is created
}, },
genus: 'hymenobacter', genus: 'hymenobacter',
podModulePrefix: 'hymenobacterdotinfo/pods',
}; };
if (environment === 'development') { if (environment === 'development') {