-
Notifications
You must be signed in to change notification settings - Fork 356
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
Containers Dashboard: Show hourly and realtime trends #519
Conversation
7392ace
to
4574849
Compare
@miq-bot add_label enhancement, compute/containers |
@zakiva I see that in the screenshot you have an example of last 24 hours (constructed from hourly I suppose). Do you have also a screenshot of the graphs constructed from the "realtime" metrics? |
Correct.
Sure, I'll add it in the description. |
if (data.ems_utilization.interval_name != "daily") { | ||
$scope.cpuUsageSparklineConfig.tooltipFn = chartsMixin.hourlyTimeTooltip; | ||
$scope.memoryUsageSparklineConfig.tooltipFn = chartsMixin.hourlyTimeTooltip; | ||
if (data.ems_utilization.interval_name == "hourly") { |
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.
nested if's are not nice :-( can you use something like ?
a. a hash { 'daily': { __('Last ...'), __( ... ), 'hourly': { ...} ... } }
b. switch (data.ems_utilization.interval_name) ...
c one level if
's
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.
fixed
dataName : __('KBps'), | ||
tooltipFn : hourlyTimeTooltip | ||
}, | ||
realtimeNetworkUsageConfig: { |
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.
can we use here the same NetworkUsageConfig
struct and just change timeFrame
when we know witch one we use ?
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.
done, thanks
} | ||
end | ||
|
||
def hourly_ems_utilization |
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.
the realtime_ems_utilization
and hourly_ems_utilization
methods look suspiciously the same, can you do one function that take the time_frame
(hour or minute) as a parameter ?
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.
Looked at it again with @zakiva, merging this two function will be equally problematic ... 👍 i'm ok with the way it is :-)
4574849
to
1f63deb
Compare
Checked commit zakiva@1f63deb with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/services/container_dashboard_service.rb
|
My way of testing this screens is using a script to fill up random data: Or a script to read real metrics from providers: @zakiva @simon3z testing the UI parts that depend on metrics collection is a problem, |
@yaacov aah, you and your cool scripts again :) Thanks! (Though, bugreport: So.. Are we waiting for other reviews or should I just merge? |
Relevant BZ is: https://bugzilla.redhat.com/show_bug.cgi?id=1425221
LGTM 👍 ready for merge @miq-bot assign himdel |
@zakiva it seems that in the case of realtime metrics you're having too many squares in the nodes heatmaps CPU/Memory (check the number of nodes and the number of squares): This issue was present also in your screenshot above. Let's fix this before becomes a bug. |
In case that daily trends are not available, we would like to display hourly trends (last 24 hours) if available, or realtime trends (last 10 minutes) instead.
For Image Usage and Pod Creation and Deletion cards I added only hourly trends as we still don't collect the relevant realtime data in the Metric table. This can be added in a follow-up PR once we have the backend functionality.