f38a50b6b2
* fetch auth methods when going to the auth route and pass them to the auth form component * add boolean editType for form-fields * look in the data hash in the serializer * remove renderInPlace for info-tooltips as it does something goofy with widths * add new fields for auth methods * fix console refresh command on routes that use lazyPaginatedQuery * add wrapped_token param that logs you in via the token backend and show other backends if your list contains supported ones * handle casing when looking up supported backends * change listingVisibility to match the new API * move wrapped_token up to the vault route level so it works from the app root
22 lines
724 B
JavaScript
22 lines
724 B
JavaScript
import ApplicationSerializer from './application';
|
|
|
|
export default ApplicationSerializer.extend({
|
|
normalizeBackend(path, backend) {
|
|
let struct = { ...backend };
|
|
// strip the trailing slash off of the path so we
|
|
// can navigate to it without getting `//` in the url
|
|
struct.id = path.slice(0, -1);
|
|
struct.path = path;
|
|
return struct;
|
|
},
|
|
|
|
normalizeResponse(store, primaryModelClass, payload, id, requestType) {
|
|
const isCreate = requestType === 'createRecord';
|
|
const backends = isCreate
|
|
? payload.data
|
|
: Object.keys(payload.data).map(path => this.normalizeBackend(path, payload.data[path]));
|
|
|
|
return this._super(store, primaryModelClass, backends, id, requestType);
|
|
},
|
|
});
|