<commit_before><div class="sidebar-component-title">
  <h5>Trace Selection</h5>
</div>

<div class="sidebar-component-close">
  <label {{action "close"}} title="Close Trace Selection" aria-label="Close">
    <font size="6">&times;</font>
  </label>
</div>

<div style="max-height:500px; overflow:auto; width:100%;">
  <table class="table table-hover">
    <thead>
      <tr>
        <th scope="col">Trace ID</th>
        <th scope="col">Soure Clazz</th>
        <th scope="col">Target Clazz</th>
        <th scope="col">Duration (ms)</th>
      </tr>
    </thead>
    <tbody>
      {{#each landscapeRepo.latestApplication.traces as |trace|}}
      {{#if trace.highlighted}}
      <tr {{action "clickedTrace" trace}} style="cursor: pointer" bgcolor="#cc8a8a">
        <th title={{trace.traceId}}>{{string-shortener trace.traceId 7}}</th>
        <td title={{trace.sourceClazz.name}}>{{string-shortener trace.sourceClazz.name 11}}</td>
        <td title={{trace.targetClazz.name}}>{{string-shortener trace.targetClazz.name 13}}</td>
        <td>{{format-number trace.totalTraceDuration}}</td>
      </tr>
      {{else}}
      <tr {{action "clickedTrace" trace}} style="cursor: pointer">
        <th title={{trace.traceId}}>{{string-shortener trace.traceId 7}}</th>
        <td title={{trace.sourceClazz.name}}>{{string-shortener trace.sourceClazz.name 11}}</td>
        <td title={{trace.targetClazz.name}}>{{string-shortener trace.targetClazz.name 13}}</td>
        <td>{{format-number trace.totalTraceDuration}}</td>
      </tr>
      {{/if}}
      {{/each}}
    </tbody>
  </table>
</div>

{{#if highlighter.isTrace}}
<hr>

<h5 align="center">Trace Replayer</h5>
<div class="mt-3 d-flex justify-content-between align-items-center">
  {{#bs-button onClick=(action "selectPreviousTraceStep") type="secondary" outline=true title="One step back"}}
  {{svg-jar "chevron-left" class="octicon align-middle"}}
  {{/bs-button}}
  <div>
    Step <strong>{{highlighter.currentTracePosition}}</strong> of {{highlighter.highlightedEntity.length}}
  </div>
  {{#bs-button onClick=(action "selectNextTraceStep") type="secondary" outline=true title="One step forth"}}
  {{svg-jar "chevron-right" class="octicon align-middle"}}
  {{/bs-button}}
</div>

<hr>

<h5 align="center">Trace Step Details</h5>
<div class="mt-3 d-flex justify-content-between">
  <table class="table table-striped">
  <tbody>
    <tr class="d-flex">
      <th class="col-3">Soure Clazz</th>
      <td class="col-9 container-word-wrap">{{highlighter.currentTraceStep.clazzCommunication.sourceClazz.name}}</td>
    </tr>
    <tr class="d-flex"><commit_msg>Disable trace selection button(s) depending on current trace step<commit_after><div class="sidebar-component-title">
  <h5>Trace Selection</h5>
</div>

<div class="sidebar-component-close">
  <label {{action "close"}} title="Close Trace Selection" aria-label="Close">
    <font size="6">&times;</font>
  </label>
</div>

<div style="max-height:500px; overflow:auto; width:100%;">
  <table class="table table-hover">
    <thead>
      <tr>
        <th scope="col">Trace ID</th>
        <th scope="col">Soure Clazz</th>
        <th scope="col">Target Clazz</th>
        <th scope="col">Duration (ms)</th>
      </tr>
    </thead>
    <tbody>
      {{#each landscapeRepo.latestApplication.traces as |trace|}}
      {{#if trace.highlighted}}
      <tr {{action "clickedTrace" trace}} style="cursor: pointer" bgcolor="#cc8a8a">
        <th title={{trace.traceId}}>{{string-shortener trace.traceId 7}}</th>
        <td title={{trace.sourceClazz.name}}>{{string-shortener trace.sourceClazz.name 11}}</td>
        <td title={{trace.targetClazz.name}}>{{string-shortener trace.targetClazz.name 13}}</td>
        <td>{{format-number trace.totalTraceDuration}}</td>
      </tr>
      {{else}}
      <tr {{action "clickedTrace" trace}} style="cursor: pointer">
        <th title={{trace.traceId}}>{{string-shortener trace.traceId 7}}</th>
        <td title={{trace.sourceClazz.name}}>{{string-shortener trace.sourceClazz.name 11}}</td>
        <td title={{trace.targetClazz.name}}>{{string-shortener trace.targetClazz.name 13}}</td>
        <td>{{format-number trace.totalTraceDuration}}</td>
      </tr>
      {{/if}}
      {{/each}}
    </tbody>
  </table>
</div>

{{#if highlighter.isTrace}}
<hr>

<h5 align="center">Trace Replayer</h5>
<div class="mt-3 d-flex justify-content-between align-items-center">
  {{#bs-button
    onClick=(action "selectPreviousTraceStep")
    type="secondary"
    outline=true
    title="One step back"
    disabled=(lte highlighter.currentTracePosition 1)
  }}
    {{svg-jar "chevron-left" class="octicon align-middle"}}
  {{/bs-button}}
  <div>
    Step <strong>{{highlighter.currentTracePosition}}</strong> of {{highlighter.highlightedEntity.length}}
  </div>
  {{#bs-button
    onClick=(action "selectNextTraceStep")
    type="secondary"
    outline=true
    title="One step forth"
    disabled=(gte highlighter.currentTracePosition highlighter.highlightedEntity.length)
  }}
    {{svg-jar "chevron-right" class="octicon align-middle"}}
  {{/bs-button}}
</div>

<hr>

<h5 align="center">Trace Step Details</h5>
<div class="mt-3 d-flex justify-content-between">
  <table class="table table-striped">
  <tbody>
    <tr class="d-flex">
      <th class="col-3">Soure Clazz</th>
      <td class="col-9 container-word-wrap">{{highlighter.currentTraceStep.clazzCommunication.sourceClazz.name}}</td>
    </tr>
    <tr class="d-flex">
{'fraction_non_alphanumeric': 0.19190624427760483, 'fraction_numerical': 0.010803882072880425, 'mean_word_length': 3.916291629162916, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 143, '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': '6543820', 'n_tokens_mistral': 1886, 'n_tokens_neox': 1820, 'n_words': 343}