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

18 lines
449 B
JavaScript

import RepositoryService from 'consul-ui/services/repository';
const modelName = 'node';
export default RepositoryService.extend({
getModelName: function() {
return modelName;
},
findLeader: function(dc, configuration = {}) {
const query = {
dc: dc,
};
if (typeof configuration.refresh !== 'undefined') {
query.uri = configuration.uri;
}
return this.store.queryLeader(this.getModelName(), query);
},
});