Feature/web gui (#15)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled

Add node display.
This commit is contained in:
Michael N. Lipp 2023-10-24 13:23:13 +02:00 committed by GitHub
parent b8e1074150
commit 8567a2f052
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 90 additions and 28 deletions

View file

@ -33,26 +33,33 @@
<tr :class="[(rowIndex % 2) ? 'odd' : 'even']"
:aria-expanded="(entry.name in detailsByName) ? 'true' : 'false'">
<td v-for="key in controller.keys"
v-bind:class="'column-' + key"
v-bind:title="key == 'name' ? entry['name']: false"
v-bind:rowspan="(key == 'name') && $aash.isDisclosed(scopedId(rowIndex)) ? 2 : false">
<aash-disclosure-button v-if="key === 'name'" :type="'div'"
:id-ref="scopedId(rowIndex)">
<span v-html="controller.breakBeforeDots(entry[key])"></span>
</aash-disclosure-button>
<span v-else-if="key === 'running'"
v-html="localize(entry[key] ? 'Yes' : 'No')"></span>
<span v-else-if="key === 'running' && entry[key]"
class="fa fa-check" :title="localize('Yes')"></span>
<span v-else-if="key === 'running' && !entry[key]"
class="fa fa-close" :title="localize('No')"></span>
<span v-else-if="key === 'currentRam'"
v-html="formatMemory(BigInt(entry[key]))"></span>
v-html="formatMemory(entry[key])"></span>
<span v-else
v-html="controller.breakBeforeDots(entry[key])"></span>
</td>
<td class="jdrupes-vmoperator-vmconlet-view-action-list">
<span role="button" v-if="!entry['running']"
<span role="button" v-if="entry.spec.vm.state != 'Running'"
tabindex="0" class="fa fa-play" :title="localize('Start VM')"
v-on:click="vmAction(entry.name, 'start')"></span>
<span role="button" v-if="entry['running']"
<span role="button" v-else class="fa fa-play"
aria-disabled="true" :title="localize('Start VM')"></span>
<span role="button" v-if="entry.spec.vm.state != 'Stopped'"
tabindex="0" class="fa fa-stop" :title="localize('Stop VM')"
v-on:click="vmAction(entry.name, 'stop')"></span>
<span role="button" v-else class="fa fa-stop"
aria-disabled="true" :title="localize('Stop VM')"></span>
</td>
</tr>
<tr :id="scopedId(rowIndex)" v-if="$aash.isDisclosed(scopedId(rowIndex))"

View file

@ -4,6 +4,7 @@ currentCpus = Current CPUs
currentRam = Current RAM
maximumCpus = Maximum CPUs
maximumRam = Maximum RAM
nodeName = Node
requestedCpus = Requested CPUs
requestedRam = Requested RAM
running = Running

View file

@ -5,6 +5,7 @@ currentCpus = Aktuelle CPUs
currentRam = Akuelles RAM
maximumCpus = Maximale CPUs
maximumRam = Maximales RAM
nodeName = Knoten
requestedCpus = Angeforderte CPUs
requestedRam = Angefordertes RAM
vmActions = Aktionen