This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis-console.git

commit 439c65a63b6d411b6638ffeddbc6e414e76c28c0
Author: Andy Taylor <[email protected]>
AuthorDate: Thu Sep 19 14:22:11 2024 +0100

    ARTEMIS-4680 - Upgrade the console to use HawtIO 4
    
    Added a select all to the browse page
    
    fixed and added the rat report jobs
    
    a couple of typos
---
 .github/workflows/build.yml                          |  5 +++--
 .../artemis/messages/MessagesTable.tsx               | 20 +++++++++++++++++++-
 artemis-console-war/src/main/webapp/WEB-INF/web.xml  |  2 +-
 3 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 25e6ad4..361cde0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -26,5 +26,6 @@ jobs:
         if: failure()
         uses: actions/upload-artifact@v4
         with:
-          name: rat
-          path: target/rat.txt
\ No newline at end of file
+          name: rat-${{ matrix.java }}
+          path: "**/target/rat.txt"
+          if-no-files-found: ignore
\ No newline at end of file
diff --git 
a/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx
 
b/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx
index f0cd6a7..7863e05 100644
--- 
a/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx
+++ 
b/artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx
@@ -176,6 +176,19 @@ export const MessagesTable: 
React.FunctionComponent<MessageProps> = props => {
     return selectedMessages.includes(id);
   }
 
+  const selectAllMessages = (isSelecting: boolean) => {
+    if(isSelecting) {
+        var updatedSelectedMessages: number[] = rows.map((row: any, index) => {
+          return Number(row.messageID);
+      })
+     setSelectedMessages(updatedSelectedMessages);
+    } else {
+      setSelectedMessages([]);
+    }
+  }
+
+  const areAllMessagesSelected = selectedMessages.length === rows.length;
+
   const handleDeleteMessages = () => {
 
     const isRejected = <T,>(p: PromiseSettledResult<T>): p is 
PromiseRejectedResult => p.status === 'rejected';
@@ -266,7 +279,12 @@ export const MessagesTable: 
React.FunctionComponent<MessageProps> = props => {
       <TableComposable id='message-table' variant="compact" aria-label="Column 
Management Table">
         <Thead>
           <Tr >
-            <Th></Th>
+            <Th
+            select={{
+              onSelect: (_event, isSelecting) => 
selectAllMessages(isSelecting),
+              isSelected: areAllMessagesSelected
+            }}
+          />
             {columns.map((column, id) => {
               if (column.visible) {
                 return <Th key={id}>{column.name}</Th>
diff --git a/artemis-console-war/src/main/webapp/WEB-INF/web.xml 
b/artemis-console-war/src/main/webapp/WEB-INF/web.xml
index 29cfbdd..a1763de 100644
--- a/artemis-console-war/src/main/webapp/WEB-INF/web.xml
+++ b/artemis-console-war/src/main/webapp/WEB-INF/web.xml
@@ -20,7 +20,7 @@
          xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee 
https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd";
          version="5.0">
   <description>Artemis WAR plugin for Hawtio v4</description>
-  <display-name>Artemis Plugin</display-name>
+  <display-name>Artemis Console</display-name>
   <filter>
     <filter-name>SessionExpiryFilter</filter-name>
     <filter-class>io.hawt.web.auth.SessionExpiryFilter</filter-class>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to