<!DOCTYPE html>
<html lang="en-GB">

<head>
  <title>AD Miner</title>
  <meta charset="utf-8" />

  <link rel="stylesheet" type="text/css" href="../css/mazars-icons.css" />
  <link rel="stylesheet" type="text/css" href="../css/bootstrap-icons.css" />
  <link rel="stylesheet" type="text/css" href="../css/flaty_bootstrap.min.css" />

  <link rel="stylesheet" href="../css/font.css" />

  <link rel="icon" href="../assets/favicon.png" type="image/x-icon" />

  <link rel="stylesheet" href="../css/main_page.css" />
  <link rel="stylesheet" href="../css/style.css" />
  <link rel="stylesheet" type="text/css" href="../css/description.css" />
  <link rel="stylesheet" type="text/css" href="../css/search_bar.css" />
</head>

<body>
  <header>
    <nav class="navbar navbar-expand-lg navbar-dark mb-3" style="background-color: rgb(44, 62, 80); width: 100%">
      <div class="nav-left">
        <div class="radio-group">
          <a class="navbar-brand" href="index.html" id="title">
            <img src="../assets/hub.svg" class="mx-2" height="30" id="hub" />
            AD Miner
          </a>
          <div style="display:{{boolean_azure}}">
            <label class="btn btn-primary custom-radio">
              <input type="radio" name="options" onclick="toggleDiv('main_circle')" id="option-on-premise" autocomplete="off"
                checked="">
              <span class="radio-btn"></span>
            On Premise
            </label>
            <label class="btn btn-primary custom-radio">
              <input type="radio" name="options" onclick="toggleDiv('azure_circle')" id="option-azure" autocomplete="off">
              <span class="radio-btn"></span>
              Entra ID
            </label>
          </div>

        </div>
      </div>

      <div class="nav-center">
        <h1 class="ml-0 text-light" id="title_current_page">
          <span id="main-title">{{render_name}} - {{date}}</span>
          <button class="btn btn-outline-light btn-sm" id="search-icon" onclick="toggleSearch()">
            <i class="bi bi-search"></i>
          </button>
        </h1>

        <div class="form-inline my-2 my-lg-0" id="search-bar-div">
          <div id="search-bar-div-2">
            <input class="form-control mr-sm-2" id="search-bar" type="search" placeholder="Search" aria-label="Search">
            <div id="search-dropdown"></div>
          </div>
        </div>

      </div>
      </div>
    </nav>
  </header>

  <div class="container main-container">
    <div class="row">
      <!-- Left column -->
      <div class="col-left">
        <!-- Rating card-->

        <!-- On premise -->
        <div class="card main-card-category shadow mb-3" id="global-rating-on-premise">
          <div class="card-body">
            <h5 class="card-title">
              On-premise Risk rating
              <i class="bi bi-info-circle" data-bs-toggle="tooltip"
                data-bs-title="This rating is an overall evaluation of the security level of your Active Directory based on the estimated risk of each indicator of exposure"></i>
            </h5>
            {{on_premise|global_rating}}
            <hr />
            <h6 class="card-subtitle mb-2 text-muted">
              Indicators of exposures breakdown
            </h6>
            <ul class="list-group">
              <li class="list-group-item d-flex justify-content-between align-items-center">
                <div>
                  <i class="bi bi-exclamation-diamond-fill" style="color: rgb(245, 75, 75); margin-right: 5px"></i>
                  Immediate risk
                </div>
                <span class="badge rounded-pill"
                  style="background-color: rgb(245, 75, 75)">{{on_premise|immediate_risk}}</span>
              </li>
              <li class="list-group-item d-flex justify-content-between align-items-center">
                <div>
                  <i class="bi bi-exclamation-triangle-fill" style="color: rgb(245, 177, 75); margin-right: 5px"></i>
                  Potential risk
                </div>
                <span class="badge rounded-pill"
                  style="background-color: rgb(245, 177, 75)">{{on_premise|potential_risk}}</span>
              </li>
              <li class="list-group-item d-flex justify-content-between align-items-center">
                <div>
                  <i class="bi bi-dash-circle-fill" style="color: rgb(255, 221, 0); margin-right: 5px"></i>
                  Minor risk
                </div>
                <span class="badge rounded-pill"
                  style="background-color: rgb(255, 221, 0)">{{on_premise|minor_risk}}</span>
              </li>
              <li class="list-group-item d-flex justify-content-between align-items-center">
                <div>
                  <i class="bi bi-check-circle-fill" style="color: rgb(91, 180, 32); margin-right: 5px"></i>
                  Handled risk
                </div>
                <span class="badge rounded-pill"
                  style="background-color: rgb(91, 180, 32)">{{on_premise|handled_risk}}</span>
              </li>
            </ul>
          </div>
        </div>

        <!-- Azure -->
        <div class="card main-card-category shadow mb-3" id="global-rating-azure" style="display:none">
          <div class="card-body">
            <h5 class="card-title">
              Entra ID Risk rating
              <i class="bi bi-info-circle" data-bs-toggle="tooltip"
                data-bs-title="This rating is an overall evaluation of the security level of your Active Directory based on the estimated risk of each indicator of exposure"></i>
            </h5>
            {{azure|global_rating}}
            <hr />
            <h6 class="card-subtitle mb-2 text-muted">
              Indicators of exposures breakdown
            </h6>
            <ul class="list-group">
              <li class="list-group-item d-flex justify-content-between align-items-center">
                <div>
                  <i class="bi bi-exclamation-diamond-fill" style="color: rgb(245, 75, 75); margin-right: 5px"></i>
                  Immediate risk
                </div>
                <span class="badge rounded-pill"
                  style="background-color: rgb(245, 75, 75)">{{azure|immediate_risk}}</span>
              </li>
              <li class="list-group-item d-flex justify-content-between align-items-center">
                <div>
                  <i class="bi bi-exclamation-triangle-fill" style="color: rgb(245, 177, 75); margin-right: 5px"></i>
                  Potential risk
                </div>
                <span class="badge rounded-pill"
                  style="background-color: rgb(245, 177, 75)">{{azure|potential_risk}}</span>
              </li>
              <li class="list-group-item d-flex justify-content-between align-items-center">
                <div>
                  <i class="bi bi-dash-circle-fill" style="color: rgb(255, 221, 0); margin-right: 5px"></i>
                  Minor risk
                </div>
                <span class="badge rounded-pill" style="background-color: rgb(255, 221, 0)">{{azure|minor_risk}}</span>
              </li>
              <li class="list-group-item d-flex justify-content-between align-items-center">
                <div>
                  <i class="bi bi-check-circle-fill" style="color: rgb(91, 180, 32); margin-right: 5px"></i>
                  Handled risk
                </div>
                <span class="badge rounded-pill"
                  style="background-color: rgb(91, 180, 32)">{{azure|handled_risk}}</span>
              </li>
            </ul>
          </div>
        </div>


        <!-- Stats card -->
        <div class="card main-card-category shadow mb-3">
          <div class="card-header">
            <ul class="nav nav-tabs card-header-tabs">
              <li class="nav-item">
                <a class="nav-link active stats-link text-primary" data-bs-toggle="tab" id="stats-tab-title-overview"
                  href="#recap" aria-selected="true"><i class="bi bi-search stats-link-icon"></i>Recap</a>
              </li>
              <li class="nav-item">
                <a class="nav-link stats-link text-primary" data-bs-toggle="tab" id="stats-tab-title-users"
                  style="display:block" href="#users" aria-selected="false"><i
                    class="bi bi-person-fill stats-link-icon"></i>Users</a>
              </li>
              <li class="nav-item">
                <a class="nav-link stats-link text-primary" data-bs-toggle="tab" id="stats-tab-title-computers"
                  style="display:block" href="#computers" aria-selected="false"><i
                    class="bi bi-pc-display stats-link-icon"></i>Computers</a>
              </li>
              <li class="nav-item">
                <a class="nav-link stats-link text-primary" data-bs-toggle="tab" id="stats-tab-title-os"
                  style="display:block" href="#os_distribution" aria-selected="false"><i
                    class="bi bi-windows stats-link-icon"></i>OS</a>
              </li>

              <li class="nav-item">
                <a class="nav-link stats-link text-primary active" data-bs-toggle="tab" id="stats-tab-title-azure"
                  style="display:none" href="#azure" aria-selected="false"><i
                    class="bi bi-microsoft stats-link-icon"></i>Entra ID</a>
              </li>

            </ul>
          </div>

          <div class="tab-content">
            <div class="tab-pane active" id="recap" role="tabpanel">
              <div class="card-body" id="stats-tab-overview">
                <div class="d-flex justify-content-between align-items-center stats-div">
                  <div>
                    <p class="stats-text">
                      <span class="stats-number"><i class="bi bi-building stats-icon"></i>{{nb_domains}}</span>
                      {{domain_or_domains}} ({{nb_domain_collected}} collected)
                    </p>
                  </div>
                  <div>
                    <a href="domain_map_trust.html" class="btn btn-outline-dark stats-button">Details <i
                        class="bi bi-box-arrow-up-right"></i></a>
                  </div>
                </div>
                <div class="d-flex justify-content-between align-items-center stats-div">
                  <div>
                    <p class="stats-text">
                      <span class="stats-number"><i class="bi bi-gem stats-icon"></i>{{nb_dc}}</span>
                      domain controllers
                    </p>
                  </div>
                  <div>
                    <a href="nb_domain_controllers.html" class="btn btn-outline-dark stats-button">Details <i
                        class="bi bi-box-arrow-up-right"></i></a>
                  </div>
                </div>
                <div class="d-flex justify-content-between align-items-center stats-div">
                  <div>
                    <p class="stats-text">
                      <span class="stats-number"><i class="bi bi-gem stats-icon"></i>{{nb_da}}</span>
                      domain admins
                    </p>
                  </div>
                  <div>
                    <a href="nb_domain_admins.html" class="btn btn-outline-dark stats-button">Details <i
                        class="bi bi-box-arrow-up-right"></i></a>
                  </div>
                </div>
                <hr />
                <div class="d-flex justify-content-between align-items-center stats-div">
                  <div>
                    <p class="stats-text">
                      <span class="stats-number"><i class="bi bi-person-fill stats-icon"></i>{{nb_users}}</span>
                      users
                    </p>
                  </div>
                  <div>
                    <a href="users.html" class="btn btn-outline-dark stats-button">Details <i
                        class="bi bi-box-arrow-up-right"></i></a>
                  </div>
                </div>
                <div class="d-flex justify-content-between align-items-center stats-div">
                  <div>
                    <p class="stats-text">
                      <span class="stats-number"><i class="bi bi-people-fill stats-icon"></i>{{nb_groups}}</span>
                      groups
                    </p>
                  </div>
                  <div>
                    <a href="groups.html" class="btn btn-outline-dark stats-button">Details <i
                        class="bi bi-box-arrow-up-right"></i></a>
                  </div>
                </div>
                <hr />
                <div class="d-flex justify-content-between align-items-center stats-div">
                  <div>
                    <p class="stats-text">
                      <span class="stats-number"><i class="bi bi-pc-display stats-icon"></i>{{nb_computers}}</span>
                      computers
                    </p>
                  </div>
                  <div>
                    <a href="computers.html" class="btn btn-outline-dark stats-button">Details <i
                        class="bi bi-box-arrow-up-right"></i></a>
                  </div>
                </div>
                <div class="d-flex justify-content-between align-items-center stats-div">
                  <div>
                    <p class="stats-text">
                      <span class="stats-number"><i class="bi bi-server stats-icon"></i>{{nb_adcs}}</span>
                      ADCS servers
                    </p>
                  </div>
                  <div>
                    <a href="adcs.html" class="btn btn-outline-dark stats-button">Details <i
                        class="bi bi-box-arrow-up-right"></i></a>
                  </div>
                </div>
              </div>
            </div>

            <div class="tab-pane" id="users" role="tabpanel">
              <div class="card-body" id="stats-tab-users">
                <h5 class="card-title stats-title">Users distribution</h5>
                <div>
                  <canvas id="chart-users" class="chart"></canvas>
                </div>
              </div>
            </div>

            <div class="tab-pane" id="computers" role="tabpanel">
              <div class="card-body" id="stats-tab-computers">
                <h5 class="card-title stats-title">Computers distribution</h5>
                <div>
                  <canvas id="chart-computers" class="chart"></canvas>
                </div>
              </div>
            </div>

            <div class="tab-pane" id="os_distribution" role="tabpanel">
              <div class="card-body" id="stats-tab-os">
                <h5 class="card-title stats-title">OS distribution</h5>
                <div>
                  <canvas id="chart-os" class="chart"></canvas>
                </div>
              </div>
            </div>

            <div class="tab-pane" id="azure" role="tabpanel">
              <div class="card-body" id="stats-tab-azure">
                <h5 class="card-title stats-title">Entra ID</h5>
                <div>
                  <div class="d-flex justify-content-between align-items-center stats-div">
                    <div>
                      <p class="stats-text">
                        <span class="stats-number"><i class="bi bi-building stats-icon"></i>{{azure_nb_tenants}}</span>
                        Tenants
                      </p>
                    </div>
                    <div>
                      <a href="azure_tenants.html" class="btn btn-outline-dark stats-button">Details <i
                          class="bi bi-box-arrow-up-right"></i></a>
                    </div>
                  </div>

                 <div class="d-flex justify-content-between align-items-center stats-div">
                    <div>
                      <p class="stats-text">
                        <span class="stats-number"><i class="bi bi-gem stats-icon"></i>{{azure_nb_admin}}</span>
                        Administrators
                      </p>
                    </div>
                    <div>
                      <a href="azure_admin.html" class="btn btn-outline-dark stats-button">Details <i
                          class="bi bi-box-arrow-up-right"></i></a>
                    </div>
                  </div>

                  <hr>

                  <div class="d-flex justify-content-between align-items-center stats-div">
                    <div>
                      <p class="stats-text">
                        <span class="stats-number"><i class="bi bi-person-fill stats-icon"></i>{{azure_nb_users}}</span>
                        users
                      </p>
                    </div>
                    <div>
                      <a href="azure_users.html" class="btn btn-outline-dark stats-button">Details <i
                          class="bi bi-box-arrow-up-right"></i></a>
                    </div>
                  </div>

                  <div class="d-flex justify-content-between align-items-center stats-div">
                    <div>
                      <p class="stats-text">
                        <span class="stats-number"><i
                            class="bi bi-people-fill stats-icon"></i>{{azure_nb_groups}}</span>
                        groups
                      </p>
                    </div>
                    <div>
                      <a href="azure_groups.html" class="btn btn-outline-dark stats-button">Details <i
                          class="bi bi-box-arrow-up-right"></i></a>
                    </div>
                  </div>

                  <hr>

                  <div class="d-flex justify-content-between align-items-center stats-div">
                    <div>
                      <p class="stats-text">
                        <span class="stats-number"><i class="bi bi-pc-horizontal stats-icon"></i>{{azure_nb_vm}}</span>
                        VMs
                      </p>
                    </div>
                    <div>
                      <a href="azure_vm.html" class="btn btn-outline-dark stats-button">Details <i
                          class="bi bi-box-arrow-up-right"></i></a>
                    </div>
                  </div>

                  <div class="d-flex justify-content-between align-items-center stats-div">
                    <div>
                      <p class="stats-text">
                        <span class="stats-number"><i class="bi bi-pc-display stats-icon"></i>{{azure_nb_devices}}</span>
                        Devices
                      </p>
                    </div>
                    <div>
                      <a href="azure_devices.html" class="btn btn-outline-dark stats-button">Details <i
                          class="bi bi-box-arrow-up-right"></i></a>
                    </div>
                  </div>

                  <div class="d-flex justify-content-between align-items-center stats-div">
                    <div>
                      <p class="stats-text">
                        <span class="stats-number"><i class="bi bi-window-sidebar stats-icon"></i>{{azure_nb_apps}}</span>
                        Apps
                      </p>
                    </div>
                    <div>
                      <a href="azure_apps.html" class="btn btn-outline-dark stats-button">Details <i
                          class="bi bi-box-arrow-up-right"></i></a>
                    </div>
                  </div>

                </div>
              </div>
            </div>


          </div>
        </div>
      </div>

      <!-- Main column -->
      <div class="col-center">
        <div class="card main-card-category shadow mb-3">
          <div class="card-header">
            <ul class="nav nav-tabs card-header-tabs">

              <li class="nav-item">
                <a class="nav-link active main-link text-primary" id="main-tab-title-overview" data-bs-toggle="tab"
                  aria-selected="true" href="#overview" role="tab"><i
                    class="bi bi-search main-link-icon"></i>Overview</a>
              </li>

              <!-- On-premise -->
              <li class="nav-item">
                <a class="nav-link main-link text-primary" id="main-tab-title-breakdown-on-premise"
                  aria-selected="false" data-bs-toggle="tab" href="#exposure-on-premise" role="tab"><i
                    class="bi bi-ui-checks-grid main-link-icon"></i>Indicators of exposure breakdown</a>
              </li>

              <!-- Azure -->
              <li class="nav-item">
                <a class="nav-link main-link text-primary" id="main-tab-title-breakdown-azure" aria-selected="false"
                  data-bs-toggle="tab" href="#exposure-azure" role="tab" style="display:none"><i
                    class="bi bi-ui-checks-grid main-link-icon"></i>Indicators of exposure breakdown</a>
              </li>


              <li class="nav-item" style="display:{{boolean_evolution_over_time}}"> 
                <a class="nav-link main-link text-primary" id="main-tab-title-evolution" aria-selected="false"
                  data-bs-toggle="tab" href="#evolution" role="tab"><i
                    class="bi bi-graph-up-arrow main-link-icon"></i>Evolution over time</a>
              </li>
            </ul>
          </div>

          <div class="tab-content">
            <div class="tab-pane fade show active" id="overview" role="tabpanel">
              <div class="card-body" id="main-tab-overview">
                <!-- Overview -->
                <div class="main_circle" id="main_circle" style="
                    width: 750px;
                    height: 750px;
                    margin: auto;
                    position: relative;
                    display: block;
                    ">
                
                   <!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
                   <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
                   viewBox="0 0 780 780" style="enable-background:new 0 0 780 780;" xml:space="preserve">
                <style type="text/css">
                  .st0{fill:none;}
                  .st1{fill:url(#SVGID_1_);}
                  .st2{fill:url(#SVGID_00000058585819401799423550000008842984916433022103_);}
                  .st3{fill:url(#SVGID_00000094612787789556503850000008603251812076001411_);}
                  .st4{fill:url(#SVGID_00000164478173907001907340000014343639112464279178_);}
                  .st5{fill:url(#SVGID_00000159445908351797673650000007356445390713230768_);}
                  .st6{fill:url(#SVGID_00000180344399481620967120000008120824531620663428_);}
                  .st7{fill:url(#SVGID_00000171695599700236687700000002790165573550169998_);}
                  .st8{fill:url(#SVGID_00000120539693948670485040000014473746326456314771_);}
                  .st9{fill:#BEBEBE;}
                  .st10{fill:url(#SVGID_00000070104620090235418960000002631340114059786431_);}
                  .st11{fill:url(#SVGID_00000045608815453853442560000004093305030017671080_);}
                  .st12{fill:url(#SVGID_00000137093457793163907850000017347475130003028101_);}
                  .st13{fill:url(#SVGID_00000173846568194389587930000012518524195197585577_);}
                  .st14{fill:none;stroke:#BDBDBD;stroke-miterlimit:10;}
                  .st15{fill:none;stroke:#DCDCDC;stroke-width:0.25;stroke-miterlimit:10;}
                  .category-title{user-select: none;pointer-events: none;}
                  #bande-misc-container{transition: all, 500ms;}
                  #bande-perm-container{transition: all, 500ms;}
                  #bande-pass-container{transition: all, 500ms;}
                  #bande-kerberos-container{transition: all, 450ms;}
                  .title-span{transition: all 500ms;}

                </style>
                <g>
                  <path class="st0" d="M390.3,237.4c-79.2,0-143.4,64.2-143.4,143.4c0,1.6,0,3.2,0.1,4.8H390h131.2h12.4c0.1-1.6,0.1-3.2,0.1-4.8
                    C533.6,301.6,469.4,237.4,390.3,237.4z"/>
                  <path class="st0" d="M10.5,385.7C10.5,176.1,180.4,6.2,390,6.2s379.5,169.9,379.5,379.5"/>
                </g>
                <g>
                  <path class="st0" d="M533.6,385.7H390l69.6,120.7C502.4,482.6,531.8,437.6,533.6,385.7z"/>
                  <path class="st0" d="M769.5,385.7C769.5,385.7,769.5,385.7,769.5,385.7c0,140.5-76.3,263.1-189.8,328.7"/>
                </g>
                <g>
                  <path class="st0" d="M390,765.1c-69.2,0-134.2-18.6-190-51l-34.4,59.6l449.3-0.7L580.4,714C524.5,746.5,459.4,765.1,390,765.1z"/>
                  <path class="st0" d="M320.2,505.9c20.7,11.6,44.6,18.3,70.1,18.3c25.2,0,48.9-6.5,69.5-17.9"/>
                </g>
                <radialGradient id="SVGID_1_" cx="365.8719" cy="385.6617" r="378.4752" gradientUnits="userSpaceOnUse">
                  <stop  offset="0.8153" style="stop-color:#F0F0F0"/>
                  <stop  offset="0.9211" style="stop-color:#EEEEEE"/>
                  <stop  offset="0.9592" style="stop-color:#E7E7E7"/>
                  <stop  offset="0.9863" style="stop-color:#DCDCDC"/>
                  <stop  offset="1" style="stop-color:#D2D2D2"/>
                </radialGradient>
                <path class="st1" d="M212.1,385.7H10.5c0,0,0,0,0,0c0,140.4,76.3,263.1,189.7,328.7l100.5-175C247.6,508.6,212.2,451.4,212.1,385.7z
                  "/>
                <radialGradient id="SVGID_00000003077926084373554700000005265092157482901900_" cx="413.8241" cy="385.4677" r="366.235" gradientUnits="userSpaceOnUse">
                  <stop  offset="0.8128" style="stop-color:#F0F0F0"/>
                  <stop  offset="0.92" style="stop-color:#EEEEEE"/>
                  <stop  offset="0.9586" style="stop-color:#E7E7E7"/>
                  <stop  offset="0.9861" style="stop-color:#DCDCDC"/>
                  <stop  offset="1" style="stop-color:#D2D2D2"/>
                </radialGradient>
                <path style="fill:url(#SVGID_00000003077926084373554700000005265092157482901900_);" d="M568.3,385.5
                  c-0.1,65.8-35.9,123.2-89.1,153.9L580,714.2c113.4-65.6,189.8-188.3,189.8-328.7c0,0,0,0,0,0H568.3z"/>
                <radialGradient id="SVGID_00000114766034724038961270000000627328893521774735_" cx="390" cy="385.6617" r="379.4772" gradientUnits="userSpaceOnUse">
                  <stop  offset="0.7612" style="stop-color:#FFFFFF"/>
                  <stop  offset="0.8894" style="stop-color:#FDFDFD"/>
                  <stop  offset="0.9483" style="stop-color:#F5F5F5"/>
                  <stop  offset="0.9931" style="stop-color:#E9E9E9"/>
                  <stop  offset="1" style="stop-color:#E6E6E6"/>
                </radialGradient>
                <path style="fill:url(#SVGID_00000114766034724038961270000000627328893521774735_);" d="M212.1,385.4
                  c0-98.3,79.7-177.9,177.9-177.9s177.9,79.7,177.9,177.9c0,0.1,0,0.2,0,0.3h201.5C769.5,176.1,599.6,6.2,390,6.2
                  S10.5,176.1,10.5,385.7h201.5C212.1,385.6,212.1,385.5,212.1,385.4z"/>
                <radialGradient id="SVGID_00000040534129288854401950000018335600777958855856_" cx="390.1882" cy="434.6322" r="340.8391" gradientUnits="userSpaceOnUse">
                  <stop  offset="0.7612" style="stop-color:#FFFFFF"/>
                  <stop  offset="0.8894" style="stop-color:#FDFDFD"/>
                  <stop  offset="0.9483" style="stop-color:#F5F5F5"/>
                  <stop  offset="0.9931" style="stop-color:#E9E9E9"/>
                  <stop  offset="1" style="stop-color:#E6E6E6"/>
                </radialGradient>
                <path style="fill:url(#SVGID_00000040534129288854401950000018335600777958855856_);" d="M479,539.5c-26.2,15.2-56.6,23.8-89,23.8
                  c-32.5,0-62.9-8.7-89.1-23.9L200,714.2c55.9,32.4,120.8,51,190,51c69.4,0,134.5-18.6,190.4-51.2L479,539.5z"/>
                <g>
                  <g>
                    
                      <radialGradient id="SVGID_00000061467403897957859680000018212568567454799519_" cx="389.9338" cy="384.3246" r="188.5001" gradientUnits="userSpaceOnUse">
                      <stop  offset="0.8458" style="stop-color:#B9B9B9"/>
                      <stop  offset="1" style="stop-color:#FFFFFF"/>
                    </radialGradient>
                    <path style="fill:url(#SVGID_00000061467403897957859680000018212568567454799519_);" d="M483.9,547.8l-4.7-8.3
                      c-26.2,15.1-56.8,24-89.2,24c-32.4,0-63.2-8.9-89.3-24l-4.7,8.3c27.6,15.9,59.9,25.2,94,25.2C424.1,573,456.3,563.7,483.9,547.8z"
                      />
                  </g>
                  <g>
                    
                      <radialGradient id="SVGID_00000028316990771625924990000013313708697531863195_" cx="389.2355" cy="385.6617" r="187.0096" gradientUnits="userSpaceOnUse">
                      <stop  offset="0.8458" style="stop-color:#AAAAAA"/>
                      <stop  offset="1" style="stop-color:#F0F0F0"/>
                    </radialGradient>
                    <path style="fill:url(#SVGID_00000028316990771625924990000013313708697531863195_);" d="M296,547.8l4.6-8.3
                      c-53.1-30.8-88.5-88-88.5-153.8l-9.5,0C202.7,455,240.1,515.4,296,547.8z"/>
                  </g>
                  <g>
                    
                      <radialGradient id="SVGID_00000152964529127242667230000006776509169579778990_" cx="390.5215" cy="385.6429" r="187.031" gradientUnits="userSpaceOnUse">
                      <stop  offset="0.8458" style="stop-color:#B4B4B4"/>
                      <stop  offset="0.9975" style="stop-color:#F0F0F0"/>
                    </radialGradient>
                    <path style="fill:url(#SVGID_00000152964529127242667230000006776509169579778990_);" d="M577.4,385.7l-9.5,0
                      c0,65.8-35.5,123.1-88.7,153.8l4.7,8.4C539.9,515.5,577.4,455,577.4,385.7z"/>
                  </g>
                  
                    <radialGradient id="SVGID_00000107552438027482697720000002546753327925191043_" cx="390" cy="385.6617" r="187.328" gradientUnits="userSpaceOnUse">
                    <stop  offset="0.8458" style="stop-color:#B9B9B9"/>
                    <stop  offset="1" style="stop-color:#FFFFFF"/>
                  </radialGradient>
                  <path style="fill:url(#SVGID_00000107552438027482697720000002546753327925191043_);" d="M390,198.3
                    c-103.5,0-187.3,83.9-187.3,187.3c0,0,0,0,0,0l9.5,0c0,0,0,0,0,0c0-98.2,79.6-177.8,177.8-177.8s177.8,79.6,177.8,177.8
                    c0,0,0,0,0,0l9.5,0c0,0,0,0,0,0C577.3,282.2,493.5,198.3,390,198.3z"/>
                </g>
                <g>
                  <g id="bande-misc-container">
                    <path class="st9" id="bande-misc" d="M483.9,547.8l-4.7-8.3c-26.2,15.1-56.8,24-89.2,24c-32.4,0-63.2-8.9-89.3-24l-4.7,8.3
                      c27.6,15.9,59.9,25.2,94,25.2C424.1,573,456.3,563.7,483.9,547.8z"/>
                  </g>
                  <g id="bande-pass-container">
                    <path class="st9" id="bande-pass" d="M296,547.8l4.6-8.3c-53.1-30.8-88.5-88-88.5-153.8l-9.5,0C202.7,455,240.1,515.4,296,547.8z"/>
                  </g>
                  <g id="bande-kerberos-container"> 
                    <path class="st9" id="bande-kerberos" d="M577.4,385.7l-9.5,0c0,65.8-35.5,123.1-88.7,153.8l4.7,8.4C539.9,515.5,577.4,455,577.4,385.7z"/>
                  </g>
                  <g id="bande-perm-container">
                  <path class="st9" id="bande-perm" d="M390,198.3c-103.5,0-187.3,83.9-187.3,187.3c0,0,0,0,0,0l9.5,0c0,0,0,0,0,0c0-98.2,79.6-177.8,177.8-177.8
                    s177.8,79.6,177.8,177.8c0,0,0,0,0,0l9.5,0c0,0,0,0,0,0C577.3,282.2,493.5,198.3,390,198.3z"/>
                  </g>
                </g>
                <g>
                  <g>
                    <g>
                      
                        <radialGradient id="SVGID_00000039106406421201509100000018018546259503094421_" cx="389.7255" cy="385.6629" r="178.026" gradientUnits="userSpaceOnUse">
                        <stop  offset="0.703" style="stop-color:#DCDCDC"/>
                        <stop  offset="0.7866" style="stop-color:#EBEBEB"/>
                        <stop  offset="0.8887" style="stop-color:#F6F6F6"/>
                        <stop  offset="1" style="stop-color:#FAFAFA"/>
                      </radialGradient>
                      <a data-bs-toggle="modal" href="#cardsModal" target="_self" onclick="switchCards('misc')" id="switchCard_misc">
                      <path id="donut-misc" style="fill:url(#SVGID_00000039106406421201509100000018018546259503094421_);" d="M479.4,539.5L479.4,539.5l-23.5-40.4
                        c-19.4,11.3-41.9,17.8-65.9,17.8c-23.9,0-46.3-6.4-65.6-17.6l-23.9,40.3c26.2,15.1,57.1,23.9,89.5,23.9
                        C422.6,563.6,453.1,554.8,479.4,539.5z"/></a>
                    </g>
                    
                      <radialGradient id="SVGID_00000083062346935033954830000018030773272596689808_" cx="390.0103" cy="-119.6605" r="177.9136" gradientTransform="matrix(1 0 0 -1 0 266)" gradientUnits="userSpaceOnUse">
                      <stop  offset="0.7043" style="stop-color:#DCDCDC"/>
                      <stop  offset="0.7875" style="stop-color:#EBEBEB"/>
                      <stop  offset="0.8891" style="stop-color:#F6F6F6"/>
                      <stop  offset="1" style="stop-color:#FAFAFA"/>
                    </radialGradient>
                    <a data-bs-toggle="modal" href="#cardsModal" target="_self" onclick="switchCards('permissions')" id="switchCard_permission">
                    <path id="donut-perm" style="fill:url(#SVGID_00000083062346935033954830000018030773272596689808_);" d="M390,207.7
                      c98.3,0,177.9,79.7,177.9,177.9h-46.7c0-72.5-58.7-131.2-131.2-131.2s-131.2,58.7-131.2,131.2h-46.7
                      C212.1,287.4,291.8,207.7,390,207.7z"/></a>
                    <g>
                      
                        <radialGradient id="SVGID_00000072978027828342106760000001886357569599661214_" cx="158.6118" cy="385.6683" r="177.7468" gradientTransform="matrix(-1 0 0 1 548.6075 0)" gradientUnits="userSpaceOnUse">
                        <stop  offset="0.6908" style="stop-color:#C8C8C8"/>
                        <stop  offset="0.7334" style="stop-color:#DADADA"/>
                        <stop  offset="0.7853" style="stop-color:#E6E6E6"/>
                        <stop  offset="0.8536" style="stop-color:#EEEEEE"/>
                        <stop  offset="1" style="stop-color:#F0F0F0"/>
                      </radialGradient>
                      <a data-bs-toggle="modal" href="#cardsModal" target="_self" onclick="switchCards('kerberos')" id="switchCard_kerberos_ms_graph">
                      <path id="donut-kerberos" style="fill:url(#SVGID_00000072978027828342106760000001886357569599661214_);" d="M479.3,539.6l-23.7-40.3
                        c39.2-22.7,65.6-65.1,65.6-113.6h46.7C567.9,451.5,532.5,508.8,479.3,539.6z"/></a>
                    </g>
                    <g>
                      
                        <radialGradient id="SVGID_00000174590736208012208720000010081720003566610349_" cx="-974.8826" cy="385.6683" r="177.7954" gradientTransform="matrix(1 0 0 1 1364.8724 0)" gradientUnits="userSpaceOnUse">
                        <stop  offset="0.6986" style="stop-color:#C8C8C8"/>
                        <stop  offset="0.7342" style="stop-color:#D3D3D3"/>
                        <stop  offset="0.8091" style="stop-color:#E3E3E3"/>
                        <stop  offset="0.8924" style="stop-color:#EDEDED"/>
                        <stop  offset="1" style="stop-color:#F0F0F0"/>
                      </radialGradient>
                      <a data-bs-toggle="modal" href="#cardsModal" target="_self" onclick="switchCards('passwords')" id="switchCard_passwords">
                      <path id="donut-pass" style="fill:url(#SVGID_00000174590736208012208720000010081720003566610349_);" d="M300.6,539.7l23.8-40.4
                        c-39.2-22.7-65.6-65.1-65.6-113.6h-46.7C212.1,451.5,247.4,508.9,300.6,539.7z"/></a>
                    </g>
                  </g>
                  <path id="SVGID_x5F_00000017494569774335167120000002202659557673287827_x5F_" class="st0" d="M390,539.3
                    c-84.9,0-153.6-68.8-153.6-153.6S305.1,232,390,232s153.6,68.8,153.6,153.6S474.9,539.3,390,539.3z"/>
                  <text class="category-title">	<textPath id="path-title-perm" dominant-baseline="middle" text-anchor="middle" xlink:href="#SVGID_x5F_00000017494569774335167120000002202659557673287827_x5F_">
                <tspan class="title-span" id="title-perm" style="font-family:'Montserrat';font-weight: bolder; font-size:19px;">PERMISSIONS</tspan>	</textPath>
                </text>
                  <path id="SVGID_x5F_00000046324577460701134720000008268128655842888079_x5F_" class="st0" d="M390,539.3
                    c84.9,0,153.6-68.8,153.6-153.6S474.9,232,390,232s-153.6,68.8-153.6,153.6S305.1,539.3,390,539.3z"/>
                  <text  class="category-title">	<textPath id="path-title-pass" dominant-baseline="middle" text-anchor="middle" xlink:href="#SVGID_x5F_00000046324577460701134720000008268128655842888079_x5F_">
                <tspan class="title-span" id="title-pass" style="font-family:'Montserrat';font-weight: bolder; font-size:19px;">PASSWORDS</tspan>	</textPath>
                </text>
                  <path id="SVGID_x5F_00000009559227705141311830000001285624377143401365_x5F_" class="st0" d="M390,539.3
                    c84.9,0,153.6-68.8,153.6-153.6S474.9,232,390,232s-153.6,68.8-153.6,153.6S305.1,539.3,390,539.3z"/>
                  <text  class="category-title">	<textPath id="path-title-kerberos" dominant-baseline="middle" text-anchor="middle" xlink:href="#SVGID_x5F_00000009559227705141311830000001285624377143401365_x5F_">
                <tspan class="title-span" id="title-kerberos" style="font-family:'Montserrat';font-weight: bolder; font-size:19px;">KERBEROS</tspan><tspan class="title-span" id="title-msgraph" style="font-family:'Montserrat';font-weight: bolder; font-size:19px;display:none;">MSGRAPH</tspan>	</textPath>
                </text>
                  <path id="SVGID_x5F_00000023983339830597866210000016273559813660546946_x5F_" class="st0" d="M543.6,385.7
                    c0-84.9-68.8-153.6-153.6-153.6s-153.6,68.8-153.6,153.6S305.1,539.3,390,539.3S543.6,470.5,543.6,385.7z"/>
                  <text  class="category-title">	<textPath id="path-title-misc" dominant-baseline="middle" text-anchor="middle" xlink:href="#SVGID_x5F_00000023983339830597866210000016273559813660546946_x5F_">
                <tspan class="title-span" id="title-misc" style="font-family:'Montserrat';font-weight: bolder; font-size:19px;">MISC</tspan>	</textPath>
                </text>
                </g>
                <g>
                  <line class="st14" x1="258.8" y1="385.7" x2="10.5" y2="385.7"/>
                  <line class="st14" x1="521.2" y1="385.7" x2="769.5" y2="385.7"/>
                  <line class="st14" x1="580.4" y1="714" x2="455.6" y2="499.3"/>
                  <line class="st14" x1="324.4" y1="499.3" x2="200" y2="714.2"/>
                </g>
                <circle class="st15" cx="390" cy="385.7" r="178.2"/>
                </svg>
                </html>
                <script>
                  const bandeMisc=document.getElementById("bande-misc");
                  const donutMisc=document.getElementById("donut-misc");
                  const titleMisc=document.getElementById("title-misc");
                  const containerBandeMisc=document.getElementById("bande-misc-container");
                  containerBandeMisc.style.opacity="0%";
                
                  donutMisc.addEventListener("mouseover",()=>{
                    titleMisc.style.fontSize="21px";
                    containerBandeMisc.style.opacity="100%";
                  });
                  donutMisc.addEventListener("mouseout",()=>{
                    titleMisc.style.fontSize="19px";
                    containerBandeMisc.style.opacity="0%";
                    
                  });
                
                  const bandePerm=document.getElementById("bande-perm");
                  const donutPerm=document.getElementById("donut-perm");
                  const titlePerm=document.getElementById("title-perm");
                  const containerBandePerm=document.getElementById("bande-perm-container");
                  containerBandePerm.style.opacity="0%";
                  donutPerm.addEventListener("mouseover",()=>{
                    containerBandePerm.style.opacity="100%";
                    titlePerm.style.fontSize="21px";
                    // donutPerm.style.stroke="#DCDCDC";
                    // donutPerm.style.strokeWidth="2";
                  });
                  donutPerm.addEventListener("mouseout",()=>{
                    containerBandePerm.style.opacity="0%";
                    titlePerm.style.fontSize="19px";
                    // donutPerm.style.stroke="";
                    
                  });
                
                  const bandePass=document.getElementById("bande-pass");
                  const donutPass=document.getElementById("donut-pass");
                  const titlePass=document.getElementById("title-pass");
                  const containerBandePass=document.getElementById("bande-pass-container");
                  containerBandePass.style.opacity="0%";
                
                  donutPass.addEventListener("mouseover",()=>{
                    containerBandePass.style.opacity="100%";
                    titlePass.style.fontSize="21px";
                  });
                  donutPass.addEventListener("mouseout",()=>{
                    containerBandePass.style.opacity="0%";
                    titlePass.style.fontSize="19px";
                  });
                
                  const bandeKerberos=document.getElementById("bande-kerberos");
                  const donutKerberos=document.getElementById("donut-kerberos");
                  const titleKerberos=document.getElementById("title-kerberos");
                  const titleMsgraph=document.getElementById("title-msgraph");
                  const containerBandeKerberos=document.getElementById("bande-kerberos-container");
                  containerBandeKerberos.style.opacity="0%";
                
                  donutKerberos.addEventListener("mouseover",()=>{
                    containerBandeKerberos.style.opacity="100%";
                    titleKerberos.style.fontSize="21px";
                    titleMsgraph.style.fontSize="21px";
                  });
                  donutKerberos.addEventListener("mouseout",()=>{
                    containerBandeKerberos.style.opacity="0%";
                    titleKerberos.style.fontSize="19px";
                    titleMsgraph.style.fontSize="19px";
                  });
                  var browserName = (function (agent) {        switch (true) {
                      case agent.indexOf("edge") > -1: return "MS Edge";
                      case agent.indexOf("edg/") > -1: return "Edge";
                      case agent.indexOf("opr") > -1 && !!window.opr: return "Opera";
                      case agent.indexOf("chrome") > -1 && !!window.chrome: return "Chrome";
                      case agent.indexOf("trident") > -1: return "MS IE";
                      case agent.indexOf("firefox") > -1: return "Mozilla Firefox";
                      case agent.indexOf("safari") > -1: return "Safari";
                      default: return "other";
                  }
              })(window.navigator.userAgent.toLowerCase());
              const pathTitlePerm = document.getElementById("path-title-perm");
              const pathTitleKerberos = document.getElementById("path-title-kerberos");
              const pathTitlePass = document.getElementById("path-title-pass");
              const pathTitleMisc = document.getElementById("path-title-misc");


              if (browserName=="Mozilla Firefox"){
                pathTitlePerm.setAttribute('startOffset','47.5%');
                pathTitlePass.setAttribute('startOffset','80.8%');
                pathTitleKerberos.setAttribute('startOffset','14%');
                pathTitleMisc.setAttribute('startOffset','72.6%');
              }
              else{
                pathTitlePerm.setAttribute('startOffset','50%');
                pathTitlePass.setAttribute('startOffset','83.4%');
                pathTitleKerberos.setAttribute('startOffset','17%');
                pathTitleMisc.setAttribute('startOffset','75.3%');
              }
                  
                </script>
                </div>
                <div class="azure_circle" id="azure_circle" style="
                    width: 750px;
                    height: 750px;
                    margin: auto;
                    position: relative;
                    display:none;
                    "></div>
              </div>
            </div>

            <!-- On-premise -->
            <div class="tab-pane fade overview" style="max-height: 780px;" id="exposure-on-premise" role="tabpanel">

              <div class="row" style="margin-bottom: 15px">
                <div class="col-graph-main-left">
                  <canvas id="chart-details-main-on-premise"></canvas>
                </div>
                <div class="col-graph-main-right">
                  <br />
                  <h5 class="card-title">
                    Your infrastructure's exposure to cyberattacks is rated:
                  </h5>
                  <br />
                  {{on_premise|global_rating}}
                  <br />
                  <ul style="
                        text-align: justify;
                        font-size: 18px;
                        margin-right: 30px;
                      ">
                    <li>
                      You have
                      <i class="bi bi-exclamation-diamond-fill" style="color: rgb(245, 75, 75); margin-right: 3px"></i>
                      <span style="font-weight: 700">{{on_premise|immediate_risk}} critical
                        {{on_premise|vuln_text_major_risk}}</span>
                      : these must be addressed as soon as possible.
                    </li>
                    <br />
                    <li>
                      You have
                      <i class="bi bi-exclamation-triangle-fill"
                        style="color: rgb(245, 177, 75); margin-right: 3px"></i>
                      <span style="font-weight: 700">{{on_premise|potential_risk}} major
                        {{on_premise|vuln_text_major_risk}}</span>
                      : these should be fixed quickly as they could
                      potentially lead to a full compromission.
                    </li>
                  </ul>
                </div>
              </div>
              <hr />
              <div class="row" style="margin-bottom: 10px">
                <div class="col-graph-details">
                  <div>
                    <canvas id="chart-details-1-on-premise" class="chart-details"></canvas>
                    <h5 class="card-title chart-details-title">
                      Permissions
                    </h5>
                  </div>
                  <div>{{on_premise|permissions_graph_summary}}</div>
                </div>
                <div class="col-graph-details">
                  <div>
                    <canvas id="chart-details-2-on-premise" class="chart-details"></canvas>
                    <h5 class="card-title chart-details-title">Passwords</h5>
                  </div>
                  <div>{{on_premise|passwords_graph_summary}}</div>
                </div>
                <div class="col-graph-details">
                  <div>
                    <canvas id="chart-details-3-on-premise" class="chart-details"></canvas>
                    <h5 class="card-title chart-details-title">Kerberos</h5>
                  </div>
                  <div>{{on_premise|kerberos_graph_summary}}</div>
                </div>
                <div class="col-graph-details">
                  <div>
                    <canvas id="chart-details-4-on-premise" class="chart-details"></canvas>
                    <h5 class="card-title chart-details-title">Misc</h5>
                  </div>
                  <div>{{on_premise|misc_graph_summary}}</div>
                </div>
              </div>
            </div>

            <div class="tab-pane fade" id="exposure-azure" role="tabpanel">

              <div class="row" style="margin-bottom: 15px">
                <div class="col-graph-main-left">
                  <canvas id="chart-details-main-azure"></canvas>
                </div>
                <div class="col-graph-main-right">
                  <br />
                  <h5 class="card-title">
                    Your infrastructure's exposure to cyberattacks is rated:
                  </h5>
                  <br />
                  {{azure|global_rating}}
                  <br />
                  <ul style="
                        text-align: justify;
                        font-size: 18px;
                        margin-right: 30px;
                      ">
                    <li>
                      You have
                      <i class="bi bi-exclamation-diamond-fill" style="color: rgb(245, 75, 75); margin-right: 3px"></i>
                      <span style="font-weight: 700">{{azure|immediate_risk}} critical
                        {{azure|vuln_text_major_risk}}</span>
                      : these must be addressed as soon as possible.
                    </li>
                    <br />
                    <li>
                      You have
                      <i class="bi bi-exclamation-triangle-fill"
                        style="color: rgb(245, 177, 75); margin-right: 3px"></i>
                      <span style="font-weight: 700">{{azure|potential_risk}} major
                        {{azure|vuln_text_major_risk}}</span>
                      : these should be fixed quickly as they could
                      potentially lead to a full compromission.
                    </li>
                  </ul>
                </div>
              </div>
              <hr />
              <div class="row" style="margin-bottom: 10px">
                <div class="col-graph-details">
                  <div>
                    <canvas id="chart-details-1-azure" class="chart-details"></canvas>
                    <h5 class="card-title chart-details-title">
                      Attack Paths
                    </h5>
                  </div>
                  <div>{{azure|attack_path_graph_summary}}</div>
                </div>
                <div class="col-graph-details">
                  <div>
                    <canvas id="chart-details-2-azure" class="chart-details"></canvas>
                    <h5 class="card-title chart-details-title">Microsoft Entra Connect</h5>
                  </div>
                  <div>{{azure|ad_connect_graph_summary}}</div>
                </div>
                <div class="col-graph-details">
                  <div>
                    <canvas id="chart-details-3-azure" class="chart-details"></canvas>
                    <h5 class="card-title chart-details-title">MS Graph</h5>
                  </div>
                  <div>{{azure|ms_graph_graph_summary}}</div>
                </div>
                <div class="col-graph-details">
                  <div>
                    <canvas id="chart-details-4-azure" class="chart-details"></canvas>
                    <h5 class="card-title chart-details-title">Service Principal / Managed Identity</h5>
                  </div>
                  <div>{{azure|sp_mi_graph_summary}}</div>
                </div>
              </div>
            </div>


            <div class="tab-pane fade" id="evolution" role="tabpanel">
              <div>
                <canvas id="chart-evolution-time-1" class="chart py-3 px-3"></canvas>
              </div>

              <div class="row">
                <div class="col-3">
                  <div class="accordion px-3 pb-3" id="accordion_evolution_time" style="font-size: 14px">
                    <div class="accordion-item">
                      <h2 class="accordion-header" id="headingOne">
                        <button class="accordion-button" type="button" data-bs-toggle="collapse"
                          data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                          General statistics
                        </button>
                      </h2>
                      <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne"
                        data-bs-parent="#accordion_evolution_time" style="">
                        <div class="accordion-body">
                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="nb_domains"
                              id="checkbox_nb_domains" />
                            <label class="form-check-label" for="checkbox_nb_domains">
                              Domains
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="nb_dc" id="checkbox_nb_dc" />
                            <label class="form-check-label" for="checkbox_nb_dc">
                              Domain controllers
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="nb_da" id="checkbox_nb_da" />
                            <label class="form-check-label" for="checkbox_nb_da">
                              Domain admins
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="nb_users" id="checkbox_nb_users" />
                            <label class="form-check-label" for="checkbox_nb_users">
                              Users
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="nb_groups" id="checkbox_nb_groups" />
                            <label class="form-check-label" for="checkbox_nb_groups">
                              Groups
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="nb_computers"
                              id="checkbox_nb_computers" />
                            <label class="form-check-label" for="checkbox_nb_computers">
                              Computers
                            </label>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div class="accordion-item">
                      <h2 class="accordion-header" id="headingTwo">
                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                          data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                          Permissions
                        </button>
                      </h2>
                      <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo"
                        data-bs-parent="#accordion_evolution_time" style="">
                        <div class="accordion-body">
                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="users_admin_of_computers"
                              id="checkbox_users_admin_of_computers" />
                            <label class="form-check-label" for="checkbox_users_admin_of_computers">
                              Users with admin privs.
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="server_users_could_be_admin"
                              id="checkbox_server_users_could_be_admin" />
                            <label class="form-check-label" for="checkbox_server_users_could_be_admin">
                              Users can compromise a server
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="dom_admin_on_non_dc"
                              id="checkbox_dom_admin_on_non_dc" />
                            <label class="form-check-label" for="checkbox_dom_admin_on_non_dc">
                              Domain admin sessions on non-DC
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="nb_domain_admins"
                              id="checkbox_nb_domain_admins" />
                            <label class="form-check-label" for="checkbox_nb_domain_admins">
                              Domain admins
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox"
                              value="users_shadow_credentials_to_non_admins"
                              id="checkbox_users_shadow_credentials_to_non_admins" />
                            <label class="form-check-label" for="checkbox_users_shadow_credentials_to_non_admins">
                              Users can impersonate others
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="users_shadow_credentials"
                              id="checkbox_users_shadow_credentials" />
                            <label class="form-check-label" for="checkbox_users_shadow_credentials">
                              users can impersonate privileged accounts
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="can_dcsync"
                              id="checkbox_can_dcsync" />
                            <label class="form-check-label" for="checkbox_can_dcsync">
                              Non DA/DC objects have DCSync privileges
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="computers_members_high_privilege"
                              id="checkbox_computers_members_high_privilege" />
                            <label class="form-check-label" for="checkbox_computers_members_high_privilege">
                              Non DA/DC objects have DCSync privileges
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="computers_admin_of_computers"
                              id="checkbox_computers_admin_of_computers" />
                            <label class="form-check-label" for="checkbox_computers_admin_of_computers">
                              Computers admin of others
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="graph_path_objects_to_da"
                              id="checkbox_graph_path_objects_to_da" />
                            <label class="form-check-label" for="checkbox_graph_path_objects_to_da">
                              Paths to DA
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="computers_list_of_rdp_users"
                              id="checkbox_computers_list_of_rdp_users" />
                            <label class="form-check-label" for="checkbox_computers_list_of_rdp_users">
                              Computers with RDP access
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="unpriv_to_dnsadmins"
                              id="checkbox_unpriv_to_dnsadmins" />
                            <label class="form-check-label" for="checkbox_unpriv_to_dnsadmins">
                              Paths to DNSAdmins group
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="unpriv_to_backupoperators"
                              id="checkbox_unpriv_to_backupoperators" />
                            <label class="form-check-label" for="checkbox_unpriv_to_backupoperators">
                              Paths to Backup Operators group
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="graph_path_objects_to_ou_handlers"
                              id="checkbox_graph_path_objects_to_ou_handlers" />
                            <label class="form-check-label" for="checkbox_graph_path_objects_to_ou_handlers">
                              Dangerous control paths over OUs
                            </label>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div class="accordion-item">
                      <h2 class="accordion-header" id="headingThree">
                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                          data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                          Kerberos
                        </button>
                      </h2>
                      <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree"
                        data-bs-parent="#accordion_evolution_time">
                        <div class="accordion-body">
                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="kerberoastables"
                              id="checkbox_kerberoastables" />
                            <label class="form-check-label" for="checkbox_kerberoastables">
                              Kerberoastable accounts
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="as_rep" id="checkbox_as_rep" />
                            <label class="form-check-label" for="checkbox_as_rep">
                              Accounts are AS-REP-roastable
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox"
                              value="non-dc_with_unconstrained_delegations"
                              id="checkbox_non-dc_with_unconstrained_delegations" />
                            <label class="form-check-label" for="checkbox_non-dc_with_unconstrained_delegations">
                              Non-DC accounts with unconstrained delegations
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="users_constrained_delegations"
                              id="checkbox_users_constrained_delegations" />
                            <label class="form-check-label" for="checkbox_users_constrained_delegations">
                              Users with constrained delegations
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="krb_last_change"
                              id="checkbox_krb_last_change" />
                            <label class="form-check-label" for="checkbox_krb_last_change">
                              Days for which krbtgt has not been updated
                            </label>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div class="accordion-item">
                      <h2 class="accordion-header" id="heading4">
                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                          data-bs-target="#collapse4" aria-expanded="false" aria-controls="collapseThree">
                          Passwords
                        </button>
                      </h2>
                      <div id="collapse4" class="accordion-collapse collapse" aria-labelledby="heading4"
                        data-bs-parent="#accordion_evolution_time">
                        <div class="accordion-body">
                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="users_pwd_cleartext"
                              id="checkbox_users_pwd_cleartext" />
                            <label class="form-check-label" for="checkbox_users_pwd_cleartext">
                              Users with clear text password
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="dc_impersonation"
                              id="checkbox_dc_impersonation" />
                            <label class="form-check-label" for="checkbox_dc_impersonation">
                              DCs impersonate by others
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="users_pwd_not_changed_since"
                              id="checkbox_users_pwd_not_changed_since" />
                            <label class="form-check-label" for="checkbox_users_pwd_not_changed_since">
                              Unchanged passwords > 3 months
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="computers_last_connexion"
                              id="checkbox_computers_last_connexion" />
                            <label class="form-check-label" for="checkbox_computers_last_connexion">
                              Ghost computers
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="never_expires"
                              id="checkbox_never_expires" />
                            <label class="form-check-label" for="checkbox_never_expires">
                              Users w/o password expiration
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="dormants_accounts"
                              id="checkbox_dormants_accounts" />
                            <label class="form-check-label" for="checkbox_dormants_accounts">
                              Dormant accounts
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="computers_os_obsolete"
                              id="checkbox_computers_os_obsolete" />
                            <label class="form-check-label" for="checkbox_computers_os_obsolete">
                              Computers with obsolete OS
                            </label>
                          </div>

                          <div class="form-check">
                            <input class="form-check-input" type="checkbox" value="computers_without_laps"
                              id="checkbox_computers_without_laps" />
                            <label class="form-check-label" for="checkbox_computers_without_laps">
                              Computers with LAPS
                            </label>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="col-9">
                  <div>
                    <canvas id="chart-evolution-time-2" class="chart" style="padding-right: 10px"></canvas>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- Right column -->
      <div class="col-right">

        <!-- On-premise -->
        <div class="card main-card-category shadow mb-3 overview" id="right-col-on-prem">
          <div class="card-body">
            <h5 class="card-title">
              <i class="bi bi-exclamation-diamond-fill" style="color: rgb(245, 75, 75); margin-right: 5px"></i>
              <span class="threats-number">{{on_premise|immediate_risk}}</span> Dangerous
              {{on_premise|issue_or_issues}}
            </h5>
            <h6 class="card-subtitle mb-2 text-muted">
              Must be solved as soon as possible
            </h6>

            <div class="threats-list">{{on_premise|list_cards_dangerous_issues}}</div>

            <br />
            <h5 class="card-title">
              <i class="bi bi-exclamation-triangle-fill" style="color: rgb(245, 177, 75); margin-right: 5px"></i>
              <span class="threats-number">{{on_premise|potential_risk}}</span>
              {{on_premise|alert_or_alerts}}
            </h5>
            <h6 class="card-subtitle mb-2 text-muted">
              These issues should be looked into shortly
            </h6>
            <div class="threats-list">{{on_premise|list_cards_alert_issues}}</div>

            <br />
            <h5 class="card-title">
              <i class="bi bi-dash-circle-fill" style="color: rgb(255, 221, 0); margin-right: 5px"></i>
              <span class="threats-number">{{on_premise|minor_risk}}</span>
              {{on_premise|minor_alert_or_alerts}}
            </h5>
            <h6 class="card-subtitle mb-2 text-muted">
              Solve these issues to reach a better security level
            </h6>
            <div class="threats-list">{{on_premise|list_cards_minor_alert_issues}}</div>
          </div>
        </div>

        <!-- Azure -->
        <div class="card main-card-category shadow limit-height mb-3 overview" id="right-col-azure"
          style="display:none">
          <div class="card-body">
            <h5 class="card-title">
              <i class="bi bi-exclamation-diamond-fill" style="color: rgb(245, 75, 75); margin-right: 5px"></i>
              <span class="threats-number">{{azure|immediate_risk}}</span> Dangerous
              {{azure|issue_or_issues}}
            </h5>
            <h6 class="card-subtitle mb-2 text-muted">
              Must be solved as soon as possible
            </h6>

            <div class="threats-list">{{azure|list_cards_dangerous_issues}}</div>

            <br />
            <h5 class="card-title">
              <i class="bi bi-exclamation-triangle-fill" style="color: rgb(245, 177, 75); margin-right: 5px"></i>
              <span class="threats-number">{{azure|potential_risk}}</span>
              {{azure|alert_or_alerts}}
            </h5>
            <h6 class="card-subtitle mb-2 text-muted">
              These issues should be looked into shortly
            </h6>
            <div class="threats-list">{{azure|list_cards_alert_issues}}</div>

            <br />
            <h5 class="card-title">
              <i class="bi bi-dash-circle-fill" style="color: rgb(255, 221, 0); margin-right: 5px"></i>
              <span class="threats-number">{{azure|minor_risk}}</span>
              {{azure|minor_alert_or_alerts}}
            </h5>
            <h6 class="card-subtitle mb-2 text-muted">
              Solve these issues to reach a better security level
            </h6>
            <div class="threats-list">{{azure|list_cards_minor_alert_issues}}</div>
          </div>
        </div>

      </div>
    </div>
  </div>

  <script type="text/javascript" src="../js/popper.min.js"></script>
  <script type="text/javascript" src="../js/bootstrap.js"></script>
  <script type="text/javascript" src="../js/jquery.min.js"></script>
  <script type="text/javascript" src="../js/chart.umd.min.js"></script>
  <script type="text/javascript" src="../js/main_circle.js"></script>
  <script type="text/javascript" src="../js/hide_cards.js"></script>
  <script type="text/javascript" src="../js/search_bar.js"></script>
  <script type="text/javascript" src="../js/chartjs-adapter-date-fns.bundle.min.js"></script>

  <script>
    // evolution time 2

    const checkboxes = document.querySelectorAll('input[type="checkbox"]');

    const chart = document
      .getElementById('chart-evolution-time-2')
      .getContext('2d');

    const data = {
      labels: `{{label_evolution_time}}`,
    };

    // créer le graphique avec les données initiales
    const myChart = new Chart(chart, {
      type: 'line',
      data: data,
      options: {
        responsive: true,
        plugins: {
          center_text_doughnut: false,
          shadow_plugin: false,
          legend: {
            position: 'bottom',
            align: 'start',
          },
        },
        scales: {
          x: {
            stacked: true,
            type: 'time',
            title: {
              display: true,
              text: 'Date',
            },
          },
          y: {
            title: {
              display: true,
              text: 'Number of',
            },
          },
        },
      },
    });

    const dico_data_evolution_time = `{{dico_data_evolution_time}}`;

    const COLORS = [
      '#4dc9f6',
      '#f67019',
      '#f53794',
      '#537bc4',
      '#acc236',
      '#166a8f',
      '#00a950',
      '#58595b',
      '#8549ba',
    ];

    function hexToRgba(hex, opacity) {
      hex = hex.replace('#', '');
      const r = parseInt(hex.substring(0, 2), 16);
      const g = parseInt(hex.substring(2, 4), 16);
      const b = parseInt(hex.substring(4, 6), 16);
      const alpha = opacity / 100;
      return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')';
    }

    checkboxes.forEach((checkbox) => {
      checkbox.addEventListener('change', function () {
        const checkboxValue = checkbox.value;
        const checkboxLabel = $(checkbox).next().text().trim();

        if (checkbox.checked) {
          random_color = COLORS[Math.floor(Math.random() * COLORS.length)];

          const newDataset = {
            label: [checkboxLabel],
            backgroundColor: hexToRgba(random_color, 50),
            borderColor: random_color,
            data: dico_data_evolution_time[checkboxValue], // NaN possible : TODO : implement NaN if a value is missing
          };
          data.datasets.push(newDataset);
        } else {
          var index = -1;
          for (var i = 0; i < data.datasets.length; i++) {
            if (data.datasets[i].label == checkboxLabel) {
              index = i;
            }
          }
          if (index > -1) {
            data.datasets.splice(index, 1);
          }
        }
        myChart.update();
      });
    });

    // evolution time 1
    const ctxEvolutionTime1 = document.querySelector(
      '#chart-evolution-time-1',
    );
    new Chart(ctxEvolutionTime1, {
      type: 'bar',
      data: {
        labels: `{{label_evolution_time}}`,
        datasets: [
          {
            label: 'Immediate risk',
            data: `{{value_evolution_time_immediate_risk}}`,
            backgroundColor: 'rgb(245, 75, 75)',
            borderColor: 'rgb(245, 75, 75)',

            fill: true,
            hoverOffset: 4,
          },
          {
            label: 'Potential risk',
            data: `{{value_evolution_time_potential_risk}}`,
            backgroundColor: 'rgb(245, 177, 75)',
            borderColor: 'rgb(245, 177, 75)',

            fill: true,
            hoverOffset: 4,
          },
          {
            label: 'Minor risk',
            data: `{{value_evolution_time_minor_risk}}`,
            backgroundColor: 'rgb(255, 221, 0)',
            borderColor: 'rgb(255, 221, 0)',

            fill: true,
            hoverOffset: 4,
          },
          {
            label: 'Handled risk',
            data: `{{value_evolution_time_handled_risk}}`,
            backgroundColor: 'rgb(91, 180, 32)',
            borderColor: 'rgb(91, 180, 32)',

            fill: true,
            hoverOffset: 4,
          },
          {
            label: 'Not Evaluated',
            data: `{{value_not_evaluated_time_handled_risk}}`,
            backgroundColor: 'rgb(133,135,150)',
            borderColor: 'rgb(133,135,150)',

            fill: true,
            hoverOffset: 4,
          },
        ],
      },
      options: {
        responsive: true,
        animation: {
          duration: 0,
        },
        plugins: {
          title: {
            display: true,
            text: 'Distribution of exposure categories by time',
          },
          tooltip: {
            mode: 'index',
          },
          center_text_doughnut: false,
          shadow_plugin: false,
          legend: {
            position: 'bottom',
            align: 'start',
          },
        },
        interaction: {
          mode: 'nearest',
          axis: 'x',
          intersect: false,
        },
        scales: {
          x: {
            stacked: true,
            type: 'time',
            title: {
              display: true,
              text: 'Date',
            },
          },
          y: {
            min: 0,
            stacked: true,
            title: {
              display: true,
              text: 'Number of indicators summed',
            },
          },
        },
      },
    });

    // Users stats chart
    const ctxUsers = document.querySelector('#chart-users');
    new Chart(ctxUsers, {
      type: 'doughnut',
      data: {
        labels: `{{domain_names}}`,
        datasets: [
          {
            label: 'Users',
            data: `{{users_per_domain}}`,
            backgroundColor: [
              'rgb(3, 4, 94)',
              'rgb(2, 62, 138)',
              'rgb(0, 119, 182)',
              'rgb(0, 150, 199)',
              'rgb(0, 180, 216)',
              'rgb(72, 202, 228)',
              'rgb(144, 224, 239)',
              'rgb(173, 232, 244)',
            ],
            hoverOffset: 4,
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        plugins: {
          center_text_doughnut: false,
          shadow_plugin: false,
          legend: {
            position: 'bottom',
            align: 'start',
            labels: {
              boxWidth: 20,
              font: {
                size: 10,
              },
            },
          },
        },
      },
    });

    // Computers stats chart
    const ctxComputers = document.querySelector('#chart-computers');
    new Chart(ctxComputers, {
      type: 'doughnut',
      data: {
        labels: `{{domain_names}}`,
        datasets: [
          {
            label: 'Computers',
            data: `{{computers_per_domain}}`,
            backgroundColor: [
              'rgb(27, 67, 50)',
              'rgb(45, 106, 79)',
              'rgb(64, 145, 108)',
              'rgb(82, 183, 136)',
              'rgb(116, 198, 157)',
              'rgb(149, 213, 178)',
              'rgb(183, 228, 199)',
              'rgb(216, 243, 220)',
            ],
            hoverOffset: 4,
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        plugins: {
          center_text_doughnut: false,
          shadow_plugin: false,
          legend: {
            position: 'bottom',
            align: 'start',
            labels: {
              boxWidth: 20,
              font: {
                size: 10,
              },
            },
          },
        },
      },
    });

    // OS stats chart
    const ctxOS = document.querySelector('#chart-os');
    new Chart(ctxOS, {
      type: 'doughnut',
      data: {
        labels: `{{os_labels}}`,
        datasets: [
          {
            label: 'OS',
            data: `{{os_repartition}}`,
            backgroundColor: `{{os_colors}}`,
            hoverOffset: 4,
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        plugins: {
          center_text_doughnut: false,
          shadow_plugin: false,
          legend: {
            position: 'bottom',
            align: 'start',
            labels: {
              boxWidth: 20,
              font: {
                size: 10,
              },
            },
          },
        },
      },
    });

    // Plugin to have text at the center of the donut
    const centerTextDoughnutPlugin = {
      id: 'center_text_doughnut',
      beforeDraw: function (chart) {
        if (chart.config.options.elements.center) {
          // Get ctx from string
          const { ctx } = chart;

          // Get options from the center object in options
          var centerConfig = chart.config.options.elements.center;
          var fontStyle = centerConfig.fontStyle || 'Arial';
          var txt = centerConfig.text;
          var color = centerConfig.color || '#000';
          var fontSizeToUse = centerConfig.fontSize || '60px';

          // Set font settings to draw it correctly.
          ctx.textAlign = 'center';
          ctx.textBaseline = 'middle';
          var centerX = (chart.chartArea.left + chart.chartArea.right) / 2;
          var centerY = (chart.chartArea.top + chart.chartArea.bottom) / 2;
          ctx.font = '700 ' + fontSizeToUse + ' ' + fontStyle;
          ctx.fillStyle = color;

          // Draw text in center
          ctx.fillText(txt, centerX, centerY);
        }
      },
    };

    // Plugin for a pretty shadow effect
    const ShadowPlugin = {
      id: 'shadow_plugin',
      beforeDraw: (chart, args, options) => {
        const { ctx } = chart;
        ctx.shadowColor = 'rgba(0, 0, 0, 0.3)';
        ctx.shadowBlur = 10;
        ctx.shadowOffsetX = 5;
        ctx.shadowOffsetY = 5;
      },
    };

    Chart.register(centerTextDoughnutPlugin);
    Chart.register(ShadowPlugin);

    // On-prem charts
    const OnPremiseMain = document.querySelector('#chart-details-main-on-premise');
    new Chart(OnPremiseMain, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{on_premise|main_graph_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 15,
        },
        elements: {
          center: {
            text: '{{on_premise|main_letter_grade}}',
            color: 'rgb({{on_premise|main_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '70px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    const OnPremise1 = document.querySelector('#chart-details-1-on-premise');
    new Chart(OnPremise1, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{on_premise|permissions_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 10,
        },
        elements: {
          center: {
            text: '{{on_premise|permissions_letter_grade}}',
            color: 'rgb({{on_premise|permissions_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '50px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    const OnPremise2 = document.querySelector('#chart-details-2-on-premise');
    new Chart(OnPremise2, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{on_premise|passwords_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 10,
        },
        elements: {
          center: {
            text: '{{on_premise|passwords_letter_grade}}',
            color: 'rgb({{on_premise|passwords_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '50px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    const Onpremise3 = document.querySelector('#chart-details-3-on-premise');
    new Chart(Onpremise3, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{on_premise|kerberos_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 10,
        },
        elements: {
          center: {
            text: '{{on_premise|kerberos_letter_grade}}',
            color: 'rgb({{on_premise|kerberos_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '50px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    const Onpremise4 = document.querySelector('#chart-details-4-on-premise');
    new Chart(Onpremise4, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{on_premise|misc_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 10,
        },
        elements: {
          center: {
            text: '{{on_premise|misc_letter_grade}}',
            color: 'rgb({{on_premise|misc_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '50px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    // Azure charts
    const AzureMain = document.querySelector('#chart-details-main-azure');
    new Chart(AzureMain, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{azure|main_graph_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 15,
        },
        elements: {
          center: {
            text: '{{azure|main_letter_grade}}',
            color: 'rgb({{azure|main_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '70px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    const Azure1 = document.querySelector('#chart-details-1-azure');
    new Chart(Azure1, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{azure|attack_path_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 10,
        },
        elements: {
          center: {
            text: '{{azure|attack_path_letter_grade}}',
            color: 'rgb({{azure|attack_path_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '50px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    const Azure2 = document.querySelector('#chart-details-2-azure');
    new Chart(Azure2, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{azure|ad_connect_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 10,
        },
        elements: {
          center: {
            text: '{{azure|ad_connect_letter_grade}}',
            color: 'rgb({{azure|ad_connect_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '50px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    const Azure3 = document.querySelector('#chart-details-3-azure');
    new Chart(Azure3, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{azure|ms_graph_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 10,
        },
        elements: {
          center: {
            text: '{{azure|ms_graph_letter_grade}}',
            color: 'rgb({{azure|ms_graph_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '50px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    const Azure4 = document.querySelector('#chart-details-4-azure');
    new Chart(Azure4, {
      type: 'doughnut',
      data: {
        labels: ['Critical', 'Major', 'Minor', 'Handled'],
        datasets: [
          {
            label: 'Vulnerabilities',
            cutout: '60%',
            data: `{{azure|sp_mi_data}}`,
            backgroundColor: [
              'rgba(245, 75, 75, 0.9)',
              'rgba(245, 177, 75, 0.9)',
              'rgba(255, 221, 0, 0.9)',
              'rgba(91, 180, 32, 0.9)',
            ],
          },
        ],
      },
      options: {
        animation: {
          duration: 0,
        },
        layout: {
          padding: 10,
        },
        elements: {
          center: {
            text: '{{azure|sp_mi_letter_grade}}',
            color: 'rgb({{azure|sp_mi_letter_color}})',
            fontStyle: 'Arial',
            fontSize: '50px',
          },
        },
        plugins: {
          shadow_plugin: false,
          legend: {
            display: false,
          },
        },
      },
    });

    // Tooltip management
    const tooltipTriggerList = document.querySelectorAll(
      '[data-bs-toggle="tooltip"]',
    );
    const tooltipList = [...tooltipTriggerList].map(
      (tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl),
    );
  </script>
</body>

</html>
