You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "dombizita (via GitHub)" <gi...@apache.org> on 2023/11/22 14:50:37 UTC

Re: [PR] HDDS-9726. Add page jump function and entity count display to the Node Status section of the SCM UI. [ozone]

dombizita commented on code in PR #5646:
URL: https://github.com/apache/ozone/pull/5646#discussion_r1402174482


##########
hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm-overview.html:
##########
@@ -62,22 +62,35 @@ <h2>Node Status</h2>
        </tr>
     </tbody>
 </table>
-<div>
-    <nav aria-label="...">
-        <ul class="pagination">
-            <li class="page-item" ng-class="{disabled:currentPage==1}"
-                ng-click="handlePagination(currentPage-1,(currentPage==1))">
-                <span class="page-link" tabindex="-1">Previous</span>
-            </li>
-            <li class="page-item active">
-                <span class="page-link">{{currentPage}} </span>
-            </li>
-            <li class="page-item" ng-class="{disabled:lastIndex==currentPage}"
-                ng-click="handlePagination(currentPage+1, (lastIndex==currentPage))">
-                <span class="page-link" tabindex="-1">Next</span>
-            </li>
-        </ul>
-    </nav>
+
+<div class="row">
+    <div class="col-md-6 text-left">
+        <label>Page:</label>
+        <select class="form-select" ng-model="currentPage" ng-change="handlePagination(currentPage, false)">
+            <option ng-repeat="page in getPagesArray()" ng-value="page">{{page}}</option>
+        </select>
+        <span>of {{lastIndex}}. </span>
+        <span ng-if="nodeStatus && nodeStatus.length > 0">
+            Showing {{getCurrentPageFirstItemIndex()}} to {{getCurrentPageLastItemIndex()}} of {{totalItems}} entries.

Review Comment:
   I'll leave it up to you if you want to change this, when there are just a few datanodes or showing all the of them in one page (eg. `Showing 1 to 3 of 3 entries.`) I think this is a bit easier to understand. 
   ```suggestion
               Showing {{getCurrentPageFirstItemIndex()}} to {{getCurrentPageLastItemIndex()}} of the total {{totalItems}} entries.
   ```
   
   Or we could do this:
   ```suggestion
               {{getCurrentPageFirstItemIndex()}} - {{getCurrentPageLastItemIndex()}} of {{totalItems}} entries.
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org