open-consul/ui-v2/app/initializers/form.js
John Cowen 52a62f2b8d UI: New ACLs (#4789)
UI to accompany the new ACLs APIs
2018-10-19 08:45:05 -07:00

20 lines
468 B
JavaScript

import token from 'consul-ui/forms/token';
import policy from 'consul-ui/forms/policy';
export function initialize(application) {
// Service-less injection using private properties at a per-project level
const FormBuilder = application.resolveRegistration('service:form');
const forms = {
token: token(),
policy: policy(),
};
FormBuilder.reopen({
form: function(name) {
return forms[name];
},
});
}
export default {
initialize,
};