<commit_before><div class="row">
  <div class="col-lg-12">
    <h1 class="page-header">
      Mazizone <small>Applications</small>
    </h1>
  </div>
</div>

<div class="row">
  <% unless error_msg.nil? %>
  <div class="alert alert-danger">
    <p><%= error_msg %></p>
  </div>
  <% end %>
  <table class="table">
    <thead>
      <tr>
        <th title="toggle the application visibility on the Portal">Active</th>
        <th title="the opperation status of portal (running/stoppped)">Status</th>
        <th title="the name of the application">Application Name</th>
        <th title="the URL of the application">URL</th>
        <th title="the desciption that will be shown on the application tile on the Portal">Description</th>
        <th title="overall clicks for the application">Click Counter</th>
        <th title="actions that can be performed on the application" class='text-center'>Actions</th>
      </tr>
    </thead>
    <tbody>
      <% applications.each do |app| %>
        <% status = mode != 'demo' ? app.status : "ON" %>
        <% web_app = app.name == 'NextCloud' || app.name == 'FramaDate' || app.name == 'WordPress' ? true : false %>
      <tr class="app_tr" id="app_tr_<%= app.id.to_s %>">
        <td scope="row">
          <label class="switch" title="<%= app.enabled ? 'disable' : 'enable' %> the application">
            <input type="checkbox" <%= app.enabled ? 'checked' : '' %>>
            <div class="slider round enabled-switch" id='enabled-switch_<%= app.id %>'></div>
          </label>
        </td>
        <td><%= status == 'ON' ? '<span class="label label-success">running</span>' : '<span class="label label-danger">stopped</span>' %></td>
        <td><%= app.name %></td>
        <td><%= app.url %></td>
        <td><%= app.description %></td>
        <td><%= app.click_counter %></td>
        <td>
          <div class="text-center">
            <div class="btn-group pull-center">
              <a class="btn btn-success start_app" id='start_app_<%= app.id %>' <%= 'disabled' if status == 'ON' || web_app %> title="<%= !web_app ? 'Start Application' : 'This is a web application, it always runs.' %>">
                <i class="fa fa-play"></i>
              </a>
              <a class="btn btn-warning stop_app" id='stop_app_<%= app.id %>' <%= 'disabled' if status == 'OFF' || web_app %> title="<%= !web_app ? 'Stop Application' : 'This is a web application, it always runs.' %>">
                <i class="fa fa-stop"></i>
              </a>
<!--               <a class="btn btn-info edit_app" id='edit_app_<%= app.id %>' data-toggle="modal" data-target="#edit-application-modal-<%= app.id %>" title="Edit Application">
                <i class="fa fa-pencil"></i>
              </a>
              <a class="btn btn-danger del_app" id='del_app_<%= app.id %>' title="Delete Application">
                <i class="fa fa-times"></i>
              </a> -->
            </div>
          </div>
        </td>
      </tr>
      <% end %> 
    </tbody>
    <tfoot>
      <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td><!-- <a class="btn btn-success teal-text pull-right" data-toggle="modal" data-target="#new-application-modal"  title="Create New Application"><i class="fa fa-plus"></i></a> --></td>
      </tr>
    </tfoot>
</table>
</div>

<div class="row">
  <h2>Application Instances</h2>
  <table class="table">
    <thead>
      <tr>
        <th title="toggle the application visibility on the Portal">Active</th>
        <th title="the name of the application">Application Name</th>
        <th title="the URL of the application">URL</th>
        <th title="the desciption that will be shown on the application tile on the Portal">Description</th>
        <th title="the parent application">Parent Application</th>
        <th title="overall clicks for the application">Click Counter</th>
        <th title="actions that can be performed on the application" class='text-center'>Actions</th>
      </tr>
    </thead>
    <tbody>
      <% application_instances.each do |app| %>
      <tr class="app_inst_tr" id="app_tr_<%= app.id.to_s %>">
        <td scope="row">
          <label class="switch" title="<%= app.enabled ? 'disable' : 'enable' %> the application"><commit_msg>admin application visuals and typos<commit_after><div class="row">
  <div class="col-lg-12">
    <h1 class="page-header">
      Mazizone <small>Applications</small>
    </h1>
  </div>
</div>

<div class="row">
  <% unless error_msg.nil? %>
  <div class="alert alert-danger">
    <p><%= error_msg %></p>
  </div>
  <% end %>
  <table class="table">
    <thead>
      <tr>
        <!-- <th title="toggle the application visibility on the Portal">Active</th> -->
        <th title="the opperation status of portal (running/stoppped)">Status</th>
        <th title="the name of the application">Application Name</th>
        <th title="the URL of the application">URL</th>
        <th title="the desciption that will be shown on the application tile on the Portal">Description</th>
        <!-- <th title="overall clicks for the application">Click Counter</th> -->
        <th title="actions that can be performed on the application" class='text-center'>Actions</th>
      </tr>
    </thead>
    <tbody>
      <% applications.each do |app| %>
        <% status = mode != 'demo' ? app.status : "ON" %>
        <% web_app = app.name == 'NextCloud' || app.name == 'FramaDate' || app.name == 'WordPress' ? true : false %>
      <tr class="app_tr" id="app_tr_<%= app.id.to_s %>">
        <!-- <td scope="row">
          <label class="switch" title="<%= app.enabled ? 'disable' : 'enable' %> the application">
            <input type="checkbox" <%= app.enabled ? 'checked' : '' %>>
            <div class="slider round enabled-switch" id='enabled-switch_<%= app.id %>'></div>
          </label>
        </td> -->
        <td><%= status == 'ON' ? '<span class="label label-success">running</span>' : '<span class="label label-danger">stopped</span>' %></td>
        <td><%= app.name %></td>
        <td><%= app.url %></td>
        <td><%= app.description %></td>
        <!-- <td><%= app.click_counter %></td> -->
        <td>
          <div class="text-center">
            <div class="btn-group pull-center">
              <a class="btn btn-success start_app" id='start_app_<%= app.id %>' <%= 'disabled' if status == 'ON' || web_app %> title="<%= !web_app ? 'Start Application' : 'This is a web application, it always runs.' %>">
                <i class="fa fa-play"></i>
              </a>
              <a class="btn btn-warning stop_app" id='stop_app_<%= app.id %>' <%= 'disabled' if status == 'OFF' || web_app %> title="<%= !web_app ? 'Stop Application' : 'This is a web application, it always runs.' %>">
                <i class="fa fa-stop"></i>
              </a>
<!--               <a class="btn btn-info edit_app" id='edit_app_<%= app.id %>' data-toggle="modal" data-target="#edit-application-modal-<%= app.id %>" title="Edit Application">
                <i class="fa fa-pencil"></i>
              </a>
              <a class="btn btn-danger del_app" id='del_app_<%= app.id %>' title="Delete Application">
                <i class="fa fa-times"></i>
              </a> -->
            </div>
          </div>
        </td>
      </tr>
      <% end %> 
    </tbody>
    <tfoot>
      <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td><!-- <a class="btn btn-success teal-text pull-right" data-toggle="modal" data-target="#new-application-modal"  title="Create New Application"><i class="fa fa-plus"></i></a> --></td>
      </tr>
    </tfoot>
</table>
</div>

<div class="row">
  <h2>Application Instances</h2>
  <table class="table">
    <thead>
      <tr>
        <th title="toggle the application visibility on the Portal">Active</th>
        <th title="the name of the application">Name</th>
        <th title="the URL of the application">URL</th>
        <th title="the desciption that will be shown on the application tile on the Portal">Description</th>
        <th title="the parent application">Parent Application</th>
        <th title="overall clicks for the application">Click Counter</th>
        <th title="actions that can be performed on the application" class='text-center'>Actions</th>
      </tr>
    </thead>
    <tbody>
      <% application_instances.each do |app| %>
      <tr class="app_inst_tr" id="app_tr_<%= app.id.to_s %>">
        <td scope="row">
          <label class="switch" title="<%= app.enabled ? 'disable' : 'enable' %> the application">
{'fraction_non_alphanumeric': 0.1925566343042071, 'fraction_numerical': 0.0013869625520110957, 'mean_word_length': 2.458433253397282, 'pattern_counts': {'":': 0, '<': 325, '<?xml version=': 0, '>': 325, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1434871', 'n_tokens_mistral': 2817, 'n_tokens_neox': 2688, 'n_words': 720}