Skip to content

Instantly share code, notes, and snippets.

@kort3x
Created December 22, 2017 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kort3x/4a68d125b6ce209d3097b05c8594b6ad to your computer and use it in GitHub Desktop.
Save kort3x/4a68d125b6ce209d3097b05c8594b6ad to your computer and use it in GitHub Desktop.
New-UDRow {
New-UDColumn -Size 6 -Content {
$Repo = @(
@{Space = "free"; Count = (Invoke-RestMethod -headers @{Authorization = "Bearer <token> "} -method GET -uri "https://172.16.221.200:1281/v2/backupRepositories/2").freeSpace}
@{Space = "used"; Count = (Invoke-RestMethod -headers @{Authorization = "Bearer <token> "} -method GET -uri "https://172.16.221.200:1281/v2/backupRepositories/2").usedSpace} # dont know if this a valid request
)
New-UDChart -Title "SBKP1-VEEAM1 Repo Space" -Type Doughnut -Endpoint {
$Repo | New-UDChartDataset -DataProperty Count -Label "GB" -BackgroundColor "#42f44e" -HoverBackgroundColor "#42f44e"
} -Options @{cutoutPercentage = 0}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment