-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Added replica set card status messages #319
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
Conversation
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.
Current coverage is
|
76cb8ee
to
7099b41
Compare
Re icon: anything worth using on material icons? E.g., https://design.google.com/icons/#ic_timelapse ? |
Or something from the notification list? https://design.google.com/icons/ |
Re performance: It seems that for every card we query for events. I think it was supposed to query for events only when not all pods are running. Am I correct? Sample log:
|
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.
Hey, now instead of one api call we have N api calls. Please fix :)
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.
There are N api calls even now. I've only refactored it and extracted function.
https://github.com/kubernetes/dashboard/blob/master/src/app/backend/events.go#L149
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.
Oh, yes. Sorry. Can you add a todo so that we know what to fix?
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.
Sure. This PR is quite big so i will do that in next PR.
Check my initial comment :)
You can check if they are empty on replica set detail events tab. If there will be no warning icons then it means that event types are empty and no errors can be recognized. |
This may be misleading, because log info is on the start of function and then in the function itself is check whether pod is in some fail state in order to get events. |
fd4c4cb
to
847c450
Compare
I couldn't find anything better than timelapse, so I've used it. |
src/app/backend/replicasetcommon.go
Outdated
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.
Should it be public?
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.
No need IMO
I've changed some comments and renamed functions. PTAL |
src/app/backend/replicasetcommon.go
Outdated
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.
Hmm.... I'd reverse this statement. The reason is that if new status is added, the function will be broken. If you list running and success here, then everything would be fine.
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.
Makes sense.
The icons need some kind of tooltip that explain what they mean. I.e., the timelapse icon should have description that says that some pods are pending. |
Hmm.. I'm running on a "real" cluster and I still see this as pending. We should fix this, IMO. How about some kind of heuristics? I.e., when there is no event type, then check whether reason has |
I've extracted new functions to new file. It feels more related to events than to replicasetcommon. I need to adjust some comments only, but you can take a look. |
src/app/backend/eventscommon.go
Outdated
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.
Hmm... This is equivalent to checking for only first event's type. How about for every event you check whether it has type or not. This is the way we should do this, because, I imagine, that some events have type and some not.
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.
I think that if api will fill one event type then it will fill it for all events, but just to be extra safe I'll change.
Btw, I tested this on my instance. The tool we're building looks better and better! :) |
We need some more tests on the backend and everything else looks good. |
28911c9
to
ffe7854
Compare
This PR has grown quite big :). PTAL |
src/app/frontend/chrome/chrome.scss
Outdated
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.
I dont think this should be $secondary
. It is a coincidence that our secondary color is red. It was pink not so long ago.
This should have color of {{warn-A700}} as defined, e.g., here: https://github.com/angular/material/blob/1f997951b5d480d04ea7d356107837e279d6a271/src/components/input/input-theme.scss#L70
Last two comments and LGTM. |
Should we merge this after replica set renaming? I think yes. |
Fixed
Unfortunately yes. Conflicts are going to kill me for sure :) |
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 ok?
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.
Ok, so LGTM on this. Let's wait for the rename to be done, and you'll rebase. Hopefully, without many problems :) |
Rebase please :) |
e179100
to
68c7c96
Compare
I really hope that I've merged it correctly :) |
LGTM, nice job! Tested on prod, works like a charm. Merging. |
Added replica set card status messages
This is the current look of the card status. I've also done some refactoring during backend implementation.
I've had a problem with cluster started with
gulp local-up-cluster
. Events returned by it has emptyType
property. No idea why. It works fine on my local cluster started from kubernetes repo fork.Important: Need help in finding
Pending
icon. :)@maciaszczykm @bryk PTAL