You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui-v2/app/services/repository/node.js

18 lines
449 B

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);
},
});