open-vault/ui/app/serializers/metrics/config.js
Chelsea Shaw 27f6988c3f
Ui/pricing metrics page setup (#10049)
* Create model and adapter for metrics/activity

* Query activity and return fake data on adapterError

* Add stub of pricing metrics cards and search form elements to metrics template

* Metrics page has pricing metrics rather than all-time tokens and requests

* update metrics config model

* Add metrics-config route and page

* Remove metrics/http-requests route and template

* remove log

* Add alert banner for when tracking disabled, and add result dates

* Small edits
2020-10-01 14:37:33 -05:00

13 lines
424 B
JavaScript

import ApplicationSerializer from '../application';
export default ApplicationSerializer.extend({
normalizeResponse(store, primaryModelClass, payload, id, requestType) {
const normalizedPayload = {
id: payload.id,
...payload.data,
enabled: payload.data.enabled.includes('enabled') ? 'On' : 'Off',
};
return this._super(store, primaryModelClass, normalizedPayload, id, requestType);
},
});