Add viewer conlet (#25)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
This commit is contained in:
parent
b6f0299932
commit
a6525a2289
77 changed files with 2642 additions and 250 deletions
|
|
@ -1,4 +1,4 @@
|
|||
conletName = VM Viewer
|
||||
conletName = VM Infos
|
||||
|
||||
VMsSummary = VMs (running/total)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
conletName = VM Anzeige
|
||||
conletName = VM-Informationen
|
||||
|
||||
VMsSummary = VMs (gestartet/gesamt)
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ public class VmConlet extends FreeMarkerConlet<VmConlet.VmsModel> {
|
|||
* on by default and that {@link Manager#fire(Event, Channel...)}
|
||||
* sends the event to
|
||||
*/
|
||||
@SuppressWarnings("PMD.ConstructorCallsOverridableMethod")
|
||||
public VmConlet(Channel componentChannel) {
|
||||
super(componentChannel);
|
||||
setPeriodicRefresh(Duration.ofMinutes(1), () -> new Update());
|
||||
|
|
@ -138,7 +139,7 @@ public class VmConlet extends FreeMarkerConlet<VmConlet.VmsModel> {
|
|||
.setRenderAs(
|
||||
RenderMode.Preview.addModifiers(event.renderAs()))
|
||||
.setSupportedModes(MODES));
|
||||
renderedAs.add(RenderMode.View);
|
||||
renderedAs.add(RenderMode.Preview);
|
||||
channel.respond(new NotifyConletView(type(),
|
||||
conletId, "summarySeries", summarySeries.entries()));
|
||||
var summary = evaluateSummary(false);
|
||||
|
|
@ -181,7 +182,8 @@ public class VmConlet extends FreeMarkerConlet<VmConlet.VmsModel> {
|
|||
*/
|
||||
@Handler(namedChannels = "manager")
|
||||
@SuppressWarnings({ "PMD.ConfusingTernary", "PMD.CognitiveComplexity",
|
||||
"PMD.AvoidInstantiatingObjectsInLoops", "PMD.AvoidDuplicateLiterals" })
|
||||
"PMD.AvoidInstantiatingObjectsInLoops", "PMD.AvoidDuplicateLiterals",
|
||||
"PMD.ConfusingArgumentToVarargsMethod" })
|
||||
public void onVmDefChanged(VmDefChanged event, VmChannel channel)
|
||||
throws JsonDecodeException, IOException {
|
||||
var vmName = event.vmDefinition().getMetadata().getName();
|
||||
|
|
|
|||
|
|
@ -97,7 +97,11 @@
|
|||
.jdrupes-vmoperator-vmconlet-view-action-list {
|
||||
white-space: nowrap;
|
||||
|
||||
[role=button]:not(:last-child) {
|
||||
margin-right: 0.5em;
|
||||
[role=button] {
|
||||
padding: 0.25rem;
|
||||
|
||||
&:not([aria-disabled]):hover {
|
||||
box-shadow: var(--darkening);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue