-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(softTenants): add softTenant ids to assets measures documents #383
Changes from all commits
35e6324
5084a45
4b549f0
fd1d271
48d034c
1d6d203
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"javascript.preferences.quoteStyle": "double", | ||
"exportall.config.quote": "\"", | ||
"exportall.config.relExclusion": [ | ||
"/lib/modules/shared/exports.ts", | ||
"/lib/modules/shared/types/exports.ts" | ||
] | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,9 +62,7 @@ export class AssetsController { | |
}, | ||
upsert: { | ||
handler: this.upsert.bind(this), | ||
http: [ | ||
{ path: "device-manager/:engineId/assets/:_id", verb: "post" }, | ||
], | ||
http: [{ path: "device-manager/:engineId/assets", verb: "put" }], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a breaking API change, this should be marked as such in the commits and lead to a semver-major release. |
||
}, | ||
delete: { | ||
handler: this.delete.bind(this), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,10 @@ export const assetsMappings: CollectionMappings = { | |
date: { type: "date" }, | ||
}, | ||
}, | ||
|
||
softTenant: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So there could be only 1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, but it's currently implemented like that and change this need a migration of database so it's breaking if we change to pluralize now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Elasticsearch doesn't have array types in mappings, an object and an array of objects will have the exact same mapping definition. |
||
type: "keyword", | ||
fields: { text: { type: "text" } }, | ||
}, | ||
metadata: { | ||
properties: { | ||
// populated with asset models | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,9 +64,7 @@ export class DevicesController { | |
}, | ||
upsert: { | ||
handler: this.upsert.bind(this), | ||
http: [ | ||
{ path: "device-manager/:engineId/devices/:_id", verb: "post" }, | ||
], | ||
http: [{ path: "device-manager/:engineId/devices", verb: "put" }], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a breaking API change, this should be marked as such in the commits and lead to a semver-major release. |
||
}, | ||
replaceMetadata: { | ||
handler: this.replaceMetadata.bind(this), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./SchemaValidationError"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
export * from "./types/DigitalTwinContent"; | ||
export * from "./types/DigitalTwinEvents"; | ||
export * from "./types/DigitalTwinMeasures"; | ||
export * from "./types/Metadata"; | ||
export * from "./types/EmbeddedMeasure"; | ||
export * from "./types/exports"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
export * from "./Module"; | ||
export * from "./errors"; | ||
export * from "./services"; | ||
export * from "./types/DigitalTwinApi"; | ||
export * from "./types/DigitalTwinContent"; | ||
export * from "./types/DigitalTwinEvents"; | ||
export * from "./types/DigitalTwinMeasures"; | ||
export * from "./types/EmbeddedMeasure"; | ||
export * from "./types/KuzzleRole"; | ||
export * from "./types/Metadata"; | ||
export * from "./utils/flattenObject"; | ||
export * from "./utils/keepStack"; | ||
export * from "./utils/lock"; | ||
export * from "./utils/objectDiff"; | ||
export * from "./types"; | ||
export * from "./utils"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MeasureDefinition } from "../../measure"; | ||
import { AssetModelDefinition, DeviceModelDefinition } from "../../model"; | ||
|
||
interface ModelDefinition<Definition> { | ||
/** | ||
* Name of model | ||
*/ | ||
modelName: string; | ||
/** | ||
* Model definition used by the plugin to create associated ressources | ||
* and updates mappings. | ||
*/ | ||
definition: Definition; | ||
} | ||
export type AssetModel = ModelDefinition<AssetModelDefinition>; | ||
export type DeviceModel = ModelDefinition<DeviceModelDefinition>; | ||
export type MeasureModel = ModelDefinition<MeasureDefinition>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export * from "./DigitalTwinContent"; | ||
export * from "./DigitalTwinEvents"; | ||
export * from "./DigitalTwinMeasures"; | ||
export * from "./EmbeddedMeasure"; | ||
export * from "./Metadata"; | ||
export * from "./Models"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export * from "./DigitalTwinApi"; | ||
export * from "./DigitalTwinContent"; | ||
export * from "./DigitalTwinEvents"; | ||
export * from "./DigitalTwinMeasures"; | ||
export * from "./EmbeddedMeasure"; | ||
export * from "./KuzzleRole"; | ||
export * from "./Metadata"; | ||
export * from "./Models"; | ||
export * from "./exports"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from "./AJValidator"; | ||
export * from "./flattenObject"; | ||
export * from "./keepStack"; | ||
export * from "./lock"; | ||
export * from "./objectDiff"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it normal for this file to be there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, It's useful to share basic VSCode settings.
Especially on certain repositories like this one which still have a specific configuration like double quote style instead of simple quote.
Maybe we should rationalize these types of configurations between project but that need a huge PR to reformat all code, to accepted style. So for the moment IMHO, it's the better solution to share these settings for contributors