Skip to content

Commit

Permalink
fix(all): args and disk space chart
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Sep 26, 2023
1 parent f4071dc commit 6ee3a86
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Run the binary via terminal to view a full list of options:
./procchi -p 7766 -u test -k test
# (If `-u` and `-k` are not specified, Procchi will prompt for credentials before deploying the web server, which is reccommended)

# Start Procchi on the default port (6565), and have it retain only 50 elements in metric history for each metric
./procchi -h 50
# Start Procchi on the default port (6565), and have it retain a max of 50 elements in metric history for each metric
./procchi -m 50

# Start Procchi configured to update every 10 seconds (instead of the default of 5 seconds)
./procchi -r 10
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct Args {
port: u16,

/// Max amount of history to keep at once for each metric
#[arg(short, long, default_value = "100")]
#[arg(short = 'm', long, default_value = "100")]
history_max: usize,

/// Rate (in seconds) at which to update the resource monitor
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/pages/Home/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ export function DataHome(props: Props) {
xLabel="Time"
yLabel="Disk Usage (GB)"
min={0}
max={
// get the largest disk size
Math.max(
...Object.keys(diskData).map((disk) => {
return diskData[disk][0].total
})
) / 1024 / 1024 / 1024
}
datasets={Object.keys(diskData).map((disk, i) => {
return {
data: diskData[disk].map((v) => {
Expand Down

0 comments on commit 6ee3a86

Please sign in to comment.