<commit_before>.grid
  .panel.panel-default
    p.page-title
      i.xo-icon-vm(ng-if="isVMWorking(VM)", class="xo-color-pending", tooltip="{{VM.power_state}} and {{(VM.current_operations | map)[0]}}")
      i.xo-icon-vm(class="xo-color-{{VM.power_state | lowercase}}",ng-if="!isVMWorking(VM)", tooltip="{{VM.power_state}}")
      |  {{VM.name_label}}
.grid
  .panel.panel-default
    .panel-heading.panel-title
      i.fa.fa-cogs(style="color: #e25440;")
      |  General
      span.quick-edit(tooltip="Edit General settings", ng-click="vmSettings.$show()")
        i.fa.fa-edit.fa-fw
    .panel-body
      form(editable-form="", name="vmSettings", onbeforesave="saveVM($data)")
        dl.dl-horizontal
          dt Name
          dd
            span(editable-text="VM.name_label", e-name="name_label", e-form="vmSettings")
              | {{VM.name_label}}
          dt Description
          dd
            span(editable-text="VM.name_description", e-name="name_description", e-form="vmSettings")
              | {{VM.name_description}}
          dt(ng-if="VM.power_state === 'Running' || VM.power_state === 'Paused'") Running on
          dt(ng-if="VM.power_state == 'Halted' || VM.power_state === 'Suspended'") Resident on
          dd(ng-repeat="container in [VM.$container] | resolve")
            span(ng-if = 'container.type === "host"')
              a(xo-sref="hosts_view({id: container.id})")
                | {{container.name_label}}
              small
                span(ng-if="(container.$poolId | resolve).name_label")
                  | (
                  a(ui-sref="pools_view({id: (container.$poolId | resolve).id})") {{(container.$poolId | resolve).name_label}}
                  | )
            a(
              ng-if = 'container.type === "pool"'
              xo-sref="pools_view({id: container.id})"
            )
              | {{container.name_label}}
          dt Addresses
          dd(ng-if="!VM.addresses") -
          dd(ng-repeat="IP in VM.addresses") {{IP}}
          dt(ng-if="!(VM.$poolId | resolve).HA_enabled") Auto Power
          dd(ng-if="!(VM.$poolId | resolve).HA_enabled")
            span(
              editable-select="VM.auto_poweron"
              e-ng-options="ap.v as ap.t for ap in [{v: true, t:'Yes'}, {v: false, t:'No'}]"
              e-name="auto_poweron"
              e-form="vmSettings"
            )
              | {{VM.auto_poweron ? 'Yes' : 'No'}}
          dt(ng-if="(VM.$poolId | resolve).HA_enabled") HA
          dd(ng-if="(VM.$poolId | resolve).HA_enabled")
            span(
              editable-checkbox="VM.high_availability"
              e-name="high_availability"
              e-form="vmSettings"
            )
              | {{VM.high_availability}}
          dt vCPUs
          dd
            span(
              editable-text="VM.CPUs.number"
              e-name="CPUs"
              e-form="vmSettings"
            )
              | {{VM.CPUs.number}}
          dt RAM
          dd
            span(
              editable-text="memorySize"
              e-name="memory"
              e-form="vmSettings"
            )
              | {{memorySize}}
          dt UUID
          dd {{VM.UUID}}
          dt(ng-if="refreshStatControl.running && stats") Xen tools
          dd(ng-if="refreshStatControl.running && stats")
            span(ng-if="VM.PV_drivers", style="color:green;") Installed
            span(ng-if="!VM.PV_drivers") NOT installed
          dt(ng-if="refreshStatControl.running && stats && VM.os_version.distro") OS
          dd(ng-if="refreshStatControl.running && stats && VM.os_version.distro")
            | {{VM.os_version.name}} ({{VM.os_version.distro}})
          dt(ng-if="refreshStatControl.running && stats && VM.os_version.uname") Kernel
          dd(ng-if="refreshStatControl.running && stats && VM.os_version.uname")
            | {{VM.os_version.uname}}
        .btn-form(ng-show="vmSettings.$visible")
          p.center
            button.btn.btn-default(
              type="button"
              ng-disabled="vmSettings.$waiting"
              ng-click="vmSettings.$cancel()"
            )
              i.fa.fa-times
              |  Cancel
            | &nbsp;
            button.btn.btn-primary(
              type="submit"
              ng-disabled="vmSettings.$waiting"
            )
              i.fa.fa-save
              |  Save

  .panel.panel-default.panel-height.center
    .panel-heading.panel-title
      i.xo-icon-stats(style="color: #e25440;", xo-click="refreshStats(VM.id)")
      |  Stats
    .panel-body-stats(ng-if="refreshStatControl.running && stats")
      div(ng-if="statView.cpuOnly", ng-click="statView.cpuOnly = false")
        p.stat-name
          i.fa.fa-tachometer
          | &nbsp; CPU usage
        canvas.chart.chart-line.chart-stat-full(
          id="bigCpu"
          data="stats.cpus"
          labels="stats.date"<commit_msg>Work around an Angular issue.<commit_after>.grid
  .panel.panel-default
    p.page-title
      i.xo-icon-vm(ng-if="isVMWorking(VM)", class="xo-color-pending", tooltip="{{VM.power_state}} and {{(VM.current_operations | map)[0]}}")
      i.xo-icon-vm(class="xo-color-{{VM.power_state | lowercase}}",ng-if="!isVMWorking(VM)", tooltip="{{VM.power_state}}")
      |  {{VM.name_label}}
.grid
  .panel.panel-default
    .panel-heading.panel-title
      i.fa.fa-cogs(style="color: #e25440;")
      |  General
      span.quick-edit(tooltip="Edit General settings", ng-click="vmSettings.$show()")
        i.fa.fa-edit.fa-fw
    .panel-body
      form(editable-form="", name="vmSettings", onbeforesave="saveVM($data)")
        dl.dl-horizontal
          dt Name
          dd
            span(editable-text="VM.name_label", e-name="name_label", e-form="vmSettings")
              | {{VM.name_label}}
          dt Description
          dd
            span(editable-text="VM.name_description", e-name="name_description", e-form="vmSettings")
              | {{VM.name_description}}
          dt(ng-if="VM.power_state === 'Running' || VM.power_state === 'Paused'") Running on
          dt(ng-if="VM.power_state == 'Halted' || VM.power_state === 'Suspended'") Resident on
          dd(ng-repeat="container in [VM.$container] | resolve")
            span(ng-if = 'container.type === "host"')
              a(xo-sref="hosts_view({id: container.id})")
                | {{container.name_label}}
              small
                span(ng-if="(container.$poolId | resolve).name_label")
                  | (
                  a(ui-sref="pools_view({id: (container.$poolId | resolve).id})") {{(container.$poolId | resolve).name_label}}
                  | )
            a(
              ng-if = 'container.type === "pool"'
              xo-sref="pools_view({id: container.id})"
            )
              | {{container.name_label}}
          dt Addresses
          dd(ng-if="!VM.addresses") -
          dd(ng-repeat="IP in VM.addresses") {{IP}}
          dt(ng-if="!(VM.$poolId | resolve).HA_enabled") Auto Power
          dd(ng-if="!(VM.$poolId | resolve).HA_enabled")
            span(
              editable-select="VM.auto_poweron"
              e-ng-options="ap.v as ap.t for ap in [{v: true, t:'Yes'}, {v: false, t:'No'}]"
              e-name="auto_poweron"
              e-form="vmSettings"
            )
              | {{VM.auto_poweron ? 'Yes' : 'No'}}
          dt(ng-if="(VM.$poolId | resolve).HA_enabled") HA
          dd(ng-if="(VM.$poolId | resolve).HA_enabled")
            span(
              editable-checkbox="VM.high_availability"
              e-name="high_availability"
              e-form="vmSettings"
            )
              | {{VM.high_availability}}
          dt vCPUs
          dd
            span(
              editable-text="VM.CPUs.number"
              e-name="CPUs"
              e-form="vmSettings"
            )
              | {{VM.CPUs.number}}
          dt RAM
          dd
            span(
              editable-text="memorySize"
              e-name="memory"
              e-form="vmSettings"
            )
              | {{memorySize}}
          dt UUID
          dd {{VM.UUID}}
          dt(ng-if="refreshStatControl.running && stats") Xen tools
          dd(ng-if="refreshStatControl.running && stats")
            span(ng-if="VM.PV_drivers", style="color:green;") Installed
            span(ng-if="!VM.PV_drivers") NOT installed
          dt(ng-if="refreshStatControl.running && stats && VM.os_version") OS
          dd(ng-if="refreshStatControl.running && stats && VM.os_version")
            | {{VM.os_version.name}} ({{VM.os_version.distro}})
          dt(ng-if="refreshStatControl.running && stats && VM.os_version") Kernel
          dd(ng-if="refreshStatControl.running && stats && VM.os_version")
            | {{VM.os_version.uname}}
        .btn-form(ng-show="vmSettings.$visible")
          p.center
            button.btn.btn-default(
              type="button"
              ng-disabled="vmSettings.$waiting"
              ng-click="vmSettings.$cancel()"
            )
              i.fa.fa-times
              |  Cancel
            | &nbsp;
            button.btn.btn-primary(
              type="submit"
              ng-disabled="vmSettings.$waiting"
            )
              i.fa.fa-save
              |  Save

  .panel.panel-default.panel-height.center
    .panel-heading.panel-title
      i.xo-icon-stats(style="color: #e25440;", xo-click="refreshStats(VM.id)")
      |  Stats
    .panel-body-stats(ng-if="refreshStatControl.running && stats")
      div(ng-if="statView.cpuOnly", ng-click="statView.cpuOnly = false")
        p.stat-name
          i.fa.fa-tachometer
          | &nbsp; CPU usage
        canvas.chart.chart-line.chart-stat-full(
          id="bigCpu"
          data="stats.cpus"
          labels="stats.date"
{'fraction_non_alphanumeric': 0.16045463854188, 'fraction_numerical': 0.002252713495801761, 'mean_word_length': 1.7937643020594967, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6114718', 'n_tokens_mistral': 3114, 'n_tokens_neox': 3026, 'n_words': 413}