As stated in https://angular2-tree.readme.io/docs/large-trees:
To use this (virtual scroll) option, one must supply the height of the
container, and the height of each node in the tree.
Current CRUSH map viewer can only show 13 out of 19 OSDs in our cluster,
and I can only get the rest of OSDs shown by fold some subtree, which is
very confusing. This PR follows the doc of "@circlon/angular-tree-component",
and set the suitable height.
Fixes: https://tracker.ceph.com/issues/45873
Signed-off-by: 胡玮文 <huww98@outlook.com>
i18n>CRUSH map viewer</div>
<div class="card-body">
<div class="row">
- <div class="col-sm-6 col-lg-6">
+ <div class="col-sm-6 col-lg-6 tree-container">
<i *ngIf="loadingIndicator"
[ngClass]="[icons.large, icons.spinner, icons.spin]"></i>
-::ng-deep cd-crushmap tree-root {
- tree-viewport {
- div:first-child {
- height: unset !important;
- }
- }
+.tree-container {
+ height: calc(100vh - 200px);
}
nodes: any[] = [];
treeOptions: ITreeOptions = {
useVirtualScroll: true,
+ nodeHeight: 22,
actionMapping: {
mouse: {
click: this.onNodeSelected.bind(this)