-
Notifications
You must be signed in to change notification settings - Fork 15
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
Domain events activity frontend #2841
Conversation
e0c8639
to
f50947e
Compare
9e9b8ad
to
31c277e
Compare
f50947e
to
a17a387
Compare
af2ba56
to
c009c8b
Compare
387465d
to
4814ab6
Compare
c009c8b
to
e3128a6
Compare
// Host events | ||
HEARTBEAT_FAILED, | ||
HEARTBEAT_SUCCEEDED, | ||
HOST_CHECKS_HEALTH_CHANGED, | ||
HOST_CHECKS_SELECTED, | ||
HOST_DEREGISTERED, | ||
HOST_DEREGISTRATION_REQUESTED, | ||
HOST_DETAILS_UPDATED, |
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.
Possible opportunity to evaluate openapi front-end code generation here?
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.
Could be an option indeed. Let's see how it evolves.
[HOST_ADDED_TO_CLUSTER]: 'Host Added to Cluster', | ||
[HEARTBEAT_FAILED]: 'Heartbeat Failed', | ||
[HEARTBEAT_SUCCEEDED]: 'Heartbeat Succeeded', | ||
[HOST_CHECKS_HEALTH_CHANGED]: 'Checks Health Changed', |
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.
This could potentially be a string manipulating function, I guess? Turning the event names into a string is a bit like writing a custom serializer, for the most part.
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 could be something like
const activityTypesLabels = _.fromPairs(
ACTIVITY_TYPES.map((type) => [
type,
type.split('_').map(_.capitalize).join(' '),
])
);
However I'd like to get some more feedback on the rendered entries in order to figure out the transformation rule.
Additionally let's take into account that there is not yet a consistent pattern throughout all the activity types. But we can improve as we proceed.
1304bbf
to
18a653f
Compare
18a653f
to
932ab4d
Compare
Description
Mapping messages/activity types/resources to the domain events activities in the UI.
I found it useful consolidating the mapping in one place.
As we iterate we'll figure out what kind of mapping should be moved from the frontend to the backend.
How was this tested?
Automated tests.