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

Add support for monitoring selection in UI #1501

Merged
merged 2 commits into from Aug 30, 2017

Conversation

nimrodshn
Copy link
Contributor

Add support for "monitoring selection" in the UI as well as "Prometheus" time series db when adding a new provider.
screencast_06-07-2017_07-15-52 pm

cc: @simon3z @moolitayer @yaacov

@nimrodshn
Copy link
Contributor Author

@miq-bot add_label providers/containers

@miq-bot
Copy link
Member

miq-bot commented Jun 7, 2017

@nimrodshn Cannot apply the following label because they are not recognized: providers/containers

@moolitayer
Copy link

@nimrodshn 🎉 cool!

Please add a print of the endpoint you get from this
(connection_configurations is better actually)

@miq-bot
Copy link
Member

miq-bot commented Jun 7, 2017

This pull request is not mergeable. Please rebase and repush.

@nimrodshn
Copy link
Contributor Author

@moolitayer Here you go :
screenshot from 2017-06-07 19-47-56

@nimrodshn nimrodshn force-pushed the support_metrics_dropdown branch 3 times, most recently from 08dbde6 to 6a9f6a0 Compare June 8, 2017 04:20
@yaacov
Copy link
Member

yaacov commented Jun 8, 2017

@simon3z @moolitayer @nimrodshn

Nice, IMHO wrongly implemented.

Kubernetes and Openshift providers should have properties that set the preferred endpoint for each monitoring task, e.g. charts/reports, alerts and logging,

For example if we have a cluster with Prometheus for volatile metrics and alerts, InfoDB for metrics (hourly / dailiy rollups reports and charting) and ElasticSearch for logging, we should have properties in the provider that set the preferred endpoint for each task ( reports, alerts and logging )

This implementation adds this properties to the endpoint, IMHO this is wrong, this new property belongs to the provider, the UI should reflect that, the new drop down should move up, to the provider properties area.

@nimrodshn
Copy link
Contributor Author

nimrodshn commented Jun 8, 2017

Nice, IMHO wrongly implemented.

I tend to agree with @yaacov on this. (Although you mean 'wrong design' and not implemented, I think..)
@moolitayer @simon3z opinions?

@moolitayer
Copy link

moolitayer commented Jun 8, 2017

The selection should be under monitoring and not in the provider section.

  1. other providers

manageiq cloud providers

manageiq infrastructure providers

  1. If the argument is "we can have a complex environment so the selection needs to be in the top section"
  • the environment might become simpler (e.g we will probably end up with one option for our monitoring manager)
  • lets imagine what you are describing "in the future". assume we have you have lets say 2 options for logging and 2 for monitoring how is that simpler to have 4 options in the top section then 2 and 2 under the relevant tabs?

@nimrodshn
Copy link
Contributor Author

@moolitayer - so in you're view we would add more "tabs" alongside 'monitoring' instead of making more drop downs at the provider section / adding options to an existing drop down in the provider section? Okay this makes sense to me.

The only thing is - if the selection is at the top we can "eliminate" irrelevant tabs when selection is marked "disabled" which could be helpful when we have a complex environment. But, I get what your'e saying.

@simon3z
Copy link
Contributor

simon3z commented Jun 8, 2017

Few comments based on the gif image:

  1. <Choose> and Disabled are redundant, please just have Disabled
  2. I see that the default port for Prometheus is 80, what about SSL?

@moolitayer
Copy link

I would argue removing tabs is more confusing but we can avoid that since we have a precedence for exactly that in ManageIQ: the vCloud screenshot I attached above.

@yaacov
Copy link
Member

yaacov commented Jun 8, 2017

@simon3z @moolitayer @nimrodshn

a. we can add the property :monitoring_endpoint => prometheus/hawkular/none to the provider
b. we can add to each new endpoint the property :default_monitor_endpoint => true/false

@simon3z please advice, @moolitayer @nimrodshn and me discussed this, and we need a new look at this.

@simon3z
Copy link
Contributor

simon3z commented Jun 8, 2017

a. we can add the property :monitoring_endpoint => prometheus/hawkular/none to the provider
b. we can add to each new endpoint the property :default_monitor_endpoint => true/false

@nimrodshn @moolitayer @yaacov I don't think either is needed. An OpenShift provider would have just one prometheus or hawkular endpoint so no need to mark anything as default.

@nimrodshn
Copy link
Contributor Author

@simon3z fixed -
I dropped the 'Choose' on the drop down and added SSL as a default for security protocol - same as in Hawkular.
screenshot from 2017-06-08 17-39-04
screenshot from 2017-06-08 17-39-09

@simon3z
Copy link
Contributor

simon3z commented Jun 8, 2017

@nimrodshn @moolitayer @yaacov I don't think either is needed. An OpenShift provider would have just one prometheus or hawkular endpoint so no need to mark anything as default.

@nimrodshn @moolitayer now that I spoke to @yaacov and I understood what the question was about. I have no strong feelings. I guess we'll follow other providers for consistency on this one. Otherwise we'll let the UI/UX maintainers decide.

@nimrodshn
Copy link
Contributor Author

@simon3z I agree with you, could go both ways - but we should be consistent like @moolitayer stated.

@yaacov
Copy link
Member

yaacov commented Jun 8, 2017

but we should be consistent like @moolitayer stated

@nimrodshn In all providers, properties that belong to the provider ( e.g. the endpoint used for ... ) are on the top area.

Since the type of metrics collection used is part of the provider properties, it should be on the top area like in all other providers.

If it was a question of endpoint exist or not is should be on the endpoint area, like in the screenshoots @moolitayer provided

@yaacov
Copy link
Member

yaacov commented Jun 8, 2017

In cloud infrastructure, the "type" property of the provider, changes the possible endpoints, just like here, the "monitoring" property of the provider change the possible endpoint from default, hawkular to default, prometheus or just default.

gifrecord_2017-06-08_182336

@nimrodshn
Copy link
Contributor Author

@simon3z @yaacov @moolitayer FYI
screencast_06-08-2017_06-51-20 pm

@yaacov
Copy link
Member

yaacov commented Jun 8, 2017

FYI
@nimrodshn @simon3z @moolitayer , Thanks, looks much cleaner now.

@nimrodshn nimrodshn force-pushed the support_metrics_dropdown branch 2 times, most recently from a2090f0 to b018135 Compare June 8, 2017 16:31
@nimrodshn nimrodshn force-pushed the support_metrics_dropdown branch 13 times, most recently from 192df81 to eeb83d8 Compare August 29, 2017 16:31
@yaacov
Copy link
Member

yaacov commented Aug 29, 2017

@nimrodshn you can squash ... I asked you not to squash, because I thought the second commit is only the js function that use the ugly element.hide thing, I see that it include lots of unrelated stuff, no need to keep separate.

some refactoring

further refactoring

further changes to ui for support

refactoring

moved the drop down to the provider section

further refactoring

further refactoring

further refactoring

add refactoring for support

further support for edit

Fixing specs and some refactoring

minor refactoring

some refactoring

minor fixes in design

Refactoring and renaming

.

.

minor refactoring

changed retrieve_metrics_selection

refactored code: changed variable names to 'metric_' prefix and refactored 'retrieve_metrics' method

some refactoring

refactored code and tests

refactored code a bit

some refactoring

some refactoring

minor refactoring

refactored a bit

added authentication for prometheus

losed unneeded parantheses

refctored metricsStatusChanged

added cred type

fixed tab bug

moved metrics down

minor refactoring

using angular now

minor refactoring

minor refactoring to tabs

move from jquery to angular

moved from querySelector to id

refactor code

very good commit

refactored get route

usless assignment

bad refactor
Copy link
Member

@yaacov yaacov left a comment

Choose a reason for hiding this comment

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

LGTM

@miq-bot
Copy link
Member

miq-bot commented Aug 30, 2017

Checked commits nimrodshn/manageiq-ui-classic@39f61a0~...91e1e99 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
5 files checked, 0 offenses detected
Everything looks fine. 🍰

@yaacov
Copy link
Member

yaacov commented Aug 30, 2017

@h-kataria @himdel please review

@simon3z
Copy link
Contributor

simon3z commented Aug 30, 2017

@miq-bot assign himdel

@himdel
Copy link
Contributor

himdel commented Aug 30, 2017

Code looks good, it can even correctly show prometheus conf when editing a provider which uses it..

Merging 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants