Compare commits

..

No commits in common. "db0f1c5be86402cf89ed27096ff462064b70770b" and "d669bef623f8dc44c87a4dac33c45acc7eaa6314" have entirely different histories.

4 changed files with 6 additions and 29 deletions

View File

@ -28,13 +28,8 @@ impl UserCountChart {
parent: &PathBuf,
group_name: &str,
render_point_circles: bool,
truncate: bool,
) -> Result<PathBuf> {
let parent = if truncate {
parent.join("charts/user-count")
} else {
parent.join("charts-untruncated/user-count")
};
let parent = parent.join("charts/user-count");
create_dir_all(&parent).await?;
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 min_count = if truncate { min_count - 10 } else { 0 };
let min_count = min_count - 10;
let max_count = max_count + 10;
let path = parent.join(format!("{group_name}.svg"));

View File

@ -111,13 +111,12 @@ pub async fn run() -> Result<()> {
create_dir_all(&output).await?;
for group in &groups {
let chart = UserCountChart {
UserCountChart {
groups: GroupDataModel::get_n_most_recent(&db, 31, &group.name)
.await?,
};
chart.render(&output, &group.name, true, true).await?;
chart.render(&output, &group.name, true, false).await?;
}
.render(&output, &group.name, true)
.await?;
GroupTemplate::new(group.description.clone(), &group.name)
.await
@ -139,13 +138,6 @@ pub async fn run() -> Result<()> {
let path =
output.join(&format!("charts/user-count/{}.svg", &group.name));
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?;
}
}
},

View File

@ -19,10 +19,5 @@
<img class="chart" src="/charts/user-count/{{ group_name }}.svg"
alt="{{ group_name }} User Count Chart">
<p>
See also the
<a href="/charts-untruncated/user-count/{{ group_name }}.svg">untruncated version</a>.
</p>
</main>
{% endblock %}

View File

@ -21,11 +21,6 @@
<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>
<summary>Groups Overview</summary>