Browse Source

auto update script executed

Toby Chui 1 năm trước cách đây
mục cha
commit
7790c3c90c
1 tập tin đã thay đổi với 11 bổ sung1 xóa
  1. 11 1
      web/components/gandetails.html

+ 11 - 1
web/components/gandetails.html

@@ -365,6 +365,7 @@
                 tableBody.empty();
                 currentGANMemberList = data;
 
+                var authroziedCount = 0;
                 data.forEach((member) => {
                     let lastAuthTime = new Date(member.lastAuthorizedTime).toLocaleString();
                     if (member.lastAuthorizedTime == 0){
@@ -393,7 +394,9 @@
                         unauthorizedStyle = "display:none;";
                     }
                     if (!member.authorized){
-                        rowClass = "unauthorized"
+                        rowClass = "unauthorized";
+                    }else{
+                        authroziedCount++;
                     }
                     
                     let assignedIp = "";
@@ -431,6 +434,13 @@
                     </tr>`);
                 }
 
+                if (data.length > 0 && authroziedCount == 0 && !$("#showUnauthorizedMembers")[0].checked){
+                    //All nodes are unauthorized. Show tips to enable unauthorize display
+                    tableBody.append(`<tr>
+                        <td colspan="7"><i class="yellow exclamation circle icon"></i> Unauthorized nodes detected. Enable "Show Unauthorized Member" to change member access permission.</td>
+                    </tr>`);
+                }
+
                 initNameForMembers();
             },
             error: function(xhr, status, error) {