From ec77fe6a994dc16251119626799e5b54c31bd9ff Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 3 Dec 2024 01:35:54 +0100 Subject: [PATCH] feat: allow customizing index header --- index.html | 2 +- src/main.rs | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index edaea3d..200fafc 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,7 @@

uppe.rs

-

keeping track of your infra's up status

+

%%DESCRIPTION%%


now --> diff --git a/src/main.rs b/src/main.rs index 23ee484..ae2ea79 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,6 +23,9 @@ struct Config { /// defined services, singular because makes more sense in toml service: std::collections::BTreeMap, + /// service description shown in web page + description: Option, + /// how many samples of history to keep //history: usize, @@ -85,9 +88,12 @@ async fn entry(cli: Cli, config: Config, db: Database) -> Result<(), Box Html<&'static str> { - Html(include_str!("../index.html")) -} - use axum::{extract::{Path, Query, State}, response::{Html, IntoResponse}, Json}; #[derive(serde::Deserialize)]