Cleaning out old stuff

This commit is contained in:
Matthew Dillon 2015-03-18 14:12:50 -08:00
parent 1d1bbd6706
commit 62020a9865
22 changed files with 18 additions and 565 deletions

View file

@ -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')
});

View file

@ -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')
});

View file

@ -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')
});

View file

@ -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')
});

View file

@ -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')
});

View file

@ -8,13 +8,6 @@ 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('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; export default Router;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,20 +1,9 @@
<div class="flakes-navigation"> <div class="flakes-navigation">
<a href="index.html" class="logo"> {{#link-to 'index' class='logo'}}
<img src="img/logo.png" width="120"> <img src="img/logo.png" width="120">
</a> {{/link-to}}
<ul> <ul>
{{#link-to 'genera' tagName='li' href=false}} <li>Strains</li>
{{#link-to 'genera'}}Genera{{/link-to}}
{{/link-to}}
{{#link-to 'species' tagName='li' href=false}}
{{#link-to 'species'}}Species{{/link-to}}
{{/link-to}}
{{#link-to 'strains' tagName='li' href=false}}
{{#link-to 'strains'}}Strains{{/link-to}}
{{/link-to}}
{{#link-to 'measurements' tagName='li' href=false}}
{{#link-to 'measurements'}}Measurements{{/link-to}}
{{/link-to}}
{{#link-to 'about' tagName='li' href=false}} {{#link-to 'about' tagName='li' href=false}}
{{#link-to 'about'}}About{{/link-to}} {{#link-to 'about'}}About{{/link-to}}
{{/link-to}} {{/link-to}}
@ -29,7 +18,6 @@
</p> </p>
</div> </div>
<div class="flakes-content"> <div class="flakes-content">
<div class="flakes-mobile-top-bar"> <div class="flakes-mobile-top-bar">
<a href="" class="logo-wrap"> <a href="" class="logo-wrap">

View file

@ -1,23 +0,0 @@
<p class="flakes-message information">This is here for debugging, this page will be deleted.</p>
<div class="grid-1">
{{#each}}
<div class="span-1">
<fieldset class="read-only-information">
<legend>{{genusName}}</legend>
<dl>
<dt>Created</dt>
<dd>{{createdAt}}</dd>
</dl>
<dl>
<dt>Updated</dt>
<dd>{{updatedAt}}</dd>
</dl>
<dl>
<dt>Deleted</dt>
<dd>{{deletedAt}}</dd>
</dl>
</fieldset>
</div>
{{/each}}
</div>

View file

@ -1,51 +0,0 @@
<div class="grid-1">
<div class="span-1">
<fieldset class="read-only-information">
<legend>{{id}}</legend>
<dl>
<dt>Strain</dt>
<dd>{{strain.strainName}}</dd>
</dl>
<dl>
<dt>Characteristic</dt>
<dd>{{characteristicId}}</dd>
</dl>
<dl>
<dt>Text Measurement Type</dt>
<dd>{{textMeasurementTypeId}}</dd>
</dl>
<dl>
<dt>Text Value</dt>
<dd>{{txtValue}}</dd>
</dl>
<dl>
<dt>Numerical Value</dt>
<dd>{{numValue}}</dd>
</dl>
<dl>
<dt>Confidence Interval</dt>
<dd>{{confidenceInterval}}</dd>
</dl>
<dl>
<dt>Unit Type</dt>
<dd>{{unitTypeId}}</dd>
</dl>
<dl>
<dt>Notes</dt>
<dd>{{notes}}</dd>
</dl>
<dl>
<dt>Test Method</dt>
<dd>{{testMethodId}}</dd>
</dl>
<dl>
<dt>Created</dt>
<dd>{{createdAt}}</dd>
</dl>
<dl>
<dt>Updated</dt>
<dd>{{updatedAt}}</dd>
</dl>
</fieldset>
</div>
</div>

View file

@ -1,41 +0,0 @@
<div class="grid-1">
{{#each}}
<div class="span-1">
<fieldset class="read-only-information">
<legend>{{speciesName}}</legend>
<dl>
<dt>Id</dt>
<dd>{{id}}</dd>
</dl>
<dl>
<dt>Genus</dt>
<dd>{{genus.genusName}}</dd>
</dl>
<dl>
<dt>Species</dt>
<dd>{{speciesName}}</dd>
</dl>
<dl>
<dt>Strains</dt>
<dd>
{{#each strains}}
{{strainName}}
{{/each}}
</dd>
</dl>
<dl>
<dt>Created</dt>
<dd>{{createdAt}}</dd>
</dl>
<dl>
<dt>Updated</dt>
<dd>{{updatedAt}}</dd>
</dl>
<dl>
<dt>Deleted</dt>
<dd>{{deletedAt}}</dd>
</dl>
</fieldset>
</div>
{{/each}}
</div>

View file

@ -1,109 +0,0 @@
<div class="grid-1">
<div class="span-1">
<fieldset class="flakes-information-box">
<legend>{{strainName}}</legend>
<div class="grid-9">
<dl class="span-3">
<dt>Species</dt>
<dd>{{species.speciesName}}</dd>
</dl>
<dl class="span-3">
<dt>Strain</dt>
<dd>{{strainName}}</dd>
</dl>
<dl class="span-3">
<dt>Type</dt>
<dd>{{strainType}}</dd>
</dl>
</div>
<div class="grid-9">
<dl class="span-3">
<dt>Accession Banks</dt>
<dd>{{accessionBanks}}</dd>
</dl>
<dl class="span-3">
<dt>Genbank EMBL DDB</dt>
<dd>{{genbankEmblDdb}}</dd>
</dl>
<dl class="span-3">
<dt>Isolated From</dt>
<dd>{{isolatedFrom}}</dd>
</dl>
</div>
<dl>
<dt>Etymology</dt>
<dd>{{etymology}}</dd>
</dl>
<div class="grid-9">
<dl class="span-3">
<dt>Created</dt>
<dd>{{createdAt}}</dd>
</dl>
<dl class="span-3">
<dt>Updated</dt>
<dd>{{updatedAt}}</dd>
</dl>
<dl class="span-3">
<dt>Deleted</dt>
<dd>{{null-time deletedAt}}</dd>
</dl>
</div>
</fieldset>
</div>
<div>
<h2>Measurements</h2>
{{#each measurements}}
<div class="grid-1">
<div class="span-1">
<fieldset class="flakes-information-box">
<legend>{{characteristic.characteristicName}}</legend>
<div class="grid-8">
<dl class="span-4">
<dt>Text Measurement Type</dt>
<dd>{{textMeasurementTypeId}}</dd>
</dl>
<dl class="span-4">
<dt>Text Value</dt>
<dd>{{txtValue}}</dd>
</dl>
</div>
<div class="grid-9">
<dl class="span-3">
<dt>Numerical Value</dt>
<dd>{{numValue}}</dd>
</dl>
<dl class="span-3">
<dt>Confidence Interval</dt>
<dd>{{confidenceInterval}}</dd>
</dl>
<dl class="span-3">
<dt>Unit Type</dt>
<dd>{{unitTypeId}}</dd>
</dl>
</div>
<div class="grid-8">
<dl class="span-4">
<dt>Notes</dt>
<dd>{{notes}}</dd>
</dl>
<dl class="span-4">
<dt>Test Method</dt>
<dd>{{testMethodId}}</dd>
</dl>
</div>
<div class="grid-8">
<dl class="span-4">
<dt>Created</dt>
<dd>{{createdAt}}</dd>
</dl>
<dl class="span-4">
<dt>Updated</dt>
<dd>{{updatedAt}}</dd>
</dl>
</div>
</fieldset>
</div>
</div>
{{/each}}
</div>
</div>

View file

@ -1,6 +0,0 @@
<h2>Strains</h2>
<ul>
{{#each}}
<li>{{#link-to 'strain' this}}{{strainName}}{{/link-to}}</li>
{{/each}}
</ul>

View file

@ -35,8 +35,8 @@
"ember-cli-uglify": "1.0.1", "ember-cli-uglify": "1.0.1",
"ember-data": "1.0.0-beta.15", "ember-data": "1.0.0-beta.15",
"ember-export-application-global": "^1.0.2", "ember-export-application-global": "^1.0.2",
"express": "^4.8.5", "express": "^4.12.3",
"glob": "^4.0.5", "glob": "^4.5.3",
"morgan": "^1.5.1" "morgan": "^1.5.2"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -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);
};

View file

@ -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);
};

View file

@ -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);
};

View file

@ -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);
};