Jade comments.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// @todo Remove code duplication for the VMs listing by using a macro.
|
||||
//- @todo Remove code duplication for the VMs listing by using a macro.
|
||||
.sub-bar
|
||||
.grid
|
||||
.grid-cell.overview
|
||||
@@ -91,10 +91,12 @@
|
||||
a(ng-click="deleteVMs()")
|
||||
i.fa.fa-trash-o.fa-fw
|
||||
| Delete
|
||||
// FIXME: Ugly trick to force the pools to be under the sub bar.
|
||||
// Add +7px to the 50px for having some space before the first pool
|
||||
|
||||
//- FIXME: Ugly trick to force the pools to be under the sub bar.
|
||||
// Add +7px to the 50px for having some space before the first pool.
|
||||
div(style="margin-top: 57px; visibility: hidden; height: 0") .
|
||||
// If we haven't any data
|
||||
|
||||
//- If we haven't any data
|
||||
div(ng-if="!pools.length")
|
||||
.grid
|
||||
.grid-cell.flat-panel.text-center
|
||||
@@ -114,16 +116,16 @@ div(ng-if="!pools.length")
|
||||
a.btn.btn-primary.big(ui-sref="about")
|
||||
i.fa.fa-info-circle
|
||||
| About us
|
||||
// If we have data
|
||||
//- If we have data
|
||||
div(ng-if="pools.length")
|
||||
// Contains a pool and all its children (hosts).
|
||||
//- Contains a pool and all its children (hosts).
|
||||
.grid.pool-block(ng-repeat="pool in pools | orderBy:natural('name_label') track by pool.UUID")
|
||||
// Pseudo pool if it is not a named pool.
|
||||
//- Pseudo pool if it is not a named pool.
|
||||
.grid-cell.grid--gutters.pool-cell(ng-if="!pool.name_label")
|
||||
p.center(style="margin-top: 2em;") No pool connected
|
||||
// Contains information about the pool if it is a named pool.
|
||||
//- Contains information about the pool if it is a named pool.
|
||||
.grid-cell.grid--gutters.pool-cell(ng-if="pool.name_label")
|
||||
// Header (name + dropdown menu).
|
||||
//- Header (name + dropdown menu).
|
||||
.dropdown.dropdown-pool
|
||||
a.pool-name(ui-sref="pools_view({id: pool.UUID})")
|
||||
| {{pool.name_label}}
|
||||
@@ -144,10 +146,10 @@ div(ng-if="pools.length")
|
||||
a.disabled(xo-click="pool_disconnect(pool.UUID)")
|
||||
i.fa.fa-unlink.fa-fw
|
||||
| Disconnect
|
||||
// /Header.
|
||||
// Stats & SRs list.
|
||||
//- /Header.
|
||||
//- Stats & SRs list.
|
||||
div
|
||||
// Stats.
|
||||
//- Stats.
|
||||
ul.list-unstyled.stats
|
||||
li
|
||||
i(tooltip="{{pool.hosts.length}} hosts connected")
|
||||
@@ -165,8 +167,8 @@ div(ng-if="pools.length")
|
||||
|
|
||||
a(ui-sref="hosts_view({id: master.UUID})") {{master.name_label}}
|
||||
li(ng-if="!pool.master") No master
|
||||
// /Stats.
|
||||
// SRs.
|
||||
//- /Stats.
|
||||
//- SRs.
|
||||
div(ng-if="pool.SRs.length")
|
||||
p.center.small-caps SRs:
|
||||
table.table.table-hover.table-condensed
|
||||
@@ -177,13 +179,13 @@ div(ng-if="pools.length")
|
||||
td.col-md-6.right.no-border
|
||||
.progress.progress-small(tooltip="Disk: {{[SR.usage, SR.size] | %}} allocated")
|
||||
.progress-bar(role="progressbar", aria-valuenow="{{100*SR.usage/SR.size}}", aria-valuemin="0", aria-valuemax="100", style="width: {{[SR.usage, SR.size] | %}}")
|
||||
// Contains all the hosts of this pool.
|
||||
//- Contains all the hosts of this pool.
|
||||
.grid-cell.grid--gutters.hosts-vms-cells
|
||||
// Contains a host and all its children (VMs).
|
||||
//- Contains a host and all its children (VMs).
|
||||
.grid(ng-repeat="host in pool.hosts | resolve | orderBy:natural('name_label') track by host.UUID")
|
||||
// Contains information about the host.
|
||||
//- Contains information about the host.
|
||||
.grid-cell.host-cell
|
||||
// Header (name + dropdown menu).
|
||||
//- Header (name + dropdown menu).
|
||||
.dropdown.dropdown-pool
|
||||
a.host-name(ui-sref="hosts_view({id: host.UUID})")
|
||||
| {{host.name_label}}
|
||||
@@ -224,32 +226,32 @@ div(ng-if="pools.length")
|
||||
a(xo-click="pool_addHost(host.UUID)")
|
||||
i.fa.fa-cloud-download.fa-fw
|
||||
| Add to pool
|
||||
// /Header.
|
||||
// Stats.
|
||||
//- /Header.
|
||||
//- Stats.
|
||||
ul.list-unstyled.stats
|
||||
// Warning icon if host is halted or disabled
|
||||
//- Warning icon if host is halted or disabled
|
||||
li.text-danger(ng-if="host.power_state === 'Halted'")
|
||||
i.fa.fa-warning
|
||||
| Halted
|
||||
li.text-warning(ng-if="!host.enabled && host.power_state === 'Running'")
|
||||
i.fa.fa-warning
|
||||
| Disabled
|
||||
// Memory
|
||||
//- Memory
|
||||
li(ng-if="host.power_state === 'Running' && host.enabled")
|
||||
i.xo-icon-memory.i-progress
|
||||
.progress.progress-small(tooltip="RAM: {{[host.memory.usage, host.memory.size] | %}} allocated")
|
||||
.progress-bar(role="progressbar", aria-valuenow="{{100*host.memory.usage/host.memory.size}}", aria-valuemin="0", aria-valuemax="100", style="width: {{[host.memory.usage, host.memory.size] | %}}")
|
||||
// Host address
|
||||
//- Host address
|
||||
li.text-muted.substats
|
||||
i.xo-icon-network
|
||||
| {{host.address}}
|
||||
// Contains all the VMs of this host.
|
||||
//- Contains all the VMs of this host.
|
||||
.grid.grid-cell.vm-cell
|
||||
// If no VMs, fill the space with a message.
|
||||
//- If no VMs, fill the space with a message.
|
||||
.vms-notice(ng-if="!host.VMs.length")
|
||||
// TODO: put 'Halted' state in xo-server
|
||||
//- TODO: put 'Halted' state in xo-server
|
||||
//p(ng-if="'Halted' === host.power_state")
|
||||
// | Host halted.
|
||||
//- | Host halted.
|
||||
p(ng-if="'shutdown' === values(host.current_operations)[0]")
|
||||
| Host halted.
|
||||
div(ng-if="'shutdown' !== values(host.current_operations)[0]")
|
||||
@@ -257,25 +259,25 @@ div(ng-if="pools.length")
|
||||
| Host disabled.
|
||||
p(ng-if="host.enabled")
|
||||
| No VMs on this host.
|
||||
// /Message if no VMs.
|
||||
// TODO: comment
|
||||
//- /Message if no VMs.
|
||||
//- TODO: comment
|
||||
.table-responsive(ng-if="host.VMs.length")
|
||||
table.table.table-hover.table-condensed
|
||||
// Contains a VM.
|
||||
//- Contains a VM.
|
||||
tr(ng-repeat="VM in host.VMs | resolve | orderBy:natural('name_label') track by VM.UUID", xo-sref="VMs_view({id: VM.UUID})")
|
||||
// Handle used for drag & drop.
|
||||
//- Handle used for drag & drop.
|
||||
td.grab
|
||||
// Checkbox used for selection.
|
||||
//- Checkbox used for selection.
|
||||
td.select-vm
|
||||
input(type="checkbox", ng-model="selected_VMs[VM.UUID]", ng-change="updateVMSelection(VM.UUID)")
|
||||
// Power state
|
||||
//- Power state
|
||||
td.vm-power-state
|
||||
i.xo-icon-working(ng-if="isVMWorking(VM)", tooltip="{{VM.power_state}} and {{values(VM.current_operations)[0]}}")
|
||||
i(class="xo-icon-{{VM.power_state | lowercase}}",ng-if="!isVMWorking(VM)", tooltip="{{VM.power_state}}")
|
||||
// VM name.
|
||||
//- VM name.
|
||||
td.vm-name.col-md-2
|
||||
p.vm {{VM.name_label}}
|
||||
// Quick actions.
|
||||
//- Quick actions.
|
||||
td.vm-quick-buttons.col-md-2
|
||||
.quick-buttons
|
||||
a(tooltip="Shutdown VM", xo-click="stopVM(VM.UUID)")
|
||||
@@ -286,47 +288,47 @@ div(ng-if="pools.length")
|
||||
i.fa.fa-refresh
|
||||
a(tooltip="VM Console", xo-sref="consoles_view({id: VM.UUID})")
|
||||
i.xo-icon-console
|
||||
// Description.
|
||||
//- Description.
|
||||
td.vm-description.col-md-4
|
||||
i(class="xo-icon-{{osType(VM.os_version.distro)}}",ng-if="VM.os_version.distro", tooltip="{{VM.os_version.name}}")
|
||||
|
|
||||
i.fa.fa-fw(ng-if="!VM.os_version.distro")
|
||||
| {{VM.name_description}}
|
||||
// Metrics.
|
||||
// Memory
|
||||
//- Metrics.
|
||||
//- Memory
|
||||
td.vm-memory-stat.col-md-2
|
||||
.cpu
|
||||
| {{VM.memory.size | bytesToSize}}
|
||||
i.fa.fa-fw(ng-if="VM.PV_drivers")
|
||||
i.xo-icon-info.fa-fw(ng-if="!VM.PV_drivers", tooltip="Xen tools not installed")
|
||||
// /Metrics.
|
||||
// Address.
|
||||
//- /Metrics.
|
||||
//- Address.
|
||||
td.text-muted.text-right.col-md-2
|
||||
| {{VM.addresses["0/ip"]}}
|
||||
// Contains a pseudo-host which contains all VMs not in any hosts.
|
||||
//- Contains a pseudo-host which contains all VMs not in any hosts.
|
||||
.grid(ng-if="pool.VMs.length")
|
||||
// This is where the information about a host would be displayed.
|
||||
//- This is where the information about a host would be displayed.
|
||||
.grid-cell.host-cell
|
||||
// Contains all the VMs of this pool.
|
||||
//- Contains all the VMs of this pool.
|
||||
.grid.grid-cell.vm-cell
|
||||
// TODO: comment
|
||||
//- TODO: comment
|
||||
.table-responsive
|
||||
table.table.table-hover.table-condensed
|
||||
// Contains a VM.
|
||||
//- Contains a VM.
|
||||
tr(ng-repeat="VM in pool.VMs | resolve | orderBy:natural('name_label') track by VM.UUID", xo-sref="VMs_view({id: VM.UUID})")
|
||||
// Handle used for drag & drop.
|
||||
//- Handle used for drag & drop.
|
||||
td.grab
|
||||
// Checkbox used for selection.
|
||||
//- Checkbox used for selection.
|
||||
td.select-vm
|
||||
input(type="checkbox", ng-model="selected_VMs[VM.UUID]", ng-change="updateVMSelection(VM.UUID)")
|
||||
// Power state
|
||||
//- Power state
|
||||
td.vm-power-state
|
||||
i.xo-icon-working(ng-if="isVMWorking(VM)", tooltip="{{VM.power_state}} and {{values(VM.current_operations)[0]}}")
|
||||
i(class="xo-icon-{{VM.power_state | lowercase}}",ng-if="!isVMWorking(VM)", tooltip="{{VM.power_state}}")
|
||||
// VM name.
|
||||
//- VM name.
|
||||
td.vm-name.col-md-2
|
||||
p.vm {{VM.name_label}}
|
||||
// Quick actions.
|
||||
//- Quick actions.
|
||||
td.vm-quick-buttons.col-md-2
|
||||
.quick-buttons
|
||||
a(tooltip="Shutdown VM", xo-click="stopVM(VM.UUID)")
|
||||
@@ -337,21 +339,21 @@ div(ng-if="pools.length")
|
||||
i.fa.fa-refresh
|
||||
a(tooltip="VM Console")
|
||||
i.xo-icon-console
|
||||
// Description.
|
||||
//- Description.
|
||||
td.vm-description.col-md-4
|
||||
i(class="xo-icon-{{osType(VM.os_version.distro)}}",ng-if="VM.os_version.distro", tooltip="{{VM.os_version.name}}")
|
||||
|
|
||||
i.fa.fa-fw(ng-if="!VM.os_version.distro")
|
||||
| {{VM.name_description}}
|
||||
// Metrics.
|
||||
// Memory
|
||||
//- Metrics.
|
||||
//- Memory
|
||||
td.vm-memory-stat.col-md-2
|
||||
.cpu
|
||||
| {{VM.memory.size | bytesToSize}}
|
||||
i.fa.fa-fw(ng-if="VM.PV_drivers")
|
||||
i.xo-icon-info.fa-fw(ng-if="!VM.PV_drivers", tooltip="Xen tools not installed")
|
||||
// /Metrics.
|
||||
// Address.
|
||||
//- /Metrics.
|
||||
//- Address.
|
||||
td.text-muted.text-right.col-md-2
|
||||
| {{VM.addresses["0/ip"]}}
|
||||
// /Pseudo host containing VMs not on any hosts.
|
||||
|
||||
Reference in New Issue
Block a user