<commit_before><!--
All Emoncms code is released under the GNU Affero General Public License.
See COPYRIGHT.txt and LICENSE.txt.

---------------------------------------------------------------------
Emoncms - open source energy visualisation
Part of the OpenEnergyMonitor project:
http://openenergymonitor.org
-->

<?php

// no direct access
defined('EMONCMS_EXEC') or die('Restricted access');

global $path, $session;
?>

<style>
  .apitext {
    border: 0;
    border-bottom: 1px solid #ccc;
    color: #F78623;
    font-weight: bold;
    width: 30px;
  }

</style>

<div class='lightbox' style="margin-bottom:20px; margin-left:3%; margin-right:3%;">
  
  <h2><?php echo _("API Helper"); ?></h2>
  <table class="table table-striped table-bordered">
    <p><?php echo _("API keys are used to give authenticated access without login in via a normal session."); ?></p>
    <tr>
      <th>API Key</th><th>Action</th>
    </tr>
    <tr>
      <td>
        <b><?php echo _("Read only access: "); ?></b><?php echo $user['apikey_read']; ?>
      </td>
      <td>
        <form action="newapiread" method="post">
          <input type="submit" class="btn btn-warning" value="<?php echo _('new'); ?>">
        </form>
      </td>
    </tr>

    <tr>
      <td style="vertical-align:middle">
        <b><?php echo _("Write only access: "); ?></b><?php echo $user['apikey_write']; ?>
      </td>
      <td>
        <form action="newapiwrite" method="post">
          <input type="submit" class="btn btn-warning" value="<?php echo _('new'); ?>" >
        </form>
      </td>
    </tr>
  </table>
  <commit_msg>Label info about api keys<commit_after><!--
All Emoncms code is released under the GNU Affero General Public License.
See COPYRIGHT.txt and LICENSE.txt.

---------------------------------------------------------------------
Emoncms - open source energy visualisation
Part of the OpenEnergyMonitor project:
http://openenergymonitor.org
-->

<?php

// no direct access
defined('EMONCMS_EXEC') or die('Restricted access');

global $path, $session;
?>

<style>
  .apitext {
    border: 0;
    border-bottom: 1px solid #ccc;
    color: #F78623;
    font-weight: bold;
    width: 30px;
  }

</style>

<div class='lightbox' style="margin-bottom:20px; margin-left:3%; margin-right:3%;">
  
  <h2><?php echo _("API Helper"); ?></h2>
  <table class="table table-striped table-bordered">
    <p><?php echo _("API keys are used to give authenticated access without login in via a normal session."); ?></p>   
    <tr>
      <td>
        <b><?php echo _("Read only access: "); ?></b><?php echo $user['apikey_read']; ?>
        <br>
        <span class="label label-info"><?php echo _("Allows to access in read only mode"); ?></span>
      </td>
      <td>
        <form action="newapiread" method="post">
          <input type="submit" class="btn btn-warning" value="<?php echo _('new'); ?>">
        </form>
      </td>
    </tr>

    <tr>
      <td style="vertical-align:middle">
        <b><?php echo _("Write only access: "); ?></b><?php echo $user['apikey_write']; ?>
        <br>
        <span class="label label-warning"><?php echo _("Keep secret. Write mode access"); ?></span>
      </td>
      <td>
        <form action="newapiwrite" method="post">
          <input type="submit" class="btn btn-warning" value="<?php echo _('new'); ?>" >
        </form>
      </td>
    </tr>
  </table>
  
{'fraction_non_alphanumeric': 0.21552996752288162, 'fraction_numerical': 0.008857395925597875, 'mean_word_length': 2.492783505154639, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, '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': '5241928', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1095, 'n_words': 308}