ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-10018. Fix search function don't show on the first page about Node Status for SCM webUI

Open aierate opened this issue 2 years ago • 9 comments

What changes were proposed in this pull request?

Fix search function don't show on the first page about Node Status for SCM webUI

Please describe your PR in detail:

In the Node Status column of SCM's webUI, when I searched for datanode, the detailed information of the datanode was not displayed on the first page, so I fixed it. After fixing, perform a search operation and the detailed information of the datanode will be displayed on the first page.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10018

How was this patch tested?

This is a screenshot of the fixed version:

图片

when I search conway-hadoop4: 图片

aierate avatar Jan 11 '24 13:01 aierate

Please help me review the code, thanks.

aierate avatar Jan 11 '24 13:01 aierate

Thank you for addressing this, @aierate. Could you provide further clarification on the issue you're encountering? Are you attempting to implement a search functionality for the Node Status table, or are you resolving an existing issue with it?

The logic for handling the search in this table is present in the scm-overview.html file at :- https://github.com/apache/ozone/blob/74f04a732809fb19366e490f79a6b4c0e40ce44c/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm-overview.html#L64

How it works :-

When the user types something into the search input, AngularJS updates the value of $scope.search. The filter:search part of the ng-repeat directive then filters the items in the nodeStatus array based on the value of $scope.search, showing only those items that match the search criteria. The items are then displayed in the table row (

) according to the filtering applied.

I checked it with the upsteream master build and the search works fine. image

ArafatKhan2198 avatar Mar 23 '24 10:03 ArafatKhan2198

Thank you for addressing this, @aierate. Could you provide further clarification on the issue you're encountering? Are you attempting to implement a search functionality for the Node Status table, or are you resolving an existing issue with it?

The logic for handling the search in this table is present in the scm-overview.html file at :-

https://github.com/apache/ozone/blob/74f04a732809fb19366e490f79a6b4c0e40ce44c/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm-overview.html#L64

How it works :-

When the user types something into the search input, AngularJS updates the value of $scope.search. The filter:search part of the ng-repeat directive then filters the items in the nodeStatus array based on the value of $scope.search, showing only those items that match the search criteria. The items are then displayed in the table row () according to the filtering applied.

I checked it with the upsteream master build and the search works fine. image

Thanks @ArafatKhan2198 . When the number of DataNodes exceeds one page, if you search for DataNodes on the second page, the search results will be displayed on the second page.

aierate avatar Apr 15 '24 10:04 aierate

@adoroszlai could you take a look as well!

ArafatKhan2198 avatar Apr 24 '24 12:04 ArafatKhan2198