From 62020a98658c305fbee7952beed720ca79156a7c Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 18 Mar 2015 14:12:50 -0800 Subject: [PATCH] Cleaning out old stuff --- app/models/characteristic.js | 10 --- app/models/genus.js | 13 ---- app/models/measurement.js | 15 ----- app/models/species.js | 10 --- app/models/strain.js | 15 ----- app/router.js | 7 -- app/routes/genera.js | 7 -- app/routes/measurements.js | 7 -- app/routes/species.js | 7 -- app/routes/strains.js | 7 -- app/templates/application.hbs | 18 +----- app/templates/genera.hbs | 23 ------- app/templates/measurement.hbs | 51 --------------- app/templates/species.hbs | 41 ------------ app/templates/strain.hbs | 109 -------------------------------- app/templates/strains.hbs | 6 -- package.json | 6 +- public/img/logo.png | Bin 1737 -> 1465 bytes server/mocks/authenticate.js | 12 ++++ server/mocks/characteristics.js | 77 ---------------------- server/mocks/genera.js | 65 ------------------- server/mocks/species.js | 77 ---------------------- 22 files changed, 18 insertions(+), 565 deletions(-) delete mode 100644 app/models/characteristic.js delete mode 100644 app/models/genus.js delete mode 100644 app/models/measurement.js delete mode 100644 app/models/species.js delete mode 100644 app/models/strain.js delete mode 100644 app/routes/genera.js delete mode 100644 app/routes/measurements.js delete mode 100644 app/routes/species.js delete mode 100644 app/routes/strains.js delete mode 100644 app/templates/genera.hbs delete mode 100644 app/templates/measurement.hbs delete mode 100644 app/templates/species.hbs delete mode 100644 app/templates/strain.hbs delete mode 100644 app/templates/strains.hbs create mode 100644 server/mocks/authenticate.js delete mode 100644 server/mocks/characteristics.js delete mode 100644 server/mocks/genera.js delete mode 100644 server/mocks/species.js diff --git a/app/models/characteristic.js b/app/models/characteristic.js deleted file mode 100644 index db5ffb0..0000000 --- a/app/models/characteristic.js +++ /dev/null @@ -1,10 +0,0 @@ -import DS from 'ember-data'; - -export default DS.Model.extend({ - characteristicName: DS.attr(), - characteristicTypeId: DS.attr(), - measurements: DS.hasMany('measurement', {async: true}), - createdAt: DS.attr('date'), - updatedAt: DS.attr('date'), - deletedAt: DS.attr('date') -}); diff --git a/app/models/genus.js b/app/models/genus.js deleted file mode 100644 index 48f6b7f..0000000 --- a/app/models/genus.js +++ /dev/null @@ -1,13 +0,0 @@ -import DS from 'ember-data'; -import Ember from 'ember'; - -var inflector = Ember.Inflector.inflector; -inflector.irregular('genus', 'genera'); - -export default DS.Model.extend({ - genusName: DS.attr(), - species: DS.hasMany('species', {async: true}), - createdAt: DS.attr('date'), - updatedAt: DS.attr('date'), - deletedAt: DS.attr('date') -}); diff --git a/app/models/measurement.js b/app/models/measurement.js deleted file mode 100644 index 8742b5f..0000000 --- a/app/models/measurement.js +++ /dev/null @@ -1,15 +0,0 @@ -import DS from 'ember-data'; - -export default DS.Model.extend({ - textMeasurementTypeId: DS.attr(), - txtValue: DS.attr(), - numValue: DS.attr(), - confidenceInterval: DS.attr(), - unitTypeId: DS.attr(), - notes: DS.attr(), - testMethodId: DS.attr(), - strain: DS.belongsTo('strain', {async: true}), - characteristic: DS.belongsTo('characteristic', {async: true}), - createdAt: DS.attr('date'), - updatedAt: DS.attr('date') -}); diff --git a/app/models/species.js b/app/models/species.js deleted file mode 100644 index ec1a9fd..0000000 --- a/app/models/species.js +++ /dev/null @@ -1,10 +0,0 @@ -import DS from 'ember-data'; - -export default DS.Model.extend({ - speciesName: DS.attr(), - genus: DS.belongsTo('genus', {async: true}), - strains: DS.hasMany('strain', {async: true}), - createdAt: DS.attr('date'), - updatedAt: DS.attr('date'), - deletedAt: DS.attr('date') -}); diff --git a/app/models/strain.js b/app/models/strain.js deleted file mode 100644 index 3c069e6..0000000 --- a/app/models/strain.js +++ /dev/null @@ -1,15 +0,0 @@ -import DS from 'ember-data'; - -export default DS.Model.extend({ - strainName: DS.attr(), - strainType: DS.attr(), - etymology: DS.attr(), - accessionBanks: DS.attr(), - genbankEmblDdb: DS.attr(), - isolatedFrom: DS.attr(), - species: DS.belongsTo('species', {async: true}), - measurements: DS.hasMany('measurement', {async: true}), - createdAt: DS.attr('date'), - updatedAt: DS.attr('date'), - deletedAt: DS.attr('date') -}); diff --git a/app/router.js b/app/router.js index 05396c9..b4acf36 100644 --- a/app/router.js +++ b/app/router.js @@ -8,13 +8,6 @@ var Router = Ember.Router.extend({ Router.map(function() { this.route('login'); this.route('about'); - this.resource('genera'); - this.resource('species'); - this.resource('strains'); - this.resource('strain', { path: '/strain/:strain_id' }, function() { - this.resource('measurements'); - }); - this.resource('measurement', { path: '/measurement/:measurement_id' }); }); export default Router; diff --git a/app/routes/genera.js b/app/routes/genera.js deleted file mode 100644 index d975380..0000000 --- a/app/routes/genera.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.store.find('genus'); - } -}); diff --git a/app/routes/measurements.js b/app/routes/measurements.js deleted file mode 100644 index 324cf3d..0000000 --- a/app/routes/measurements.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.store.find('measurement'); - } -}); diff --git a/app/routes/species.js b/app/routes/species.js deleted file mode 100644 index aa33152..0000000 --- a/app/routes/species.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.store.find('species'); - } -}); diff --git a/app/routes/strains.js b/app/routes/strains.js deleted file mode 100644 index ce81372..0000000 --- a/app/routes/strains.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.store.find('strain'); - } -}); diff --git a/app/templates/application.hbs b/app/templates/application.hbs index fcc8ea8..e0162e3 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -1,20 +1,9 @@
- + {{/link-to}}
-
diff --git a/app/templates/genera.hbs b/app/templates/genera.hbs deleted file mode 100644 index b3f4c38..0000000 --- a/app/templates/genera.hbs +++ /dev/null @@ -1,23 +0,0 @@ -

This is here for debugging, this page will be deleted.

- -
- {{#each}} -
-
- {{genusName}} -
-
Created
-
{{createdAt}}
-
-
-
Updated
-
{{updatedAt}}
-
-
-
Deleted
-
{{deletedAt}}
-
-
-
- {{/each}} -
diff --git a/app/templates/measurement.hbs b/app/templates/measurement.hbs deleted file mode 100644 index 3b6e6a5..0000000 --- a/app/templates/measurement.hbs +++ /dev/null @@ -1,51 +0,0 @@ -
-
-
- {{id}} -
-
Strain
-
{{strain.strainName}}
-
-
-
Characteristic
-
{{characteristicId}}
-
-
-
Text Measurement Type
-
{{textMeasurementTypeId}}
-
-
-
Text Value
-
{{txtValue}}
-
-
-
Numerical Value
-
{{numValue}}
-
-
-
Confidence Interval
-
{{confidenceInterval}}
-
-
-
Unit Type
-
{{unitTypeId}}
-
-
-
Notes
-
{{notes}}
-
-
-
Test Method
-
{{testMethodId}}
-
-
-
Created
-
{{createdAt}}
-
-
-
Updated
-
{{updatedAt}}
-
-
-
-
diff --git a/app/templates/species.hbs b/app/templates/species.hbs deleted file mode 100644 index 964149d..0000000 --- a/app/templates/species.hbs +++ /dev/null @@ -1,41 +0,0 @@ -
- {{#each}} -
-
- {{speciesName}} -
-
Id
-
{{id}}
-
-
-
Genus
-
{{genus.genusName}}
-
-
-
Species
-
{{speciesName}}
-
-
-
Strains
-
- {{#each strains}} - {{strainName}} - {{/each}} -
-
-
-
Created
-
{{createdAt}}
-
-
-
Updated
-
{{updatedAt}}
-
-
-
Deleted
-
{{deletedAt}}
-
-
-
- {{/each}} -
diff --git a/app/templates/strain.hbs b/app/templates/strain.hbs deleted file mode 100644 index 7372dec..0000000 --- a/app/templates/strain.hbs +++ /dev/null @@ -1,109 +0,0 @@ -
-
-
- {{strainName}} -
-
-
Species
-
{{species.speciesName}}
-
-
-
Strain
-
{{strainName}}
-
-
-
Type
-
{{strainType}}
-
-
-
-
-
Accession Banks
-
{{accessionBanks}}
-
-
-
Genbank EMBL DDB
-
{{genbankEmblDdb}}
-
-
-
Isolated From
-
{{isolatedFrom}}
-
-
-
-
Etymology
-
{{etymology}}
-
-
-
-
Created
-
{{createdAt}}
-
-
-
Updated
-
{{updatedAt}}
-
-
-
Deleted
-
{{null-time deletedAt}}
-
-
-
-
-
-

Measurements

- {{#each measurements}} -
-
-
- {{characteristic.characteristicName}} -
-
-
Text Measurement Type
-
{{textMeasurementTypeId}}
-
-
-
Text Value
-
{{txtValue}}
-
-
-
-
-
Numerical Value
-
{{numValue}}
-
-
-
Confidence Interval
-
{{confidenceInterval}}
-
-
-
Unit Type
-
{{unitTypeId}}
-
-
-
-
-
Notes
-
{{notes}}
-
-
-
Test Method
-
{{testMethodId}}
-
-
-
-
-
Created
-
{{createdAt}}
-
-
-
Updated
-
{{updatedAt}}
-
-
-
-
-
- {{/each}} -
-
diff --git a/app/templates/strains.hbs b/app/templates/strains.hbs deleted file mode 100644 index 6232146..0000000 --- a/app/templates/strains.hbs +++ /dev/null @@ -1,6 +0,0 @@ -

Strains

-
    - {{#each}} -
  • {{#link-to 'strain' this}}{{strainName}}{{/link-to}}
  • - {{/each}} -
diff --git a/package.json b/package.json index 9644fb7..34c884c 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,8 @@ "ember-cli-uglify": "1.0.1", "ember-data": "1.0.0-beta.15", "ember-export-application-global": "^1.0.2", - "express": "^4.8.5", - "glob": "^4.0.5", - "morgan": "^1.5.1" + "express": "^4.12.3", + "glob": "^4.5.3", + "morgan": "^1.5.2" } } diff --git a/public/img/logo.png b/public/img/logo.png index 42fd72548cb46f5d41aadc20b1f95372803160d5..f0eece7bdfc1bd570b0e5d8e759d4c1cd9a59cf6 100755 GIT binary patch literal 1465 zcmV;q1xEUbP)K$Y8G_T;>+uKgtApG(1v3q}bc-R#Q>^M0&>7Kv7zD`e1Pp8Mn$DP)y zEj0K3{=R!gyZXJkx%t(OOqklydlj|w@$oT}Pwy@-FN^ZU2|YSGnzbW2)PE%S?Ch*- zk9ul9no+f_=iXnGTjO%M^*1u9F7v=U)n`naFPGEDqHk4SE(MvFCb(AK-`{6~N+=*w zOLbZc6N(utm9MX_uJp+VA+C&X}OaoEJu_J`giV+}KziLwj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@rpzGBQ%c4V;gvg%Ku?M z7r@7KZw0cZ!1#o)Mjs~g!nTW$sx~D+NYzwGb<#g=Q~K5cVg7w28FZD1uKWnEIHcSE z5RqR z6x|pqq$niFFhu6;$`?|#2Jm}Z7`S#2Qhgz$8i`v{BY^OV>-v<9s$@F2r4N3wMxOwl z2;@1yTp?9*y*3LlL7l$9QX$oFAyqpeRevGX1mI`fPp&lj1a#+A`6Td0PRq{Y49-#E zGCAc3y3rc_oF7y#U^bb18n~2aiZ%Lm|1)U|a8;zLa!W7_6&{znv z3wMRJ$oFS9sdUMs5SU<%p6tVzCBeXp!-K$gz>l6j>)S5IId%|k>o@@nvqmqK00000NkvXXu0mjfar+?M diff --git a/server/mocks/authenticate.js b/server/mocks/authenticate.js new file mode 100644 index 0000000..ad5ff6f --- /dev/null +++ b/server/mocks/authenticate.js @@ -0,0 +1,12 @@ +module.exports = function(app) { + var express = require('express'); + var authenticateRouter = express.Router(); + + authenticateRouter.post('/', function(req, res) { + res.send({ + 'token': 'abc123' + }); + }); + + app.use('/api/authenticate', authenticateRouter); +}; diff --git a/server/mocks/characteristics.js b/server/mocks/characteristics.js deleted file mode 100644 index 4844b67..0000000 --- a/server/mocks/characteristics.js +++ /dev/null @@ -1,77 +0,0 @@ -module.exports = function(app) { - var express = require('express'); - var characteristicsRouter = express.Router(); - - var CHARACTERISTICS = [ - { - id: 1, - characteristicName: "Char01", - characteristicTypeId: 1, - createdAt: "2015-01-27T10:19:25.156836Z", - updatedAt: "2015-01-27T10:19:25.156836Z", - deletedAt: null, - measurements: [1,6] - }, - { - id: 2, - characteristicName: "Char02", - characteristicTypeId: 1, - createdAt: "2015-01-27T10:19:25.156836Z", - updatedAt: "2015-01-27T10:19:25.156836Z", - deletedAt: null, - measurements: [2,7] - }, - { - id: 3, - characteristicName: "Char03", - characteristicTypeId: 1, - createdAt: "2015-01-27T10:19:25.156836Z", - updatedAt: "2015-01-27T10:19:25.156836Z", - deletedAt: null, - measurements: [3,8] - }, - { - id: 4, - characteristicName: "Char04", - characteristicTypeId: 1, - createdAt: "2015-01-27T10:19:25.156836Z", - updatedAt: "2015-01-27T10:19:25.156836Z", - deletedAt: null, - measurements: [4,5,9,10] - } - ] - - characteristicsRouter.get('/', function(req, res) { - res.send({ - 'characteristics': CHARACTERISTICS - }); - }); - - characteristicsRouter.post('/', function(req, res) { - res.status(201).end(); - }); - - characteristicsRouter.get('/:id', function(req, res) { - var characteristics = CHARACTERISTICS.filter(function(c) { - return req.params.id.indexOf(c.id.toString()) > -1; - }); - res.send({ - 'characteristic': characteristics[0] - }); - }); - - characteristicsRouter.put('/:id', function(req, res) { - var characteristics = CHARACTERISTICS.filter(function(c) { - return req.params.id.indexOf(c.id.toString()) > -1; - }); - res.send({ - 'characteristic': characteristics[0] - }); - }); - - characteristicsRouter.delete('/:id', function(req, res) { - res.status(204).end(); - }); - - app.use('/api/characteristics', characteristicsRouter); -}; diff --git a/server/mocks/genera.js b/server/mocks/genera.js deleted file mode 100644 index 09e7620..0000000 --- a/server/mocks/genera.js +++ /dev/null @@ -1,65 +0,0 @@ -module.exports = function(app) { - var express = require('express'); - var generaRouter = express.Router(); - - var GENERA = [ - { - id: 1, - genusName: "Genus One", - species: [1,2], - createdAt: "0001-01-01T00:00:00Z", - updatedAt: "0001-01-01T00:00:00Z", - deletedAt: null, - }, - { - id: 2, - genusName: "Genus Two", - species: [3], - createdAt: "0001-01-01T00:00:00Z", - updatedAt: "0001-01-01T00:00:00Z", - deletedAt: null, - }, - { - id: 3, - genusName: "Genus Three", - species: [4], - createdAt: "0001-01-01T00:00:00Z", - updatedAt: "0001-01-01T00:00:00Z", - deletedAt: null, - } - ]; - - generaRouter.get('/', function(req, res) { - res.send({ - 'genera': GENERA - }); - }); - - generaRouter.post('/', function(req, res) { - res.status(201).end(); - }); - - generaRouter.get('/:id', function(req, res) { - var genus = GENERA.filter(function(g) { - return req.params.id.indexOf(g.id.toString()) > -1; - }); - res.send({ - 'genus': genus[0] - }); - }); - - generaRouter.put('/:id', function(req, res) { - var genus = GENERA.filter(function(g) { - return req.params.id.indexOf(g.id.toString()) > -1; - }); - res.send({ - 'genus': genus[0] - }); - }); - - generaRouter.delete('/:id', function(req, res) { - res.status(204).end(); - }); - - app.use('/api/genera', generaRouter); -}; diff --git a/server/mocks/species.js b/server/mocks/species.js deleted file mode 100644 index 9c9ea76..0000000 --- a/server/mocks/species.js +++ /dev/null @@ -1,77 +0,0 @@ -module.exports = function(app) { - var express = require('express'); - var speciesRouter = express.Router(); - - var SPECIES = [ - { - id: 1, - genus: 1, - speciesName: "Species One", - strains: [1], - createdAt: "0001-01-01T00:00:00Z", - updatedAt: "0001-01-01T00:00:00Z", - deletedAt: null, - }, - { - id: 2, - genus: 1, - speciesName: "Species Two", - strains: [2], - createdAt: "0001-01-01T00:00:00Z", - updatedAt: "0001-01-01T00:00:00Z", - deletedAt: null, - }, - { - id: 3, - genus: 2, - speciesName: "Species Three", - strains: [3], - createdAt: "0001-01-01T00:00:00Z", - updatedAt: "0001-01-01T00:00:00Z", - deletedAt: null, - }, - { - id: 4, - genus: 3, - speciesName: "Species Four", - strains: [4], - createdAt: "0001-01-01T00:00:00Z", - updatedAt: "0001-01-01T00:00:00Z", - deletedAt: null, - } - ]; - - speciesRouter.get('/', function(req, res) { - res.send({ - 'species': SPECIES - }); - }); - - speciesRouter.post('/', function(req, res) { - res.status(201).end(); - }); - - speciesRouter.get('/:id', function(req, res) { - var species = SPECIES.filter(function(s) { - return req.params.id.indexOf(s.id.toString()) > -1; - }); - res.send({ - 'species': species[0] - }); - }); - - speciesRouter.put('/:id', function(req, res) { - var species = SPECIES.filter(function(s) { - return req.params.id.indexOf(s.id.toString()) > -1; - }); - res.send({ - 'species': species[0] - }); - }); - - speciesRouter.delete('/:id', function(req, res) { - res.status(204).end(); - }); - - app.use('/api/species', speciesRouter); -};