@fleetbase/ember-core 0.3.20 → 0.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon/exports/host-services.js +1 -0
- package/addon/exports/services.js +1 -0
- package/addon/library/subject-custom-fields.js +1 -1
- package/addon/serializers/application.js +12 -0
- package/addon/services/chat.js +1 -1
- package/addon/utils/load-installed-extensions.js +1 -0
- package/package.json +1 -1
|
@@ -135,7 +135,7 @@ export default class SubjectCustomFields {
|
|
|
135
135
|
|
|
136
136
|
// If `fieldFor` is provided then we are fetching custom fields for resource and not an instance of something
|
|
137
137
|
// this means custom fields can be tied to individual resource instances OR tied to the schema of a resource kind
|
|
138
|
-
const fieldsQp = fieldFor ? { for: fieldFor } : { subject_uuid: subjectId };
|
|
138
|
+
const fieldsQp = fieldFor ? { for: fieldFor, limit: -1 } : { subject_uuid: subjectId, limit: -1 };
|
|
139
139
|
const fields = await this.store.query('custom-field', fieldsQp);
|
|
140
140
|
|
|
141
141
|
// retain on instance for getGroups/getFields()
|
|
@@ -4,6 +4,8 @@ import { underscore } from '@ember/string';
|
|
|
4
4
|
import normalizePolymorphicTypeWithinHash from '../utils/serialize/normalize-polymorphic-type-within-hash';
|
|
5
5
|
|
|
6
6
|
export default class ApplicationSerializer extends RESTSerializer {
|
|
7
|
+
readOnlyAttributes = ['slug'];
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
10
|
* Default primary keys to uuid
|
|
9
11
|
*
|
|
@@ -32,6 +34,8 @@ export default class ApplicationSerializer extends RESTSerializer {
|
|
|
32
34
|
serialize(snapshot) {
|
|
33
35
|
const json = super.serialize(...arguments);
|
|
34
36
|
|
|
37
|
+
this.removeReadOnlyAttributes(json);
|
|
38
|
+
|
|
35
39
|
// for each relationship make sure the id is set
|
|
36
40
|
snapshot.eachRelationship((key, relationship) => {
|
|
37
41
|
const { kind } = relationship.meta;
|
|
@@ -52,6 +56,14 @@ export default class ApplicationSerializer extends RESTSerializer {
|
|
|
52
56
|
return json;
|
|
53
57
|
}
|
|
54
58
|
|
|
59
|
+
removeReadOnlyAttributes(json = {}) {
|
|
60
|
+
this.readOnlyAttributes.forEach((attribute) => {
|
|
61
|
+
delete json[attribute];
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
/**
|
|
56
68
|
* Normalizes a part of the JSON payload returned by the server.
|
|
57
69
|
*
|
package/addon/services/chat.js
CHANGED
|
@@ -11,6 +11,7 @@ export default async function loadInstalledExtensions(additionalCoreEngines = []
|
|
|
11
11
|
'@fleetbase/iam-engine',
|
|
12
12
|
'@fleetbase/ledger-engine',
|
|
13
13
|
'@fleetbase/pallet-engine',
|
|
14
|
+
'@fleetbase/customer-portal-engine',
|
|
14
15
|
'@fleetbase/vroom-engine',
|
|
15
16
|
'@fleetbase/valhalla-engine',
|
|
16
17
|
...additionalCoreEngines,
|
package/package.json
CHANGED