diff --git a/app/adapters/application.js b/app/adapters/application.js new file mode 100644 index 0000000000000000000000000000000000000000..e93e85975ad9d689c9b5905f27644c01d1570cdf --- /dev/null +++ b/app/adapters/application.js @@ -0,0 +1,6 @@ +import RESTAdapter from 'ember-data/adapters/rest'; + +export default RESTAdapter.extend({ + host: 'http://localhost:3000', + namespace: 'v1' +}); \ No newline at end of file diff --git a/app/models/baseentity.js b/app/models/baseentity.js new file mode 100644 index 0000000000000000000000000000000000000000..dc29a6284be5a351ccfe64c1e704c59048871134 --- /dev/null +++ b/app/models/baseentity.js @@ -0,0 +1,6 @@ +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 +}); diff --git a/app/models/communication.js b/app/models/communication.js new file mode 100644 index 0000000000000000000000000000000000000000..74f799d1332a874c3d810b6c0be7ee677550b775 --- /dev/null +++ b/app/models/communication.js @@ -0,0 +1,10 @@ +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 +}); diff --git a/app/models/communicationInstance.js b/app/models/communicationInstance.js new file mode 100644 index 0000000000000000000000000000000000000000..352267c8da63b0ba0123d4e700e4483a87c00c5b --- /dev/null +++ b/app/models/communicationInstance.js @@ -0,0 +1,8 @@ +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 +}); diff --git a/app/models/node.js b/app/models/node.js new file mode 100644 index 0000000000000000000000000000000000000000..05953175fa1ab2d40bdaa1ea8562adcebab30c68 --- /dev/null +++ b/app/models/node.js @@ -0,0 +1,10 @@ +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? +}); diff --git a/app/models/nodeGroup.js b/app/models/nodeGroup.js new file mode 100644 index 0000000000000000000000000000000000000000..23355b345b3eaa92f37e8d48f297a07e07415c6c --- /dev/null +++ b/app/models/nodeGroup.js @@ -0,0 +1,8 @@ +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 +}); diff --git a/app/models/service.js b/app/models/service.js new file mode 100644 index 0000000000000000000000000000000000000000..68e6a4bf852aa0b3874ccf8eb8c2b7951c9535a8 --- /dev/null +++ b/app/models/service.js @@ -0,0 +1,8 @@ +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') +}); diff --git a/app/models/serviceInstance.js b/app/models/serviceInstance.js new file mode 100644 index 0000000000000000000000000000000000000000..8bb57a8d89eabb86a5080cd035be9d3f3f58b866 --- /dev/null +++ b/app/models/serviceInstance.js @@ -0,0 +1,8 @@ +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 +}); diff --git a/app/models/system.js b/app/models/system.js new file mode 100644 index 0000000000000000000000000000000000000000..dd31943eb2f61a3378584a13762b4d2e311dc506 --- /dev/null +++ b/app/models/system.js @@ -0,0 +1,9 @@ +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 +}); diff --git a/app/routes/cytoscape.js b/app/routes/cytoscape.js new file mode 100644 index 0000000000000000000000000000000000000000..8490ad185be806404e849218ce9f6009830e2093 --- /dev/null +++ b/app/routes/cytoscape.js @@ -0,0 +1,10 @@ +import Ember from 'ember'; + +export default Ember.Route.extend({ + model() { + return this.store.findAll('system').then((systems) => { + console.log('loaded systems', systems) + return systems; + }); + } +});