mirror of https://github.com/status-im/consul.git
21 lines
599 B
JavaScript
21 lines
599 B
JavaScript
import RepositoryService from 'consul-ui/services/repository';
|
|
import { inject as service } from '@ember/service';
|
|
import { get } from '@ember/object';
|
|
const modelName = 'node';
|
|
export default RepositoryService.extend({
|
|
coordinates: service('repository/coordinate'),
|
|
getModelName: function() {
|
|
return modelName;
|
|
},
|
|
findBySlug: function(slug, dc) {
|
|
return this._super(...arguments).then(node => {
|
|
return get(this, 'coordinates')
|
|
.findAllByDatacenter(dc)
|
|
.then(function(res) {
|
|
node.Coordinates = res;
|
|
return node;
|
|
});
|
|
});
|
|
},
|
|
});
|