mirror of
https://github.com/JustKato/drive-health.git
synced 2026-03-04 16:39:45 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92baa56a1c | |||
| 4c877e7162 |
@@ -7,5 +7,6 @@ MAX_HISTORY_AGE=2592000
|
|||||||
# The ip:port to listen to for the application
|
# The ip:port to listen to for the application
|
||||||
LISTEN=":8080"
|
LISTEN=":8080"
|
||||||
|
|
||||||
# Basic Security
|
# Basic Security, these are required to view the data
|
||||||
ACCESS_PASSWORD=
|
IDENTITY_USERNAME=admin
|
||||||
|
IDENTITY_PASSWORD=admin
|
||||||
@@ -42,7 +42,7 @@ func GetSystemHardDrives(db *gorm.DB, olderThan *time.Time, newerThan *time.Time
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter out nvme drives (M.2)
|
// Filter out nvme drives (M.2)
|
||||||
if cols[1] != "nvme" && cols[5] != "Device" && cols[1] != "usb" {
|
if cols[1] != "usb" {
|
||||||
hd := &HardDrive{
|
hd := &HardDrive{
|
||||||
Name: cols[0],
|
Name: cols[0],
|
||||||
Transport: cols[1],
|
Transport: cols[1],
|
||||||
|
|||||||
@@ -4,9 +4,10 @@
|
|||||||
--bg0: #202327;
|
--bg0: #202327;
|
||||||
--bg1: #282d33;
|
--bg1: #282d33;
|
||||||
--bg2: #31373f;
|
--bg2: #31373f;
|
||||||
|
--bg3: #3e4248;
|
||||||
|
|
||||||
--fg0: #bbc0ca;
|
--fg0: #bbc0ca;
|
||||||
--fg0: #bbc0ca;
|
--fg1: #434c56;
|
||||||
|
|
||||||
--acc: #bbc0ca;
|
--acc: #bbc0ca;
|
||||||
}
|
}
|
||||||
@@ -21,7 +22,6 @@ html, body {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vw;
|
|
||||||
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
@@ -69,3 +69,11 @@ table thead tr {
|
|||||||
.graph-image {
|
.graph-image {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.disk-graph-entry {
|
||||||
|
background-color: var(--bg3);
|
||||||
|
|
||||||
|
border-radius: 8px;
|
||||||
|
|
||||||
|
padding: .3rem .5rem;
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<title>Drive Health Dashboard</title>
|
<title>Drive Health Dashboard</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container bordered">
|
||||||
|
|
||||||
<div class="container-titlebar">
|
<div class="container-titlebar">
|
||||||
<div class="pad">
|
<div class="pad">
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container bordered">
|
||||||
|
|
||||||
<div class="container-titlebar">
|
<div class="container-titlebar">
|
||||||
<div class="pad">
|
<div class="pad">
|
||||||
@@ -68,11 +68,13 @@
|
|||||||
<div class="pad">
|
<div class="pad">
|
||||||
{{ if len .drives }}
|
{{ if len .drives }}
|
||||||
{{ range .drives }}
|
{{ range .drives }}
|
||||||
<div id="disk-temp-{{ .ID }}">
|
<div class="disk-graph-entry bordered" id="disk-temp-{{ .ID }}">
|
||||||
|
<h4>{{.Name}}:{{.Serial}} [{{.Size}}]</h4>
|
||||||
<a href="/api/v1/disks/{{.ID}}/chart" target="_blank">
|
<a href="/api/v1/disks/{{.ID}}/chart" target="_blank">
|
||||||
<img class="graph-image" src="/api/v1/disks/{{.ID}}/chart" alt="{{ .Model }} Image">
|
<img class="graph-image" src="/api/v1/disks/{{.ID}}/chart" alt="{{ .Model }} Image">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<p>No hard drives found.</p>
|
<p>No hard drives found.</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user