Port worker page to Page
This commit is contained in:
parent
a931f00df3
commit
eb1e82dae6
1 changed files with 29 additions and 36 deletions
|
|
@ -12,11 +12,7 @@ use crate::{
|
|||
config::ServerConfig,
|
||||
server::{
|
||||
util,
|
||||
web::{
|
||||
base::{Base, Tab},
|
||||
components,
|
||||
paths::PathWorkerByName,
|
||||
},
|
||||
web::{components, page::Page, paths::PathWorkerByName},
|
||||
workers::Workers,
|
||||
},
|
||||
shared::WorkerStatus,
|
||||
|
|
@ -61,15 +57,11 @@ pub async fn get_worker_by_name(
|
|||
return Ok(StatusCode::NOT_FOUND.into_response());
|
||||
};
|
||||
|
||||
let base = Base::new(config, Tab::None);
|
||||
|
||||
let status = status(config, &info.status, &db).await?;
|
||||
|
||||
Ok(base
|
||||
.html(
|
||||
&path.name,
|
||||
html! {},
|
||||
html! {
|
||||
let html = Page::new(config)
|
||||
.title(&path.name)
|
||||
.body(html! {
|
||||
h2 { "Worker" }
|
||||
div .commit-like .worker {
|
||||
span .title { "worker " (path.name) }
|
||||
|
|
@ -96,7 +88,8 @@ pub async fn get_worker_by_name(
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
.into_response())
|
||||
})
|
||||
.build();
|
||||
|
||||
Ok(html.into_response())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue