<commit_before>  <!-- TODO: lots of stuff. -->
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="page-title"><i class="xo-icon-vm xo-color-{{VM.power_state | lowercase}}"></i> {{VM.name_label}}</p>
  </div>
</div>
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="fa fa-cogs" style="color: #e25440;"></i> General</p>
    <div class="general-properties">
      <dl class="dl-horizontal">
        <dt>Name</dt>
          <dd><a editable-text="VM.name_label">{{VM.name_label}}</a></dd>
        <dt>Description</dt>
          <dd><a editable-text="VM.name_description">{{VM.name_description}}</a></dd>
        <dt ng-if="VM.power_state == ('Running' || 'Paused')">Running on:</dt>
          <dd><a xo-sref="hosts_view({uuid: VM.$container})">{{(VM.$container | fromUUID).name_label}}</a></dd>
        <dt>Address</dt>
          <dd ng-repeat="IP in VM.address.ip">{{IP}}</dd>
        <dt>Tags</dt>
          <dd>
            <input type="text" ui-select2="select2Options" ng-model="VM.tags">
          </dd>
        <dt>vCPUs</dt>
          <dd>{{VM.CPUs.number}}</dd>
        <dt>RAM</dt>
          <dd><a editable-text="VM.memory.size">{{VM.memory.size | bytes}}</a></dd>
        <dt>UUID</dt>
          <dd>{{VM.UUID}}</dd>
      </dl>
    </div>
  </div>
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="fa fa-bar-chart-o" style="color: #e25440;"></i> Stats</p>
    <div class="grid">
      <div class="grid-cell">
        <p class="stat-name">vCPUs</p>
        <p class="center big">{{VM.CPUs.number}}</p>
      </div>
      <div class="grid-cell">
        <p class="stat-name">RAM</p>
        <p class="center big">{{VM.memory.size | bytes}}</p>
      </div>
      <div class="grid-cell">
        <p class="stat-name">Disks</p>
        <p class="center big">{{VM.$VBDs.length || 0}}</p>
      </div>
    </div>
  </div>
</div>

<!-- Action panel -->
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="fa fa-flash" style="color: #e25440;"></i> Actions</p>
    <div class="grid">
      <div class="grid-cell text-center grid-button" tooltip="Stop VM" xo-click="stopVM(VM.UUID)">
        <i class="fa fa-stop fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Start VM" xo-click="startVM(VM.UUID)">
        <i class="fa fa-play fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Reboot VM" xo-click="rebootVM(VM.UUID)">
        <i class="fa fa-refresh fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Migrate VM">
        <i class="fa fa-mail-forward fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Force Reboot">
        <i class="fa fa-flash fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Force Shutdown">
        <i class="fa fa-power-off fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Delete VM">
        <i class="fa fa-trash-o fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Create a snapshot">
        <i class="xo-icon-snapshot fa-2x fa-fw"></i>
      </div>
      <div
        class="grid-cell text-center grid-button"
        tooltip="VM Console"
        xo-sref="consoles_view({uuid: VM.UUID})"
      >
        <i class="xo-icon-console fa-2x fa-fw"></i>
      </div>
    </div>
  </div>
</div>

<!-- TODO: Disk panel -->
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="xo-icon-sr" style="color: #e25440;"></i> Disk</p>
    <table class="table table-hover">
      <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Size</th>
        <th>Physical usage</th>
      </tr>
      <tr xo-sref="SRs_view({uuid: VDI.SR})" ng-repeat="VDI in VM.$VBDs | fromUUID | map:'VDI' | fromUUID | orderBy:'name_label'">
        <td>{{VDI.name_label}}</td>
        <td>{{VDI.name_description}}</td>
        <td>{{VDI.size | bytes}}</td>
        <td>{{VDI.usage | bytes}}</td>
      </tr>
    </table>
    <p class="center">
      <button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> Add Disk</button>
  </div>
</div>

<!-- TODO: Interface panel -->
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="xo-icon-network" style="color: #e25440;"></i> Interface</p>
    <table class="table table-hover">
      <th class="col-md-1">Name</th>
      <th class="col-md-1">IP</th>
      <th class="col-md-2">MAC</th>
      <th class="col-md-1">Link status</th>
      <tr>
        <td>VIF #0</td>
        <td>192.168.3.11</td>
        <td>e4:11:5b:b7:f3:8f</td>
        <td>
          <span class="label label-success">OK</span>
          <div class="quick-buttons"><div class="quick-button"><a tooltip="Delete SR"><i class="fa fa-trash-o"></i></a></div></div>
        </td>
      </tr>
    </table>
    <p class="center">
      <button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> Add Interface</button>
  </div>
</div>

<!-- TODO: Snapshot and Logs panels -->
<div class="grid">
  <!-- Snapshots panel -->
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="xo-icon-snapshot" style="color: #e25440;"></i> Snapshot</p>
    <table class="table table-hover">
      <th>Name</th>
      <th class="col-md-8">Description</th>
      <tr>
        <td>Snap1</td>
        <td>
          Before Update kernel
          <div class="quick-buttons"><div class="quick-button"><a tooltip="Revert VM to this snapshot"><i class="fa fa-reply"></i></a><a tooltip="Remove"><i class="fa fa-trash-o"></i></a></div></div>
        </td>
      </tr>
    </table>
    </div>
  <!-- Logs panel --><commit_msg>add VIF display in VM view<commit_after>  <!-- TODO: lots of stuff. -->
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="page-title"><i class="xo-icon-vm xo-color-{{VM.power_state | lowercase}}"></i> {{VM.name_label}}</p>
  </div>
</div>
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="fa fa-cogs" style="color: #e25440;"></i> General</p>
    <div class="general-properties">
      <dl class="dl-horizontal">
        <dt>Name</dt>
          <dd><a editable-text="VM.name_label">{{VM.name_label}}</a></dd>
        <dt>Description</dt>
          <dd><a editable-text="VM.name_description">{{VM.name_description}}</a></dd>
        <dt ng-if="VM.power_state == ('Running' || 'Paused')">Running on:</dt>
          <dd><a xo-sref="hosts_view({uuid: VM.$container})">{{(VM.$container | fromUUID).name_label}}</a></dd>
        <dt>Address</dt>
          <dd ng-repeat="IP in VM.address.ip">{{IP}}</dd>
        <dt>Tags</dt>
          <dd>
            <input type="text" ui-select2="select2Options" ng-model="VM.tags">
          </dd>
        <dt>vCPUs</dt>
          <dd>{{VM.CPUs.number}}</dd>
        <dt>RAM</dt>
          <dd><a editable-text="VM.memory.size">{{VM.memory.size | bytes}}</a></dd>
        <dt>UUID</dt>
          <dd>{{VM.UUID}}</dd>
      </dl>
    </div>
  </div>
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="fa fa-bar-chart-o" style="color: #e25440;"></i> Stats</p>
    <div class="grid">
      <div class="grid-cell">
        <p class="stat-name">vCPUs</p>
        <p class="center big">{{VM.CPUs.number}}</p>
      </div>
      <div class="grid-cell">
        <p class="stat-name">RAM</p>
        <p class="center big">{{VM.memory.size | bytes}}</p>
      </div>
      <div class="grid-cell">
        <p class="stat-name">Disks</p>
        <p class="center big">{{VM.$VBDs.length || 0}}</p>
      </div>
    </div>
  </div>
</div>

<!-- Action panel -->
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="fa fa-flash" style="color: #e25440;"></i> Actions</p>
    <div class="grid">
      <div class="grid-cell text-center grid-button" tooltip="Stop VM" xo-click="stopVM(VM.UUID)">
        <i class="fa fa-stop fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Start VM" xo-click="startVM(VM.UUID)">
        <i class="fa fa-play fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Reboot VM" xo-click="rebootVM(VM.UUID)">
        <i class="fa fa-refresh fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Migrate VM">
        <i class="fa fa-mail-forward fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Force Reboot">
        <i class="fa fa-flash fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Force Shutdown">
        <i class="fa fa-power-off fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Delete VM">
        <i class="fa fa-trash-o fa-2x fa-fw"></i>
      </div>
      <div class="grid-cell text-center grid-button" tooltip="Create a snapshot">
        <i class="xo-icon-snapshot fa-2x fa-fw"></i>
      </div>
      <div
        class="grid-cell text-center grid-button"
        tooltip="VM Console"
        xo-sref="consoles_view({uuid: VM.UUID})"
      >
        <i class="xo-icon-console fa-2x fa-fw"></i>
      </div>
    </div>
  </div>
</div>

<!-- TODO: Disk panel -->
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="xo-icon-sr" style="color: #e25440;"></i> Disk</p>
    <table class="table table-hover">
      <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Size</th>
        <th>Physical usage</th>
      </tr>
      <tr xo-sref="SRs_view({uuid: VDI.SR})" ng-repeat="VDI in VM.$VBDs | fromUUID | map:'VDI' | fromUUID | orderBy:'name_label'">
        <td>{{VDI.name_label}}</td>
        <td>{{VDI.name_description}}</td>
        <td>{{VDI.size | bytes}}</td>
        <td>{{VDI.usage | bytes}}</td>
      </tr>
    </table>
    <p class="center">
      <button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> Add Disk</button>
  </div>
</div>

<!-- TODO: Interface panel -->
<div class="grid">
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="xo-icon-network" style="color: #e25440;"></i> Interface</p>
    <table class="table table-hover">
      <th class="col-md-1">Device</th>
      <th class="col-md-2">MAC</th>
      <th class="col-md-1">MTU</th>
      <th class="col-md-1">Link status</th>
      <tr ng-repeat="VIF in VM.$VIFs | fromUUID  | orderBy:'name_label'">
        <td>{{VIF.device}}</td>
        <td>{{VIF.mtu}}</td>
        <td>{{VIF.mac}}</td>
        <td ng-if="VIF.attached"><span class="label label-success">Connected</span></td>
        <td ng-if="!VIF.attached"><span class="label label-default">Disabled</span></td>
      </tr>
    </table>
    <p class="center">
      <button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> Add Interface</button>
  </div>
</div>

<!-- TODO: Snapshot and Logs panels -->
<div class="grid">
  <!-- Snapshots panel -->
  <div class="grid-cell flat-panel">
    <p class="flat-panel-title"><i class="xo-icon-snapshot" style="color: #e25440;"></i> Snapshot</p>
    <table class="table table-hover">
      <th>Name</th>
      <th class="col-md-8">Description</th>
      <tr>
        <td>Snap1</td>
        <td>
          Before Update kernel
          <div class="quick-buttons"><div class="quick-button"><a tooltip="Revert VM to this snapshot"><i class="fa fa-reply"></i></a><a tooltip="Remove"><i class="fa fa-trash-o"></i></a></div></div>
        </td>
      </tr>
    </table>
    </div>
  <!-- Logs panel -->
{'fraction_non_alphanumeric': 0.2265776801554448, 'fraction_numerical': 0.009546337754498606, 'mean_word_length': 2.649198520345253, 'pattern_counts': {'":': 0, '<': 497, '<?xml version=': 0, '>': 497, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '5727859', 'n_tokens_mistral': 4428, 'n_tokens_neox': 4319, 'n_words': 813}