gnss_qc/report/summary/
mod.rs1use maud::{html, Markup, Render};
2use rinex::prelude::TimeScale;
3
4use crate::prelude::{QcConfig, QcContext};
5
6mod nav_post;
7use nav_post::QcNavPostSummary;
8
9mod bias;
10use bias::QcBiasSummary;
11
12pub struct QcSummary {
16 name: String,
17 cfg: QcConfig,
19 pub navi: QcNavPostSummary,
21 timescale: Option<TimeScale>,
23 bias_sum: QcBiasSummary,
25}
26
27impl QcSummary {
28 pub fn new(context: &QcContext, cfg: &QcConfig) -> Self {
29 Self {
30 cfg: cfg.clone(),
31 name: context.name(),
32 timescale: context.timescale(),
33 bias_sum: QcBiasSummary::new(context),
34 navi: QcNavPostSummary::new(context),
35 }
36 }
37}
38
39impl Render for QcSummary {
40 fn render(&self) -> Markup {
41 html! {
42 div class="table-container" {
43 table class="table is-bordered" {
44 tbody {
45 tr {
46 th class="is-info is-bordered" {
47 (self.name.clone())
48 }
49 }
50 tr {
51 th {
52 button aria-label="Timescale in which observations are expressed.
53 Navigation solutions are expressed in this timescale by default." data-balloon-pos="right" {
54 "Timescale"
55 }
56 }
57 @if let Some(timescale) = self.timescale {
58 td {
59 (timescale.to_string())
60 }
61 } @else {
62 td {
63 button aria-label="This dataset is not a timeserie." data-balloon-pos="up" {
64 "Not Applicable"
65 }
66 }
67 }
68 }
69 tr {
70 th class="is-info" {
71 button aria-label="Context / Dataset compliancy" data-balloon-pos="right" {
72 "Compliancy"
73 }
74 }
75 td {
76 (self.navi.render())
77 }
78 }
79 tr {
80 th class="is-info" {
81 button aria-label="Physical and Environmental bias analysis & cancellation capabilities" data-balloon-pos="right" {
82 "Bias"
83 }
84 }
85 td {
86 (self.bias_sum.render())
87 }
88 }
89 }
90 }
91 }
92 }
93 }
94}