<commit_before><?php
/*=========================================================================
 MIDAS Server
 Copyright (c) Kitware SAS. 26 rue <NAME>. 69100 Villeurbanne, FRANCE
 All rights reserved.
 More information http://www.kitware.com

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0.txt

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
=========================================================================*/
?>
<script type="text/javascript" src="<?php echo $this->moduleWebroot?>/public/js/scalar/scalar.details.js" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/scalar/scalar.details.css" />

<input type="hidden" class="scalarId" value="<?php echo $this->scalar->getKey(); ?>" />

<div class="thisScalarInfo">
  <div class="sectionDivider"><span class="sectionTitle">Info</span></div>
  <table class="scalarInfoTable"><tbody>
    <tr><th>Metric:</th><td><span id="thisMetric"><?php echo $this->scalar->getTrend()->getMetricName(); ?></span></td></tr>
    <tr><th>Value:</th><td><span id="thisValue"><?php echo $this->scalar->getValue().' '.$this->scalar->getTrend()->getUnit(); ?></span></td></tr>
    <tr><th>Submitted:</th>
        <td>
          <span id="thisSubmitTime"><?php echo $this->scalar->getSubmitTime(); ?></span>
          <?php
          if($this->submittedBy)
            {
            echo ' by <a href="'.$this->webroot.'/user/'.$this->submittedBy->getKey().'">'.$this->submittedBy->getFullName().'</a> ';
            }
          if(!$this->scalar->getOfficial())
            {
            echo '(unofficial)';
            }
          ?>
        </td>
    </tr>
    <tr>
      <th>Revision:</th>
      <td><span id="thisProducerRev"><?php echo $this->revisionHtml; ?></span></td>
    </tr>
    <?php
    if($this->scalar->getBranch())
      { ?>
      <tr>
        <th>Branch:</th>
        <td><?php echo $this->scalar->getBranch();?></td>
      </tr>
    <?php
      }
    if($this->scalar->getBuildResultsUrl())
      { ?>
      <tr>
        <th>Build Results:</th>
        <td>
          <a target="_blank"
             href="<?php echo $this->scalar->getBuildResultsUrl();?>">Click here</a>
        </td>
      </tr>
    <?php
      }

      foreach($this->extraUrls as $linkInfo)
        {
        echo '<tr><th>'.$linkInfo['label'].':</th><td>';
        echo '<a target="_blank" href="'.$linkInfo['href'].'">'.$linkInfo['text'].'</a>';
        echo '</td></tr>';
        }
    ?>
  </tbody></table>
</div>

<?php if(count($this->extraParams))
  { ?>
  <div class="extraParams">
    <div class="sectionDivider"><span class="sectionTitle">Other Information</span></div>
    <table class="scalarInfoTable"><tbody>
    <?php foreach($this->extraParams as $key => $value)
      {
      echo '<tr><th>'.$key.':</th><td>'.$value.'</td></tr>';
      }
    ?>
  </tbody></table>
  </div>
<?php } ?>

<div class="otherScalars">
  <div class="sectionDivider"><span class="sectionTitle">All values for this submission</span></div>
  <table class="otherScalarTable"><tbody>
  <?php
  foreach($this->otherValues as $metricName => $value)
    {
    echo '<tr><th>'.$metricName.':</th><td>'.$value.'</td></tr>';
    }
  ?>
  </tbody></table>
</div><commit_msg>Fix bug when no extra urls exist on scalar<commit_after><?php
/*=========================================================================
 MIDAS Server
 Copyright (c) Kitware SAS. 26 <NAME>. 69100 Villeurbanne, FRANCE
 All rights reserved.
 More information http://www.kitware.com

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0.txt

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
=========================================================================*/
?>
<script type="text/javascript" src="<?php echo $this->moduleWebroot?>/public/js/scalar/scalar.details.js" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/scalar/scalar.details.css" />

<input type="hidden" class="scalarId" value="<?php echo $this->scalar->getKey(); ?>" />

<div class="thisScalarInfo">
  <div class="sectionDivider"><span class="sectionTitle">Info</span></div>
  <table class="scalarInfoTable"><tbody>
    <tr><th>Metric:</th><td><span id="thisMetric"><?php echo $this->scalar->getTrend()->getMetricName(); ?></span></td></tr>
    <tr><th>Value:</th><td><span id="thisValue"><?php echo $this->scalar->getValue().' '.$this->scalar->getTrend()->getUnit(); ?></span></td></tr>
    <tr><th>Submitted:</th>
        <td>
          <span id="thisSubmitTime"><?php echo $this->scalar->getSubmitTime(); ?></span>
          <?php
          if($this->submittedBy)
            {
            echo ' by <a href="'.$this->webroot.'/user/'.$this->submittedBy->getKey().'">'.$this->submittedBy->getFullName().'</a> ';
            }
          if(!$this->scalar->getOfficial())
            {
            echo '(unofficial)';
            }
          ?>
        </td>
    </tr>
    <tr>
      <th>Revision:</th>
      <td><span id="thisProducerRev"><?php echo $this->revisionHtml; ?></span></td>
    </tr>
    <?php
    if($this->scalar->getBranch())
      { ?>
      <tr>
        <th>Branch:</th>
        <td><?php echo $this->scalar->getBranch();?></td>
      </tr>
    <?php
      }
    if($this->scalar->getBuildResultsUrl())
      { ?>
      <tr>
        <th>Build Results:</th>
        <td>
          <a target="_blank"
             href="<?php echo $this->scalar->getBuildResultsUrl();?>">Click here</a>
        </td>
      </tr>
    <?php
      }
      if ($this->extraUrls)
        {
        foreach($this->extraUrls as $linkInfo)
          {
          echo '<tr><th>'.$linkInfo['label'].':</th><td>';
          echo '<a target="_blank" href="'.$linkInfo['href'].'">'.$linkInfo['text'].'</a>';
          echo '</td></tr>';
          }
        }
    ?>
  </tbody></table>
</div>

<?php if(count($this->extraParams))
  { ?>
  <div class="extraParams">
    <div class="sectionDivider"><span class="sectionTitle">Other Information</span></div>
    <table class="scalarInfoTable"><tbody>
    <?php foreach($this->extraParams as $key => $value)
      {
      echo '<tr><th>'.$key.':</th><td>'.$value.'</td></tr>';
      }
    ?>
  </tbody></table>
  </div>
<?php } ?>

<div class="otherScalars">
  <div class="sectionDivider"><span class="sectionTitle">All values for this submission</span></div>
  <table class="otherScalarTable"><tbody>
  <?php
  foreach($this->otherValues as $metricName => $value)
    {
    echo '<tr><th>'.$metricName.':</th><td>'.$value.'</td></tr>';
    }
  ?>
  </tbody></table>
</div>
{'fraction_non_alphanumeric': 0.23922994076467421, 'fraction_numerical': 0.0029617662897145933, 'mean_word_length': 3.1549217002237135, 'pattern_counts': {'":': 0, '<': 243, '<?xml version=': 0, '>': 318, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '6529215', 'n_tokens_mistral': 2247, 'n_tokens_neox': 2253, 'n_words': 476}