Compare commits
No commits in common. "db0f1c5be86402cf89ed27096ff462064b70770b" and "d669bef623f8dc44c87a4dac33c45acc7eaa6314" have entirely different histories.
db0f1c5be8
...
d669bef623
|
@ -28,13 +28,8 @@ impl UserCountChart {
|
||||||
parent: &PathBuf,
|
parent: &PathBuf,
|
||||||
group_name: &str,
|
group_name: &str,
|
||||||
render_point_circles: bool,
|
render_point_circles: bool,
|
||||||
truncate: bool,
|
|
||||||
) -> Result<PathBuf> {
|
) -> Result<PathBuf> {
|
||||||
let parent = if truncate {
|
let parent = parent.join("charts/user-count");
|
||||||
parent.join("charts/user-count")
|
|
||||||
} else {
|
|
||||||
parent.join("charts-untruncated/user-count")
|
|
||||||
};
|
|
||||||
create_dir_all(&parent).await?;
|
create_dir_all(&parent).await?;
|
||||||
|
|
||||||
let (mut datapoints, mut min_count, mut max_count) = (vec![], i64::MAX, 0);
|
let (mut datapoints, mut min_count, mut max_count) = (vec![], i64::MAX, 0);
|
||||||
|
@ -52,7 +47,7 @@ impl UserCountChart {
|
||||||
}
|
}
|
||||||
|
|
||||||
let datapoints_len = datapoints.len() as isize;
|
let datapoints_len = datapoints.len() as isize;
|
||||||
let min_count = if truncate { min_count - 10 } else { 0 };
|
let min_count = min_count - 10;
|
||||||
let max_count = max_count + 10;
|
let max_count = max_count + 10;
|
||||||
|
|
||||||
let path = parent.join(format!("{group_name}.svg"));
|
let path = parent.join(format!("{group_name}.svg"));
|
||||||
|
|
|
@ -111,13 +111,12 @@ pub async fn run() -> Result<()> {
|
||||||
create_dir_all(&output).await?;
|
create_dir_all(&output).await?;
|
||||||
|
|
||||||
for group in &groups {
|
for group in &groups {
|
||||||
let chart = UserCountChart {
|
UserCountChart {
|
||||||
groups: GroupDataModel::get_n_most_recent(&db, 31, &group.name)
|
groups: GroupDataModel::get_n_most_recent(&db, 31, &group.name)
|
||||||
.await?,
|
.await?,
|
||||||
};
|
}
|
||||||
|
.render(&output, &group.name, true)
|
||||||
chart.render(&output, &group.name, true, true).await?;
|
.await?;
|
||||||
chart.render(&output, &group.name, true, false).await?;
|
|
||||||
|
|
||||||
GroupTemplate::new(group.description.clone(), &group.name)
|
GroupTemplate::new(group.description.clone(), &group.name)
|
||||||
.await
|
.await
|
||||||
|
@ -139,13 +138,6 @@ pub async fn run() -> Result<()> {
|
||||||
let path =
|
let path =
|
||||||
output.join(&format!("charts/user-count/{}.svg", &group.name));
|
output.join(&format!("charts/user-count/{}.svg", &group.name));
|
||||||
copy(path, output.join("charts/main-user-count.svg")).await?;
|
copy(path, output.join("charts/main-user-count.svg")).await?;
|
||||||
|
|
||||||
let path = output.join(&format!(
|
|
||||||
"charts-untruncated/user-count/{}.svg",
|
|
||||||
&group.name
|
|
||||||
));
|
|
||||||
copy(path, output.join("charts-untruncated/main-user-count.svg"))
|
|
||||||
.await?;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,10 +19,5 @@
|
||||||
|
|
||||||
<img class="chart" src="/charts/user-count/{{ group_name }}.svg"
|
<img class="chart" src="/charts/user-count/{{ group_name }}.svg"
|
||||||
alt="{{ group_name }} User Count Chart">
|
alt="{{ group_name }} User Count Chart">
|
||||||
|
|
||||||
<p>
|
|
||||||
See also the
|
|
||||||
<a href="/charts-untruncated/user-count/{{ group_name }}.svg">untruncated version</a>.
|
|
||||||
</p>
|
|
||||||
</main>
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -21,11 +21,6 @@
|
||||||
|
|
||||||
<img class="chart" src="/charts/main-user-count.svg" alt="User Count Chart">
|
<img class="chart" src="/charts/main-user-count.svg" alt="User Count Chart">
|
||||||
|
|
||||||
<p>
|
|
||||||
See also the
|
|
||||||
<a href="/charts-untruncated/main-user-count.svg">untruncated version</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<details open>
|
<details open>
|
||||||
<summary>Groups Overview</summary>
|
<summary>Groups Overview</summary>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue