Skip to content

Commit

Permalink
Independent conlet for pools.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlipp committed Jan 17, 2025
1 parent 5bd6700 commit 761e94b
Show file tree
Hide file tree
Showing 31 changed files with 1,828 additions and 0 deletions.
1 change: 1 addition & 0 deletions org.jdrupes.vmoperator.manager/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies {

runtimeOnly project(':org.jdrupes.vmoperator.vmmgmt')
runtimeOnly project(':org.jdrupes.vmoperator.vmaccess')
runtimeOnly project(':org.jdrupes.vmoperator.poolaccess')
}

application {
Expand Down
10 changes: 10 additions & 0 deletions org.jdrupes.vmoperator.poolaccess/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
<local-check-config name="Project Checks" location="/VM-Operator/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Project Checks" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
7 changes: 7 additions & 0 deletions org.jdrupes.vmoperator.poolaccess/.eclipse-pmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<eclipse-pmd xmlns="http://acanda.ch/eclipse-pmd/0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acanda.ch/eclipse-pmd/0.8 http://acanda.ch/eclipse-pmd/eclipse-pmd-0.8.xsd">
<analysis enabled="true" />
<rulesets>
<ruleset name="Custom Rules" ref="VM-Operator/ruleset.xml" refcontext="workspace" />
</rulesets>
</eclipse-pmd>
1 change: 1 addition & 0 deletions org.jdrupes.vmoperator.poolaccess/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rollup.config.mjs
15 changes: 15 additions & 0 deletions org.jdrupes.vmoperator.poolaccess/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": ["./tsconfig.json"] },
"plugins": [
"@typescript-eslint"
],
"rules": {
"constructor-super": "off"
}
}

4 changes: 4 additions & 0 deletions org.jdrupes.vmoperator.poolaccess/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/bin/
/bin_test/
/generated/
/build/
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
line.separator=\n
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_JGrapes
formatter_settings_version=13
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_functional_interfaces=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.insert_inferred_type_arguments=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=false
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=false
sp_cleanup.organize_imports=false
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_redundant_type_arguments=false
sp_cleanup.remove_trailing_whitespaces=false
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=false
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_anonymous_class_creation=false
sp_cleanup.use_blocks=false
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_lambda=true
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
sp_jautodoc.cleanup.add_header=false
sp_jautodoc.cleanup.replace_header=false
57 changes: 57 additions & 0 deletions org.jdrupes.vmoperator.poolaccess/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
plugins {
id 'org.jdrupes.vmoperator.java-library-conventions'
}

dependencies {
implementation project(':org.jdrupes.vmoperator.manager.events')

implementation 'org.jgrapes:org.jgrapes.webconsole.base:[2.1.0,3)'
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.vue:[1,2)'
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.jgwcvuecomponents:[1.2,2)'
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.chartjs:[1.2,2)'

}

apply plugin: 'com.github.node-gradle.node'

node {
download = true
}

task extractDependencies(type: Copy) {
from configurations.compileClasspath
.findAll{ it.name.contains('.provider.')
|| it.name.contains('org.jgrapes.webconsole.base')
}
.collect{ zipTree (it) }
exclude '*.class'
into 'build/unpacked'
duplicatesStrategy 'include'
}

task compileTs(type: NodeTask) {
dependsOn ':npmInstall'
dependsOn extractDependencies
inputs.dir project.file('src')
inputs.file project.file('tsconfig.json')
inputs.file project.file('rollup.config.mjs')
outputs.dir project.file('build/generated/resources')
script = file("${rootProject.rootDir}/node_modules/rollup/dist/bin/rollup")
args = ["-c"]
}

sourceSets {
main {
resources {
srcDir project.file('build/generated/resources')
}
}
}

processResources {
dependsOn compileTs
}

eclipse {
autoBuildTasks compileTs
}
1 change: 1 addition & 0 deletions org.jdrupes.vmoperator.poolaccess/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.jdrupes.vmoperator.poolaccess.PoolAccessFactory
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div title="${_("conletName")}"
class="jdrupes-vmoperator-PoolAccess jdrupes-vmoperator-poolaccess-edit"
data-jgwc-on-load="orgJDrupesVmOperatorPoolAccess.initEdit"
data-jgwc-on-action="orgJDrupesVmOperatorPoolAccess.applyEdit"
data-jgwc-on-unload="JGConsole.jgwc.unmountVueApps">
<form :id="formId" ref="formDom" onsubmit="return false;">
<section>
<span>{{ localize("Select pool") }}</span>
<p>
<label>
<span>{{ localize("Pool") }}</span>
<select v-model="poolNameInput">
<#list poolNames as name>
<option value="${name}">${name}</option>
</#list>
</select>
</label>
</p>
</section>
</form>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* VM-Operator
* Copyright (C) 2024 Michael N. Lipp
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://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;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div
class="jdrupes-vmoperator-poolaccess jdrupes-vmoperator-poolaccess-preview"
data-conlet-grid-rows="2" data-conlet-grid-columns="2"
data-jgwc-on-load="orgJDrupesVmOperatorPoolAccess.initPreview"
data-jgwc-on-unload="JGConsole.jgwc.unmountVueApps"
data-conlet-resource-base="${conletResource('')}">
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 761e94b

Please sign in to comment.