<commit_before><div class="row">
  <div class="col-lg-12">
    <h1 class="page-header">
      MAZI Zone <small><%= I18n.translate("admin.devices-page.subheader") %></small>
    </h1>
  </div>
</div>

<% unless error_msg.nil? %>
  <div class="alert alert-danger">
    <p><%= error_msg %></p>
  </div>
<% end %>

<div class="row">
  <div class='col-md-12 col-lg-12'>
    <p>
      <%= I18n.translate("admin.devices-page.message") %> <a href="https://github.com/mazi-project/guides/wiki/Products" target="_blank"><%= I18n.translate("general.messages.here") %></a>
    </p>
  </div>
  <div class='col-md-12 col-lg-6'>
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="panel-title"><%= I18n.translate("admin.devices-page.sensors-panel.header") %>
          <i class="fa fa-info-circle pull-right" aria-hidden="true" title="<%= I18n.translate("admin.devices-page.sensors-panel.header-hint") %>"></i>
        </div>
      </div>
      <!-- panel body -->
      <div class="panel-body">
        <div class="row">
          <div class='col-md-12'>
            <label class="switch" title="<%= I18n.translate("admin.devices-page.sensors-panel.toggle-sensors-hint") %>">
              <input type="checkbox" <%= sensors_enabled ? 'checked' : '' %>>
              <div class="slider round enabled-sensors-switch"></div>
            </label>
            <span class="device-enable-msg"><%= I18n.translate("admin.devices-page.sensors-panel.toggle-sensors-message") %> (<a href="/index_sensors" target="_blank"><%= I18n.translate("general.messages.here") %></a>)</span>
          </div>
        </div>
        <% if sensors_db_exist %>
        <div class="row">
          <div class='col-md-12'>
            <% if available_sensors.length > 0 %>
            <table class="table">
              <thead>
                <tr>
                  <th title="Sensor Type"><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.type") %></th>
                  <th title="Sensor Status"><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.status") %></th>
                  <th title="Number of measurements"><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.entries") %></th>
                  <th title="Actions that can be performed on the sensor" class='text-center'><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.actions") %></th>
                </tr>
              </thead>
              <tbody>
                <% available_sensors.each do |sensor| %>
                <tr>
                  <td><%= sensor[:type] %></td>
                  <td id="sensor_type_<%= sensor[:id] %>_td"><%= sensor[:status] %></td>
                  <td id="sensor_entries_<%= sensor[:id] %>_td"><%= sensor[:nof_entries]%></td>
                  <td>
                     <div class="text-center">
                      <div class="btn-group pull-center">
                        <a class="btn btn-success start_sensing" id='start_sensing_<%= sensor[:type] %>_<%= sensor[:id] %>' data-toggle="modal" data-target="#start-sensing-modal-<%= sensor[:id] %>" title="<%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.start-button-hint") %>" <%= 'disabled' if sensor[:status] == 'not found' || sensor[:status] == 'active' %>>
                          <i class="fa fa-play"></i>
                        </a>
                        <a class="btn btn-danger delete_sensor_data" id='delete_sensor_data_<%= sensor[:type] %>_<%= sensor[:id] %>' data-toggle="modal" data-target="#delete-sensing-measurements-modal-<%= sensor[:id] %>" title="<%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.delete-button-hint") %>">
                          <i class="fa fa-remove"></i>
                        </a>
                      </div>
                    </div>
                  </td>
                </tr>
                <% end %>
              </tbody>
            </table>
            <p><b>* Hint: </b><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.sensehat-calibration-hint") %> (<a href="https://www.raspberrypi.org/documentation/hardware/sense-hat/" target="_blank"><%= I18n.translate("general.messages.here") %></a>)</p>
            <% else %>
              <p><%= I18n.translate("admin.devices-page.sensors-panel.no-sensors-message") %></p>
            <% end %>
          </div>
        </div>
        <% else %>
        <div class="row">
          <div class="col-lg-12">
            <p><%= I18n.translate("admin.devices-page.sensors-panel.init-sensors-message") %></p>
            <button class="btn btn-success pull-right init-sensor-db" data-toggle="modal" data-target="#init-sensor-db-modal" title="<%= I18n.translate("admin.devices-page.sensors-panel.init-button-hint") %>"><%= I18n.translate("general.buttons.initialize") %></button>
          </div>
        </div>
        <% end %>
      </div>
    </div>
  </div>

  <div class='col-md-12 col-lg-6'>
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="panel-title"><%= I18n.translate("admin.devices-page.camera-panel.header") %>
          <i class="fa fa-info-circle pull-right" aria-hidden="true" title="<%= I18n.translate("admin.devices-page.camera-panel.header-hint") %>"></i>
        </div>
      </div><commit_msg>removing sensors db check in admin devices<commit_after><div class="row">
  <div class="col-lg-12">
    <h1 class="page-header">
      MAZI Zone <small><%= I18n.translate("admin.devices-page.subheader") %></small>
    </h1>
  </div>
</div>

<% unless error_msg.nil? %>
  <div class="alert alert-danger">
    <p><%= error_msg %></p>
  </div>
<% end %>

<div class="row">
  <div class='col-md-12 col-lg-12'>
    <p>
      <%= I18n.translate("admin.devices-page.message") %> <a href="https://github.com/mazi-project/guides/wiki/Products" target="_blank"><%= I18n.translate("general.messages.here") %></a>
    </p>
  </div>
  <div class='col-md-12 col-lg-6'>
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="panel-title"><%= I18n.translate("admin.devices-page.sensors-panel.header") %>
          <i class="fa fa-info-circle pull-right" aria-hidden="true" title="<%= I18n.translate("admin.devices-page.sensors-panel.header-hint") %>"></i>
        </div>
      </div>
      <!-- panel body -->
      <div class="panel-body">
        <div class="row">
          <div class='col-md-12'>
            <label class="switch" title="<%= I18n.translate("admin.devices-page.sensors-panel.toggle-sensors-hint") %>">
              <input type="checkbox" <%= sensors_enabled ? 'checked' : '' %>>
              <div class="slider round enabled-sensors-switch"></div>
            </label>
            <span class="device-enable-msg"><%= I18n.translate("admin.devices-page.sensors-panel.toggle-sensors-message") %> (<a href="/index_sensors" target="_blank"><%= I18n.translate("general.messages.here") %></a>)</span>
          </div>
        </div>
        <div class="row">
          <div class='col-md-12'>
            <% if available_sensors.length > 0 %>
            <table class="table">
              <thead>
                <tr>
                  <th title="Sensor Type"><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.type") %></th>
                  <th title="Sensor Status"><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.status") %></th>
                  <th title="Number of measurements"><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.entries") %></th>
                  <th title="Actions that can be performed on the sensor" class='text-center'><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.actions") %></th>
                </tr>
              </thead>
              <tbody>
                <% available_sensors.each do |sensor| %>
                <tr>
                  <td><%= sensor[:type] %></td>
                  <td id="sensor_type_<%= sensor[:id] %>_td"><%= sensor[:status] %></td>
                  <td id="sensor_entries_<%= sensor[:id] %>_td"><%= sensor[:nof_entries]%></td>
                  <td>
                     <div class="text-center">
                      <div class="btn-group pull-center">
                        <a class="btn btn-success start_sensing" id='start_sensing_<%= sensor[:type] %>_<%= sensor[:id] %>' data-toggle="modal" data-target="#start-sensing-modal-<%= sensor[:id] %>" title="<%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.start-button-hint") %>" <%= 'disabled' if sensor[:status] == 'not found' || sensor[:status] == 'active' %>>
                          <i class="fa fa-play"></i>
                        </a>
                        <a class="btn btn-danger delete_sensor_data" id='delete_sensor_data_<%= sensor[:type] %>_<%= sensor[:id] %>' data-toggle="modal" data-target="#delete-sensing-measurements-modal-<%= sensor[:id] %>" title="<%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.delete-button-hint") %>">
                          <i class="fa fa-remove"></i>
                        </a>
                      </div>
                    </div>
                  </td>
                </tr>
                <% end %>
              </tbody>
            </table>
            <p><b>* Hint: </b><%= I18n.translate("admin.devices-page.sensors-panel.sensors-table.sensehat-calibration-hint") %> (<a href="https://www.raspberrypi.org/documentation/hardware/sense-hat/" target="_blank"><%= I18n.translate("general.messages.here") %></a>)</p>
            <% else %>
              <p><%= I18n.translate("admin.devices-page.sensors-panel.no-sensors-message") %></p>
            <% end %>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class='col-md-12 col-lg-6'>
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="panel-title"><%= I18n.translate("admin.devices-page.camera-panel.header") %>
          <i class="fa fa-info-circle pull-right" aria-hidden="true" title="<%= I18n.translate("admin.devices-page.camera-panel.header-hint") %>"></i>
        </div>
      </div>
{'fraction_non_alphanumeric': 0.2042862760519072, 'fraction_numerical': 0.011993708218639402, 'mean_word_length': 2.2816129032258066, 'pattern_counts': {'":': 0, '<': 303, '<?xml version=': 0, '>': 305, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2452209', 'n_tokens_mistral': 3424, 'n_tokens_neox': 3110, 'n_words': 513}