Skip to content
Snippets Groups Projects
Commit f3747376 authored by Mathis Neumann's avatar Mathis Neumann
Browse files

add models and adapter

parent 5be93b14
No related branches found
No related tags found
No related merge requests found
import RESTAdapter from 'ember-data/adapters/rest';
export default RESTAdapter.extend({
host: 'http://localhost:3000',
namespace: 'v1'
});
\ No newline at end of file
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
export default Model.extend({
// id: attr('string') - not allowed to be listed by ember
});
import BaseEntity from './baseentity.js';
import attr from 'ember-data/attr';
export default BaseEntity.extend({
system: attr('string'), // TODO: relation?
technology: attr('string'),
source: attr(), // FIXME relation
target: attr(), // FIXME relation
instances: attr(), // FIXME relation
});
import BaseEntity from './baseentity.js';
import attr from 'ember-data/attr';
export default BaseEntity.extend({
source: attr(), // FIXME relation
target: attr(), // FIXME relation
communication: attr(), // FIXME relation
});
import BaseEntity from './baseentity.js';
import attr from 'ember-data/attr';
export default BaseEntity.extend({
name: attr(), // FIXME relation
services: attr(), // FIXME relation
ip: attr('string'),
hostname: attr('string'),
group: attr('string'), // TODO: relation?
});
import BaseEntity from './baseentity.js';
import attr from 'ember-data/attr';
export default BaseEntity.extend({
name: attr('string'),
system: attr(), // FIXME relation
nodes: attr() // FIXME relation
});
import BaseEntity from './baseentity.js';
import attr from 'ember-data/attr';
export default BaseEntity.extend({
name: attr('string'),
system: attr(), // FIXME relation
description: attr('string')
});
import BaseEntity from './baseentity.js';
import attr from 'ember-data/attr';
export default BaseEntity.extend({
name: attr('string'),
node: attr(), // FIXME relation
service: attr() // FIXME relation
});
import BaseEntity from './baseentity';
import attr from 'ember-data/attr';
export default BaseEntity.extend({
name: attr('string'),
nodeGroups: attr('string'), // FIXME relation
communications: attr('string'), // FIXME relation
services: attr('string') // FIXME relation
});
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return this.store.findAll('system').then((systems) => {
console.log('loaded systems', systems)
return systems;
});
}
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment