Port index page
This commit is contained in:
parent
3bfae9c0ad
commit
a36b188938
4 changed files with 18 additions and 11 deletions
|
|
@ -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},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
pub mod commit;
|
||||
pub mod index;
|
||||
pub mod run;
|
||||
pub mod worker;
|
||||
|
|
|
|||
|
|
@ -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>,
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
{% import "util.html" as util %}
|
||||
|
||||
{% block title %}overview{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<h2>Refs</h2>
|
||||
|
||||
<details open>
|
||||
<summary>Tracked ({{ tracked_refs.len() }})</summary>
|
||||
<dl>
|
||||
|
|
@ -14,6 +15,7 @@
|
|||
{% endfor %}
|
||||
</dl>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Untracked ({{ untracked_refs.len() }})</summary>
|
||||
<dl>
|
||||
|
|
@ -23,4 +25,5 @@
|
|||
{% endfor %}
|
||||
</dl>
|
||||
</details>
|
||||
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue