

## group.html - Showing group tab buttons with vectors in the group


<%page args="deviceobj, groups, selectedgp, vectors, loggedin, blobfolder"/>

  ## and if newvectors event received request a change of this same selected group
 <div hx-get="/device/getgroup/${deviceobj.itemid|h}/${selectedgp|h}" hx-trigger="sse:newvectors" hx-target="#grouptabs">

  <div class="w3-panel">
    <div class="w3-bar w3-light-grey" >
      % for group in groups:
        % if selectedgp == group:
            <a hx-get="/device/getgroup/${deviceobj.itemid|h}/${group|h}" class="w3-bar-item w3-button w3-mobile w3-green" hx-target="#grouptabs">${group|h}</a>
        % else:
            <a hx-get="/device/getgroup/${deviceobj.itemid|h}/${group|h}"  class="w3-bar-item w3-button w3-mobile"  hx-target="#grouptabs">${group|h}</a>
        % endif
      % endfor
    </div>
  </div>

    ## For the displayed group, show the vectors in the group

  % for vectorobj in vectors:
    <div class="w3-panel">
        <div id="vector_${vectorobj.itemid|h}" hx-get="/vector/update/${vectorobj.itemid|h}" hx-trigger="sse:vector_${vectorobj.itemid|h}" hx-target=this>
          <%include file="vector/getvector.html" args="vectorobj=vectorobj, timestamp='', loggedin=loggedin, blobfolder=blobfolder, message_timestamp=''"/>
        </div>
    </div>
  % endfor

 </div>
