-
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 Provider Dashboard conversion to use Angular/PF components #2499
Conversation
This pull request is not mergeable. Please rebase and repush. |
74a0235
to
ffac729
Compare
a52d2c5
to
6c99339
Compare
This pull request is not mergeable. Please rebase and repush. |
4db9581
to
812d450
Compare
@martinpovolny @himdel I recall we left off with this, wondering if the charts could be dynamically resized like the main dashboard. We'd like to do the same thing for all of the new angular dashboards. Is that something you could look at? I see for Cap & U it is handled here: https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/assets/javascripts/miq_c3.js |
07aa2d2
to
6da4a1d
Compare
@epwinchell please review commit with styling changes, i hope i didn't miss any from the patch you sent me. |
@h-kataria Tested. Looks fine. |
This pull request is not mergeable. Please rebase and repush. |
@himdel can you please review, let me know if this is still a valid/acceptable way to move forward with dashboard componentization work. |
6da4a1d
to
0f09aac
Compare
0429c8f
to
3c6a37a
Compare
@himdel please take a look, i have fixed the aggregate status card to show total counts/link of Providers on Containers Dashboard. This PR only affects All Containers Dashboard and individual Container Provider dashboard, all charts before/after on the above mentioned 2 types of dashboards look same to me. The only difference is layouts of charts which is intentional, goal is to keep all charts to same size so when we introduce drag/drop feature in future it wont cause any issues with regards to layouts. |
60905ee
to
e572339
Compare
Fixed existing spec test
e572339
to
e50a3be
Compare
Aah, makes sense, thanks :). Taking another look.. |
Issue I can still see:
EDIT: missing node utilization was a local problem, old metrics |
Oh, but the network utilization trend issue is probably easy, I can see an error in the console:
|
.spinner.spinner-lg.loading{"ng-if" => "!vm.loadingDone"} | ||
.row | ||
.col-xs-12.col-sm-12.col-md-12.col-lg-6.example-heatmap-container{"ng-repeat" => "(key, data) in vm.data"} | ||
%pf-heatmap{'ng-attr-id' => "{{data[0].id}}", "chart-title" => "key", "data" => "data", "chart-data-available" => "vm.dataAvailable", "show-legend" => "vm.showLegends", "legend-labels" => "vm.legendLabels", "max-block-size" => "20", "block-padding" => "5", "heatmap-color-pattern" => "vm.heatmapColorPattern", "thresholds" => "vm.thresholds", "click-action" => "vm.clickAction", "loading-done" => true} |
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.
"chart-data-available" => "vm.dataAvailable"
I think that's the problem - dataAvailable is true before the loading is done .. looks like you may want to use vm.dataAvailable && vm.loadingDone
here?
As for the font problem, that looks like a bug in the existing Soo.. diff --git a/app/views/static/pf_charts/aggregate-status-card.html.haml b/app/views/static/pf_charts/aggregate-status-card.html.haml
index ab86948cf..422cf8d21 100644
--- a/app/views/static/pf_charts/aggregate-status-card.html.haml
+++ b/app/views/static/pf_charts/aggregate-status-card.html.haml
@@ -23,12 +23,12 @@
%a{:href => "{{notification.href}}", "ng-if" => "notification.href"}
%image{"ng-if" => "notification.iconImage", "ng-src" => "{{notification.iconImage}}", :alt => "", :class => "card-pf-icon-image"}
%span{:class => "{{notification.iconClass}}"}
- {{ notification.count }}
+ {{ notification.count }}
%span{"ng-if" => "!notification.href"}
%image{"ng-if" => "notification.iconImage", "ng-src" => "{{notification.iconImage}}", :alt => "", :class => "card-pf-icon-image"}
%span{:class => "{{notification.iconClass}}"}
- {{ notification.count }}
+ {{ notification.count }}
%div{"ng-if" => "$ctrl.isMiniLayout", :class => "card-pf card-pf-aggregate-status card-pf-aggregate-status-mini", "ng-class" => "{'card-pf-accented': $ctrl.shouldShowTopBorder}"}
%h2{:class => "card-pf-title"} Should be closer |
Indeed, looks like with those 2 changes (aggregate and loadingDone):
|
@himdel, i will implement your suggestions and push those up in a few mins. |
@himdel for container detail - provider missing name -It has been a long time since this PR was created but as far as i remember removing the name was intentional as the name is already available in the breadcrumbs |
@himdel for container detail - numbers in alerts have wrong font (and the number should be there twice?) - it doesn't make sense to show same data/numbers twice on the card. |
Fixed heatmap loading so it loads charts everytime properly.
Checked commits h-kataria/manageiq-ui-classic@b630035~...c369f5c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 **
|
@himdel pushed a commit with suggested changes, all charts seem to be loading fine for me with the data i have. jest spec test failure seems to be unrelated to my changes. |
Agreed, seeing the same thing :) I think we're ready, sorry it took so long :). Confirming the jest failure is unrelated - #4371. |
@himdel thx for the merge. |
@@ -1,145 +0,0 @@ | |||
angular.module('miq.util').factory('chartsMixin', ['$document', function($document) { |
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.
Any reason for keeping this empty file?
@@ -1,4 +1,4 @@ | |||
angular.module('miq.util').factory('containerChartsMixin', ['pfUtils', function(pfUtils) { |
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.
So we are using this file over ems_common/charts-mixin
, that correct? because I noticed that this file is missing few configs that were present on the older one.
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.
chartsMixin
should be preferred. If this PR removed chartsMixin and replaced it with an older version, that's a mistake (bad rebase I'd guess?).
(But looks like we had 2 versions already for some reason - mixins/charts-mixin and ems_common/charts-mixin. All of those should definitely be unified.)
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.
You are right @himdel, I've heard about plans to unify the container with the other providers, so I won't touch it 😅, will just rollback the chartsMixin
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.
Thanks @felipedf .. feel free to touch it enough so that you don't see any more breakages ;)
I'd love to unify these more, but.. obviously not breaking stuff is more important :)
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.
Ok @himdel will try to help whenever I can (:
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.
Actually, I guess it was exactly what @h-kataria did here, container_dashboard/util/charts-mixin
was merged with the older chartsMixin
but some configs might me lost in the between, will just update the new chartsMixin
.
can confirm that @h-kataria ?
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.
@felipedf i tried to keep a common charts_mixin for all charts in https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/assets/javascripts/controllers/mixins/charts-mixin.js
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.
@felipedf apologies if during all the back and forth rebasing i missed/lost some piece of code, let me know i will be happy to help with recovering those.
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.
@h-kataria it is fine 😄
I got it all working just fine now.. I was confused after pulling from master and ending up with 3 charts-mixin
in my local.. i was like LOL 😅
the file is empty, and never referenced (emptied and last reference removed in ManageIQ#2499)
before:
after:
https://bugzilla.redhat.com/show_bug.cgi?id=1609345