Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

16 provide mapping UI for c8y hub events outbound #32

Merged
merged 10 commits into from
Dec 21, 2022

Conversation

hnaether-sag
Copy link
Collaborator

No description provided.

@hnaether-sag hnaether-sag linked an issue Dec 20, 2022 that may be closed by this pull request
@hnaether-sag
Copy link
Collaborator Author

Currently testing on pmt-training tenant. Conversion is working fine. Still todo is testing if flattening of attributes works.

Copy link
Member

@haraldmeyer haraldmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

@Value("${C8Y.tenant}")
private String tenant;

public EventRulesService() {}

private Map<String, Date> lastUpdateDatesCache = new HashMap<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Scheduled(fixedRate = 60000)
public void consumeC8YEvent() {
public void startListenersForEventMappings() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this renaming is appropriate anymore as we decided to not start listeners.

default:
return "";

public void listenForMapping(EventMapping mapping, List<ManagedObjectRepresentation> selectedDevices) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment above, we are not listening.

Comment on lines 112 to 131
mappings: IEventMapping[] = [
{
c8yEventType: "c8y_Position",
c8yFragments: ["foo", "bar"],
c8yDevices: ["2318011", "2318012", "44297003"],
enabled: false,
name: "Test",
id: "d982b35d-b932-432c-8cda-a604daac9137",
adamosEventType: "adamos:runstate:event:resource:stackLight:*:update:1",
},
{
c8yEventType: "c8y_Whatever",
c8yFragments: ["hans", "wurst"],
c8yDevices: ["2318011", "2318012", "44297003"],
enabled: false,
name: "Test2",
id: "d982b35d-b932-432c-8cda-a604daac9138",
adamosEventType: "adamos:runstate:event:resource:stackLight:*:update:2",
},
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why hardcoded values here?

@hnaether-sag hnaether-sag merged commit b579e72 into main Dec 21, 2022
@hnaether-sag hnaether-sag deleted the 16-provide-mapping-ui-for-c8y-hub-events-outbound branch December 21, 2022 13:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide mapping UI for C8Y -> Hub Events (outbound)
2 participants