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 admin;
|
||||||
mod api;
|
mod api;
|
||||||
mod base;
|
mod base;
|
||||||
mod index;
|
|
||||||
mod link;
|
mod link;
|
||||||
mod pages;
|
mod pages;
|
||||||
pub mod paths;
|
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,
|
get_api_worker_bench_repo_by_hash_tree_tar_gz, get_api_worker_repo_by_hash_tree_tar_gz,
|
||||||
post_api_worker_status,
|
post_api_worker_status,
|
||||||
},
|
},
|
||||||
index::get_index,
|
pages::{
|
||||||
pages::{commit::get_commit_by_hash, run::get_run_by_id, worker::get_worker_by_name},
|
commit::get_commit_by_hash, index::get_index, run::get_run_by_id,
|
||||||
|
worker::get_worker_by_name,
|
||||||
|
},
|
||||||
queue::{get_queue, get_queue_inner},
|
queue::{get_queue, get_queue_inner},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
pub mod commit;
|
pub mod commit;
|
||||||
|
pub mod index;
|
||||||
pub mod run;
|
pub mod run;
|
||||||
pub mod worker;
|
pub mod worker;
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,14 @@ use axum::{extract::State, response::IntoResponse};
|
||||||
use futures::TryStreamExt;
|
use futures::TryStreamExt;
|
||||||
use sqlx::SqlitePool;
|
use sqlx::SqlitePool;
|
||||||
|
|
||||||
use crate::{config::Config, somehow};
|
use crate::{
|
||||||
|
config::Config,
|
||||||
use super::{
|
server::web::{
|
||||||
base::{Base, Tab},
|
base::{Base, Tab},
|
||||||
link::LinkCommit,
|
link::LinkCommit,
|
||||||
paths::PathIndex,
|
paths::PathIndex,
|
||||||
|
},
|
||||||
|
somehow,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Ref {
|
struct Ref {
|
||||||
|
|
@ -18,7 +20,7 @@ struct Ref {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
#[template(path = "index.html")]
|
#[template(path = "pages/index.html")]
|
||||||
struct IndexTemplate {
|
struct IndexTemplate {
|
||||||
base: Base,
|
base: Base,
|
||||||
tracked_refs: Vec<Ref>,
|
tracked_refs: Vec<Ref>,
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% import "util.html" as util %}
|
|
||||||
|
|
||||||
{% block title %}overview{% endblock %}
|
{% block title %}overview{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<h2>Refs</h2>
|
<h2>Refs</h2>
|
||||||
|
|
||||||
<details open>
|
<details open>
|
||||||
<summary>Tracked ({{ tracked_refs.len() }})</summary>
|
<summary>Tracked ({{ tracked_refs.len() }})</summary>
|
||||||
<dl>
|
<dl>
|
||||||
|
|
@ -14,6 +15,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</dl>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Untracked ({{ untracked_refs.len() }})</summary>
|
<summary>Untracked ({{ untracked_refs.len() }})</summary>
|
||||||
<dl>
|
<dl>
|
||||||
|
|
@ -23,4 +25,5 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</dl>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue