diff --git a/app/adapters/application.js b/app/adapters/application.js index 1295b07..70db61e 100644 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -2,6 +2,6 @@ import DS from 'ember-data'; import config from '../config/environment'; export default DS.RESTAdapter.reopen({ - namespace: 'api', + namespace: 'api/hymenobacter', host: config.apiURL }); diff --git a/app/models/strain.js b/app/models/strain.js new file mode 100644 index 0000000..3bd7de2 --- /dev/null +++ b/app/models/strain.js @@ -0,0 +1,13 @@ +import DS from 'ember-data'; + +export default DS.Model.extend({ + strainName: DS.attr('string'), + strainType: DS.attr('string'), + etymology: DS.attr('string'), + accessionBanks: DS.attr('string'), + genbankEmblDdb: DS.attr('string'), + isolatedFrom: DS.attr('string'), + createdAt: DS.attr('date'), + updatedAt: DS.attr('date'), + deletedAt: DS.attr('date') +}); diff --git a/app/router.js b/app/router.js index b4acf36..4f8d6ef 100644 --- a/app/router.js +++ b/app/router.js @@ -8,6 +8,9 @@ var Router = Ember.Router.extend({ Router.map(function() { this.route('login'); this.route('about'); + this.resource('strains', function() { + this.route('show', { path: ':strain_id' }); + }); }); export default Router; diff --git a/app/routes/strains.js b/app/routes/strains.js new file mode 100644 index 0000000..26d9f31 --- /dev/null +++ b/app/routes/strains.js @@ -0,0 +1,4 @@ +import Ember from 'ember'; + +export default Ember.Route.extend({ +}); diff --git a/app/routes/strains/index.js b/app/routes/strains/index.js new file mode 100644 index 0000000..eb8fe88 --- /dev/null +++ b/app/routes/strains/index.js @@ -0,0 +1,7 @@ +import Ember from 'ember'; + +export default Ember.Route.extend({ + model: function() { + return this.store.findAll('strain'); + } +}); diff --git a/app/routes/strains/show.js b/app/routes/strains/show.js new file mode 100644 index 0000000..26d9f31 --- /dev/null +++ b/app/routes/strains/show.js @@ -0,0 +1,4 @@ +import Ember from 'ember'; + +export default Ember.Route.extend({ +}); diff --git a/app/templates/application.hbs b/app/templates/application.hbs index e0162e3..37e6b90 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -3,7 +3,9 @@ {{/link-to}}