Closed johnpoth closed 4 years ago
I've just re-tested it and got the following issue:
I open the event tab. Then the events display correctly. I trigger an event. like scaling a deployment, then the new events display with undefined
.
I've tried to reproduce scaling deployments up and down without any luck. I'm wondering if this is specific to kamel-k that creates events but doesn't populate some standard fields (like namespace).
Out of curiosity, could you run describe
on one of those events ? I'm pretty sure some fields are undefined
which is what causes the rendering issues.
I think this raises an important case in that some fields aren't necessarily populated. As this will also be relevant in other Kubernetes Resources, I thought it would be okay to add a check in the listable
and table
blessed Prototypes. Added relevant commit. Thanks !
Awesome. Did you get a change to look at the status bar not displaying? Otherwise I think we can merge the PR and have a look afterwards.
Note to myself, check how sorting is implemented in:
$ kubectl get events --sort-by=.metadata.creationTimestamp
Let me resolve the conflicts and merge the PR!
For sure! I'm still working on handling <unknown>
last seen
values in some events camel-k sends. I can merge the work afterwards. Thanks !
@astefanutti resolved merge conflicts, I also pushed hanlding <unknown>
timestamps that should resolve the issue regarding the status bar you raised ? It needs some polishing but I think it's worth the effort especially if we are to reuse the timestamped columns for other resources. I'll try using the isValid
function from moment.js that should clean things up a bit. Thanks !
@johnpoth Thanks a lot! Let's merge the PR and iterate. Once it's polished enough, I'll cut a release with all the good stuff that has been done since 0.7.0.
This is a first stab at #36 to support events.
Hopefully we'll be able to reuse most of this for other resource types (via inheritance or composition).
We could also display a list of resource names similar to what we do for namespaces to support things like custom resources.
Once we agree on the display I'll polish things up a bit :)
HTH !
Note: I had to modify
lib/ui/blessed/element.js
for performance reasons.