-
Notifications
You must be signed in to change notification settings - Fork 90
Create topology graph component #395
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
Create topology graph component #395
Conversation
* <ul style='list-style-type: none'> | ||
* <li>.name - name of the item the node represents | ||
* <li>.status - optional status of the node (can be used to differentiate the circle color) | ||
* <li>.kind - the kind of node |
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 you elaborate on what 'kinds' of charts are supported, and what the 'kind' values may be?
Thanks,
- Dave
angular.module('patternfly.charts').component('pfTopology', { | ||
bindings: { | ||
items: '=', | ||
relations: '=', |
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.
Hi, do these have to be two way bindings?
LGTM 👍 |
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.
👍 LGTM, some minor issues/questions.
.pf-topology-svg g text.glyph { | ||
font-size: 20px; | ||
fill: #1186C1; | ||
} |
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.
Lots of additions to A-PF, these should be in Patternfly. Is there a backlog story to move this to Patternfly?
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.
Not yet - we'll make sure one gets in
* @restrict E | ||
* | ||
* @description | ||
* Component for rendering a topology chart. Individual nodes and relationships can be represented with this view. CSS is especially important for rendering the noes and lines. The example inline contains specific examples that can be used to change the icon size and the line type of the relationships. |
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.
Typo: noes -> nodes
"fontfamily": "PatternFlyIcons-webfont" | ||
} | ||
}, | ||
}); |
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.
Funky indentation.
font-size: 18px; | ||
} | ||
</file> | ||
|
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 the expectation that applications will want to define each of these?
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, due to the fact that they are text icons - this is the way they'll need to be styled.
ctrl.$onInit = function () { | ||
$element.css("display", "block"); | ||
options = {"force": ctrl.force, "radius": ctrl.radius}; | ||
//graph = topologyGraph($element[0], notify, options); |
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 this left in for a reason?
return "unknown"; | ||
} | ||
} | ||
} |
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.
May want to use case insensitive checks here.
This ports the kubernetes-ui component created by Red Hat over to PatternFly with new functionality that has been used by other products.
Inclues unit tests, less for styling and an example of how to style specific nodes, search and filter.