mirror of https://github.com/hashicorp/consul
15 lines
332 B
JavaScript
15 lines
332 B
JavaScript
import RepositoryService from 'consul-ui/services/repository';
|
|
|
|
const modelName = 'node';
|
|
export default RepositoryService.extend({
|
|
getModelName: function() {
|
|
return modelName;
|
|
},
|
|
findByLeader: function(dc) {
|
|
const query = {
|
|
dc: dc,
|
|
};
|
|
return this.store.queryLeader(this.getModelName(), query);
|
|
},
|
|
});
|