diff --git a/target/classes/io/openliberty/sample/system/SystemApplication.class b/target/classes/io/openliberty/sample/system/SystemApplication.class deleted file mode 100644 index 245513f..0000000 Binary files a/target/classes/io/openliberty/sample/system/SystemApplication.class and /dev/null differ diff --git a/target/classes/io/openliberty/sample/system/SystemLivenessCheck.class b/target/classes/io/openliberty/sample/system/SystemLivenessCheck.class deleted file mode 100644 index 07a2f63..0000000 Binary files a/target/classes/io/openliberty/sample/system/SystemLivenessCheck.class and /dev/null differ diff --git a/target/classes/io/openliberty/sample/system/SystemReadinessCheck.class b/target/classes/io/openliberty/sample/system/SystemReadinessCheck.class deleted file mode 100644 index 9b70fa6..0000000 Binary files a/target/classes/io/openliberty/sample/system/SystemReadinessCheck.class and /dev/null differ diff --git a/target/classes/io/openliberty/sample/system/SystemResource.class b/target/classes/io/openliberty/sample/system/SystemResource.class deleted file mode 100644 index 5ee5153..0000000 Binary files a/target/classes/io/openliberty/sample/system/SystemResource.class and /dev/null differ diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties deleted file mode 100644 index 9eb96e1..0000000 --- a/target/maven-archiver/pom.properties +++ /dev/null @@ -1,3 +0,0 @@ -artifactId=riscv64-olproperties -groupId=allardkrings -version=1.0 diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst deleted file mode 100644 index 6c01550..0000000 --- a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ /dev/null @@ -1,4 +0,0 @@ -io/openliberty/sample/system/SystemLivenessCheck.class -io/openliberty/sample/system/SystemResource.class -io/openliberty/sample/system/SystemApplication.class -io/openliberty/sample/system/SystemReadinessCheck.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst deleted file mode 100644 index aee472f..0000000 --- a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ /dev/null @@ -1,4 +0,0 @@ -/home/ubuntu/olproperties/src/main/java/io/openliberty/sample/system/SystemApplication.java -/home/ubuntu/olproperties/src/main/java/io/openliberty/sample/system/SystemLivenessCheck.java -/home/ubuntu/olproperties/src/main/java/io/openliberty/sample/system/SystemReadinessCheck.java -/home/ubuntu/olproperties/src/main/java/io/openliberty/sample/system/SystemResource.java diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst deleted file mode 100644 index e5d4acc..0000000 --- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +++ /dev/null @@ -1 +0,0 @@ -it/io/openliberty/sample/PropertiesEndpointIT.class diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst deleted file mode 100644 index 23e91f1..0000000 --- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +++ /dev/null @@ -1 +0,0 @@ -/home/ubuntu/olproperties/src/test/java/it/io/openliberty/sample/PropertiesEndpointIT.java diff --git a/target/olproperties.war b/target/olproperties.war deleted file mode 100644 index b5a44a4..0000000 Binary files a/target/olproperties.war and /dev/null differ diff --git a/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemApplication.class b/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemApplication.class deleted file mode 100644 index 245513f..0000000 Binary files a/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemApplication.class and /dev/null differ diff --git a/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemLivenessCheck.class b/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemLivenessCheck.class deleted file mode 100644 index 07a2f63..0000000 Binary files a/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemLivenessCheck.class and /dev/null differ diff --git a/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemReadinessCheck.class b/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemReadinessCheck.class deleted file mode 100644 index 9b70fa6..0000000 Binary files a/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemReadinessCheck.class and /dev/null differ diff --git a/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemResource.class b/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemResource.class deleted file mode 100644 index 5ee5153..0000000 Binary files a/target/olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemResource.class and /dev/null differ diff --git a/target/olproperties/WEB-INF/web.xml b/target/olproperties/WEB-INF/web.xml deleted file mode 100755 index a3823f1..0000000 --- a/target/olproperties/WEB-INF/web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Liberty Project - - - index.html - - \ No newline at end of file diff --git a/target/olproperties/css/main.css b/target/olproperties/css/main.css deleted file mode 100644 index 7f4ea6a..0000000 --- a/target/olproperties/css/main.css +++ /dev/null @@ -1,426 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2018 IBM Corporation and others. -* All rights reserved. This program and the accompanying materials -* are made available under the terms of the Eclipse Public License v1.0 -* which accompanies this distribution, and is available at -* http://www.eclipse.org/legal/epl-v10.html -* -* Contributors: -* IBM Corporation - initial API and implementation -*******************************************************************************/ -@import url("https://fonts.googleapis.com/css?family=Asap:300,400,500"); - -@font-face { - font-family: BunueloLight; - src: url("/fonts/BunueloCleanPro-Light.woff"); -} - -@font-face { - font-family: BunueloSemiBold; - src: url("/fonts/BunueloCleanPro-SemiBold.woff"); -} - -body{ - font-family:Asap; - font-size: 16px; - color:#24243b; - background-color: white; - margin: 0px; -} - -section { - padding-top: 55px; - padding-left: 8%; - padding-right: 8%; - /* font-weight: 400; */ - letter-spacing:0; - text-align:left; -} - -.line { - margin-right: 200px; - height: 1px; - background-color: #C8D3D3; -} - -.headerImage { - background-image: url(/img/header_ufo.png); - background-repeat: no-repeat; - background-position: top 20px right 15px; - height: 103px; - margin-top: -94px; -} - -#whereTo { - padding-bottom: 80px; - width: 50%; -} - -p { - line-height: 22px; - margin-top: 0px; -} -h1 { - font-family:BunueloSemiBold; - font-size: 40px; - font-weight: 400; - letter-spacing:0; - text-align:left; -} -h2 { - font-size: 24px; - font-weight: 400; -} -h4 { - margin-top: 52px; -} -a { - text-decoration: none; -} - -#appIntro { - background-image:linear-gradient(#141427 0%, #2c2e50 100%); - background-size: 100% calc(100% - 70px); - background-repeat: no-repeat; -} - -#titleSection { - color: white; - margin-bottom: 80px; -} - -#appTitle { - font-family:BunueloLight; - font-size:55px; -} - -.headerRow { - height: 100px; - position:relative; - z-index:2; - box-shadow: 0 2px 4px 0 rgba(0,0,0,0.50); -} -.headerRow > div { - display: inline-block; -} - -.collapsibleRow { - transition: border 400ms ease-out, box-shadow 200ms linear; - cursor: pointer; -} -.collapsibleRow:hover .headerTitle { - background-color: #f4f4f4; - transition: background-color 0.1s; -} -.collapsed .collapsibleRow { - box-shadow: none; - border-bottom: 4px solid; -} -.collapsed#healthSection > .headerRow { - border-bottom-color: #D6D9E4; -} -.collapsed#configSection > .headerRow { - border-bottom-color: #F8D7C1; -} -.collapsed#metricsSection > .headerRow { - border-bottom-color: #EEF3C3; -} - -.collapsed .collapsibleContent { /* collapsing animation */ - transition: all 400ms ease-out, opacity 300ms ease-in; -} -.expanded .collapsibleContent { /* expanding animation */ - transition: all 400ms ease-out, opacity 450ms ease-out; -} -.collapsed .collapsibleContent { - opacity: 0; - max-height: 0; - visibility: hidden; -} -.expanded .collapsibleContent { - opacity: 1; - max-height: 1000px; - visibility: visible; -} - -.headerIcon { - width: 160px; - height: 100%; - float: left; - background-color: #E8EAEF; -} -.headerIcon img { - display:block; - margin:auto; - margin-top: 20px; -} - -#healthSection .headerIcon { - background-color: #E8EAEF; -} -#configSection .headerIcon { - background-color: #FDE4D1; -} -#metricsSection .headerIcon { - background-color: #F5F8DA; -} - -.headerTitle { - background-color: white; - color:#5d6a8e; - letter-spacing:0; - text-align:left; - padding-left: 40px; - padding-top: 10px; - width: calc(100% - 200px); /* 160 from icon, 40 from padding */ -} -#healthSection h2 { - color: #5D6A8E; -} -#configSection h2 { - color: #E57000; -} -#metricsSection h2 { - color: #4F6700; -} - -#sysPropTitle { - padding-top: 28px; -} - -.headerTitle > h2 { - font-family: BunueloLight; - font-size:40px; - margin: 0; -} - -.caret { - position: absolute; - right: 45px; - top: 45px; -} - -.collapsed#configSection .caret { - background-image: url("../img/carets/caret_down_orange.svg") -} -.expanded#configSection .caret { - background-image: url("../img/carets/caret_up_orange.svg") -} - -.msSection { - background: white; - box-shadow: 0 2px 4px 0 rgba(63,70,89,0.31); -} - -.sectionContent { - margin-left: 160px; -} - -#systemPropertiesTable { - padding-left: 160px; - background: white; -} - -button { - border-radius:100px; - height:44px; - color:#24253a; - text-align:center; - font-family: Asap; - margin-top: 25px; - margin-bottom: 70px; - cursor: pointer; - border: none; -} - -button a { - text-decoration: none; - color:#F4914D; -} - -#guidesButton { - background-color:#abd155; - width:269px; - font-weight: 500; - font-size:16px; - transition: background-color .2s; -} -#guidesButton:hover { - background-color: #C7EE63; -} -#mpGuidesButton { - border:2px solid #f4914d8c; - border-radius:100px; - font-size:20px; - letter-spacing:0; - padding-left: 40px; - padding-right: 40px; - background-color: white; - transition: background-color .2s, color .2s; -} -#mpGuidesButton:hover { - background-color: #f4914d; - color: white; -} - -section#openLibertyAndMp { - background:#f4f4f5; - background-size: 100% calc(100% - 70px); - background-repeat: no-repeat; -} - -#healthBox { - text-align: left; - display: table-cell; - vertical-align: middle; - width: 47%; -} - -#healthBox > div { - display: table-cell; - vertical-align: middle; -} - -#healthIcon { - padding-left: 73px; - padding-top: 56px; - padding-bottom: 56px; -} -#healthStatusIcon { - width: 104px; - height: 104px; -} - -#healthText { - padding: 50px; -} - -#serviceStatus { - font-size: 50px; - font-family:BunueloLight; - margin-top: 30px; -} - -#healthNote { - text-align: left; - display: table-cell; - vertical-align: middle; - padding-left: 43px; - line-height: 26px; - width: 53%; -} - -table { - width: 100%; - font-size: 14px; - text-align: left; - border-collapse: collapse; -} - -th { - height: 63px; - padding-left: 41px; - font-size: 16px; -} -tr { - height: 45px; -} -td { - padding-left: 41px; -} -#systemPropertiesTable tr:first-child { - background: #D6D9E4; -} -#configTable tr:first-child { - background: #F8D7C1;; -} -#metricsTable tr:first-child { - background: #EEF3C3; -} - -#systemPropertiesTable tr:nth-child(2n+3) { - background: #EEEFF3; -} -#configTable tr:nth-child(2n+2) { - background: #FEF8F4; -} -#metricsTable tr:nth-child(2n+2) { - background: #FBFCEE; -} - -#systemPropertiesTable .sourceRow, -#healthTable .sourceRow { - border-top: 4px solid #D6D9E4; -} -#systemPropertiesTable .sourceRow a, -#healthTable .sourceRow a { - color: #5D6A8E; -} -#configTable .sourceRow { - border-top: 4px solid #F8D7C1; -} -#configTable .sourceRow a { - color: #E57000; -} -#metricsTable .sourceRow { - border-top: 4px solid #EEF3C3; -} -#metricsTable .sourceRow a { - color: #4F6700; -} -.sourceRow a { - font-weight: 500; -} - -#learnMore { - margin-top: 120px; - padding: 0px 200px 100px; -} - -#learnMore > h2 { - color:#5e6b8d; -} - -.bodyFooter { - padding: 5px 8%; - background-image: url(/img/footer_main.png); - background-repeat: no-repeat; - background-position: top 20px right 110px; - margin-bottom: 40px; - margin-top: 50px; - color: #3F4659; -} - -.bodyFooterLink { - font-family: Asap; - font-weight: 300; - font-size: 14px; - letter-spacing: 0; - border-bottom: solid 1px #C8D3D3; - margin-top: 30px; - margin-right: 130px; - padding-bottom: 5px; - padding-right: 50px; - text-align: right; -} - -.bodyFooterLink > a { - text-decoration: none; - padding: 10px; - color: #96bc32; -} - -#licenseLink { - color: #5E6B8D; - text-align: left; -} - -#footer_text { - margin-top: 4px; - margin-bottom: 4px; - font-size: 16px; -} - -#footer_copyright { - font-size: 11px; -} diff --git a/target/olproperties/favicon.ico b/target/olproperties/favicon.ico deleted file mode 100644 index c8652f3..0000000 Binary files a/target/olproperties/favicon.ico and /dev/null differ diff --git a/target/olproperties/fonts/BunueloCleanPro-Light.otf b/target/olproperties/fonts/BunueloCleanPro-Light.otf deleted file mode 100644 index bcb8cfb..0000000 Binary files a/target/olproperties/fonts/BunueloCleanPro-Light.otf and /dev/null differ diff --git a/target/olproperties/fonts/BunueloCleanPro-SemiBold.otf b/target/olproperties/fonts/BunueloCleanPro-SemiBold.otf deleted file mode 100644 index 6d85daf..0000000 Binary files a/target/olproperties/fonts/BunueloCleanPro-SemiBold.otf and /dev/null differ diff --git a/target/olproperties/img/carets/caret_down_blue.svg b/target/olproperties/img/carets/caret_down_blue.svg deleted file mode 100644 index ba417e0..0000000 --- a/target/olproperties/img/carets/caret_down_blue.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/olproperties/img/carets/caret_down_green.svg b/target/olproperties/img/carets/caret_down_green.svg deleted file mode 100644 index 22dd446..0000000 --- a/target/olproperties/img/carets/caret_down_green.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/olproperties/img/carets/caret_down_orange.svg b/target/olproperties/img/carets/caret_down_orange.svg deleted file mode 100644 index 33d588a..0000000 --- a/target/olproperties/img/carets/caret_down_orange.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/olproperties/img/carets/caret_up_blue.svg b/target/olproperties/img/carets/caret_up_blue.svg deleted file mode 100644 index b1346d6..0000000 --- a/target/olproperties/img/carets/caret_up_blue.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/olproperties/img/carets/caret_up_green.svg b/target/olproperties/img/carets/caret_up_green.svg deleted file mode 100644 index 425fd6a..0000000 --- a/target/olproperties/img/carets/caret_up_green.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/olproperties/img/carets/caret_up_orange.svg b/target/olproperties/img/carets/caret_up_orange.svg deleted file mode 100644 index fe353cb..0000000 --- a/target/olproperties/img/carets/caret_up_orange.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/olproperties/img/config.svg b/target/olproperties/img/config.svg deleted file mode 100644 index 4eaf794..0000000 --- a/target/olproperties/img/config.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - diff --git a/target/olproperties/img/footer_main.png b/target/olproperties/img/footer_main.png deleted file mode 100644 index 1194702..0000000 Binary files a/target/olproperties/img/footer_main.png and /dev/null differ diff --git a/target/olproperties/img/header_ufo.png b/target/olproperties/img/header_ufo.png deleted file mode 100644 index b7fce7d..0000000 Binary files a/target/olproperties/img/header_ufo.png and /dev/null differ diff --git a/target/olproperties/img/health.svg b/target/olproperties/img/health.svg deleted file mode 100644 index b740823..0000000 --- a/target/olproperties/img/health.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - diff --git a/target/olproperties/img/metrics.svg b/target/olproperties/img/metrics.svg deleted file mode 100644 index f7287fd..0000000 --- a/target/olproperties/img/metrics.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/target/olproperties/img/sysProps.svg b/target/olproperties/img/sysProps.svg deleted file mode 100644 index 3ba129f..0000000 --- a/target/olproperties/img/sysProps.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/target/olproperties/img/systemDown.svg b/target/olproperties/img/systemDown.svg deleted file mode 100644 index 9f9929b..0000000 --- a/target/olproperties/img/systemDown.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/target/olproperties/img/systemUp.svg b/target/olproperties/img/systemUp.svg deleted file mode 100644 index b0c1e91..0000000 --- a/target/olproperties/img/systemUp.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/target/olproperties/index.html b/target/olproperties/index.html deleted file mode 100755 index ce8f3d1..0000000 --- a/target/olproperties/index.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - -
-
-

Java-PitStop Openliberty/Java17 voorbeeld 3.0

-
-
-

Open Liberty Java17 applicatie op Container Hosting Platform!

-

Dit voorbeeld gebruikt de System Properties microservice om de eigenschappen van de Liberty server te tonen.

-
- -
-
-
-

System Properties

-
-
- - - - -
EigenschapWaarde
-
-
- -
- -
-

Dit voorbeeld toont de eigenschappen van de host evenals health en metrics.

-
- -
-

System properties voorbeeld

-

Gebouwd met Microprofile op Open Liberty

- - - - - -
-
-

Where to next, captain?

-

Set course for the Open Liberty guides!

-

All of the info you need to continue your journey is here, laid out in easy to follow steps and examples. Searching our current selection makes it easy to find the guide that will help make your next project a reality.

- -
- - - - - - diff --git a/target/olproperties/js/mpData.js b/target/olproperties/js/mpData.js deleted file mode 100644 index cbd5a80..0000000 --- a/target/olproperties/js/mpData.js +++ /dev/null @@ -1,243 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2018, 2019 IBM Corporation and others. -* All rights reserved. This program and the accompanying materials -* are made available under the terms of the Eclipse Public License v1.0 -* which accompanies this distribution, and is available at -* http://www.eclipse.org/legal/epl-v10.html -* -* Contributors: -* IBM Corporation - initial API and implementation -*******************************************************************************/ -function displayMetrics() { - getSystemMetrics(); -} - -function getSystemMetrics() { - var url = "https://olproperties-dev.alldcs.nl/metrics"; - var req = new XMLHttpRequest(); - - var metricToDisplay = {}; - var SRgetPropertiesTime = "io_openliberty_sample_system_SystemResource_getPropertiesTime"; - metricToDisplay["getProperties_total{mp_scope=\"application\",}"] = "Request Count"; - metricToDisplay[SRgetPropertiesTime + "_seconds{mp_scope=\"application\",quantile=\"0.999\",}"] = "Request Time (ms) at Quantile 0.999"; - metricToDisplay[SRgetPropertiesTime + "_seconds{mp_scope=\"application\",quantile=\"0.5\",}"] = "Request Time (ms) at Quantile 0.5"; - metricToDisplay[SRgetPropertiesTime + "_seconds_max{mp_scope=\"application\",}"] = "Max Request Time (ms)"; - metricToDisplay["cpu_processCpuLoad_percent{mp_scope=\"base\",}"] = "System CPU Usage (%)"; - metricToDisplay["memory_usedHeap_bytes{mp_scope=\"base\",}"] = "System Heap Usage (MB)"; - - var metricToMatch = "^("; - for (var metricKey in metricToDisplay) { - metricToMatch += metricKey + "|" - } - // remove the last | - metricToMatch = metricToMatch.substring(0, metricToMatch.length-1); - metricToMatch += ")\\s*(\\S*)$" - - req.onreadystatechange = function() { - if (req.readyState != 4) return; // Not there yet - if (req.status != 200) { - document.getElementById("metricsText").innerHTML = req.statusText; - return; - } - - var resp = req.responseText; - var regexpToMatch = new RegExp(metricToMatch, "gm"); - var matchMetrics = resp.match(regexpToMatch); - - var keyValPairs = {}; - for (var metricKey in metricToDisplay) { - matchMetrics.forEach(function(line) { - var keyToMatch = metricKey + " (.*)"; - var keyVal = line.match(new RegExp(keyToMatch)); - if (keyVal) { - var val = keyVal[1]; - if (metricKey.indexOf("application_io_openliberty_sample_system_SystemResource_getPropertiesTime") === 0) { - val = val * 1000; - } else if (metricKey.indexOf("base_memory_usedHeap_bytes") === 0) { - val = val / 1000000; - } - keyValPairs[metricToDisplay[metricKey]] = val; - } - }) - } - - var table = document.getElementById("metricsTableBody"); - for (key in keyValPairs) { - var row = document.createElement("tr"); - var keyData = document.createElement("td"); - keyData.innerText = key; - var valueData = document.createElement("td"); - valueData.innerText = keyValPairs[key]; - row.appendChild(keyData); - row.appendChild(valueData); - table.appendChild(row); - } - - addSourceRow(table, url); - }; - - req.open("GET", url, true); - req.send(); -} - -function displaySystemProperties() { - getSystemPropertiesRequest(); -} - -function getSystemPropertiesRequest() { - var propToDisplay = ["java.vendor", "java.version", "user.name", "os.name", "wlp.install.dir", "wlp.server.name" ]; - var url = "https://olproperties-dev.alldcs.nl/system/properties"; - var req = new XMLHttpRequest(); - var table = document.getElementById("systemPropertiesTable"); - // Create the callback: - req.onreadystatechange = function () { - if (req.readyState != 4) return; // Not there yet - displayMetrics(); - if (req.status != 200) { - table.innerHTML = ""; - var row = document.createElement("tr"); - var th = document.createElement("th"); - th.innerText = req.statusText; - row.appendChild(th); - table.appendChild(row); - - addSourceRow(table, url); - return; - } - // Request successful, read the response - var resp = JSON.parse(req.responseText); - for (var i = 0; i < propToDisplay.length; i++) { - var key = propToDisplay[i]; - if (resp.hasOwnProperty(key)) { - var row = document.createElement("tr"); - var keyData = document.createElement("td"); - keyData.innerText = key; - var valueData = document.createElement("td"); - valueData.innerText = resp[key]; - row.appendChild(keyData); - row.appendChild(valueData); - table.appendChild(row); - } - } - - addSourceRow(table, url); - }; - req.open("GET", url, true); - req.send(); -} - -function displayHealth() { - getHealth(); -} - -function getHealth() { - var url = "https://olproperties-dev.alldcs.nl/health"; - var req = new XMLHttpRequest(); - - var healthBox = document.getElementById("healthBox"); - var serviceName = document.getElementById("serviceName"); - var healthStatus = document.getElementById("serviceStatus"); - var healthIcon = document.getElementById("healthStatusIconImage"); - - req.onreadystatechange = function () { - if (req.readyState != 4) return; // Not there yet - - // Request successful, read the response - if (req.responseText) { - var resp = JSON.parse(req.responseText); - var service = resp.checks[0]; //TODO: use for loop for multiple services - - resp.checks.forEach(function (service) { - serviceName.innerText = service.name; - healthStatus.innerText = service.status; - - if (service.status === "UP") { - healthBox.style.backgroundColor = "#f0f7e1"; - healthIcon.setAttribute("src", "img/systemUp.svg"); - } else { - healthBox.style.backgroundColor = "#fef7f2"; - healthIcon.setAttribute("src", "img/systemDown.svg"); - } - }); - } - var table = document.getElementById("healthTable"); - - addSourceRow(table, url); - }; - req.open("GET", url, true); - req.send(); -} - -function displayConfigProperties() { - getConfigPropertiesRequest(); -} - -function getConfigPropertiesRequest() { - var url = "https://olproperties-dev.alldcs.nl/config"; - var req = new XMLHttpRequest(); - - var configToDisplay = {}; - configToDisplay["io_openliberty_sample_system_inMaintenance"] = "System In Maintenance"; - configToDisplay["io_openliberty_sample_testConfigOverwrite"] = "Test Config Overwrite"; - configToDisplay["io_openliberty_sample_port_number"] = "Port Number"; - // Create the callback: - req.onreadystatechange = function () { - if (req.readyState != 4) return; // Not there yet - if (req.status != 200) { - return; - } - - // Request successful, read the response - var resp = JSON.parse(req.responseText); - var configProps = resp["ConfigProperties"]; - var table = document.getElementById("configTableBody"); - for (key in configProps) { - var row = document.createElement("tr"); - var keyData = document.createElement("td"); - keyData.innerText = configToDisplay[key]; - var valueData = document.createElement("td"); - valueData.innerText = configProps[key]; - row.appendChild(keyData); - row.appendChild(valueData); - table.appendChild(row); - } - - addSourceRow(table, url); - } - req.open("GET", url, true); - req.send(); -} - -function toggle(e) { - var callerElement; - if (!e) { - if (window.event) { - e = window.event; - callerElement = e.currentTarget; - } else { - callerElement = window.toggle.caller.arguments[0].currentTarget; // for firefox - } - } - - var classes = callerElement.parentElement.classList; - var collapsed = classes.contains("collapsed"); - var caretImg = callerElement.getElementsByClassName("caret")[0]; - var caretImgSrc = caretImg.getAttribute("src"); - if (collapsed) { // expand the section - classes.replace("collapsed", "expanded"); - caretImg.setAttribute("src", caretImgSrc.replace("down", "up")); - } else { // collapse the section - classes.replace("expanded", "collapsed"); - caretImg.setAttribute("src", caretImgSrc.replace("up", "down")); - } -} - -function addSourceRow(table, url) { - var sourceRow = document.createElement("tr"); - sourceRow.classList.add("sourceRow"); - var sourceText = document.createElement("td"); - sourceText.setAttribute("colspan", "100%"); - sourceText.innerHTML = "API Source\: "+url+""; - sourceRow.appendChild(sourceText); - table.appendChild(sourceRow); -} diff --git a/target/riscv64-olproperties.war b/target/riscv64-olproperties.war deleted file mode 100644 index 7a9985a..0000000 Binary files a/target/riscv64-olproperties.war and /dev/null differ diff --git a/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemApplication.class b/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemApplication.class deleted file mode 100644 index 245513f..0000000 Binary files a/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemApplication.class and /dev/null differ diff --git a/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemLivenessCheck.class b/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemLivenessCheck.class deleted file mode 100644 index 07a2f63..0000000 Binary files a/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemLivenessCheck.class and /dev/null differ diff --git a/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemReadinessCheck.class b/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemReadinessCheck.class deleted file mode 100644 index 9b70fa6..0000000 Binary files a/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemReadinessCheck.class and /dev/null differ diff --git a/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemResource.class b/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemResource.class deleted file mode 100644 index 5ee5153..0000000 Binary files a/target/riscv64-olproperties/WEB-INF/classes/io/openliberty/sample/system/SystemResource.class and /dev/null differ diff --git a/target/riscv64-olproperties/WEB-INF/web.xml b/target/riscv64-olproperties/WEB-INF/web.xml deleted file mode 100755 index a3823f1..0000000 --- a/target/riscv64-olproperties/WEB-INF/web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Liberty Project - - - index.html - - \ No newline at end of file diff --git a/target/riscv64-olproperties/css/main.css b/target/riscv64-olproperties/css/main.css deleted file mode 100644 index 7f4ea6a..0000000 --- a/target/riscv64-olproperties/css/main.css +++ /dev/null @@ -1,426 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2018 IBM Corporation and others. -* All rights reserved. This program and the accompanying materials -* are made available under the terms of the Eclipse Public License v1.0 -* which accompanies this distribution, and is available at -* http://www.eclipse.org/legal/epl-v10.html -* -* Contributors: -* IBM Corporation - initial API and implementation -*******************************************************************************/ -@import url("https://fonts.googleapis.com/css?family=Asap:300,400,500"); - -@font-face { - font-family: BunueloLight; - src: url("/fonts/BunueloCleanPro-Light.woff"); -} - -@font-face { - font-family: BunueloSemiBold; - src: url("/fonts/BunueloCleanPro-SemiBold.woff"); -} - -body{ - font-family:Asap; - font-size: 16px; - color:#24243b; - background-color: white; - margin: 0px; -} - -section { - padding-top: 55px; - padding-left: 8%; - padding-right: 8%; - /* font-weight: 400; */ - letter-spacing:0; - text-align:left; -} - -.line { - margin-right: 200px; - height: 1px; - background-color: #C8D3D3; -} - -.headerImage { - background-image: url(/img/header_ufo.png); - background-repeat: no-repeat; - background-position: top 20px right 15px; - height: 103px; - margin-top: -94px; -} - -#whereTo { - padding-bottom: 80px; - width: 50%; -} - -p { - line-height: 22px; - margin-top: 0px; -} -h1 { - font-family:BunueloSemiBold; - font-size: 40px; - font-weight: 400; - letter-spacing:0; - text-align:left; -} -h2 { - font-size: 24px; - font-weight: 400; -} -h4 { - margin-top: 52px; -} -a { - text-decoration: none; -} - -#appIntro { - background-image:linear-gradient(#141427 0%, #2c2e50 100%); - background-size: 100% calc(100% - 70px); - background-repeat: no-repeat; -} - -#titleSection { - color: white; - margin-bottom: 80px; -} - -#appTitle { - font-family:BunueloLight; - font-size:55px; -} - -.headerRow { - height: 100px; - position:relative; - z-index:2; - box-shadow: 0 2px 4px 0 rgba(0,0,0,0.50); -} -.headerRow > div { - display: inline-block; -} - -.collapsibleRow { - transition: border 400ms ease-out, box-shadow 200ms linear; - cursor: pointer; -} -.collapsibleRow:hover .headerTitle { - background-color: #f4f4f4; - transition: background-color 0.1s; -} -.collapsed .collapsibleRow { - box-shadow: none; - border-bottom: 4px solid; -} -.collapsed#healthSection > .headerRow { - border-bottom-color: #D6D9E4; -} -.collapsed#configSection > .headerRow { - border-bottom-color: #F8D7C1; -} -.collapsed#metricsSection > .headerRow { - border-bottom-color: #EEF3C3; -} - -.collapsed .collapsibleContent { /* collapsing animation */ - transition: all 400ms ease-out, opacity 300ms ease-in; -} -.expanded .collapsibleContent { /* expanding animation */ - transition: all 400ms ease-out, opacity 450ms ease-out; -} -.collapsed .collapsibleContent { - opacity: 0; - max-height: 0; - visibility: hidden; -} -.expanded .collapsibleContent { - opacity: 1; - max-height: 1000px; - visibility: visible; -} - -.headerIcon { - width: 160px; - height: 100%; - float: left; - background-color: #E8EAEF; -} -.headerIcon img { - display:block; - margin:auto; - margin-top: 20px; -} - -#healthSection .headerIcon { - background-color: #E8EAEF; -} -#configSection .headerIcon { - background-color: #FDE4D1; -} -#metricsSection .headerIcon { - background-color: #F5F8DA; -} - -.headerTitle { - background-color: white; - color:#5d6a8e; - letter-spacing:0; - text-align:left; - padding-left: 40px; - padding-top: 10px; - width: calc(100% - 200px); /* 160 from icon, 40 from padding */ -} -#healthSection h2 { - color: #5D6A8E; -} -#configSection h2 { - color: #E57000; -} -#metricsSection h2 { - color: #4F6700; -} - -#sysPropTitle { - padding-top: 28px; -} - -.headerTitle > h2 { - font-family: BunueloLight; - font-size:40px; - margin: 0; -} - -.caret { - position: absolute; - right: 45px; - top: 45px; -} - -.collapsed#configSection .caret { - background-image: url("../img/carets/caret_down_orange.svg") -} -.expanded#configSection .caret { - background-image: url("../img/carets/caret_up_orange.svg") -} - -.msSection { - background: white; - box-shadow: 0 2px 4px 0 rgba(63,70,89,0.31); -} - -.sectionContent { - margin-left: 160px; -} - -#systemPropertiesTable { - padding-left: 160px; - background: white; -} - -button { - border-radius:100px; - height:44px; - color:#24253a; - text-align:center; - font-family: Asap; - margin-top: 25px; - margin-bottom: 70px; - cursor: pointer; - border: none; -} - -button a { - text-decoration: none; - color:#F4914D; -} - -#guidesButton { - background-color:#abd155; - width:269px; - font-weight: 500; - font-size:16px; - transition: background-color .2s; -} -#guidesButton:hover { - background-color: #C7EE63; -} -#mpGuidesButton { - border:2px solid #f4914d8c; - border-radius:100px; - font-size:20px; - letter-spacing:0; - padding-left: 40px; - padding-right: 40px; - background-color: white; - transition: background-color .2s, color .2s; -} -#mpGuidesButton:hover { - background-color: #f4914d; - color: white; -} - -section#openLibertyAndMp { - background:#f4f4f5; - background-size: 100% calc(100% - 70px); - background-repeat: no-repeat; -} - -#healthBox { - text-align: left; - display: table-cell; - vertical-align: middle; - width: 47%; -} - -#healthBox > div { - display: table-cell; - vertical-align: middle; -} - -#healthIcon { - padding-left: 73px; - padding-top: 56px; - padding-bottom: 56px; -} -#healthStatusIcon { - width: 104px; - height: 104px; -} - -#healthText { - padding: 50px; -} - -#serviceStatus { - font-size: 50px; - font-family:BunueloLight; - margin-top: 30px; -} - -#healthNote { - text-align: left; - display: table-cell; - vertical-align: middle; - padding-left: 43px; - line-height: 26px; - width: 53%; -} - -table { - width: 100%; - font-size: 14px; - text-align: left; - border-collapse: collapse; -} - -th { - height: 63px; - padding-left: 41px; - font-size: 16px; -} -tr { - height: 45px; -} -td { - padding-left: 41px; -} -#systemPropertiesTable tr:first-child { - background: #D6D9E4; -} -#configTable tr:first-child { - background: #F8D7C1;; -} -#metricsTable tr:first-child { - background: #EEF3C3; -} - -#systemPropertiesTable tr:nth-child(2n+3) { - background: #EEEFF3; -} -#configTable tr:nth-child(2n+2) { - background: #FEF8F4; -} -#metricsTable tr:nth-child(2n+2) { - background: #FBFCEE; -} - -#systemPropertiesTable .sourceRow, -#healthTable .sourceRow { - border-top: 4px solid #D6D9E4; -} -#systemPropertiesTable .sourceRow a, -#healthTable .sourceRow a { - color: #5D6A8E; -} -#configTable .sourceRow { - border-top: 4px solid #F8D7C1; -} -#configTable .sourceRow a { - color: #E57000; -} -#metricsTable .sourceRow { - border-top: 4px solid #EEF3C3; -} -#metricsTable .sourceRow a { - color: #4F6700; -} -.sourceRow a { - font-weight: 500; -} - -#learnMore { - margin-top: 120px; - padding: 0px 200px 100px; -} - -#learnMore > h2 { - color:#5e6b8d; -} - -.bodyFooter { - padding: 5px 8%; - background-image: url(/img/footer_main.png); - background-repeat: no-repeat; - background-position: top 20px right 110px; - margin-bottom: 40px; - margin-top: 50px; - color: #3F4659; -} - -.bodyFooterLink { - font-family: Asap; - font-weight: 300; - font-size: 14px; - letter-spacing: 0; - border-bottom: solid 1px #C8D3D3; - margin-top: 30px; - margin-right: 130px; - padding-bottom: 5px; - padding-right: 50px; - text-align: right; -} - -.bodyFooterLink > a { - text-decoration: none; - padding: 10px; - color: #96bc32; -} - -#licenseLink { - color: #5E6B8D; - text-align: left; -} - -#footer_text { - margin-top: 4px; - margin-bottom: 4px; - font-size: 16px; -} - -#footer_copyright { - font-size: 11px; -} diff --git a/target/riscv64-olproperties/favicon.ico b/target/riscv64-olproperties/favicon.ico deleted file mode 100644 index c8652f3..0000000 Binary files a/target/riscv64-olproperties/favicon.ico and /dev/null differ diff --git a/target/riscv64-olproperties/fonts/BunueloCleanPro-Light.otf b/target/riscv64-olproperties/fonts/BunueloCleanPro-Light.otf deleted file mode 100644 index bcb8cfb..0000000 Binary files a/target/riscv64-olproperties/fonts/BunueloCleanPro-Light.otf and /dev/null differ diff --git a/target/riscv64-olproperties/fonts/BunueloCleanPro-SemiBold.otf b/target/riscv64-olproperties/fonts/BunueloCleanPro-SemiBold.otf deleted file mode 100644 index 6d85daf..0000000 Binary files a/target/riscv64-olproperties/fonts/BunueloCleanPro-SemiBold.otf and /dev/null differ diff --git a/target/riscv64-olproperties/img/carets/caret_down_blue.svg b/target/riscv64-olproperties/img/carets/caret_down_blue.svg deleted file mode 100644 index ba417e0..0000000 --- a/target/riscv64-olproperties/img/carets/caret_down_blue.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/riscv64-olproperties/img/carets/caret_down_green.svg b/target/riscv64-olproperties/img/carets/caret_down_green.svg deleted file mode 100644 index 22dd446..0000000 --- a/target/riscv64-olproperties/img/carets/caret_down_green.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/riscv64-olproperties/img/carets/caret_down_orange.svg b/target/riscv64-olproperties/img/carets/caret_down_orange.svg deleted file mode 100644 index 33d588a..0000000 --- a/target/riscv64-olproperties/img/carets/caret_down_orange.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/riscv64-olproperties/img/carets/caret_up_blue.svg b/target/riscv64-olproperties/img/carets/caret_up_blue.svg deleted file mode 100644 index b1346d6..0000000 --- a/target/riscv64-olproperties/img/carets/caret_up_blue.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/riscv64-olproperties/img/carets/caret_up_green.svg b/target/riscv64-olproperties/img/carets/caret_up_green.svg deleted file mode 100644 index 425fd6a..0000000 --- a/target/riscv64-olproperties/img/carets/caret_up_green.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/riscv64-olproperties/img/carets/caret_up_orange.svg b/target/riscv64-olproperties/img/carets/caret_up_orange.svg deleted file mode 100644 index fe353cb..0000000 --- a/target/riscv64-olproperties/img/carets/caret_up_orange.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/target/riscv64-olproperties/img/config.svg b/target/riscv64-olproperties/img/config.svg deleted file mode 100644 index 4eaf794..0000000 --- a/target/riscv64-olproperties/img/config.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - diff --git a/target/riscv64-olproperties/img/footer_main.png b/target/riscv64-olproperties/img/footer_main.png deleted file mode 100644 index 1194702..0000000 Binary files a/target/riscv64-olproperties/img/footer_main.png and /dev/null differ diff --git a/target/riscv64-olproperties/img/header_ufo.png b/target/riscv64-olproperties/img/header_ufo.png deleted file mode 100644 index b7fce7d..0000000 Binary files a/target/riscv64-olproperties/img/header_ufo.png and /dev/null differ diff --git a/target/riscv64-olproperties/img/health.svg b/target/riscv64-olproperties/img/health.svg deleted file mode 100644 index b740823..0000000 --- a/target/riscv64-olproperties/img/health.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - diff --git a/target/riscv64-olproperties/img/metrics.svg b/target/riscv64-olproperties/img/metrics.svg deleted file mode 100644 index f7287fd..0000000 --- a/target/riscv64-olproperties/img/metrics.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/target/riscv64-olproperties/img/sysProps.svg b/target/riscv64-olproperties/img/sysProps.svg deleted file mode 100644 index 3ba129f..0000000 --- a/target/riscv64-olproperties/img/sysProps.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/target/riscv64-olproperties/img/systemDown.svg b/target/riscv64-olproperties/img/systemDown.svg deleted file mode 100644 index 9f9929b..0000000 --- a/target/riscv64-olproperties/img/systemDown.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/target/riscv64-olproperties/img/systemUp.svg b/target/riscv64-olproperties/img/systemUp.svg deleted file mode 100644 index b0c1e91..0000000 --- a/target/riscv64-olproperties/img/systemUp.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/target/riscv64-olproperties/index.html b/target/riscv64-olproperties/index.html deleted file mode 100755 index ce8f3d1..0000000 --- a/target/riscv64-olproperties/index.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - -
-
-

Java-PitStop Openliberty/Java17 voorbeeld 3.0

-
-
-

Open Liberty Java17 applicatie op Container Hosting Platform!

-

Dit voorbeeld gebruikt de System Properties microservice om de eigenschappen van de Liberty server te tonen.

-
- -
-
-
-

System Properties

-
-
- - - - -
EigenschapWaarde
-
-
- -
- -
-

Dit voorbeeld toont de eigenschappen van de host evenals health en metrics.

-
- -
-

System properties voorbeeld

-

Gebouwd met Microprofile op Open Liberty

- - - - - -
-
-

Where to next, captain?

-

Set course for the Open Liberty guides!

-

All of the info you need to continue your journey is here, laid out in easy to follow steps and examples. Searching our current selection makes it easy to find the guide that will help make your next project a reality.

- -
- - - - - - diff --git a/target/riscv64-olproperties/js/mpData.js b/target/riscv64-olproperties/js/mpData.js deleted file mode 100644 index cbd5a80..0000000 --- a/target/riscv64-olproperties/js/mpData.js +++ /dev/null @@ -1,243 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2018, 2019 IBM Corporation and others. -* All rights reserved. This program and the accompanying materials -* are made available under the terms of the Eclipse Public License v1.0 -* which accompanies this distribution, and is available at -* http://www.eclipse.org/legal/epl-v10.html -* -* Contributors: -* IBM Corporation - initial API and implementation -*******************************************************************************/ -function displayMetrics() { - getSystemMetrics(); -} - -function getSystemMetrics() { - var url = "https://olproperties-dev.alldcs.nl/metrics"; - var req = new XMLHttpRequest(); - - var metricToDisplay = {}; - var SRgetPropertiesTime = "io_openliberty_sample_system_SystemResource_getPropertiesTime"; - metricToDisplay["getProperties_total{mp_scope=\"application\",}"] = "Request Count"; - metricToDisplay[SRgetPropertiesTime + "_seconds{mp_scope=\"application\",quantile=\"0.999\",}"] = "Request Time (ms) at Quantile 0.999"; - metricToDisplay[SRgetPropertiesTime + "_seconds{mp_scope=\"application\",quantile=\"0.5\",}"] = "Request Time (ms) at Quantile 0.5"; - metricToDisplay[SRgetPropertiesTime + "_seconds_max{mp_scope=\"application\",}"] = "Max Request Time (ms)"; - metricToDisplay["cpu_processCpuLoad_percent{mp_scope=\"base\",}"] = "System CPU Usage (%)"; - metricToDisplay["memory_usedHeap_bytes{mp_scope=\"base\",}"] = "System Heap Usage (MB)"; - - var metricToMatch = "^("; - for (var metricKey in metricToDisplay) { - metricToMatch += metricKey + "|" - } - // remove the last | - metricToMatch = metricToMatch.substring(0, metricToMatch.length-1); - metricToMatch += ")\\s*(\\S*)$" - - req.onreadystatechange = function() { - if (req.readyState != 4) return; // Not there yet - if (req.status != 200) { - document.getElementById("metricsText").innerHTML = req.statusText; - return; - } - - var resp = req.responseText; - var regexpToMatch = new RegExp(metricToMatch, "gm"); - var matchMetrics = resp.match(regexpToMatch); - - var keyValPairs = {}; - for (var metricKey in metricToDisplay) { - matchMetrics.forEach(function(line) { - var keyToMatch = metricKey + " (.*)"; - var keyVal = line.match(new RegExp(keyToMatch)); - if (keyVal) { - var val = keyVal[1]; - if (metricKey.indexOf("application_io_openliberty_sample_system_SystemResource_getPropertiesTime") === 0) { - val = val * 1000; - } else if (metricKey.indexOf("base_memory_usedHeap_bytes") === 0) { - val = val / 1000000; - } - keyValPairs[metricToDisplay[metricKey]] = val; - } - }) - } - - var table = document.getElementById("metricsTableBody"); - for (key in keyValPairs) { - var row = document.createElement("tr"); - var keyData = document.createElement("td"); - keyData.innerText = key; - var valueData = document.createElement("td"); - valueData.innerText = keyValPairs[key]; - row.appendChild(keyData); - row.appendChild(valueData); - table.appendChild(row); - } - - addSourceRow(table, url); - }; - - req.open("GET", url, true); - req.send(); -} - -function displaySystemProperties() { - getSystemPropertiesRequest(); -} - -function getSystemPropertiesRequest() { - var propToDisplay = ["java.vendor", "java.version", "user.name", "os.name", "wlp.install.dir", "wlp.server.name" ]; - var url = "https://olproperties-dev.alldcs.nl/system/properties"; - var req = new XMLHttpRequest(); - var table = document.getElementById("systemPropertiesTable"); - // Create the callback: - req.onreadystatechange = function () { - if (req.readyState != 4) return; // Not there yet - displayMetrics(); - if (req.status != 200) { - table.innerHTML = ""; - var row = document.createElement("tr"); - var th = document.createElement("th"); - th.innerText = req.statusText; - row.appendChild(th); - table.appendChild(row); - - addSourceRow(table, url); - return; - } - // Request successful, read the response - var resp = JSON.parse(req.responseText); - for (var i = 0; i < propToDisplay.length; i++) { - var key = propToDisplay[i]; - if (resp.hasOwnProperty(key)) { - var row = document.createElement("tr"); - var keyData = document.createElement("td"); - keyData.innerText = key; - var valueData = document.createElement("td"); - valueData.innerText = resp[key]; - row.appendChild(keyData); - row.appendChild(valueData); - table.appendChild(row); - } - } - - addSourceRow(table, url); - }; - req.open("GET", url, true); - req.send(); -} - -function displayHealth() { - getHealth(); -} - -function getHealth() { - var url = "https://olproperties-dev.alldcs.nl/health"; - var req = new XMLHttpRequest(); - - var healthBox = document.getElementById("healthBox"); - var serviceName = document.getElementById("serviceName"); - var healthStatus = document.getElementById("serviceStatus"); - var healthIcon = document.getElementById("healthStatusIconImage"); - - req.onreadystatechange = function () { - if (req.readyState != 4) return; // Not there yet - - // Request successful, read the response - if (req.responseText) { - var resp = JSON.parse(req.responseText); - var service = resp.checks[0]; //TODO: use for loop for multiple services - - resp.checks.forEach(function (service) { - serviceName.innerText = service.name; - healthStatus.innerText = service.status; - - if (service.status === "UP") { - healthBox.style.backgroundColor = "#f0f7e1"; - healthIcon.setAttribute("src", "img/systemUp.svg"); - } else { - healthBox.style.backgroundColor = "#fef7f2"; - healthIcon.setAttribute("src", "img/systemDown.svg"); - } - }); - } - var table = document.getElementById("healthTable"); - - addSourceRow(table, url); - }; - req.open("GET", url, true); - req.send(); -} - -function displayConfigProperties() { - getConfigPropertiesRequest(); -} - -function getConfigPropertiesRequest() { - var url = "https://olproperties-dev.alldcs.nl/config"; - var req = new XMLHttpRequest(); - - var configToDisplay = {}; - configToDisplay["io_openliberty_sample_system_inMaintenance"] = "System In Maintenance"; - configToDisplay["io_openliberty_sample_testConfigOverwrite"] = "Test Config Overwrite"; - configToDisplay["io_openliberty_sample_port_number"] = "Port Number"; - // Create the callback: - req.onreadystatechange = function () { - if (req.readyState != 4) return; // Not there yet - if (req.status != 200) { - return; - } - - // Request successful, read the response - var resp = JSON.parse(req.responseText); - var configProps = resp["ConfigProperties"]; - var table = document.getElementById("configTableBody"); - for (key in configProps) { - var row = document.createElement("tr"); - var keyData = document.createElement("td"); - keyData.innerText = configToDisplay[key]; - var valueData = document.createElement("td"); - valueData.innerText = configProps[key]; - row.appendChild(keyData); - row.appendChild(valueData); - table.appendChild(row); - } - - addSourceRow(table, url); - } - req.open("GET", url, true); - req.send(); -} - -function toggle(e) { - var callerElement; - if (!e) { - if (window.event) { - e = window.event; - callerElement = e.currentTarget; - } else { - callerElement = window.toggle.caller.arguments[0].currentTarget; // for firefox - } - } - - var classes = callerElement.parentElement.classList; - var collapsed = classes.contains("collapsed"); - var caretImg = callerElement.getElementsByClassName("caret")[0]; - var caretImgSrc = caretImg.getAttribute("src"); - if (collapsed) { // expand the section - classes.replace("collapsed", "expanded"); - caretImg.setAttribute("src", caretImgSrc.replace("down", "up")); - } else { // collapse the section - classes.replace("expanded", "collapsed"); - caretImg.setAttribute("src", caretImgSrc.replace("up", "down")); - } -} - -function addSourceRow(table, url) { - var sourceRow = document.createElement("tr"); - sourceRow.classList.add("sourceRow"); - var sourceText = document.createElement("td"); - sourceText.setAttribute("colspan", "100%"); - sourceText.innerHTML = "API Source\: "+url+""; - sourceRow.appendChild(sourceText); - table.appendChild(sourceRow); -} diff --git a/target/test-classes/it/io/openliberty/sample/PropertiesEndpointIT.class b/target/test-classes/it/io/openliberty/sample/PropertiesEndpointIT.class deleted file mode 100644 index bd33055..0000000 Binary files a/target/test-classes/it/io/openliberty/sample/PropertiesEndpointIT.class and /dev/null differ