Port index page

This commit is contained in:
Joscha 2023-08-13 23:06:05 +02:00
parent 3bfae9c0ad
commit a36b188938
4 changed files with 18 additions and 11 deletions

View file

@ -1,7 +1,6 @@
mod admin;
mod api;
mod base;
mod index;
mod link;
mod pages;
pub mod paths;
@ -19,8 +18,10 @@ use self::{
get_api_worker_bench_repo_by_hash_tree_tar_gz, get_api_worker_repo_by_hash_tree_tar_gz,
post_api_worker_status,
},
index::get_index,
pages::{commit::get_commit_by_hash, run::get_run_by_id, worker::get_worker_by_name},
pages::{
commit::get_commit_by_hash, index::get_index, run::get_run_by_id,
worker::get_worker_by_name,
},
queue::{get_queue, get_queue_inner},
};

View file

@ -1,3 +1,4 @@
pub mod commit;
pub mod index;
pub mod run;
pub mod worker;

View file

@ -3,12 +3,14 @@ use axum::{extract::State, response::IntoResponse};
use futures::TryStreamExt;
use sqlx::SqlitePool;
use crate::{config::Config, somehow};
use super::{
base::{Base, Tab},
link::LinkCommit,
paths::PathIndex,
use crate::{
config::Config,
server::web::{
base::{Base, Tab},
link::LinkCommit,
paths::PathIndex,
},
somehow,
};
struct Ref {
@ -18,7 +20,7 @@ struct Ref {
}
#[derive(Template)]
#[template(path = "index.html")]
#[template(path = "pages/index.html")]
struct IndexTemplate {
base: Base,
tracked_refs: Vec<Ref>,