Skip to content

Commit

Permalink
Add legal category
Browse files Browse the repository at this point in the history
Related to #73

Signed-off-by: Sergio Castaño Arteaga <[email protected]>
Signed-off-by: Cintia Sanchez Garcia <[email protected]>
Co-authored-by: Sergio Castaño Arteaga <[email protected]>
Co-authored-by: Cintia Sanchez Garcia <[email protected]>
  • Loading branch information
tegioz and cynthia-sg committed Mar 2, 2022
1 parent d66203c commit 5119517
Show file tree
Hide file tree
Showing 34 changed files with 1,126 additions and 687 deletions.
15 changes: 4 additions & 11 deletions clomonitor-apiserver/src/filters.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
/// Template filter that returns the section score x-axis translate value for
/// the score bar.
pub fn rs_section_score_arrow_t_x(score: &usize) -> ::askama::Result<usize> {
let v = score + 19;
if v < 23 {
return Ok(23);
}
Ok(v)
pub fn rs_section_score_arrow_t_x(score: &usize) -> ::askama::Result<f64> {
Ok((158.0 + *score as f64 * 1.21).round())
}

/// Template filter that returns the width of the section score bar.
pub fn rs_section_score_width(score: &usize) -> ::askama::Result<usize> {
if *score < 100 {
return Ok(score.saturating_sub(4));
}
Ok(*score)
pub fn rs_section_score_width(score: &usize) -> ::askama::Result<f64> {
Ok((*score as f64 * 1.21).round())
}

/// Template filter that returns the rating letter corresponding to the score
Expand Down
206 changes: 126 additions & 80 deletions clomonitor-apiserver/templates/report-summary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5119517

Please sign in to comment.