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

(Host|Service) Detail view: Introduce parents and children tab #1098

Open
wants to merge 14 commits into
base: dependencies
Choose a base branch
from

Conversation

sukhwinder33445
Copy link
Contributor

@sukhwinder33445 sukhwinder33445 commented Nov 25, 2024

TODO

@sukhwinder33445 sukhwinder33445 self-assigned this Nov 25, 2024
@sukhwinder33445 sukhwinder33445 changed the base branch from main to dependencies November 25, 2024 14:19
@sukhwinder33445 sukhwinder33445 force-pushed the introduce-parents-children-tab branch from 59dc8c9 to 74bb945 Compare December 5, 2024 10:16
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Dec 5, 2024
@nilmerg nilmerg linked an issue Dec 9, 2024 that may be closed by this pull request
Copy link
Member

@nilmerg nilmerg left a comment

Choose a reason for hiding this comment

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

From the issue:

The tabs are only visible if the object is linked in the database table dependency_node.

The tabs are always visible right now.

@sukhwinder33445 sukhwinder33445 force-pushed the introduce-parents-children-tab branch 2 times, most recently from c37ece0 to 9ab8072 Compare December 16, 2024 09:21
@raviks789
Copy link
Contributor

Except for the error in the search bar while trying to apply filter in Parents/Children tabs, everything else seems to work as listed out in the issue.

application/controllers/HostController.php Outdated Show resolved Hide resolved
application/controllers/HostController.php Outdated Show resolved Hide resolved
application/controllers/HostController.php Outdated Show resolved Hide resolved
application/controllers/HostController.php Outdated Show resolved Hide resolved
application/controllers/ServiceController.php Outdated Show resolved Hide resolved
application/controllers/ServiceController.php Outdated Show resolved Hide resolved
application/controllers/ServiceController.php Outdated Show resolved Hide resolved
application/controllers/ServiceController.php Show resolved Hide resolved
application/controllers/HostController.php Show resolved Hide resolved
public/css/list/redundancy-group-list-item.less Outdated Show resolved Hide resolved
@sukhwinder33445 sukhwinder33445 force-pushed the introduce-parents-children-tab branch 2 times, most recently from fb557c7 to 03a160d Compare December 18, 2024 16:35
@sukhwinder33445 sukhwinder33445 force-pushed the introduce-parents-children-tab branch from 03a160d to 2caf0ae Compare January 9, 2025 10:22

$limitControl = $this->createLimitControl();
$paginationControl = $this->createPaginationControl($nodesQuery);
$sortControl = $this->createSortControl(
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, it would be nice to have a default sort here. Or you could add getDefaultSort method to DependencyNode model. In which case you do not have to change the code every where createSortControl method is called.

Copy link
Member

Choose a reason for hiding this comment

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

I'm inclined to agree, why is this resolved without change and comment?

Copy link
Contributor Author

@sukhwinder33445 sukhwinder33445 Jan 16, 2025

Choose a reason for hiding this comment

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

We discussed this offline and i added the $defaultSort afterward.
This cannot be added as DependencyNode::getDefaultSort(), as the columns are only aliases and do not work.

@nilmerg nilmerg requested a review from raviks789 January 15, 2025 14:10
@sukhwinder33445 sukhwinder33445 force-pushed the introduce-parents-children-tab branch 3 times, most recently from df52697 to 25d1b6b Compare January 16, 2025 10:40
Copy link
Member

@nilmerg nilmerg left a comment

Choose a reason for hiding this comment

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

I still need to review HostController::joinFix, can't wrap my head around it right now…

application/controllers/ServiceController.php Outdated Show resolved Hide resolved
application/controllers/ServiceController.php Outdated Show resolved Hide resolved
application/controllers/ServiceController.php Outdated Show resolved Hide resolved
application/controllers/ServiceController.php Show resolved Hide resolved

$limitControl = $this->createLimitControl();
$paginationControl = $this->createPaginationControl($nodesQuery);
$sortControl = $this->createSortControl(
Copy link
Member

Choose a reason for hiding this comment

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

I'm inclined to agree, why is this resolved without change and comment?

application/controllers/HostController.php Show resolved Hide resolved
@sukhwinder33445 sukhwinder33445 force-pushed the introduce-parents-children-tab branch 2 times, most recently from 013432d to 0564431 Compare January 17, 2025 11:33
Comment on lines 209 to 212
->setParams($requestParams)
)->setSuggestionUrl(
Url::fromPath('icingadb/service/children-complete')
->setParams($requestParams)
Copy link
Member

Choose a reason for hiding this comment

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

it's the same here, clone the params please

Comment on lines 337 to 340
->setParams($requestParams)
)->setSuggestionUrl(
Url::fromPath('icingadb/host/children-complete')
->setParams($requestParams)
Copy link
Member

Choose a reason for hiding this comment

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

you know the deal :)

Comment on lines 1 to 16
.item-list.detailed { //TODO: ipl-web item-list applies these changes for .default-layout class, which is removed for detailed view, because detail view can show long display names on multiple lines.
.redundancy-group-list-item { // but this margin rules are actually general and can be applied to all list items, so we should add them separately (without .default-layout class) in item-list.less instead to generalize them.
.title > * {
margin: 0 .28125em; // 0 calculated   width

&:first-child {
margin-left: 0;
}

&:last-child {
margin-right: 0;
}
}
}
}
// remove code above once https://github.com/Icinga/ipl-web/pull/240 is merged.
Copy link
Member

Choose a reason for hiding this comment

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

please clean this up, the linked pr is closed and the label seems still being wrapped in a span

- Otherwise the searchbar uses it as base filter and apply it on the query
- Set the outer tab as active.

Previously, the inner tab was activated in the setTitleTab method, but the outer tab does not know about the state of inner tabs.
So whenever sendMultipartUpdate() -> getActiveTab() was called, the retured value was always null.
…th context

This msg should be handled same as the host <is/on> word, no element wrapping.
This way, the margin arround the msg is applied properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List views for parents and children
3 participants