mirror of
https://github.com/BioArchLinux/bioarchlinux-packages.git
synced 2025-03-10 06:24:00 +00:00
fix: fixed the decimal places for memory field
This commit is contained in:
parent
a72c1463bc
commit
aaed5aa94d
3 changed files with 7 additions and 3 deletions
|
@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Remove the quote tag from more href
|
||||
- Remove the word `率` in memory field
|
||||
- Prevent A link being wrap
|
||||
- Fixed the decimal places for memory field
|
||||
|
||||
## [0.2.1] - 2022-01-23
|
||||
|
||||
|
|
|
@ -83,7 +83,10 @@
|
|||
{
|
||||
targets: 6,
|
||||
title: "内存使用(GiB)",
|
||||
data: "memory"
|
||||
data: "memory",
|
||||
render: function (data, type, row, meta) {
|
||||
return data.toFixed(3)
|
||||
}
|
||||
},
|
||||
{
|
||||
targets: 7,
|
||||
|
|
|
@ -149,7 +149,7 @@ async fn logs(db: web::Data<deadpool_postgres::Pool>) -> impl Responder {
|
|||
let conn = db.get().await.unwrap();
|
||||
let rows = conn
|
||||
.query(
|
||||
"select ts, pkgbase, COALESCE(pkg_version, '') AS pkg_version, elapsed, result, COALESCE(case when elapsed = 0 then 0 else cputime * 100 / elapsed end, -1) AS cpu, COALESCE(round(memory / 1073741824.0, 3), -1) AS memory from (
|
||||
"select ts, pkgbase, COALESCE(pkg_version, '') AS pkg_version, elapsed, result, COALESCE(case when elapsed = 0 then 0 else cputime * 100 / elapsed end, -1) AS cpu, COALESCE(memory / 1073741824.0, -1) AS memory from (
|
||||
select *, row_number() over (partition by pkgbase order by ts desc) as k
|
||||
from lilac.pkglog
|
||||
) as w where k = 1 order by ts desc",
|
||||
|
@ -190,7 +190,7 @@ async fn get_pkg(
|
|||
let conn = db.get().await.unwrap();
|
||||
let rows = conn
|
||||
.query(
|
||||
"select ts, pkgbase, COALESCE(pkg_version, '') AS pkg_version, elapsed, result, COALESCE(case when elapsed = 0 then 0 else cputime * 100 / elapsed end, -1) AS cpu, COALESCE(round(memory / 1073741824.0, 3), -1) AS memory from lilac.pkglog WHERE pkgbase=$1 order by id desc",
|
||||
"select ts, pkgbase, COALESCE(pkg_version, '') AS pkg_version, elapsed, result, COALESCE(case when elapsed = 0 then 0 else cputime * 100 / elapsed end, -1) AS cpu, COALESCE(memory / 1073741824.0, -1) AS memory from lilac.pkglog WHERE pkgbase=$1 order by id desc",
|
||||
&[&name.to_string()],
|
||||
)
|
||||
.await
|
||||
|
|
Loading…
Add table
Reference in a new issue