Compare commits

...

17 commits

Author SHA1 Message Date
f20e61d57c Default to generating secrets.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-06 12:36:29 +02:00
b0b6d6723e Fix typo. 2024-06-06 12:03:00 +02:00
d6a0cc6220 Improve state feedback.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-05 21:10:05 +02:00
9180323618 Update. 2024-06-04 22:09:54 +02:00
08f4a818da Add HTTPConnector to diagrams. 2024-06-04 21:57:15 +02:00
bab0db48d1 Fix typo. 2024-06-04 11:25:21 +02:00
85d9278e2e Update diagrams. 2024-06-04 11:20:12 +02:00
ebead17193 Minor update.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-04 09:43:27 +02:00
fefd2737f3 Widen selection box. 2024-06-03 23:12:22 +02:00
a4bd129252 Minor updates. 2024-06-03 23:10:35 +02:00
4617d8d3ba Make byte[] to String conversion null-safe.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 14:59:08 +02:00
6c250d4656 Fix release versions.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 14:28:57 +02:00
2403f5db64 Undo previous commit (is implied by fetch-depth: 0). 2024-06-01 13:57:21 +02:00
c66e304de4 Fetch all tags to make axion release plugin work properly.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 13:44:53 +02:00
2cb8c90357 Try to fix version issue when building release.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 13:26:47 +02:00
837ee043aa Checkout triggering version (is default).
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 12:28:28 +02:00
a20602f671 Plain tags for development branches.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 11:54:23 +02:00
11 changed files with 76 additions and 53 deletions

View file

@ -18,10 +18,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install podman

View file

@ -5,6 +5,11 @@
*/
plugins {
// Apply the common versioning conventions.
// Put this at the start, because accessing project.version before
// this is applied makes things fail.
id 'org.jdrupes.vmoperator.versioning-conventions'
// Apply the java Plugin to add support for Java.
id 'java'
@ -13,9 +18,6 @@ plugins {
// Access to git information
id 'org.ajoberstar.grgit'
// Apply the common versioning conventions.
id 'org.jdrupes.vmoperator.versioning-conventions'
}
repositories {

View file

@ -21,11 +21,13 @@ scmVersion {
}
var p = shortened.replace('.', '-') + "-"
if (grgit.branch.current.name != "main"
&& !grgit.branch.current.name.startsWith("release")) {
&& grgit.branch.current.name != "HEAD"
&& !grgit.branch.current.name.startsWith("release")
&& !grgit.branch.current.name.startsWith("develop")) {
p = p + grgit.branch.current.name.replace('/', '-') + "-"
}
prefix = p
}
}
version = scmVersion.version
project.version = scmVersion.version
ext.isSnapshot = version.endsWith('-SNAPSHOT')

View file

@ -45,7 +45,7 @@
body {
background-color:#ffffff;
color:#353833;
font: normal 16px/1.5 "DejaVu Serif", serif;
font: normal 16px/1.5 "DejaVu Sans", Arial, Helvetica, sans-serif;
margin:0;
padding:0;
height:100%;
@ -71,37 +71,33 @@ a[name] {
color:#353833;
}
pre {
font-family: "DejaVu Sans Mono", monospace;
font-family:'DejaVu Sans Mono', monospace;
}
h1 {
font-family: "DejaVu Sans", sans;
font-size:20px;
}
h2 {
font-family: "DejaVu Sans", sans;
font-size:18px;
}
h3 {
font-family: "DejaVu Sans", sans;
font-size:16px;
font-size:17px;
}
h4 {
font-family: "DejaVu Sans", sans;
font-size:15px;
font-size:16px;
margin-top: 1rem;
margin-bottom: 1rem;
}
h5 {
font-family: "DejaVu Sans", sans;
font-size:14px;
}
h6 {
font-family: "DejaVu Sans", sans;
font-size:13px;
}
ul {
list-style-type:disc;
}
code, tt {
font-family: "DejaVu Sans Mono", monospace;
font-family:'DejaVu Sans Mono', monospace;
}
:not(h1, h2, h3, h4, h5, h6) > code,
:not(h1, h2, h3, h4, h5, h6) > tt {
@ -111,12 +107,12 @@ code, tt {
line-height:1.4em;
}
dt code {
font-family: "DejaVu Sans Mono", monospace;
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
padding-top:4px;
}
.summary-table dt code {
font-family: "DejaVu Sans Mono", monospace;
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
vertical-align:top;
padding-top:4px;
@ -124,7 +120,9 @@ dt code {
sup {
font-size:8px;
}
button {
font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
}
/*
* Styles for HTML generated by javadoc.
*
@ -185,7 +183,6 @@ sup {
min-height:2.8em;
padding-top:10px;
overflow:hidden;
font-family: "DejaVu Sans", sans;
font-size:80%;
}
.sub-nav {
@ -193,7 +190,6 @@ sup {
float:left;
width:100%;
overflow:hidden;
font-family: "DejaVu Sans", sans;
font-size:80%;
}
.sub-nav div {
@ -311,13 +307,16 @@ main {
position:relative;
}
dl.notes > dt {
font-family: "DejaVu Sans", sans;
font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
/* font-size:12px; */
font-weight:bold;
margin:10px 0 0 0;
color:#4E4E4E;
}
dl.notes > dd {
margin:5px 10px 10px 0;
margin:5px 10px 0 0;
/* font-size:14px; */
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
}
dl.name-value > dt {
margin-left:1px;
@ -389,6 +388,11 @@ ul.see-list-long li:not(:last-child):after {
border-bottom:1px solid #EEE;
padding:0;
}
.summary-table .col-first {
font-family: "DejaVu Sans Mono", monospace;
}
.caption {
position:relative;
text-align:left;
@ -402,7 +406,6 @@ ul.see-list-long li:not(:last-child):after {
padding-left:1px;
margin:0;
white-space:pre;
font-family: 'DejaVu Sans';
}
.caption a:link, .caption a:visited {
color:#1f389c;
@ -450,9 +453,6 @@ div.table-tabs > button.table-tab {
display: grid;
grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto);
}
#method-summary-table .three-column-summary {
grid-template-columns: minmax(10%, 20%) minmax(15%, max-content) minmax(15%, auto);
}
.four-column-summary {
display: grid;
grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto);
@ -490,7 +490,6 @@ div.table-tabs > button.table-tab {
}
.table-header {
background:#dee3e9;
font-family: 'DejaVu Sans';
font-weight: bold;
}
/*
@ -508,7 +507,6 @@ div.table-tabs > button.table-tab {
.col-last {
white-space:normal;
}
/*
.col-first a:link, .col-first a:visited,
.col-second a:link, .col-second a:visited,
.col-first a:link, .col-first a:visited,
@ -520,7 +518,6 @@ div.table-tabs > button.table-tab {
.all-packages-container a:link, .all-packages-container a:visited {
font-weight:bold;
}
*/
.table-sub-heading-color {
background-color:#EEEEFF;
}
@ -537,12 +534,9 @@ div.table-tabs > button.table-tab {
margin:0;
padding:10px 0;
}
/*
div.block {
font-size:14px;
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
}
*/
.col-last div {
padding-top:0;
}
@ -553,8 +547,7 @@ div.block {
.package-signature,
.type-signature,
.member-signature {
font-family: "DejaVu Sans Mono", monospace;
/* font-size:14px; */
font-family:'DejaVu Sans Mono', monospace;
margin:14px 0;
white-space: pre-wrap;
}
@ -593,13 +586,8 @@ h1.hidden {
.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link,
.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type,
.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label {
font-family: "DejaVu Sans", sans;
font-weight:bold;
}
.sub-title, .inheritance, .all-packages-table-tab1.col-first,
.summary-table .col-first {
font-family: "DejaVu Sans", sans;
}
.deprecation-comment, .help-footnote, .preview-comment {
font-style:italic;
}
@ -658,6 +646,7 @@ main, nav, header, footer, section {
ul.ui-autocomplete {
position:fixed;
z-index:999999;
background-color: #FFFFFF;
}
ul.ui-autocomplete li {
float:left;
@ -667,6 +656,9 @@ ul.ui-autocomplete li {
.result-highlight {
font-weight:bold;
}
.ui-autocomplete .result-item {
font-size: inherit;
}
#search-input {
background-image:url('resources/glass.png');
background-size:13px;

View file

@ -33,6 +33,7 @@ import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Scanner;
import java.util.logging.Level;
import static org.jdrupes.vmoperator.common.Constants.APP_NAME;
@ -180,7 +181,8 @@ public class DisplaySecretMonitor
// Check validity
var model = stub.model().get();
@SuppressWarnings("PMD.StringInstantiation")
var expiry = new String(model.getData().get(DATA_PASSWORD_EXPIRY));
var expiry = Optional.ofNullable(model.getData()
.get(DATA_PASSWORD_EXPIRY)).map(b -> new String(b)).orElse(null);
if (model.getData().get(DATA_DISPLAY_PASSWORD) != null
&& stillValid(expiry)) {
event.setResult(

View file

@ -64,7 +64,7 @@ import org.jose4j.base64url.Base64;
var display = GsonPtr.to(event.vmDefinition().data()).to("spec", "vm",
"display");
if (!display.get(JsonPrimitive.class, "spice", "generateSecret")
.map(JsonPrimitive::getAsBoolean).orElse(false)) {
.map(JsonPrimitive::getAsBoolean).orElse(true)) {
return;
}

View file

@ -57,7 +57,7 @@
* ```
*
* Developers may also be interested in the usage of channels
* by the application's component:
* by the application's components:
*
* ![Main channels](app-channels.svg)
*
@ -74,6 +74,8 @@
*
* Component NioDispatcher as NioDispatcher <<internal>>
* [Manager] *-up- [NioDispatcher]
* Component HttpConnector as HttpConnector <<internal>>
* [Manager] *-up- [HttpConnector]
* Component FileSystemWatcher as FileSystemWatcher <<internal>>
* [Manager] *-up- [FileSystemWatcher]
* Component YamlConfigurationStore as YamlConfigurationStore <<internal>>
@ -119,6 +121,7 @@
* [WebConsole] *-- [RoleConfigurator]
* [WebConsole] *-- [RoleConletFilter]
* [WebConsole] *-left- [LoginConlet]
* [WebConsole] *-right- [OidcClient]
*
* Component "ComponentCollector\nfor page resources" as cpr <<internal>>
* [WebConsole] *-- [cpr]
@ -147,21 +150,35 @@
* () "guiTransport" as hT
* hT .up. [GuiSocketServer:8080]
* hT .down. [GuiHttpServer]
* hT .right[hidden]. [HttpConnector]
*
* [YamlConfigurationStore] -right[hidden]- hT
*
* () "guiHttp" as http
* http .up. [GuiHttpServer]
* http .up. [HttpConnector]
* note top of [HttpConnector]: transport layer com-\nponents omitted
*
* [PreferencesStore] .right. http
* [PreferencesStore] .. http
* [OidcClient] .up. http
* [LanguageSelector] .left. http
* [InMemorySessionManager] .up. http
* [LanguageSelector] .up. http
*
* package "Conceptual WebConsole" {
* [ConsoleWeblet] .left. http
* [ConsoleWeblet] .right. http
* [ConsoleWeblet] *-down- [WebConsole]
* }
*
* [Controller] .down[hidden]. [ConsoleWeblet]
*
* () "console" as console
* console .. WebConsole
*
* [OidcClient] .. console
* [LoginConlet] .right. console
*
* note right of console: More conlets\nconnect here
*
* @enduml
*/
package org.jdrupes.vmoperator.manager;

View file

@ -52,12 +52,14 @@
v-html="controller.breakBeforeDots(entry[key])"></span>
</td>
<td class="jdrupes-vmoperator-vmconlet-view-action-list">
<span role="button" v-if="entry.spec.vm.state != 'Running'"
<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'"
<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"

View file

@ -90,7 +90,7 @@ import org.jgrapes.webconsole.base.events.UpdateConletType;
import org.jgrapes.webconsole.base.freemarker.FreeMarkerConlet;
/**
* The Class VmConlet.
* The Class VmViewer.
*/
@SuppressWarnings({ "PMD.DataflowAnomalyAnalysis", "PMD.ExcessiveImports",
"PMD.CouplingBetweenObjects", "PMD.GodClass" })

View file

@ -92,13 +92,15 @@ window.orgJDrupesVmOperatorVmViewer.initPreview = (previewDom: HTMLElement,
:title="localize('Open console')"></td>
<td v-if="vmDef.spec"
class="jdrupes-vmoperator-vmviewer-preview-action-list">
<span role="button" v-if="vmDef.spec.vm.state != 'Running'"
<span role="button"
v-if="vmDef.spec.vm.state != 'Running' && !vmDef.running"
:aria-disabled="!vmDef.userPermissions.includes('start')"
tabindex="0" class="fa fa-play" :title="localize('Start VM')"
v-on:click="vmAction(vmDef.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="vmDef.spec.vm.state != 'Stopped'"
<span role="button"
v-if="vmDef.spec.vm.state != 'Stopped' && vmDef.running"
:aria-disabled="!vmDef.userPermissions.includes('stop')"
tabindex="0" class="fa fa-stop" :title="localize('Stop VM')"
v-on:click="vmAction(vmDef.name, 'stop')"></span>

View file

@ -43,3 +43,8 @@
white-space: nowrap;
}
.jdrupes-vmoperator-vmviewer-edit {
select {
width: 15em;
}
}