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 10 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
protected function createTabs(): Tabs
{
$hasDependencyNode = DependencyNode::on($this->getDb())
->columns('1')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
->columns('1')
->columns([new ipl\Sql\Expression('1')])

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 Outdated Show resolved Hide resolved
application/controllers/HostController.php Show resolved Hide resolved
@sukhwinder33445 sukhwinder33445 force-pushed the introduce-parents-children-tab branch from 9ab8072 to fb557c7 Compare December 18, 2024 12:00
@sukhwinder33445 sukhwinder33445 force-pushed the introduce-parents-children-tab branch from fb557c7 to 03a160d Compare December 18, 2024 16:35
- 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.
@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.

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