consul/ui-v2/app/services/repository/node.js

18 lines
478 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;
},
findByLeader: function(dc) {
const query = {
dc: dc,
};
return get(this, 'store').queryLeader(this.getModelName(), query);
},
});