Skip to content
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

ui: HealthCheck Search/Sort/Filtering #9314

Merged
merged 14 commits into from
Dec 7, 2020

Conversation

johncowen
Copy link
Contributor

This PR adds search, sort and filtering to the healthcheck tabs in both Node and ServiceInstance views.

In doing this, we added a new HealthCheck model fragment and stitched ServiceInstances and their ProxyServiceInstances together a little more - ProxyServiceInstances are now a JS instance of our Proxy model (soon to be renamed ProxyInstance) which inherits from a our ServiceInstance model, this means that ProxyServiceInstances now take on the properties of the responses of both the API endpoint we use for proxy meta endpoint and the API endpoint we use for service instance endpoint.

We also added some further computed properties onto these models (ServiceInstance.MeshChecks, .HealthCheck.Exposable and .HealthCheck.Exposed)

Lastly a tiny addition here is that we noticed that a HealthCheck can have an empty Type (""), which seems to be only for the serf related healthchecks that Consul automatically adds to services, so we filled in the Type in the template with serf when its blank.

@johncowen johncowen added theme/ui Anything related to the UI backport/1.9 labels Dec 2, 2020
@johncowen johncowen requested a review from kaxcode December 2, 2020 15:01
@johncowen johncowen marked this pull request as draft December 2, 2020 15:40
@johncowen
Copy link
Contributor Author

I have a weird failing test here, converted to draft whilst I sort it out

@johncowen johncowen marked this pull request as ready for review December 3, 2020 15:32
@johncowen
Copy link
Contributor Author

@kaxcode just a quick ping to say this is ready for review now 🙇

getModelName() {
return modelName;
}

findByService(slug, dc, nspace, configuration = {}) {
async findByService(slug, dc, nspace, configuration = {}) {
Copy link
Contributor

@kaxcode kaxcode Dec 4, 2020

Choose a reason for hiding this comment

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

are we using the async in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we pretty much went to 'we are an ES6 project now' with that native class codemod we did, so I'm trying to add async style to things as I go. If I happen to be working on something else and need to touch a file, I'll update what is straightforwards to async, unless there's a specific reason not to.

Copy link
Contributor

@kaxcode kaxcode left a comment

Choose a reason for hiding this comment

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

👍 quick question about async, but LGTM

@johncowen
Copy link
Contributor Author

quick question about async, but LGTM

@kaxcode did you mean to approve this?

@johncowen johncowen merged commit 2061bff into master Dec 7, 2020
@johncowen johncowen deleted the ui/feature/health-check-search-sort branch December 7, 2020 09:14
@hashicorp-ci
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/292828.

@hashicorp-ci
Copy link
Contributor

🍒✅ Cherry pick of commit 2061bff onto release/1.9.x succeeded!

hashicorp-ci pushed a commit that referenced this pull request Dec 7, 2020
* Adds model layer changes around HealthChecks

1. Makes a HealthCheck model fragment and uses it in ServiceInstances and
Nodes
2. Manually adds a relationship between a ServiceInstance and its
potential ServiceInstanceProxy
3. Misc changes related to the above such as an Exposed property on
MeshChecks, MeshChecks itself

* Add a potential temporary endpoint to distinguish ProxyServiceInstance

* Fix up Node search bar class

* Add search/sort/filter logic

* Fixup Service default sort key

* Add Healthcheck search/sort/filtering

* Tweak CSS add a default Type of 'Serf' when type is blank

* Fix up tests and new test support

* Add ability to search on Service/Node name depending on where you are

* Fixup CheckID search predicate

* Use computed for DataCollection to use caching

* Alpha sort the Type menu

* Temporary fix for new non-changing style Ember Proxys

* Only special case EventSource proxies
@mikemorris
Copy link
Contributor

Should this have had a changelog entry?

@johncowen
Copy link
Contributor Author

johncowen commented Jan 8, 2021

Not necessarily this PR exactly, but maybe a bunch of PRs (which are still ongoing) under 'redesigned search/sort/filtering' or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants