Skip to content

Commit

Permalink
Add missing volumePerformance/spark/all endpoint (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentOates authored May 4, 2024
1 parent ed00e4e commit 6ad63e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Opserver.Web/Controllers/GraphController.Spark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ public async Task<ActionResult> VolumeSpark(string direction, string id, string
return SparkSVG(points, Convert.ToInt64(points.Max(getter)), p => getter(p));
}

[OnlyAllow(DashboardRoles.Viewer)]
[ResponseCache(Duration = SparkGraphDuration, Location = ResponseCacheLocation.Client)]
[Route("graph/volumePerformance/spark/all"), AlsoAllow(Roles.InternalRequest)]
public Task<ActionResult> VolumeSparkSvgAll()
{
return SparkSvgAll(
"Volume",
getPoints: n => n.GetVolumePerformanceUtilization(SparkStart, null, SparkPoints),
getMax: (_, points) => Convert.ToInt64(points.Max(p => p.Value + p.BottomValue).GetValueOrDefault()),
getVal: p => (p.Value + p.BottomValue).GetValueOrDefault());
}

[OnlyAllow(SQLRoles.Viewer)]
[ResponseCache(Duration = SparkGraphDuration, VaryByQueryKeys = new string[] { "node" }, Location = ResponseCacheLocation.Client)]
[Route("graph/sql/cpu/spark")]
Expand Down

0 comments on commit 6ad63e4

Please sign in to comment.