add changes before cleanup

This commit is contained in:
Mans Ziesel 2024-09-08 13:38:52 +02:00
parent 13e77cec55
commit 9e24e2933a
4 changed files with 59 additions and 37 deletions

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>

View File

@ -5,12 +5,8 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="99a808b4-b8c5-4c6a-8a7b-960f11e07db3" name="Changes" comment="Make application use monitors in config, try handle gracefull shutdown"> <list default="true" id="99a808b4-b8c5-4c6a-8a7b-960f11e07db3" name="Changes" comment="Make application use monitors in config, try handle gracefull shutdown">
<change beforePath="$PROJECT_DIR$/.idea/gradle.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/gradle.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build.gradle.kts" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle.kts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/nl/mziesel/BaseMonitor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/nl/mziesel/BaseMonitor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/nl/mziesel/HttpMonitor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/nl/mziesel/HttpMonitor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/nl/mziesel/IcmpMonitor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/nl/mziesel/IcmpMonitor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/nl/mziesel/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/nl/mziesel/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/JmonitConfig.pkl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/JmonitConfig.pkl" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/resources/JmonitConfig.pkl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/JmonitConfig.pkl" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/JmonitConfigTemplate.pkl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/JmonitConfigTemplate.pkl" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/resources/JmonitConfigTemplate.pkl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/JmonitConfigTemplate.pkl" afterDir="false" />
</list> </list>
@ -97,43 +93,46 @@
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProblemsViewState"> <component name="ProblemsViewState">
<option name="selectedTabId" value="ProjectErrors" /> <option name="selectedTabId" value="ProjectErrors" />
</component> </component>
<component name="ProjectColorInfo"><![CDATA[{ <component name="ProjectColorInfo">{
"associatedIndex": 6 &quot;associatedIndex&quot;: 6
}]]></component> }</component>
<component name="ProjectId" id="2buOVAM2wRC1qrdIQSuvfsVXCGU" /> <component name="ProjectId" id="2buOVAM2wRC1qrdIQSuvfsVXCGU" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState"> <component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"Gradle.jmonit [:JmonitConfig.main()].executor": "Run", &quot;Gradle.jmonit [:JmonitConfig.main()].executor&quot;: &quot;Run&quot;,
"Gradle.jmonit [:Main.main()].executor": "Run", &quot;Gradle.jmonit [:Main.main()].executor&quot;: &quot;Run&quot;,
"Gradle.jmonit [assembleDist].executor": "Run", &quot;Gradle.jmonit [assembleDist].executor&quot;: &quot;Run&quot;,
"Gradle.jmonit [build].executor": "Run", &quot;Gradle.jmonit [build].executor&quot;: &quot;Run&quot;,
"Gradle.jmonit [clean].executor": "Run", &quot;Gradle.jmonit [clean].executor&quot;: &quot;Run&quot;,
"Gradle.jmonit [configClasses].executor": "Run", &quot;Gradle.jmonit [configClasses].executor&quot;: &quot;Run&quot;,
"Gradle.jmonit [jar].executor": "Run", &quot;Gradle.jmonit [jar].executor&quot;: &quot;Run&quot;,
"Gradle.jmonit [testPklConfig].executor": "Run", &quot;Gradle.jmonit [testPklConfig].executor&quot;: &quot;Run&quot;,
"RunOnceActivity.OpenProjectViewOnStart": "true", &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"SHARE_PROJECT_CONFIGURATION_FILES": "true", &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
"git-widget-placeholder": "gradle", &quot;git-widget-placeholder&quot;: &quot;main&quot;,
"kotlin-language-version-configured": "true", &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
"node.js.detected.package.eslint": "true", &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
"node.js.detected.package.tslint": "true", &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
"node.js.selected.package.eslint": "(autodetect)", &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
"node.js.selected.package.tslint": "(autodetect)", &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
"nodejs_package_manager_path": "npm", &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
"settings.editor.selected.configurable": "org.pkl.intellij.settings.PklSettingsConfigurable", &quot;settings.editor.selected.configurable&quot;: &quot;settings.sync&quot;,
"vue.rearranger.settings.migration": "true" &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
} }
}]]></component> }</component>
<component name="RunManager" selected="Gradle.jmonit [testPklConfig]"> <component name="RunManager" selected="Gradle.jmonit [build]">
<configuration name="jmonit [assembleDist]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true"> <configuration name="jmonit [assembleDist]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
<ExternalSystemSettings> <ExternalSystemSettings>
<option name="executionName" /> <option name="executionName" />
@ -178,7 +177,7 @@
<RunAsTest>false</RunAsTest> <RunAsTest>false</RunAsTest>
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="jmonit [clean]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true"> <configuration name="jmonit [configClasses]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
<ExternalSystemSettings> <ExternalSystemSettings>
<option name="executionName" /> <option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
@ -189,7 +188,7 @@
</option> </option>
<option name="taskNames"> <option name="taskNames">
<list> <list>
<option value="clean" /> <option value="configClasses" />
</list> </list>
</option> </option>
<option name="vmOptions" /> <option name="vmOptions" />
@ -246,18 +245,19 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Gradle.jmonit [build]" />
<item itemvalue="Gradle.jmonit [configClasses]" />
<item itemvalue="Gradle.jmonit [testPklConfig]" /> <item itemvalue="Gradle.jmonit [testPklConfig]" />
<item itemvalue="Gradle.jmonit [assembleDist]" /> <item itemvalue="Gradle.jmonit [assembleDist]" />
<item itemvalue="Gradle.jmonit [jar]" /> <item itemvalue="Gradle.jmonit [jar]" />
<item itemvalue="Gradle.jmonit [build]" />
<item itemvalue="Gradle.jmonit [clean]" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
<component name="SharedIndexes"> <component name="SharedIndexes">
<attachedChunks> <attachedChunks>
<set> <set>
<option value="jdk-21.0.2-openjdk-21.0.2-4caba194b151-78a6f59c" /> <option value="bundled-jdk-9f38398b9061-18abd8497189-intellij.indexing.shared.core-IU-241.14494.240" />
<option value="bundled-js-predefined-1d06a55b98c1-74d2a5396914-JavaScript-IU-241.14494.240" />
</set> </set>
</attachedChunks> </attachedChunks>
</component> </component>
@ -270,6 +270,10 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1707061517834</updated> <updated>1707061517834</updated>
<workItem from="1707061518829" duration="10760000" /> <workItem from="1707061518829" duration="10760000" />
<workItem from="1707146665294" duration="461000" />
<workItem from="1707160972056" duration="25000" />
<workItem from="1713979540341" duration="2728000" />
<workItem from="1714037666044" duration="18000" />
</task> </task>
<task id="LOCAL-00001" summary="Add PKL lib, add test config, create initial jmonit config template"> <task id="LOCAL-00001" summary="Add PKL lib, add test config, create initial jmonit config template">
<option name="closed" value="true" /> <option name="closed" value="true" />

View File

@ -1,5 +1,13 @@
amends "./JmonitConfigTemplate.pkl" amends "./JmonitConfigTemplate.pkl"
databaseConfig {
username = "root"
password = "password"
host = "localhost"
port = 3306
database = "joomla"
}
monitors { monitors {
new { new {
monitorType = "https" monitorType = "https"

View File

@ -6,6 +6,14 @@ typealias MonitorType = "http"|"https"|"icmp"
const defaultTimeout: Int = 5000 const defaultTimeout: Int = 5000
const defaultInterval: Int = 120 const defaultInterval: Int = 120
class Database {
username: String(!isEmpty)
password: String
host: String(!isEmpty)
port: Int
database: String(!isEmpty)
}
class Monitor { class Monitor {
monitorType: MonitorType monitorType: MonitorType
friendlyName: String(!isEmpty) friendlyName: String(!isEmpty)
@ -14,4 +22,5 @@ class Monitor {
interval: Int = defaultInterval interval: Int = defaultInterval
} }
databaseConfig: Database
monitors: Listing<Monitor> monitors: Listing<Monitor>