|
@ -1,15 +1,52 @@ |
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
<odoo> |
|
|
<odoo> |
|
|
<template id="odoo_health_report" name="Odoo Health Report"> |
|
|
<template id="odoo_health_report" name="Odoo Module Health Report"> |
|
|
<t t-call="web.html_container"> |
|
|
<t t-call="web.html_container"> |
|
|
<t t-call="web.external_layout"> |
|
|
<t t-call="web.external_layout"> |
|
|
<div class="footer"> |
|
|
<style type="text/css"> |
|
|
<p>Cybrosys Technologies | www.cybrosys.com | info@cybrosys.com</p> |
|
|
.hr-module-title { |
|
|
|
|
|
color: #000; |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: 700; |
|
|
|
|
|
text-transform: capitalize; |
|
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
table, th, td, tr, thead, tbody { |
|
|
|
|
|
border: none !important; |
|
|
|
|
|
} |
|
|
|
|
|
.hr-table { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
} |
|
|
|
|
|
.hr-table thead { |
|
|
|
|
|
background-color: #ddf66b; |
|
|
|
|
|
color: #000; |
|
|
|
|
|
} |
|
|
|
|
|
.hr-table thead th { |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
background-color: #DDF66B; |
|
|
|
|
|
color: #000 !important; |
|
|
|
|
|
} |
|
|
|
|
|
.hr-table thead th:first-child { |
|
|
|
|
|
border-top-left-radius: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
.hr-table thead th:last-child { |
|
|
|
|
|
border-top-right-radius: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
.hr-table tbody tr td { |
|
|
|
|
|
font-size: 14px !important; |
|
|
|
|
|
color: #495057 !important; |
|
|
|
|
|
border-bottom: 1px solid #ddd !important; |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|
<div class="footer" style="display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; font-size: 14px; border-top: 1px solid #ccc;"> |
|
|
|
|
|
<p style="text-align: left; margin: 0;">Cybrosys Technologies | www.cybrosys.com | info@cybrosys.com</p> |
|
|
|
|
|
<p style="text-align: right; margin: 0; right: 40px; top: 10px; position:absolute;"><span class="page"/> | Page</p> |
|
|
</div> |
|
|
</div> |
|
|
<body style="background-color: beige; display: flex; justify-content: center; align-items: center; flex-flow: column; gap: 2rem; font-family: 'Public Sans', sans-serif; font-size: 1rem;"> |
|
|
|
|
|
<main style="width: 21cm; height: 29.7cm; background-color: white; padding: 25px; position: relative;"> |
|
|
<body style="display: flex; justify-content: center; align-items: center; flex-flow: column; gap: 2rem; font-family: 'Public Sans', sans-serif; font-size: 1rem;"> |
|
|
<!-- Left Top Corner Decoration --> |
|
|
<main> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/left.svg" alt="" style="position: absolute; top: 0; left: 0;"/> |
|
|
|
|
|
<section> |
|
|
<section> |
|
|
<t t-if="module_quality"> |
|
|
<t t-if="module_quality"> |
|
|
<t t-set="field_details" t-value="module_quality['field_details']"/> |
|
|
<t t-set="field_details" t-value="module_quality['field_details']"/> |
|
@ -26,51 +63,46 @@ |
|
|
Module Quality Report |
|
|
Module Quality Report |
|
|
</h3> |
|
|
</h3> |
|
|
</div> |
|
|
</div> |
|
|
<table style="width: 100%; border-collapse: collapse; margin: 15px 0;"> |
|
|
|
|
|
|
|
|
<table style="width: 100%; margin: 15px 0;"> |
|
|
<tr> |
|
|
<tr> |
|
|
<!-- Critical Overview --> |
|
|
<!-- Critical Overview --> |
|
|
<td style="width: 40%; padding: 10px; vertical-align: top;"> |
|
|
<td style="width: 40%; padding: 10px; vertical-align: top;"> |
|
|
<div style="background: url('/odoo_health_report/static/src/assets/images/icons_report/box.png') no-repeat; background-size: cover; border-radius: 15px; color: white; padding: 20px; position: relative; height: 135px;width: 100%;"> |
|
|
<div style="background: url('/odoo_health_report/static/src/assets/images/icons_report/box.png') no-repeat; background-size: cover; border-radius: 15px; color: white; padding: 20px; position: relative; height: 135px;width: 100%;"> |
|
|
<h5 style="margin: 0; font-size: 12pt; font-weight: normal;color: white;">Apps installed ratio</h5> |
|
|
<h5 style="margin: 0; font-size: 14pt; font-weight: normal;color: white;">Apps installed ratio</h5> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/graph.png" alt="" style="width: 155px; position: absolute; left: 16px; top: 52px;"/> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/graph.png" alt="" style="width: 155px; position: absolute; left: 16px; top: 52px;"/> |
|
|
<h6 style="position: absolute; bottom: 10px; left: 40px; font-size: 10pt; margin: 0;color: white;"> |
|
|
<h6 style="position: absolute; bottom: 10px; left: 40px; font-size: 12pt; margin: 0;color: white;"> |
|
|
Overall <span style="font-weight: bold;"><t t-esc="field_details['critical_overview']['overall_percentage']['value']"/>%</span> |
|
|
Overall <span style="font-weight: bold;"><t t-esc="field_details['critical_overview']['overall_percentage']['value']"/>%</span> |
|
|
</h6> |
|
|
</h6> |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
<!-- Fields --> |
|
|
<!-- Fields --> |
|
|
<td style="width: 60%;"> |
|
|
<td style="width: 60%;"> |
|
|
<table style="width: 100%; border-collapse: collapse;"> |
|
|
<table style="width: 100%;"> |
|
|
<tr> |
|
|
<tr> |
|
|
<td style="padding: 10px; width: 33.33%;"> |
|
|
<td style="padding: 10px; width: 33.33%;"> |
|
|
<div style="background: #d9e8ff; border-radius: 15px; padding: 15px; position: relative; height: 135px;"> |
|
|
<div style="background: #d9e8ff; border-radius: 15px; padding: 15px; position: relative; height: 135px;"> |
|
|
<h3 style="margin-top: 30px; color: #7b7b7b; font-size: 10pt;">Total Fields</h3> |
|
|
<h3 style="margin-top: 20px; color: #7b7b7b; font-size: 14pt;">Total Fields</h3> |
|
|
<span style="position: absolute; right: 5px; top: 5px; background: #2b7fff; padding: 5px; border-radius: 40%; width: 40px; height: 40px; text-align: center;"> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/icon-all-field.svg" style="position: absolute; right: 5px; top: 5px;"/> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/globe.svg" alt="" style="width: 25px; top: 8px;position: absolute; left: 8px;" /> |
|
|
<p style="margin: 8px 0; font-size: 12pt; color: black; font-weight: bold;"> |
|
|
</span> |
|
|
|
|
|
<p style="margin: 8px 0; font-size: 10pt; color: black; font-weight: bold;"> |
|
|
|
|
|
<t t-esc="field_details['critical_overview']['total_fields']['value']"/> |
|
|
<t t-esc="field_details['critical_overview']['total_fields']['value']"/> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
<td style="padding: 10px; width: 33.33%;"> |
|
|
<td style="padding: 10px; width: 33.33%;"> |
|
|
<div style="background: #d9e8ff; border-radius: 15px; padding: 15px; position: relative; height: 135px;"> |
|
|
<div style="background: #d9e8ff; border-radius: 15px; padding: 15px; position: relative; height: 135px;"> |
|
|
<h3 style="margin-top: 30px; color: #7b7b7b; font-size: 10pt;">Stored Fields</h3> |
|
|
<h3 style="margin-top: 20px; color: #7b7b7b; font-size: 14pt;">Stored Fields</h3> |
|
|
<span style="position: absolute; right: 5px; top: 5px; background: #2b7fff; padding: 5px; border-radius: 40%; width: 40px; height: 40px; text-align: center;"> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/icon-stored.svg" style="position: absolute; right: 5px; top: 5px;"/> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/note.svg" alt="" style="width: 25px; top: 8px;position: absolute; left: 8px;"/> |
|
|
<p style="margin: 8px 0; font-size: 12pt; color: black; font-weight: bold;"> |
|
|
</span> |
|
|
|
|
|
<p style="margin: 8px 0; font-size: 10pt; color: black; font-weight: bold;"> |
|
|
|
|
|
<t t-esc="field_details['critical_overview']['stored']['value']"/> |
|
|
<t t-esc="field_details['critical_overview']['stored']['value']"/> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
<td style="padding: 10px; width: 33.33%;"> |
|
|
<td style="padding: 10px; width: 33.33%;"> |
|
|
<div style="background: #d9e8ff; border-radius: 15px; padding: 15px; position: relative; height: 135px;"> |
|
|
<div style="background: #d9e8ff; border-radius: 15px; padding: 15px; position: relative; height: 135px;"> |
|
|
<h3 style="margin-top: 30px; color: #7b7b7b; font-size: 10pt;">Non-Stored Fields</h3> |
|
|
<h3 style="margin-top: 20px; color: #7b7b7b; font-size: 14pt;">Non-Stored <br/>Fields</h3> |
|
|
<span style="position: absolute; right: 5px; top: 5px; background: #2b7fff; padding: 5px; border-radius: 40%; width: 40px; height: 40px; text-align: center;"> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/icon-non-stored.svg" style="position: absolute; right: 5px; top: 5px;"/> |
|
|
<img src="/odoo_health_report/static/src/assets/images/icons_report/hour-glass.svg" alt="" style="width: 25px; top: 8px;position: absolute; left: 8px;"/> |
|
|
<p style="margin: 8px 0; font-size: 12pt; color: black; font-weight: bold;"> |
|
|
</span> |
|
|
|
|
|
<p style="margin: 8px 0; font-size: 10pt; color: black; font-weight: bold;"> |
|
|
|
|
|
<t t-esc="field_details['critical_overview']['non_stored']['value']"/> |
|
|
<t t-esc="field_details['critical_overview']['non_stored']['value']"/> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
@ -83,11 +115,11 @@ |
|
|
<section> |
|
|
<section> |
|
|
<h3>Module Lines Of Code</h3> |
|
|
<h3>Module Lines Of Code</h3> |
|
|
<t t-foreach="count_lines.get('result')" t-as="author"> |
|
|
<t t-foreach="count_lines.get('result')" t-as="author"> |
|
|
<h3 style="font-size: 1rem; color: #333; margin: 0; margin-bottom: 10px"> |
|
|
<h3 class="hr-module-title"> |
|
|
<t t-esc="author"/> |
|
|
<t t-esc="author"/> |
|
|
</h3> |
|
|
</h3> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table" style="margin-bottom: 15px;"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">Module</th> |
|
|
<th style="text-align: left; padding: 10px">Module</th> |
|
|
<th style="text-align: center; padding: 10px">Technical Name</th> |
|
|
<th style="text-align: center; padding: 10px">Technical Name</th> |
|
|
<th style="text-align: center; padding: 10px">Java Script Lines</th> |
|
|
<th style="text-align: center; padding: 10px">Java Script Lines</th> |
|
@ -127,12 +159,12 @@ |
|
|
<t t-foreach="violation_module['violations']" t-as="violations_categ"> |
|
|
<t t-foreach="violation_module['violations']" t-as="violations_categ"> |
|
|
<!-- Odoo Code Standards Check --> |
|
|
<!-- Odoo Code Standards Check --> |
|
|
<t t-if="violations_categ == 'odoo_standards'"> |
|
|
<t t-if="violations_categ == 'odoo_standards'"> |
|
|
<h3 style="font-size: 1rem; color: #333; margin: 0; margin-bottom: 10px; font-weight: 700;"> |
|
|
<h3 style="font-size: 1.1rem; color: #333; margin: 0; margin-bottom: 10px; font-weight: 700;"> |
|
|
Odoo Code Standards Check |
|
|
Odoo Code Standards Check |
|
|
</h3> |
|
|
</h3> |
|
|
<t t-if="violation_module['violations']['odoo_standards']"> |
|
|
<t t-if="violation_module['violations']['odoo_standards']"> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: center; padding: 10px">Line</th> |
|
|
<th style="text-align: center; padding: 10px">Line</th> |
|
|
<th style="text-align: left; padding: 10px">Violation Message</th> |
|
|
<th style="text-align: left; padding: 10px">Violation Message</th> |
|
@ -157,8 +189,8 @@ |
|
|
Style & Linting Check |
|
|
Style & Linting Check |
|
|
</h3> |
|
|
</h3> |
|
|
<t t-if="violation_module['violations']['style_lint']"> |
|
|
<t t-if="violation_module['violations']['style_lint']"> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: center; padding: 10px">Line</th> |
|
|
<th style="text-align: center; padding: 10px">Line</th> |
|
|
<th style="text-align: left; padding: 10px">Violation Message</th> |
|
|
<th style="text-align: left; padding: 10px">Violation Message</th> |
|
@ -181,8 +213,8 @@ |
|
|
General Code Quality |
|
|
General Code Quality |
|
|
</h3> |
|
|
</h3> |
|
|
<t t-if="violation_module['violations']['code_quality']"> |
|
|
<t t-if="violation_module['violations']['code_quality']"> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: center; padding: 10px">Line</th> |
|
|
<th style="text-align: center; padding: 10px">Line</th> |
|
|
<th style="text-align: center; padding: 10px">Column</th> |
|
|
<th style="text-align: center; padding: 10px">Column</th> |
|
@ -209,8 +241,8 @@ |
|
|
Maintainability Index |
|
|
Maintainability Index |
|
|
</h3> |
|
|
</h3> |
|
|
<t t-if="violation_module['violations']['maintainability_index']"> |
|
|
<t t-if="violation_module['violations']['maintainability_index']"> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: center; padding: 10px">Grade</th> |
|
|
<th style="text-align: center; padding: 10px">Grade</th> |
|
|
</thead> |
|
|
</thead> |
|
@ -231,8 +263,8 @@ |
|
|
Import Sorting Check |
|
|
Import Sorting Check |
|
|
</h3> |
|
|
</h3> |
|
|
<t t-if="violation_module['violations']['import_sort']"> |
|
|
<t t-if="violation_module['violations']['import_sort']"> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: left; padding: 10px">Message</th> |
|
|
<th style="text-align: left; padding: 10px">Message</th> |
|
|
</thead> |
|
|
</thead> |
|
@ -253,8 +285,8 @@ |
|
|
Code Formatting Check |
|
|
Code Formatting Check |
|
|
</h3> |
|
|
</h3> |
|
|
<t t-if="violation_module['violations']['code_format']"> |
|
|
<t t-if="violation_module['violations']['code_format']"> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: left; padding: 10px">File Name</th> |
|
|
<th style="text-align: left; padding: 10px">Action</th> |
|
|
<th style="text-align: left; padding: 10px">Action</th> |
|
|
</thead> |
|
|
</thead> |
|
@ -278,8 +310,8 @@ |
|
|
<t t-foreach="violation_module['violations']['code_complexity'].items()" t-as="cc_files"> |
|
|
<t t-foreach="violation_module['violations']['code_complexity'].items()" t-as="cc_files"> |
|
|
<h3 style="font-size: 1rem; color: #333; margin: 0; margin-bottom: 10px">File: <t t-esc="cc_files[0]"/></h3> |
|
|
<h3 style="font-size: 1rem; color: #333; margin: 0; margin-bottom: 10px">File: <t t-esc="cc_files[0]"/></h3> |
|
|
<t t-if="cc_files[1]"> |
|
|
<t t-if="cc_files[1]"> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">Type</th> |
|
|
<th style="text-align: left; padding: 10px">Type</th> |
|
|
<th style="text-align: left; padding: 10px">Name</th> |
|
|
<th style="text-align: left; padding: 10px">Name</th> |
|
|
<th style="text-align: left; padding: 10px">Class Name</th> |
|
|
<th style="text-align: left; padding: 10px">Class Name</th> |
|
@ -313,8 +345,8 @@ |
|
|
Security Scan |
|
|
Security Scan |
|
|
</h3> |
|
|
</h3> |
|
|
<t t-if="violation_module['violations']['security_scan']"> |
|
|
<t t-if="violation_module['violations']['security_scan']"> |
|
|
<table style="border-collapse: collapse; width: 100%; font-size: 0.8rem; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 20px rgb(0 0 0 / 5%);"> |
|
|
<table class="hr-table"> |
|
|
<thead style="background-color: #ddf66b; color: #333"> |
|
|
<thead> |
|
|
<th style="text-align: left; padding: 10px">Test ID</th> |
|
|
<th style="text-align: left; padding: 10px">Test ID</th> |
|
|
<th style="text-align: center; padding: 10px">Test Name</th> |
|
|
<th style="text-align: center; padding: 10px">Test Name</th> |
|
|
<th style="text-align: center; padding: 10px">Severity</th> |
|
|
<th style="text-align: center; padding: 10px">Severity</th> |
|
|