aierate commented on code in PR #5983:
URL: https://github.com/apache/ozone/pull/5983#discussion_r1577605757
##########
hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm.js:
##########
@@ -82,12 +82,16 @@
});
/*if option is 'All' display all records else display specified
record on page*/
$scope.UpdateRecordsToShow = () => {
- if($scope.RecordsToDisplay == 'All') {
- $scope.lastIndex = 1;
- $scope.nodeStatus = nodeStatusCopy;
- } else {
- $scope.lastIndex = Math.ceil(nodeStatusCopy.length /
$scope.RecordsToDisplay);
- $scope.nodeStatus = nodeStatusCopy.slice(0,
$scope.RecordsToDisplay);
+ if($scope.search){
+ $scope.nodeStatus = nodeStatusCopy.filter(item =>
item.hostname.includes($scope.search));
+ }else {
+ if ($scope.RecordsToDisplay == 'All') {
Review Comment:
Thanks for your suggestion @ArafatKhan2198 , I am already refactor to the
function, with a few changed comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]