parent
9c31f574b8
commit
10182efea1
28 changed files with 114 additions and 998 deletions
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
|
|
@ -22,10 +22,10 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- name: Install graphviz
|
||||
run: sudo apt-get install graphviz
|
||||
- name: Set up JDK 17
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew -Prepo.access.token=${{ secrets.REPO_ACCESS_TOKEN }} stage
|
||||
|
|
|
|||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -31,10 +31,10 @@ jobs:
|
|||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Set up JDK 17
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
- name: Push with Gradle
|
||||
run: ./gradlew -Prepo.access.token=${{ secrets.REPO_ACCESS_TOKEN }} -Pdocker.registry=ghcr.io/${{ github.actor }} stage pushImages
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ sourceSets {
|
|||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,31 +22,28 @@ configurations {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
markdownDoclet "org.jdrupes.mdoclet:doclet:3.1.0"
|
||||
javadocTaglets "org.jdrupes.taglets:plantuml-taglet:2.1.0"
|
||||
}
|
||||
|
||||
task javadocResources(type: Copy) {
|
||||
into file(docDestinationDir)
|
||||
from ("${rootProject.rootDir}/misc") {
|
||||
include '*.woff2'
|
||||
}
|
||||
markdownDoclet "org.jdrupes.mdoclet:doclet:4.0.0"
|
||||
javadocTaglets "org.jdrupes.taglets:plantuml-taglet:3.0.0"
|
||||
}
|
||||
|
||||
task apidocs (type: JavaExec) {
|
||||
// Does not work on JitPack, no /usr/bin/dot
|
||||
enabled = JavaVersion.current() == JavaVersion.VERSION_17
|
||||
|
||||
dependsOn javadocResources
|
||||
enabled = JavaVersion.current() == JavaVersion.VERSION_21
|
||||
|
||||
outputs.dir(docDestinationDir)
|
||||
|
||||
inputs.file rootProject.file('overview.md')
|
||||
inputs.file "${rootProject.rootDir}/misc/stylesheet.css"
|
||||
inputs.file "${rootProject.rootDir}/misc/javadoc-overwrites.css"
|
||||
|
||||
jvmArgs = ['--add-exports=jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED',
|
||||
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED']
|
||||
main = 'jdk.javadoc.internal.tool.Main'
|
||||
jvmArgs = ['--add-exports=jdk.compiler/com.sun.tools.doclint=ALL-UNNAMED',
|
||||
'--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
|
||||
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
|
||||
'--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
|
||||
'--add-exports=jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED',
|
||||
'--add-exports=jdk.javadoc/jdk.javadoc.internal.doclets.toolkit=ALL-UNNAMED',
|
||||
'--add-opens=jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.resources.releases=ALL-UNNAMED',
|
||||
'-Duser.language=en', '-Duser.region=US']
|
||||
mainClass = 'jdk.javadoc.internal.tool.Main'
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
// Make sure that other projects' compileClasspaths are resolved
|
||||
|
|
@ -69,7 +66,7 @@ task apidocs (type: JavaExec) {
|
|||
'-package',
|
||||
'-use',
|
||||
'-linksource',
|
||||
'-link', 'https://docs.oracle.com/en/java/javase/17/docs/api/',
|
||||
'-link', 'https://docs.oracle.com/en/java/javase/21/docs/api/',
|
||||
'-link', 'https://mnlipp.github.io/jgrapes/latest-release/javadoc/',
|
||||
'-link', 'https://freemarker.apache.org/docs/api/',
|
||||
'--add-exports', 'jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED',
|
||||
|
|
@ -88,7 +85,7 @@ task apidocs (type: JavaExec) {
|
|||
'-bottom', rootProject.file("misc/javadoc.bottom.txt").text,
|
||||
'--allow-script-in-comments',
|
||||
'-Xdoclint:-html',
|
||||
'--main-stylesheet', "${rootProject.rootDir}/misc/stylesheet.css",
|
||||
'--add-stylesheet', "${rootProject.rootDir}/misc/javadoc-overwrites.css",
|
||||
'--add-exports=jdk.javadoc/jdk.javadoc.internal.doclets.formats.html=ALL-UNNAMED',
|
||||
'-quiet'
|
||||
]
|
||||
|
|
@ -97,6 +94,25 @@ task apidocs (type: JavaExec) {
|
|||
ignoreExitValue true
|
||||
}
|
||||
|
||||
task testJavadoc(type: Javadoc) {
|
||||
enabled = JavaVersion.current() == JavaVersion.VERSION_21
|
||||
|
||||
source = fileTree(dir: 'testfiles', include: '**/*.java')
|
||||
destinationDir = project.file("build/testfiles-gradle")
|
||||
options.docletpath = configurations.markdownDoclet.files.asType(List)
|
||||
options.doclet = 'org.jdrupes.mdoclet.MDoclet'
|
||||
options.overview = 'testfiles/overview.md'
|
||||
options.addStringOption('Xdoclint:-html', '-quiet')
|
||||
|
||||
options.setJFlags([
|
||||
'--add-exports=jdk.compiler/com.sun.tools.doclint=ALL-UNNAMED',
|
||||
'--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
|
||||
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
|
||||
'--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
|
||||
'--add-exports=jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED',
|
||||
'--add-exports=jdk.javadoc/jdk.javadoc.internal.doclets.toolkit=ALL-UNNAMED',
|
||||
'--add-opens=jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.resources.releases=ALL-UNNAMED'])
|
||||
}
|
||||
// Prepare github authentication for plugins
|
||||
if (System.properties['org.ajoberstar.grgit.auth.username'] == null) {
|
||||
System.setProperty('org.ajoberstar.grgit.auth.username',
|
||||
|
|
|
|||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,7 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
31
gradlew
vendored
31
gradlew
vendored
|
|
@ -55,7 +55,7 @@
|
|||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
|
@ -83,10 +83,8 @@ done
|
|||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
|
@ -133,10 +131,13 @@ location of your Java installation."
|
|||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
|
|
@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
|
|
@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
|
|
@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
|
|||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
|
|
|
|||
20
gradlew.bat
vendored
20
gradlew.bat
vendored
|
|
@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
|
|||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
|
|
@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
misc/javadoc-overwrites.css
Normal file
2
misc/javadoc-overwrites.css
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
:root { --body-font-size: 16px;}
|
||||
:root { --code-font-size: 16px;}
|
||||
|
|
@ -1,904 +0,0 @@
|
|||
/*
|
||||
* Javadoc style sheet
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: 'DejaVu Serif';
|
||||
src: local('DejaVu Serif'), url('DejaVuSerif.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DejaVu Serif';
|
||||
font-weight: bold;
|
||||
src: local('DejaVu Serif Bold'), url('DejaVuSerif-Bold.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DejaVu Sans';
|
||||
src: local('DejaVu Sans'), url('DejaVuSans.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DejaVu Sans';
|
||||
font-weight: bold;
|
||||
src: local('DejaVu Sans Bold'), url('DejaVuSans-Bold.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DejaVu Sans Mono';
|
||||
src: local('DejaVu Sans Mono'), url('DejaVuSansMono.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DejaVu Sans Mono';
|
||||
font-weight: bold;
|
||||
src: local('DejaVu Sans Mono Bold'), url('DejaVuSansMono-Bold.woff2');
|
||||
}
|
||||
|
||||
/*
|
||||
* Styles for individual HTML elements.
|
||||
*
|
||||
* These are styles that are specific to individual HTML elements. Changing them affects the style of a particular
|
||||
* HTML element throughout the page.
|
||||
*/
|
||||
|
||||
body {
|
||||
background-color:#ffffff;
|
||||
color:#353833;
|
||||
font: normal 16px/1.5 "DejaVu Sans", Arial, Helvetica, sans-serif;
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
}
|
||||
iframe {
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
overflow-y:scroll;
|
||||
border:none;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color:#4A6782;
|
||||
}
|
||||
a[href]:hover, a[href]:focus {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
a[name] {
|
||||
color:#353833;
|
||||
}
|
||||
pre {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
}
|
||||
h1 {
|
||||
font-size:20px;
|
||||
}
|
||||
h2 {
|
||||
font-size:18px;
|
||||
}
|
||||
h3 {
|
||||
font-size:17px;
|
||||
}
|
||||
h4 {
|
||||
font-size:16px;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
h5 {
|
||||
font-size:14px;
|
||||
}
|
||||
h6 {
|
||||
font-size:13px;
|
||||
}
|
||||
ul {
|
||||
list-style-type:disc;
|
||||
}
|
||||
code, tt {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
}
|
||||
:not(h1, h2, h3, h4, h5, h6) > code,
|
||||
:not(h1, h2, h3, h4, h5, h6) > tt {
|
||||
/* font-size:14px; */
|
||||
padding-top:4px;
|
||||
margin-top:8px;
|
||||
line-height:1.4em;
|
||||
}
|
||||
dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
}
|
||||
.summary-table dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
vertical-align:top;
|
||||
padding-top:4px;
|
||||
}
|
||||
sup {
|
||||
font-size:8px;
|
||||
}
|
||||
button {
|
||||
font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
|
||||
}
|
||||
/*
|
||||
* Styles for HTML generated by javadoc.
|
||||
*
|
||||
* These are style classes that are used by the standard doclet to generate HTML documentation.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Styles for document title and copyright.
|
||||
*/
|
||||
.clear {
|
||||
clear:both;
|
||||
height:0;
|
||||
overflow:hidden;
|
||||
}
|
||||
.about-language {
|
||||
float:right;
|
||||
padding:0 21px 8px 8px;
|
||||
font-size:11px;
|
||||
margin-top:-9px;
|
||||
height:2.9em;
|
||||
}
|
||||
.legal-copy {
|
||||
margin-left:.5em;
|
||||
}
|
||||
.tab {
|
||||
background-color:#0066FF;
|
||||
color:#ffffff;
|
||||
padding:8px;
|
||||
width:5em;
|
||||
font-weight:bold;
|
||||
}
|
||||
/*
|
||||
* Styles for navigation bar.
|
||||
*/
|
||||
@media screen {
|
||||
.flex-box {
|
||||
position:fixed;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.flex-header {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.flex-content {
|
||||
flex: 1 1 auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.top-nav {
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
min-height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:80%;
|
||||
}
|
||||
.sub-nav {
|
||||
background-color:#dee3e9;
|
||||
float:left;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
font-size:80%;
|
||||
}
|
||||
.sub-nav div {
|
||||
clear:left;
|
||||
float:left;
|
||||
padding:0 0 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.sub-nav .nav-list {
|
||||
padding-top:5px;
|
||||
}
|
||||
ul.nav-list {
|
||||
display:block;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.sub-nav-list {
|
||||
float:left;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.nav-list li {
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding: 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.sub-nav .nav-list-search {
|
||||
float:right;
|
||||
margin:0 0 0 0;
|
||||
padding:5px 6px;
|
||||
clear:none;
|
||||
}
|
||||
.nav-list-search label {
|
||||
position:relative;
|
||||
right:-16px;
|
||||
}
|
||||
ul.sub-nav-list li {
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding-top:10px;
|
||||
}
|
||||
.top-nav a:link, .top-nav a:active, .top-nav a:visited {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.top-nav a:hover {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.nav-bar-cell1-rev {
|
||||
background-color:#F8981D;
|
||||
color:#253441;
|
||||
margin: auto 5px;
|
||||
}
|
||||
.skip-nav {
|
||||
position:absolute;
|
||||
top:auto;
|
||||
left:-9999px;
|
||||
overflow:hidden;
|
||||
}
|
||||
/*
|
||||
* Hide navigation links and search box in print layout
|
||||
*/
|
||||
@media print {
|
||||
ul.nav-list, div.sub-nav {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Styles for page header and footer.
|
||||
*/
|
||||
.title {
|
||||
color:#2c4557;
|
||||
margin:10px 0;
|
||||
}
|
||||
.sub-title {
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
.header ul {
|
||||
margin:0 0 15px 0;
|
||||
padding:0;
|
||||
}
|
||||
.header ul li, .footer ul li {
|
||||
list-style:none;
|
||||
font-size:80%;
|
||||
}
|
||||
/*
|
||||
* Styles for headings.
|
||||
*/
|
||||
body.class-declaration-page .summary h2,
|
||||
body.class-declaration-page .details h2,
|
||||
body.class-use-page h2,
|
||||
body.module-declaration-page .block-list h2 {
|
||||
font-style: italic;
|
||||
padding:0;
|
||||
margin:15px 0;
|
||||
}
|
||||
body.class-declaration-page .summary h3,
|
||||
body.class-declaration-page .details h3,
|
||||
body.class-declaration-page .summary .inherited-list h2 {
|
||||
background-color:#dee3e9;
|
||||
border:1px solid #d0d9e0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:7px 5px;
|
||||
}
|
||||
/*
|
||||
* Styles for page layout containers.
|
||||
*/
|
||||
main {
|
||||
clear:both;
|
||||
padding:10px 20px;
|
||||
position:relative;
|
||||
}
|
||||
dl.notes > dt {
|
||||
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 0 0;
|
||||
/* font-size:14px; */
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
dl.name-value > dt {
|
||||
margin-left:1px;
|
||||
/* font-size:1.1em; */
|
||||
display:inline;
|
||||
font-weight:bold;
|
||||
}
|
||||
dl.name-value > dd {
|
||||
margin:0 0 0 1px;
|
||||
/* font-size:1.1em; */
|
||||
display:inline;
|
||||
}
|
||||
/*
|
||||
* Styles for lists.
|
||||
*/
|
||||
li.circle {
|
||||
list-style:circle;
|
||||
}
|
||||
ul.horizontal li {
|
||||
display:inline;
|
||||
/* font-size:0.9em; */
|
||||
}
|
||||
div.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
div.inheritance div.inheritance {
|
||||
margin-left:2em;
|
||||
}
|
||||
ul.block-list,
|
||||
ul.details-list,
|
||||
ul.member-list,
|
||||
ul.summary-list {
|
||||
margin:10px 0 10px 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.block-list > li,
|
||||
ul.details-list > li,
|
||||
ul.member-list > li,
|
||||
ul.summary-list > li {
|
||||
list-style:none;
|
||||
margin-bottom:15px;
|
||||
line-height:1.4;
|
||||
}
|
||||
.summary-table dl, .summary-table dl dt, .summary-table dl dd {
|
||||
margin-top:0;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
ul.see-list, ul.see-list-long {
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
ul.see-list li {
|
||||
display: inline;
|
||||
}
|
||||
ul.see-list li:not(:last-child):after,
|
||||
ul.see-list-long li:not(:last-child):after {
|
||||
content: ", ";
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
/*
|
||||
* Styles for tables.
|
||||
*/
|
||||
.summary-table, .details-table {
|
||||
width:100%;
|
||||
border-spacing:0;
|
||||
border-left:1px solid #EEE;
|
||||
border-right:1px solid #EEE;
|
||||
border-bottom:1px solid #EEE;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.summary-table .col-first {
|
||||
font-family: "DejaVu Sans Mono", monospace;
|
||||
}
|
||||
|
||||
.caption {
|
||||
position:relative;
|
||||
text-align:left;
|
||||
background-repeat:no-repeat;
|
||||
color:#253441;
|
||||
font-weight:bold;
|
||||
clear:none;
|
||||
overflow:hidden;
|
||||
padding:0;
|
||||
padding-top:10px;
|
||||
padding-left:1px;
|
||||
margin:0;
|
||||
white-space:pre;
|
||||
}
|
||||
.caption a:link, .caption a:visited {
|
||||
color:#1f389c;
|
||||
}
|
||||
.caption a:hover,
|
||||
.caption a:active {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.caption span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
padding-bottom:7px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
border: none;
|
||||
height:16px;
|
||||
}
|
||||
div.table-tabs {
|
||||
padding:10px 0 0 1px;
|
||||
margin:0;
|
||||
}
|
||||
div.table-tabs > button {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 5px 12px 7px 12px;
|
||||
font-weight: bold;
|
||||
margin-right: 3px;
|
||||
}
|
||||
div.table-tabs > button.active-table-tab {
|
||||
background: #F8981D;
|
||||
color: #253441;
|
||||
}
|
||||
div.table-tabs > button.table-tab {
|
||||
background: #4D7A97;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.two-column-summary {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(15%, max-content) minmax(15%, auto);
|
||||
}
|
||||
.three-column-summary {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(10%, max-content) 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);
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
.two-column-summary {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
.three-column-summary {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(10%, max-content) minmax(25%, auto);
|
||||
}
|
||||
.three-column-summary .col-last {
|
||||
grid-column-end: span 2;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1000px) {
|
||||
.four-column-summary {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(15%, max-content) minmax(15%, auto);
|
||||
}
|
||||
}
|
||||
.summary-table > div, .details-table > div {
|
||||
text-align:left;
|
||||
padding: 8px 3px 3px 7px;
|
||||
}
|
||||
.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name {
|
||||
vertical-align:top;
|
||||
padding-right:0;
|
||||
padding-top:8px;
|
||||
padding-bottom:3px;
|
||||
}
|
||||
.table-header {
|
||||
background:#dee3e9;
|
||||
font-weight: bold;
|
||||
}
|
||||
/*
|
||||
.col-first, .col-first {
|
||||
font-size:13px;
|
||||
}
|
||||
.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last {
|
||||
font-size:13px;
|
||||
}
|
||||
*/
|
||||
.col-first, .col-second, .col-constructor-name {
|
||||
vertical-align:top;
|
||||
overflow: auto;
|
||||
}
|
||||
.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,
|
||||
.col-second a:link, .col-second a:visited,
|
||||
.col-constructor-name a:link, .col-constructor-name a:visited,
|
||||
.col-summary-item-name a:link, .col-summary-item-name a:visited,
|
||||
.constant-values-container a:link, .constant-values-container a:visited,
|
||||
.all-classes-container a:link, .all-classes-container a:visited,
|
||||
.all-packages-container a:link, .all-packages-container a:visited {
|
||||
font-weight:bold;
|
||||
}
|
||||
.table-sub-heading-color {
|
||||
background-color:#EEEEFF;
|
||||
}
|
||||
.even-row-color, .even-row-color .table-header {
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
.odd-row-color, .odd-row-color .table-header {
|
||||
background-color:#EEEEEF;
|
||||
}
|
||||
/*
|
||||
* Styles for contents.
|
||||
*/
|
||||
.deprecated-content {
|
||||
margin:0;
|
||||
padding:10px 0;
|
||||
}
|
||||
div.block {
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
.col-last div {
|
||||
padding-top:0;
|
||||
}
|
||||
.col-last a {
|
||||
padding-bottom:3px;
|
||||
}
|
||||
.module-signature,
|
||||
.package-signature,
|
||||
.type-signature,
|
||||
.member-signature {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
margin:14px 0;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.module-signature,
|
||||
.package-signature,
|
||||
.type-signature {
|
||||
margin-top: 0;
|
||||
}
|
||||
.member-signature .type-parameters-long,
|
||||
.member-signature .parameters,
|
||||
.member-signature .exceptions {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
white-space: pre;
|
||||
}
|
||||
.member-signature .type-parameters {
|
||||
white-space: normal;
|
||||
}
|
||||
/*
|
||||
* Styles for formatting effect.
|
||||
*/
|
||||
.source-line-no {
|
||||
color:green;
|
||||
padding:0 30px 0 0;
|
||||
}
|
||||
h1.hidden {
|
||||
visibility:hidden;
|
||||
overflow:hidden;
|
||||
/* font-size:10px; */
|
||||
}
|
||||
.block {
|
||||
display:block;
|
||||
margin:0 10px 5px 0;
|
||||
color:#474747;
|
||||
}
|
||||
.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-weight:bold;
|
||||
}
|
||||
.deprecation-comment, .help-footnote, .preview-comment {
|
||||
font-style:italic;
|
||||
}
|
||||
.deprecation-block {
|
||||
/* font-size:14px; */
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
border-style:solid;
|
||||
border-width:thin;
|
||||
border-radius:10px;
|
||||
padding:10px;
|
||||
margin-bottom:10px;
|
||||
margin-right:10px;
|
||||
display:inline-block;
|
||||
}
|
||||
.preview-block {
|
||||
/* font-size:14px; */
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
border-style:solid;
|
||||
border-width:thin;
|
||||
border-radius:10px;
|
||||
padding:10px;
|
||||
margin-bottom:10px;
|
||||
margin-right:10px;
|
||||
display:inline-block;
|
||||
}
|
||||
div.block div.deprecation-comment {
|
||||
font-style:normal;
|
||||
}
|
||||
/*
|
||||
* Styles specific to HTML5 elements.
|
||||
*/
|
||||
main, nav, header, footer, section {
|
||||
display:block;
|
||||
}
|
||||
/*
|
||||
* Styles for javadoc search.
|
||||
*/
|
||||
.ui-autocomplete-category {
|
||||
font-weight:bold;
|
||||
/* font-size:15px; */
|
||||
padding:7px 0 7px 3px;
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.result-item {
|
||||
/* font-size:13px; */
|
||||
}
|
||||
.ui-autocomplete {
|
||||
max-height:85%;
|
||||
max-width:65%;
|
||||
overflow-y:scroll;
|
||||
overflow-x:scroll;
|
||||
white-space:nowrap;
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
}
|
||||
ul.ui-autocomplete {
|
||||
position:fixed;
|
||||
z-index:999999;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
ul.ui-autocomplete li {
|
||||
float:left;
|
||||
clear:both;
|
||||
width:100%;
|
||||
}
|
||||
.result-highlight {
|
||||
font-weight:bold;
|
||||
}
|
||||
.ui-autocomplete .result-item {
|
||||
font-size: inherit;
|
||||
}
|
||||
#search-input {
|
||||
background-image:url('resources/glass.png');
|
||||
background-size:13px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:2px 3px;
|
||||
padding-left:20px;
|
||||
position:relative;
|
||||
right:-18px;
|
||||
width:400px;
|
||||
}
|
||||
#reset-button {
|
||||
background-color: rgb(255,255,255);
|
||||
background-image:url('resources/x.png');
|
||||
background-position:center;
|
||||
background-repeat:no-repeat;
|
||||
background-size:12px;
|
||||
border:0 none;
|
||||
width:16px;
|
||||
height:16px;
|
||||
position:relative;
|
||||
left:-4px;
|
||||
top:-4px;
|
||||
font-size:0px;
|
||||
}
|
||||
.watermark {
|
||||
color:#545454;
|
||||
}
|
||||
.search-tag-desc-result {
|
||||
font-style:italic;
|
||||
/* font-size:11px; */
|
||||
}
|
||||
.search-tag-holder-result {
|
||||
font-style:italic;
|
||||
/* font-size:12px; */
|
||||
}
|
||||
.search-tag-result:target {
|
||||
background-color:yellow;
|
||||
}
|
||||
.module-graph span {
|
||||
display:none;
|
||||
position:absolute;
|
||||
}
|
||||
.module-graph:hover span {
|
||||
display:block;
|
||||
margin: -100px 0 0 100px;
|
||||
z-index: 1;
|
||||
}
|
||||
.inherited-list {
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
section.class-description {
|
||||
line-height: 1.4;
|
||||
}
|
||||
.summary section[class$="-summary"], .details section[class$="-details"],
|
||||
.class-uses .detail, .serialized-class-details {
|
||||
padding: 0px 20px 5px 10px;
|
||||
border: 1px solid #ededed;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.inherited-list, section[class$="-details"] .detail {
|
||||
padding:0 0 5px 8px;
|
||||
background-color:#ffffff;
|
||||
border:none;
|
||||
}
|
||||
.vertical-separator {
|
||||
padding: 0 5px;
|
||||
}
|
||||
ul.help-section-list {
|
||||
margin: 0;
|
||||
}
|
||||
ul.help-subtoc > li {
|
||||
display: inline-block;
|
||||
padding-right: 5px;
|
||||
/* font-size: smaller; */
|
||||
}
|
||||
ul.help-subtoc > li::before {
|
||||
content: "\2022" ;
|
||||
padding-right:2px;
|
||||
}
|
||||
span.help-note {
|
||||
font-style: italic;
|
||||
}
|
||||
/*
|
||||
* Indicator icon for external links.
|
||||
*/
|
||||
main a[href*="://"]::after {
|
||||
content:"";
|
||||
display:inline-block;
|
||||
background-image:url('data:image/svg+xml; utf8, \
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768">\
|
||||
<path d="M584 664H104V184h216V80H0v688h688V448H584zM384 0l132 \
|
||||
132-240 240 120 120 240-240 132 132V0z" fill="%234a6782"/>\
|
||||
</svg>');
|
||||
background-size:100% 100%;
|
||||
width:7px;
|
||||
height:7px;
|
||||
margin-left:2px;
|
||||
margin-bottom:4px;
|
||||
}
|
||||
main a[href*="://"]:hover::after,
|
||||
main a[href*="://"]:focus::after {
|
||||
background-image:url('data:image/svg+xml; utf8, \
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768">\
|
||||
<path d="M584 664H104V184h216V80H0v688h688V448H584zM384 0l132 \
|
||||
132-240 240 120 120 240-240 132 132V0z" fill="%23bb7a2a"/>\
|
||||
</svg>');
|
||||
}
|
||||
|
||||
/*
|
||||
* Styles for user-provided tables.
|
||||
*
|
||||
* borderless:
|
||||
* No borders, vertical margins, styled caption.
|
||||
* This style is provided for use with existing doc comments.
|
||||
* In general, borderless tables should not be used for layout purposes.
|
||||
*
|
||||
* plain:
|
||||
* Plain borders around table and cells, vertical margins, styled caption.
|
||||
* Best for small tables or for complex tables for tables with cells that span
|
||||
* rows and columns, when the "striped" style does not work well.
|
||||
*
|
||||
* striped:
|
||||
* Borders around the table and vertical borders between cells, striped rows,
|
||||
* vertical margins, styled caption.
|
||||
* Best for tables that have a header row, and a body containing a series of simple rows.
|
||||
*/
|
||||
|
||||
table.borderless,
|
||||
table.plain,
|
||||
table.striped {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
table.borderless > caption,
|
||||
table.plain > caption,
|
||||
table.striped > caption {
|
||||
font-weight: bold;
|
||||
/* font-size: smaller; */
|
||||
}
|
||||
table.borderless th, table.borderless td,
|
||||
table.plain th, table.plain td,
|
||||
table.striped th, table.striped td {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
table.borderless,
|
||||
table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th,
|
||||
table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td {
|
||||
border: none;
|
||||
}
|
||||
table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr {
|
||||
background-color: transparent;
|
||||
}
|
||||
table.plain {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid black;
|
||||
}
|
||||
table.plain > thead > tr, table.plain > tbody tr, table.plain > tr {
|
||||
background-color: transparent;
|
||||
}
|
||||
table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th,
|
||||
table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
table.striped {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid black;
|
||||
}
|
||||
table.striped > thead {
|
||||
background-color: #E3E3E3;
|
||||
}
|
||||
table.striped > thead > tr > th, table.striped > thead > tr > td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
table.striped > tbody > tr:nth-child(even) {
|
||||
background-color: #EEE
|
||||
}
|
||||
table.striped > tbody > tr:nth-child(odd) {
|
||||
background-color: #FFF
|
||||
}
|
||||
table.striped > tbody > tr > th, table.striped > tbody > tr > td {
|
||||
border-left: 1px solid black;
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
table.striped > tbody > tr > th {
|
||||
font-weight: normal;
|
||||
}
|
||||
/**
|
||||
* Tweak font sizes and paddings for small screens.
|
||||
*/
|
||||
@media screen and (max-width: 1050px) {
|
||||
#search-input {
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
#search-input {
|
||||
width: 200px;
|
||||
}
|
||||
.top-nav,
|
||||
.bottom-nav {
|
||||
font-size: 80%;
|
||||
padding-top: 6px;
|
||||
}
|
||||
.sub-nav {
|
||||
font-size: 80%;
|
||||
}
|
||||
.about-language {
|
||||
padding-right: 16px;
|
||||
}
|
||||
ul.nav-list li,
|
||||
.sub-nav .nav-list-search {
|
||||
padding: 6px;
|
||||
}
|
||||
ul.sub-nav-list li {
|
||||
padding-top: 5px;
|
||||
}
|
||||
main {
|
||||
padding: 10px;
|
||||
}
|
||||
.summary section[class$="-summary"], .details section[class$="-details"],
|
||||
.class-uses .detail, .serialized-class-details {
|
||||
padding: 0 8px 5px 8px;
|
||||
}
|
||||
body {
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 500px) {
|
||||
#search-input {
|
||||
width: 150px;
|
||||
}
|
||||
.top-nav,
|
||||
.bottom-nav {
|
||||
font-size: 80%;
|
||||
}
|
||||
.sub-nav {
|
||||
font-size: 80%;
|
||||
}
|
||||
.about-language {
|
||||
font-size: 80%;
|
||||
padding-right: 12px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
FROM docker.io/eclipse-temurin:17-jre-alpine
|
||||
FROM docker.io/eclipse-temurin:21-jre-alpine
|
||||
|
||||
COPY build/install/vm-manager /opt/vmmanager
|
||||
|
||||
|
|
|
|||
|
|
@ -184,12 +184,8 @@ public class Reconciler extends Component {
|
|||
* @param event the event
|
||||
* @param channel the channel
|
||||
* @throws ApiException the api exception
|
||||
* @throws IOException
|
||||
* @throws ParseException
|
||||
* @throws MalformedTemplateNameException
|
||||
* @throws TemplateNotFoundException
|
||||
* @throws TemplateException
|
||||
* @throws KubectlException
|
||||
* @throws TemplateException the template exception
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
@Handler
|
||||
@SuppressWarnings("PMD.ConfusingTernary")
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import org.jdrupes.vmoperator.runner.qemu.commands.QmpOpenTray;
|
|||
import org.jdrupes.vmoperator.runner.qemu.commands.QmpRemoveMedium;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.ConfigureQemu;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.RunState;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.TrayMovedEvent;
|
||||
import org.jgrapes.core.Channel;
|
||||
import org.jgrapes.core.Component;
|
||||
|
|
@ -69,7 +69,7 @@ public class CdMediaController extends Component {
|
|||
@SuppressWarnings({ "PMD.AvoidLiteralsInIfCondition",
|
||||
"PMD.AvoidInstantiatingObjectsInLoops" })
|
||||
public void onConfigureQemu(ConfigureQemu event) {
|
||||
if (event.state() == State.TERMINATING) {
|
||||
if (event.runState() == RunState.TERMINATING) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ public class CdMediaController extends Component {
|
|||
}
|
||||
var driveId = "cd" + cdCounter++;
|
||||
var newFile = Optional.ofNullable(drives[i].file).orElse("");
|
||||
if (event.state() == State.STARTING) {
|
||||
if (event.runState() == RunState.STARTING) {
|
||||
current.put(driveId, newFile);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -116,8 +116,8 @@ public class CdMediaController extends Component {
|
|||
*/
|
||||
@Handler
|
||||
public void onTrayMovedEvent(TrayMovedEvent event) {
|
||||
trayState.put(event.driveId(), event.state());
|
||||
if (event.state() == TrayState.OPEN
|
||||
trayState.put(event.driveId(), event.trayState());
|
||||
if (event.trayState() == TrayState.OPEN
|
||||
&& pending.containsKey(event.driveId())) {
|
||||
changeMedium(event.driveId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ FROM docker.io/alpine
|
|||
|
||||
RUN apk update
|
||||
|
||||
RUN apk add qemu-system-x86_64 qemu-modules ovmf swtpm openjdk17 mtools
|
||||
RUN apk add qemu-system-x86_64 qemu-modules ovmf swtpm openjdk21 mtools
|
||||
|
||||
RUN mkdir -p /etc/qemu && echo "allow all" > /etc/qemu/bridge.conf
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ RUN systemd-firstboot
|
|||
RUN pacman-key --init \
|
||||
&& pacman -Sy --noconfirm archlinux-keyring && pacman -Su --noconfirm \
|
||||
&& pacman -S --noconfirm which qemu-full virtiofsd \
|
||||
edk2-ovmf swtpm iproute2 bridge-utils jre17-openjdk-headless \
|
||||
edk2-ovmf swtpm iproute2 bridge-utils jre21-openjdk-headless \
|
||||
mtools \
|
||||
&& pacman -Scc --noconfirm
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import org.jdrupes.vmoperator.runner.qemu.events.CpuAdded;
|
|||
import org.jdrupes.vmoperator.runner.qemu.events.CpuDeleted;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.HotpluggableCpuStatus;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.RunState;
|
||||
import org.jgrapes.core.Channel;
|
||||
import org.jgrapes.core.Component;
|
||||
import org.jgrapes.core.annotation.Handler;
|
||||
|
|
@ -64,7 +64,7 @@ public class CpuController extends Component {
|
|||
*/
|
||||
@Handler
|
||||
public void onConfigureQemu(ConfigureQemu event) {
|
||||
if (event.state() == State.TERMINATING) {
|
||||
if (event.runState() == RunState.TERMINATING) {
|
||||
return;
|
||||
}
|
||||
Optional.ofNullable(event.configuration().vm.currentCpus)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import org.jdrupes.vmoperator.runner.qemu.commands.QmpSetDisplayPassword;
|
|||
import org.jdrupes.vmoperator.runner.qemu.commands.QmpSetPasswordExpiry;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.ConfigureQemu;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.RunState;
|
||||
import org.jgrapes.core.Channel;
|
||||
import org.jgrapes.core.Component;
|
||||
import org.jgrapes.core.annotation.Handler;
|
||||
|
|
@ -67,7 +67,7 @@ public class DisplayController extends Component {
|
|||
*/
|
||||
@Handler
|
||||
public void onConfigureQemu(ConfigureQemu event) {
|
||||
if (event.state() == State.TERMINATING) {
|
||||
if (event.runState() == RunState.TERMINATING) {
|
||||
return;
|
||||
}
|
||||
protocol
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ import org.jdrupes.vmoperator.runner.qemu.events.Exit;
|
|||
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.QmpConfigured;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.RunState;
|
||||
import org.jdrupes.vmoperator.util.ExtendedObjectWrapper;
|
||||
import org.jdrupes.vmoperator.util.FsdUtils;
|
||||
import org.jgrapes.core.Channel;
|
||||
|
|
@ -217,7 +217,7 @@ public class Runner extends Component {
|
|||
private CommandDefinition qemuDefinition;
|
||||
private final QemuMonitor qemuMonitor;
|
||||
private Integer resetCounter;
|
||||
private State state = State.INITIALIZING;
|
||||
private RunState state = RunState.INITIALIZING;
|
||||
|
||||
/** Preparatory actions for QEMU start */
|
||||
@SuppressWarnings("PMD.FieldNamingConventions")
|
||||
|
|
@ -467,7 +467,7 @@ public class Runner extends Component {
|
|||
*/
|
||||
@Handler
|
||||
public void onStarted(Started event) {
|
||||
state = State.STARTING;
|
||||
state = RunState.STARTING;
|
||||
rep.fire(new RunnerStateChange(state, "RunnerStarted",
|
||||
"Runner has been started"));
|
||||
// Start first process(es)
|
||||
|
|
@ -618,9 +618,9 @@ public class Runner extends Component {
|
|||
*/
|
||||
@Handler(priority = -1000)
|
||||
public void onConfigureQemuFinal(ConfigureQemu event) {
|
||||
if (state == State.STARTING) {
|
||||
if (state == RunState.STARTING) {
|
||||
fire(new MonitorCommand(new QmpCont()));
|
||||
state = State.RUNNING;
|
||||
state = RunState.RUNNING;
|
||||
rep.fire(new RunnerStateChange(state, "VmStarted",
|
||||
"Qemu has been configured and is continuing"));
|
||||
}
|
||||
|
|
@ -633,7 +633,7 @@ public class Runner extends Component {
|
|||
*/
|
||||
@Handler
|
||||
public void onConfigureQemu(ConfigureQemu event) {
|
||||
if (state == State.RUNNING) {
|
||||
if (state == RunState.RUNNING) {
|
||||
if (resetCounter != null
|
||||
&& event.configuration().resetCounter != null
|
||||
&& event.configuration().resetCounter > resetCounter) {
|
||||
|
|
@ -659,14 +659,14 @@ public class Runner extends Component {
|
|||
return;
|
||||
}
|
||||
// No other process(es) may exit during startup
|
||||
if (state == State.STARTING) {
|
||||
if (state == RunState.STARTING) {
|
||||
logger.severe(() -> "Process " + procDef.name
|
||||
+ " has exited with value " + event.exitValue()
|
||||
+ " during startup.");
|
||||
rep.fire(new Stop());
|
||||
return;
|
||||
}
|
||||
if (procDef.equals(qemuDefinition) && state == State.RUNNING) {
|
||||
if (procDef.equals(qemuDefinition) && state == RunState.RUNNING) {
|
||||
rep.fire(new Exit(event.exitValue()));
|
||||
}
|
||||
logger.info(() -> "Process " + procDef.name
|
||||
|
|
@ -693,7 +693,7 @@ public class Runner extends Component {
|
|||
*/
|
||||
@Handler(priority = 10_000)
|
||||
public void onStopFirst(Stop event) {
|
||||
state = State.TERMINATING;
|
||||
state = RunState.TERMINATING;
|
||||
rep.fire(new RunnerStateChange(state, "VmTerminating",
|
||||
"The VM is being shut down", exitStatus != 0));
|
||||
}
|
||||
|
|
@ -705,14 +705,14 @@ public class Runner extends Component {
|
|||
*/
|
||||
@Handler(priority = -10_000)
|
||||
public void onStopLast(Stop event) {
|
||||
state = State.STOPPED;
|
||||
state = RunState.STOPPED;
|
||||
rep.fire(new RunnerStateChange(state, "VmStopped",
|
||||
"The VM has been shut down"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.ConfusingArgumentToVarargsMethod")
|
||||
private void shutdown() {
|
||||
if (!Set.of(State.TERMINATING, State.STOPPED).contains(state)) {
|
||||
if (!Set.of(RunState.TERMINATING, RunState.STOPPED).contains(state)) {
|
||||
fire(new Stop());
|
||||
}
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ import org.jdrupes.vmoperator.runner.qemu.events.DisplayPasswordChanged;
|
|||
import org.jdrupes.vmoperator.runner.qemu.events.Exit;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.HotpluggableCpuStatus;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.RunState;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.ShutdownEvent;
|
||||
import org.jdrupes.vmoperator.util.GsonPtr;
|
||||
import org.jgrapes.core.Channel;
|
||||
|
|
@ -65,8 +65,8 @@ import org.jgrapes.util.events.InitialConfiguration;
|
|||
@SuppressWarnings("PMD.DataflowAnomalyAnalysis")
|
||||
public class StatusUpdater extends Component {
|
||||
|
||||
private static final Set<State> RUNNING_STATES
|
||||
= Set.of(State.RUNNING, State.TERMINATING);
|
||||
private static final Set<RunState> RUNNING_STATES
|
||||
= Set.of(RunState.RUNNING, RunState.TERMINATING);
|
||||
|
||||
private String namespace;
|
||||
private String vmName;
|
||||
|
|
@ -240,11 +240,11 @@ public class StatusUpdater extends Component {
|
|||
updateRunningCondition(event, from, cond);
|
||||
}
|
||||
});
|
||||
if (event.state() == State.STARTING) {
|
||||
if (event.runState() == RunState.STARTING) {
|
||||
status.addProperty("ram", GsonPtr.to(from.data())
|
||||
.getAsString("spec", "vm", "maximumRam").orElse("0"));
|
||||
status.addProperty("cpus", 1);
|
||||
} else if (event.state() == State.STOPPED) {
|
||||
} else if (event.runState() == RunState.STOPPED) {
|
||||
status.addProperty("ram", "0");
|
||||
status.addProperty("cpus", 0);
|
||||
}
|
||||
|
|
@ -252,7 +252,7 @@ public class StatusUpdater extends Component {
|
|||
});
|
||||
|
||||
// Maybe stop VM
|
||||
if (event.state() == State.TERMINATING && !event.failed()
|
||||
if (event.runState() == RunState.TERMINATING && !event.failed()
|
||||
&& guestShutdownStops && shutdownByGuest) {
|
||||
logger.info(() -> "Stopping VM because of shutdown by guest.");
|
||||
var res = vmStub.patch(V1Patch.PATCH_FORMAT_JSON_PATCH,
|
||||
|
|
@ -277,13 +277,13 @@ public class StatusUpdater extends Component {
|
|||
K8sDynamicModel from, JsonObject cond) {
|
||||
boolean reportedRunning
|
||||
= "True".equals(cond.get("status").getAsString());
|
||||
if (RUNNING_STATES.contains(event.state())
|
||||
if (RUNNING_STATES.contains(event.runState())
|
||||
&& !reportedRunning) {
|
||||
cond.addProperty("status", "True");
|
||||
cond.addProperty("lastTransitionTime",
|
||||
Instant.now().toString());
|
||||
}
|
||||
if (!RUNNING_STATES.contains(event.state())
|
||||
if (!RUNNING_STATES.contains(event.runState())
|
||||
&& reportedRunning) {
|
||||
cond.addProperty("status", "False");
|
||||
cond.addProperty("lastTransitionTime",
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
package org.jdrupes.vmoperator.runner.qemu.events;
|
||||
|
||||
import org.jdrupes.vmoperator.runner.qemu.Configuration;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.RunState;
|
||||
import org.jgrapes.core.Channel;
|
||||
import org.jgrapes.core.Event;
|
||||
|
||||
|
|
@ -34,14 +34,14 @@ import org.jgrapes.core.Event;
|
|||
public class ConfigureQemu extends Event<Void> {
|
||||
|
||||
private final Configuration configuration;
|
||||
private final State state;
|
||||
private final RunState state;
|
||||
|
||||
/**
|
||||
* Instantiates a new configuration event.
|
||||
*
|
||||
* @param channels the channels
|
||||
*/
|
||||
public ConfigureQemu(Configuration configuration, State state,
|
||||
public ConfigureQemu(Configuration configuration, RunState state,
|
||||
Channel... channels) {
|
||||
super(channels);
|
||||
this.state = state;
|
||||
|
|
@ -62,7 +62,7 @@ public class ConfigureQemu extends Event<Void> {
|
|||
*
|
||||
* @return the state
|
||||
*/
|
||||
public State state() {
|
||||
public RunState runState() {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,11 +31,11 @@ public class RunnerStateChange extends Event<Void> {
|
|||
/**
|
||||
* The state.
|
||||
*/
|
||||
public enum State {
|
||||
public enum RunState {
|
||||
INITIALIZING, STARTING, RUNNING, TERMINATING, STOPPED
|
||||
}
|
||||
|
||||
private final State state;
|
||||
private final RunState state;
|
||||
private final String reason;
|
||||
private final String message;
|
||||
private final boolean failed;
|
||||
|
|
@ -48,7 +48,7 @@ public class RunnerStateChange extends Event<Void> {
|
|||
* @param message the message
|
||||
* @param channels the channels
|
||||
*/
|
||||
public RunnerStateChange(State state, String reason, String message,
|
||||
public RunnerStateChange(RunState state, String reason, String message,
|
||||
Channel... channels) {
|
||||
this(state, reason, message, false, channels);
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ public class RunnerStateChange extends Event<Void> {
|
|||
* @param failed the failed
|
||||
* @param channels the channels
|
||||
*/
|
||||
public RunnerStateChange(State state, String reason, String message,
|
||||
public RunnerStateChange(RunState state, String reason, String message,
|
||||
boolean failed, Channel... channels) {
|
||||
super(channels);
|
||||
this.state = state;
|
||||
|
|
@ -76,7 +76,7 @@ public class RunnerStateChange extends Event<Void> {
|
|||
*
|
||||
* @return the state
|
||||
*/
|
||||
public State state() {
|
||||
public RunState runState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class TrayMovedEvent extends MonitorEvent {
|
|||
*
|
||||
* @return the tray state
|
||||
*/
|
||||
public TrayState state() {
|
||||
public TrayState trayState() {
|
||||
return data().get("tray-open").asBoolean()
|
||||
? TrayState.OPEN
|
||||
: TrayState.CLOSED;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue