diff options
author | Andreas Geissler <andreas-geissler@telekom.de> | 2022-10-19 17:49:04 +0200 |
---|---|---|
committer | Andreas Geissler <andreas-geissler@telekom.de> | 2022-10-19 17:52:13 +0200 |
commit | d273edeccd97122de1caec74243d702a652cacb9 (patch) | |
tree | 4414e752f4a6aebc6fa29ef79b36d9b5f5571858 /doc/template | |
parent | ed3c78887493baa5855ac5256683b68ab7b74073 (diff) |
[GITLAB] Initial content for gitlab project xtesting-onap
Issue-ID: INT-2150
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
Change-Id: I6a429e2f661474fe54b13b6513eca64f13e99b50
Diffstat (limited to 'doc/template')
-rw-r--r-- | doc/template/docker-version-tmpl.html | 409 | ||||
-rw-r--r-- | doc/template/index-gating-tmpl.html | 63 | ||||
-rw-r--r-- | doc/template/index-infra.html | 46 | ||||
-rw-r--r-- | doc/template/index-stability-tmpl.html | 391 | ||||
-rw-r--r-- | doc/template/index-tmpl.html | 203 | ||||
-rw-r--r-- | doc/template/k8s.html | 103 |
6 files changed, 1215 insertions, 0 deletions
diff --git a/doc/template/docker-version-tmpl.html b/doc/template/docker-version-tmpl.html new file mode 100644 index 0000000..e783f9f --- /dev/null +++ b/doc/template/docker-version-tmpl.html @@ -0,0 +1,409 @@ +<!DOCTYPE html> +<html> +<meta charset="UTF-8"> + +<head> + <title>Docker version</title> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css"> + +</head> + +<body> + <div class='ui inverted vertical masthead center aligned segment'> + + <div class="ui text container"> + <h1 class="ui inverted header"> + Docker version evolution + </h1> + </div> + + </div> + + <div class='ui vertical stripe segment'> + <div class='ui grid container'> + <div class="row"> + <div class="column"> + <h1 class="ui header"> + <i class="warehouse icon"></i> + + </h1> + <div class="sub header"> + + <!-- <div class="ui olive statistic"> + + <div class="value">20%</div> + <div class="label">last check</div> + </div> --> + <!-- <div class="ui olive statistic"> + <div class="value"> + <i class=""></i> + </div> + <div class="label">trend</div> + </div> --> + <div class="ui tiny grey statistic"> + <div class="value"></div> + <div class="label">ONAP Version</div> + </div> + <div class="ui tiny grey statistic"> + <div class="value"></div> + <div class="label">Lab owner</div> + </div> + </div> + <div class="ui segment"> + <div class="ui two column very relaxed grid middle aligned"> + <div class="column"> + <div class="ui list"> + <div class="item"> + <i class=" green big square full icon"></i> + <div style="vertical-align: middle" class="content"> + New version + </div> + </div> + <div class="item"> + <i class=" yellow big square full icon"></i> + <div style="vertical-align: middle" class="content"> + No version change since last official release + </div> + </div> + <div class="item"> + <i class=" blue big square full icon"></i> + <div style="vertical-align: middle" class="content"> + New component + </div> + </div> + <div class="item"> + <i class=" grey big square full icon"></i> + <div style="vertical-align: middle" class="content"> + No version change since at least two official releases + </div> + </div> + <div class="item"> + <i class=" black big square outline icon"></i> + <div style="vertical-align: middle" class="content"> + Component deleted + </div> + </div> + </div> + </div> + <div class="center aligned column"> + + <div class="row" style="margin-bottom: 15px;"> + <button id="green" class="ui green button">.</button> + <button id="yellow" class="ui yellow button">.</button> + <button id="blue" class="ui blue button">.</button> + <button id="grey" class="ui grey button">.</button> + <button id="black" class="ui black basic button">.</button> + <button id="all" class="ui basic button"> all </button> + </div> + <div class="row"> + <div class="ui input focus"> + <input type="text" id="search_input" onkeyup="search()" placeholder="Search..."> + </div> + </div> + </div> + </div> + <div class="ui vertical divider"> + Filter + </div> + </div> + <table id="version_table" class="ui celled table"> + <thead> + <tr> + <th>Component</th> + <th>Container</th> + <th>Image</th> + <th>Current version</th> + </tr> + </thead> + <tbody> + + + </tbody> + </table> + </div> + </div> + </div> + </div> + <script> + + /* + get ONAPS versions + add as many columns as versions + fill the table by adding rows + + */ + let DATA = [{% for data_item in data %} + { + "component": "{{ data_item.component }}", + "container": "{{ data_item.container }}", + "image": "{{ data_item.image }}", + "current_version": "{{ data_item.current_version }}", + "other_version": {{ data_item.other_version | safe }}, + "status": "{{ data_item.status }}" + }, + {% endfor %}] + // [ + // { + // "component": "aaf-cass", + // "container": "aaf-cass", + // "image": "nexus3.onap.org:10001/onap/aaf/aaf_cass", + // "current_version": "2.1.23", + // "other_version": { "honolulu": "2.1.18" }, + // "status" : 1 + // }, + // { + // "component": "aai", + // "container": " aai", + // "image": "docker.nexus.azure.onap.eu/aaionap/haproxy", + // "current_version": "1.4.2", + // "other_version": { "honolulu": "1.4.2" }, + // "status" : 0 + // }, + // { + // "component": "cassandra", + // "container": "cassandra", + // "image": "docker.nexus.azure.onap.eu/cassandra", + // "current_version": "1.0", + // "other_version": {}, + // "status" : 2 + // }, + // { + // "component": "sdnc", + // "container": "sdnc", + // "image": "", + // "current_version": "", + // "other_version": { "honolulu": "2.2" }, + // "status" : 3 + // }, + // { + // "component": "onap-awx", + // "container": "awx-web", + // "image": "docker.nexus.azure.onap.eu/ansible/awx_web", + // "current_version": "9.0.1", + // "other_version": { + // "honolulu": "2.2", + // "guilin": "8.2.3", + // }, + // "status" : "" + // } + + // ] + + + const TABLE = document.getElementById("version_table"); + + function is_empty(object) { + return object && Object.keys(object).length === 0 && object.constructor === Object + } + + function add_column_to_table(column_title) { + //create a th for title + let table = document.querySelector(" #version_table>thead>tr"); + let new_column = document.createElement("th"); + let new_title = document.createTextNode(column_title); + + table.appendChild(new_column); + new_column.appendChild(new_title); + + //create matching td + /* let columns = document.getElementsByTagName("th"); + let last_column = columns[colums.length - 1];*/ + } + + let COMPONENTS = []; + let CONTAINERS = []; + let IMAGES = []; + let C_VERSIONS = []; //current versions + let O_VERSIONS = []; //other versions + + DATA.forEach(element => { + //sort data + COMPONENTS.push(element.component); + CONTAINERS.push(element.container); + IMAGES.push(element.image); + C_VERSIONS.push(element.current_version); + O_VERSIONS.push(element.other_version) + + + }); + + let columns_to_add = []; + O_VERSIONS.forEach(element => { + + if (!(is_empty(element))) { + + // if there are other version + + // console.log(Object.keys(element).length) + + for (let i = 0; i < Object.keys(element).length; i++) { + + columns_to_add.push(Object.keys(element)[i]) + + } + + + } + + }) + versions = [...new Set(columns_to_add)]; // turn the array into a set and thus remove duplicates + //console.log(versions) + + //construct table + versions.forEach(element => { + add_column_to_table(element) + }) + + const columns = document.getElementsByTagName("th") + + + DATA.forEach(element => { + //create a row for each element + let new_row = TABLE.insertRow(-1); + new_row.style.color = "white" + switch (element.status) { + case "0": + new_row.style.backgroundColor = "#FBBD08"; + break; + case "1": + new_row.style.backgroundColor = "#21BA45"; + break; + case "2": + new_row.style.backgroundColor = "#2185D0"; + break; + case "3": + new_row.style.backgroundColor = "grey"; + break; + case "4": + new_row.style.color = "black" + break; + } + for (let i = 0; i <= columns.length - 1; i++) { + + // for each row create 4 base cells + let cell = new_row.insertCell(-1); + + cell.setAttribute("class", "cell" + i); + if (cell.className == "cell0") { + let fill = document.createTextNode(element.component) + cell.append(fill) + } else if (cell.className == "cell1") { + let fill = document.createTextNode(element.container) + cell.append(fill) + } else if (cell.className == "cell2") { + let fill = document.createTextNode(element.image) + cell.append(fill) + } else if (cell.className == "cell" + 3) { + let fill = document.createTextNode(element.current_version) + cell.append(fill) + } + + // add as many cells as versions after the base cells + for (let j = 3 + versions.length; j > 3; j--) { + let version_item = j - (columns.length - versions.length) + if (cell.className == "cell" + j) { + + console.log(version_item) + let txt = element.other_version[versions[version_item]]; + let fill = document.createTextNode(txt) + cell.append(fill) + version_item++; + } + + + } + + } + + }) + function filter(color) { + console.log(color + ": cliqué") + let table = document.getElementById("version_table"); + let tr = table.getElementsByTagName("tr"); + for (let i = 1; i < tr.length; i++) { + tr[i].style.display = "none"; + switch (color) { + case "green": + if (tr[i].style.backgroundColor == "rgb(33, 186, 69)") { + tr[i].style.display = ""; + } + break; + + case "yellow": + + if (tr[i].style.backgroundColor == "rgb(251, 189, 8)") { + tr[i].style.display = ""; + } + break; + + case "blue": + + if (tr[i].style.backgroundColor == "rgb(33, 133, 208)") { + tr[i].style.display = ""; + } + break; + + case "grey": + + if (tr[i].style.backgroundColor == "grey") { + tr[i].style.display = ""; + } + break; + + case "black": + + if (tr[i].style.backgroundColor == "") { + tr[i].style.display = ""; + } + break; + + case "all": + tr[i].style.display = ""; + + break; + } + + } + } + let green_button = document.getElementById("green") + let yellow_button = document.getElementById("yellow") + let blue_button = document.getElementById("blue") + let grey_button = document.getElementById("grey") + let black_button = document.getElementById("black") + let all_button = document.getElementById("all") + + + + green_button.addEventListener("click", function () { filter("green") }) + yellow_button.addEventListener("click", function () { filter("yellow") }) + blue_button.addEventListener("click", function () { filter("blue") }) + grey_button.addEventListener("click", function () { filter("grey") }) + black_button.addEventListener("click", function () { filter("black") }) + all_button.addEventListener("click", function () { filter("all") }) + + function search() { + + var input, filter, table, tr, td, i, txtValue; + input = document.getElementById("search_input"); + filter = input.value.toUpperCase(); + table = document.getElementById("version_table"); + tr = table.getElementsByTagName("tr"); + + // Loop through all table rows, and hide those who don't match the search query + for (i = 0; i < tr.length; i++) { + td = tr[i].getElementsByTagName("td")[0]; + if (td) { + txtValue = td.textContent || td.innerText; + if (txtValue.toUpperCase().indexOf(filter) > -1) { + tr[i].style.display = ""; + } else { + tr[i].style.display = "none"; + } + } + } + } + + </script> +</body> + +</html>
\ No newline at end of file diff --git a/doc/template/index-gating-tmpl.html b/doc/template/index-gating-tmpl.html new file mode 100644 index 0000000..0b0f650 --- /dev/null +++ b/doc/template/index-gating-tmpl.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html> + <meta charset="UTF-8"> + <head> + <title>Xtesting ONAP Results</title> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/accordion.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/header.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/card.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/container.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/step.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/statistic.min.css"> + <script + src="https://code.jquery.com/jquery-3.1.1.min.js" + integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" + crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/accordion.min.js"></script> + <script>$(function(){ + $('.ui.accordion').accordion();}); + </script> + </head> + + <body> + <div class='ui inverted vertical masthead center aligned segment'> + + <div class="ui text container"> + <i class="large gitlab icon"></i> + <h1 class="ui inverted header"> + OOM Gating: list of patchset + </h1> + <div class="meta">{{ date }}</div> + </div> + </div> + + <div class="ui equal width center aligned padded grid"> + <div class="row"> + <div class="white column"></div> + </div> + </div> + + <div class='ui vertical stripe segment'> + <div class='ui middle aligned stackable grid container'> + <div class="row"> + <div class="column"> + <h1 class="ui header"> + <div class="sub header"> + + <div class="ui list center aligned segment"> + {% for patch in patchsets -%} + <div class="item center aligned segment"> + <div class="content"> + <a class="link"><a href={{ patch }}/index.html><h2>{{ patch }}</h2></a></a> + </div> + </div> + {%- endfor %} + </div> + </div> + </div> + </div> + </div> + </div> + </body> +</html> diff --git a/doc/template/index-infra.html b/doc/template/index-infra.html new file mode 100644 index 0000000..a613ac9 --- /dev/null +++ b/doc/template/index-infra.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<html> + <meta charset="UTF-8"> + <head> + <title>Xtesting ONAP Results</title> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/accordion.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/header.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/card.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/container.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/step.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/statistic.min.css"> + <script + src="https://code.jquery.com/jquery-3.1.1.min.js" + integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" + crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/accordion.min.js"></script> + <script>$(function(){ + $('.ui.accordion').accordion();}); + </script> + </head> + +<body> + <div class='ui inverted vertical masthead center aligned segment'> + + <div class="ui text container"> + <h1 class="ui inverted header"> + ONAP Xtesting Results + </h1> + </div> + </div> + <center> + <div class="ui main text container"> + <h2 class="ui icon header"> + <i class="gitlab icon"></i> + <div class="content"> + <a tabindex="0" class="big ui orange basic button" href="./onap_xtesting_openlab/index.html">Openlab</a> + <a tabindex="0" class="big ui blue basic button" href="./onap_master_daily_pod4/index.html">Daily Master</a> + <a tabindex="0" class="big ui green basic button" href="./onap_casablanca_daily_pod4/index.html">Daily Casablanca</a> + </div> + </h2> + </div> + </center> +</body> + +</html> diff --git a/doc/template/index-stability-tmpl.html b/doc/template/index-stability-tmpl.html new file mode 100644 index 0000000..073ff26 --- /dev/null +++ b/doc/template/index-stability-tmpl.html @@ -0,0 +1,391 @@ +<!DOCTYPE html> +<html> +<meta charset="UTF-8"> + +<head> + <title>Xtesting ONAP Results</title> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css"> + <style> + canvas{ + margin-bottom: 30px; + } + </style> +</head> + +<body> + <div class='ui inverted vertical masthead center aligned segment'> + + <div class="ui text container"> + <h1 class="ui inverted header"> + Stability testing results evolution + </h1> + </div> + + </div> + + <div class='ui vertical stripe segment'> + <div class='ui grid container'> + <div class="row"> + <div class="column"> + <h1 class="ui header"> + <i class="warehouse icon"></i> + + </h1> + <div class="sub header"> + + <!-- <div class="ui olive statistic"> + + <div class="value">20%</div> + <div class="label">last check</div> + </div> --> + <!-- <div class="ui olive statistic"> + <div class="value"> + <i class="{{ trend }}"></i> + </div> + <div class="label">trend</div> + </div> --> + <div class="ui tiny grey statistic"> + <div class="value">{{ lab_version }}</div> + <div class="label">ONAP Version</div> + </div> + <div class="ui tiny grey statistic"> + <div class="value">{{ lab_owner }}</div> + <div class="label">Lab owner</div> + </div> + </div> + + </div> + </div> + + <div class="ui vertical segment"> + <div class="ui middle aligned stackable grid container"> + <div class="row"> + <div class="eight wide column"> + <h3 class="ui header center aligned">Infra test results</h3> + <div class=" column" style=" height:300px"> + <canvas id="canvas_infra"></canvas> + </div> + </div> + <div class="eight wide column"> + <h3 class="ui header center aligned">Healthcheck test results</h3> + <div class=" column" style=" height:300px"> + <canvas id="canvas_healthcheck"></canvas> + </div> + </div> + <div class="eight wide column"> + <h3 class="ui header center aligned">Smoke test results</h3> + <div class=" column" style=" height:300px"> + <canvas id="canvas_smoke"></canvas> + </div> + </div> + <div class="eight wide column"> + <h3 class="ui header center aligned">Security test results</h3> + <div class=" column" style=" height:300px"> + <canvas id="canvas_security"></canvas> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + + <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.3.2/chart.min.js"></script> + <script> + + let DATA = {{ data |safe }} + let TEST_NAMES= ["infrastructure-healthcheck", "healthcheck","smoke-usecases", "security"] + + function get_dates(data) { + let dates = [] + for (const date of data){ + dates.push(date["date"]) + } + // data.forEach(element => { + // dates.push(element.date) + // }); + return dates + } + + function get_tests_results(data,test_name){ + let results = [] + + for (const item of data){ + console.log(item[test_name]) + results.push(item[test_name]) + + } + + return results + } + + function trendlineEq(X, Y) { + // X : all x coordinates + // Y: all y coordinate + var x_sum = 0 + var y_sum = 0 + + var N = 0; + var A = 0; + var B = 0; + var C = 0; + var D = 0; + var E = 0; + var F = 0; + var m = 0; + var b = 0; + + if (X.length == Y.length) { + + var N = X.length + console.log("N : " + N) + + } else { + + return console.log(" X and Y must be of the same size") + } + + for (let i = 0; i <= N - 1; i++) { + + A = A + (X[i] * Y[i]) + + + + x_sum = x_sum + X[i] + y_sum = y_sum + Y[i] + + C = C + Math.pow(X[i], 2) + + } + A = N * A; + console.log("A : " + A) + + B = x_sum * y_sum + console.log("B : " + B) + + C = N * C + console.log("C : " + C) + + D = Math.pow(x_sum, 2) + console.log("D : " + D) + + m = (A - B) / (C - D) + console.log("m : " + m) + + E = y_sum + console.log("E : " + E) + + F = m * x_sum + console.log("F : " + F) + + b = (E - F) / N + console.log("b : " + b) + + return [m, b] + } + + function get_trend_line_data(X, params) { + let trend_line_data = [] + for (let i = 0; i <= X.length - 1; i++) { + let y_param = (params[0] * X[i]) + params[1] + let coordinates = { + x: X[i], + y: y_param + } + trend_line_data.push(coordinates) + } + return trend_line_data + } + + var x_coord = 0 + var X_COORDS = [] + + DATA.forEach(element => { + X_COORDS.push(x_coord); + x_coord++ + + }); + + function generate_target_array(data, target) { + let target_array = [] + for (const item of data){ + target_array.push(target) + } + // data.forEach(element => { + // target_array.push(target) + // }); + return target_array + } + + const results_infra = get_tests_results(DATA,TEST_NAMES[0]) + const results_healthcheck = get_tests_results(DATA,TEST_NAMES[1]) + const results_smoke = get_tests_results(DATA,TEST_NAMES[2]) + const results_security = get_tests_results(DATA,TEST_NAMES[3]) + + const target_infra = generate_target_array(DATA, 75) + const target_healthcheck = generate_target_array(DATA, 100) + const target_smoke = generate_target_array(DATA, 100) + const target_security = generate_target_array(DATA, 100) + + const params_infra = trendlineEq(X_COORDS, results_infra) + const params_healthcheck = trendlineEq(X_COORDS, results_healthcheck) + const params_smoke = trendlineEq(X_COORDS, results_smoke) + const params_security = trendlineEq(X_COORDS, results_security) + + const trend_line_infra = get_trend_line_data(X_COORDS, params_infra) + const trend_line_healthcheck = get_trend_line_data(X_COORDS, params_healthcheck) + const trend_line_smoke = get_trend_line_data(X_COORDS, params_smoke) + const trend_line_security = get_trend_line_data(X_COORDS, params_security) + + const labels = get_dates(DATA) + + const data_infra = { + labels: labels, + datasets: [{ + label: 'Infra results', + borderColor: 'rgb(255, 99, 132)', + data: results_infra + }, { + type: 'line', + label: 'Target', + borderColor: 'rgb(99, 255, 132)', + data: target_infra, + }, { + type: 'line', + label: 'trend', + borderColor: 'rgb(66, 191, 245)', + data: trend_line_infra, + } + ] + + }; + + const data_healthcheck = { + labels: labels, + datasets: [{ + label: 'healthcheck results', + borderColor: 'rgb(255, 99, 132)', + data: results_healthcheck + }, { + type: 'line', + label: 'Target', + borderColor: 'rgb(99, 255, 132)', + data: target_healthcheck, + },{ + type: 'line', + label: 'trend', + borderColor: 'rgb(66, 191, 245)', + data: trend_line_healthcheck, + } + ] + }; + + const data_smoke = { + labels: labels, + datasets: [{ + label: 'smoke results', + borderColor: 'rgb(255, 99, 132)', + data: results_smoke + }, { + type: 'line', + label: 'Target', + borderColor: 'rgb(99, 255, 132)', + data: target_smoke, + },{ + type: 'line', + label: 'trend', + borderColor: 'rgb(66, 191, 245)', + data: trend_line_smoke, + } + ] + }; + + const data_security = { + labels: labels, + datasets: [{ + label: 'security results', + borderColor: 'rgb(255, 99, 132)', + data: results_security + }, { + type: 'line', + label: 'Target', + borderColor: 'rgb(99, 255, 132)', + data: target_security, + },{ + type: 'line', + label: 'trend', + borderColor: 'rgb(66, 191, 245)', + data: trend_line_security, + } + ] + }; + + var options = { + responsive: true, + maintainAspectRatio: false, + scales: { + y: { + title: { + display: true, + text: 'Value' + }, + min: 0, + max: 100, + ticks: { + stepSize: 10 + } + } + } + } + + const config_infra = { + type: 'line', + data: data_infra, + options: options, + }; + const config_healthcheck = { + type: 'line', + data: data_healthcheck, + options: options + }; + const config_smoke = { + type: 'line', + data: data_smoke, + options: options + }; + const config_security = { + type: 'line', + data: data_security, + options: options + }; + + //charts rendering + + + var chart_infra = new Chart( + document.getElementById('canvas_infra'), + config_infra + ); + + + var chart_healthcheck = new Chart( + document.getElementById('canvas_healthcheck'), + config_healthcheck + ); + + var chart_smoke = new Chart( + document.getElementById('canvas_smoke'), + config_smoke + ); + + var chart_security = new Chart( + document.getElementById('canvas_security'), + config_security + ); + +</script> +</body> + +</html> diff --git a/doc/template/index-tmpl.html b/doc/template/index-tmpl.html new file mode 100644 index 0000000..b8918c7 --- /dev/null +++ b/doc/template/index-tmpl.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<html> + <meta charset="UTF-8"> + <head> + <title>Xtesting ONAP Results</title> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/accordion.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/header.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/card.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/container.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/step.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/statistic.min.css"> + <script + src="https://code.jquery.com/jquery-3.1.1.min.js" + integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" + crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/accordion.min.js"></script> + <script>$(function(){ + $('.ui.accordion').accordion();}); + </script> + </head> + + <body> + + <div class='ui vertical stripe segment'> + <div class='ui middle aligned stackable grid container'> + <div class="row"> + <div class="column"> + <h1 class="ui header"> + <i class="warehouse icon"></i> + <div class="content">ONAP Xtesting results</div> + <div class="sub header"> + {% if score > 99 -%} + <div class="ui olive statistic"> + {%- elif score > 75 -%} + <div class="ui orange statistic"> + {%- else -%} + <div class="ui red statistic"> + {%- endif %} + <div class="value">{{ score }}%</div> + <div class="label">last check</div> + </div> + <div class="ui olive statistic"> + <div class="value"> + <i class="{{ trend }}"></i> + </div> + <div class="label">trend</div> + </div> + <div class="ui tiny grey statistic"> + <div class="value">{{ lab_version }}</div> + <div class="label">ONAP Version</div> + </div> + <div class="ui tiny grey statistic"> + <div class="value">{{ lab_owner }}</div> + <div class="label">Lab owner</div> + </div> + + {% if "daily" in pod -%} + <div class="ui tiny grey statistic"> + <a href="./index-versions.html" target="_blank"> + <i class="tasks icon"></i> + <div class="label">Docker Versions</div> + </a> + </div> + <div class="ui tiny grey statistic"> + <a href="./index-stability.html" target="_blank"> + <i class="chart line icon"></i> + <div class="label">Stability charts</div> + </a> + </div> + </div> + </div> + + {%- endif %} + + </div> + </div> + </h1> + <div class="ui cards"> + {% for tier in tiers -%} + <div class="ui card"> + <div class="content"> + <div class="header">{{ tier.name }}</div> + <div class="meta">{{ date }}</div> + <div class="center aligned description"> + {% if tier.score > 99 -%} + <div class="ui green statistic"> + {%- elif tier.score > 75 -%} + <div class="ui orange statistic"> + {%- else -%} + <div class="ui red statistic"> + {%- endif %} + <div class="value">{{ tier.score }}%</div> + <div class="label">last check</div> + </div> + <div class="ui fluid accordion"> + <div class="title"> + <div class="dropdown icon"></div> + Full results + </div> + <div class="content"> + <div class="ui mini vertical steps"> + {% for result in tier.results -%} + <div class="step"> + {% if 'PASS' == result.result -%} + <i class="inverted green check icon"></i> + {%- else -%} + <i class="inverted red x icon"></i> + {%- endif %} + <div class="content"> + {% if result.url != '' -%} + <div class="center aligned header"><a href="{{result.url}}">{{result.name}}</a></div> + {%- else -%} + <div class="center aligned header">{{result.name}}</div> + {%- endif %} + </div> + </div> + {%- endfor %} + </div> + </div> + </div> + </div> + </div> + </div> + {%- endfor %} + {% if "weekly" in pod -%} + <div class="ui card"> + <div class="content"> + <div class="header">stability</div> + <div class="meta">Note: results may be uploaded after several days, be patient..</div> + <div class="step"> + <br> + <div class="ui fluid accordion"> + <div class="title"> + <div class="dropdown icon"></div> + Stability results + </div> + <div class="content"> + <div class="ui mini vertical steps"> + <div class="step"> + <div class="center aligned header"><a href="./stability/results_instantiation_10_24h//onaptests_bench.html">10 // basic_vm - 24h</a></div> + </div> + <div class="step"> + <div class="center aligned header"><a href="./stability/results_sdc_5_24h/onaptests_bench.html">5 // basic_onboard - 24h</a></div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="ui card"> + <div class="content"> + <div class="header">resiliency</div> + <div class="meta">Note: results may be uploaded after several days, be patient..</div> + <div class="step"> + <br> + <div class="ui fluid accordion"> + <div class="title"> + <div class="dropdown icon"></div> + Resiliency results + </div> + <div class="content"> + <div class="ui mini vertical steps"> + <div class="step"> + <div class="center aligned header"><a href="./resiliency/reporting_chaos.html">Resiliency page</a></div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="ui card"> + <div class="content"> + <div class="header">info only</div> + <div class="meta">Note: results may be uploaded a day after the page is created, be patient..</div> + <div class="step"> + <br> + <div class="ui fluid accordion"> + <div class="title"> + <div class="dropdown icon"></div> + Results + </div> + <div class="content"> + <div class="ui mini vertical steps"> + <div class="step"> + <div class="center aligned header"><a href="./legal/tern/index.html">tern - Docker SBoMs</a></div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + {%- endif %} + </div> + </div> + </div> + </div> + </div> + </body> +</html> diff --git a/doc/template/k8s.html b/doc/template/k8s.html new file mode 100644 index 0000000..130553f --- /dev/null +++ b/doc/template/k8s.html @@ -0,0 +1,103 @@ +<!DOCTYPE html> +<html> + <meta charset="UTF-8"> + <head> + <title>Xtesting ONAP Results</title> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/accordion.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/header.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/card.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/container.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/step.min.css"> + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/statistic.min.css"> + <script + src="https://code.jquery.com/jquery-3.1.1.min.js" + integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" + crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/accordion.min.js"></script> + <script>$(function(){ + $('.ui.accordion').accordion();}); + </script> + </head> + +<body> + <div class='ui inverted vertical masthead center aligned segment'> + <div class="ui text container"> + <h1 class="ui inverted header"> + Xtesting ONAP Results for Kubernetes Deployment + </h1> + </div> + </div> + + <div class='ui vertical stripe segment'> + <div class='ui middle aligned stackable grid container'> + <div class="row"> + <div class="column"> + <h2 class="ui header"> + Summary + </h2> + <div class="ui statistics"> + <div class="statistic"> + <div class="value"> + 38M + </div> + <div class="label"> + Duration + </div> + </div> + <div class="statistic"> + <div class="value"> + 108 + </div> + <div class="label"> + Total Pods Scheduled + </div> + </div> + <div class="statistic"> + <div class="value"> + 3 + </div> + <div class="label"> + Pods Failing + </div> + </div> + </div> + + <h2 class="ui header"> + Failing pods + </h2> + <div class="ui list"> + + <div class="item"> + <i class="large inverted middle aligned red x icon"></i> + <div class="content"> + <div class="header">Pod Name</div> + <div class="description">Fail Reason</div> + </div> + </div> + <div class="item"> + <i class="large inverted middle aligned red x icon"></i> + <div class="content"> + <div class="header">Pod Name</div> + <div class="description">Fail Reason</div> + </div> + </div> + <div class="item"> + <i class="large inverted middle aligned red x icon"></i> + <div class="content"> + <div class="header">Pod Name</div> + <div class="description">Fail Reason</div> + </div> + </div> + </div> + <h2 class="ui header"> + full logs + </h2> + <a href="">Access to entire logs</a> + </div> + </div> + </div> + </div> +</body> + +</html> |