Rename conlet.
This commit is contained in:
parent
4ceaaa9fa2
commit
e839f7b3b2
34 changed files with 42 additions and 42 deletions
|
|
@ -0,0 +1 @@
|
|||
org.jdrupes.vmoperator.vmmgmt.VmMgmtFactory
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Moodle Tools Console
|
||||
* Copyright (C) 2022 Michael N. Lipp
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
const l10nBundles = new Map();
|
||||
let entries = null;
|
||||
// <#list supportedLanguages() as l>
|
||||
entries = new Map();
|
||||
l10nBundles.set("${l.locale.toLanguageTag()}", entries);
|
||||
// <#list l.l10nBundle.keys as key>
|
||||
entries.set("${key}", "${l.l10nBundle.getString(key)}");
|
||||
// </#list>
|
||||
// </#list>
|
||||
|
||||
export default l10nBundles;
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<div class="jdrupes-vmoperator-vmmgmt jdrupes-vmoperator-vmmgmt-preview"
|
||||
data-conlet-grid-rows="5"
|
||||
data-jgwc-on-load="orgJDrupesVmOperatorVmMgmt.initPreview"
|
||||
data-jgwc-on-unload="JGConsole.jgwc.unmountVueApps">
|
||||
|
||||
<form>
|
||||
<fieldset>
|
||||
<legend>{{ localize("Period") }}:</legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" name="period" v-model="period" value="day">
|
||||
<span>{{ localize("Last day") }}</span>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" name="period" v-model="period" value="hour">
|
||||
<span>{{ localize("Last hour") }}</span>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ localize("VMsSummary") }}:</td>
|
||||
<td>{{ vmSummary.runningVms }} / {{ vmSummary.totalVms }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ localize("currentCpus") }}:</td>
|
||||
<td>{{ vmSummary.usedCpus }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ localize("currentRam") }}:</td>
|
||||
<td>{{ formatMemory(Number(vmSummary.usedRam)) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="vmsChart-wrapper">
|
||||
<canvas class="vmsChart"></canvas>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<div class="jdrupes-vmoperator-vmmgmt jdrupes-vmoperator-vmmgmt-view"
|
||||
data-jgwc-on-load="orgJDrupesVmOperatorVmMgmt.initView"
|
||||
data-jgwc-on-unload="JGConsole.jgwc.unmountVueApps">
|
||||
<div class="jdrupes-vmoperator-vmmgmt-view-search">
|
||||
<form>
|
||||
<label class="form__label--horizontal">
|
||||
<span>{{ localize("Filter") }}</span>
|
||||
<input type="text" class="form__input-text--with-remove"
|
||||
v-on:input="controller.updateFilter($event)">
|
||||
<span role="button" tabindex="0" class="fa fa-remove"
|
||||
v-on:click="controller.clearFilter($event)"></span>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
<table
|
||||
class="table--basic--striped jdrupes-vmoperator-vmmgmt-view-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th v-for="key in controller.keys"
|
||||
class="sortable" v-on:click="controller.sortBy(key)">
|
||||
{{ localize(controller.label(key)) }}<span v-if="controller.sortedByAsc(key)"
|
||||
role="button" tabindex="0">▲</span><span
|
||||
v-if="controller.sortedByDesc(key)" role="button"
|
||||
tabindex="0">▼</span>
|
||||
</th>
|
||||
<th>
|
||||
{{ localize("vmActions") }}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="(entry, rowIndex) in filteredData">
|
||||
<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' && 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 === 'runningConditionSince'"
|
||||
>{{ shortDateTime(entry[key].toString()) }}</span>
|
||||
<span v-else-if="key === 'currentRam'"
|
||||
>{{ formatMemory(entry[key]) }}</span>
|
||||
<span v-else
|
||||
v-html="controller.breakBeforeDots(entry[key])"></span>
|
||||
</td>
|
||||
<td class="jdrupes-vmoperator-vmmgmt-view-action-list">
|
||||
<span role="button"
|
||||
v-if="entry.spec.vm.state != 'Running' && !entry['running']"
|
||||
tabindex="0" class="fa fa-play" :title="localize('Start VM')"
|
||||
v-on:click="vmAction(entry.name, 'start')"></span>
|
||||
<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' && entry['running']"
|
||||
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))"
|
||||
:class="[(rowIndex % 2) ? 'odd' : 'even']">
|
||||
<td colspan="8" class="details">
|
||||
<table class="table--basic table--basic--autoStriped">
|
||||
<tr>
|
||||
<td>{{ localize("maximumCpus") }}</td>
|
||||
<td>{{ maximumCpus(entry) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ localize("requestedCpus") }}</td>
|
||||
<td v-if="cic.key !== (entry['name'] + ':cpus')" tabindex="0"
|
||||
v-on:focus="cic.startEdit(entry['name'] + ':cpus', entry.spec.vm.currentCpus)"
|
||||
>{{ entry.spec.vm.currentCpus }}</td>
|
||||
<td v-else><form action="javascript:void();"
|
||||
><input :ref="(el) => { cic.input = el; }"
|
||||
type="number" required :max="entry.spec.vm.maximumCpus"
|
||||
v-on:focusout="cic.endEdit(cic.parseNumber)"
|
||||
v-on:keydown.escape="cic.endEdit()"
|
||||
><span>{{ cic.error }}</span></form></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ localize("maximumRam") }}</td>
|
||||
<td>{{ formatMemory(Number(entry.spec.vm.maximumRam)) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ localize("requestedRam") }}</td>
|
||||
<td v-if="cic.key !== (entry['name'] + ':ram')" tabindex="0"
|
||||
v-on:focus="cic.startEdit(entry['name'] + ':ram', formatMemory(entry.spec.vm.currentRam))"
|
||||
>{{ formatMemory(entry.spec.vm.currentRam) }}</td>
|
||||
<td v-else><form action="javascript:void(0);"
|
||||
><input :ref="(el) => { cic.input = el; }"
|
||||
type="text" required
|
||||
v-on:focusout="cic.endEdit(parseMemory)"
|
||||
v-on:keydown.escape="cic.endEdit()"
|
||||
><span>{{ cic.error }}</span></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
conletName = VM Management
|
||||
|
||||
VMsSummary = VMs (running/total)
|
||||
|
||||
since = Since
|
||||
currentCpus = Current CPUs
|
||||
currentRam = Current RAM
|
||||
maximumCpus = Maximum CPUs
|
||||
maximumRam = Maximum RAM
|
||||
nodeName = Node
|
||||
requestedCpus = Requested CPUs
|
||||
requestedRam = Requested RAM
|
||||
running = Running
|
||||
usedBy = Used by
|
||||
usedFrom = Used from
|
||||
vmActions = Actions
|
||||
vmname = Name
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
conletName = VM-Management
|
||||
|
||||
VMsSummary = VMs (gestartet/gesamt)
|
||||
|
||||
Period = Zeitraum
|
||||
Last\ hour = Letzte Stunde
|
||||
Last\ day = Letzter Tag
|
||||
|
||||
running = Gestartet
|
||||
since = Seit
|
||||
currentCpus = Aktuelle CPUs
|
||||
currentRam = Akuelles RAM
|
||||
maximumCpus = Maximale CPUs
|
||||
maximumRam = Maximales RAM
|
||||
nodeName = Knoten
|
||||
requestedCpus = Angeforderte CPUs
|
||||
requestedRam = Angefordertes RAM
|
||||
usedBy = Benutzt durch
|
||||
usedFrom = Benutzt von
|
||||
vmActions = Aktionen
|
||||
vmname = Name
|
||||
Value\ is\ above\ maximum = Wert ist zu groß
|
||||
Illegal\ format = Ungültiges Format
|
||||
|
||||
Start\ VM = VM Starten
|
||||
Stop\ VM = VM Anhalten
|
||||
|
||||
Yes = Ja
|
||||
No = Nein
|
||||
Loading…
Add table
Add a link
Reference in a new issue