Skip to content

Commit 6ad63e4

Browse files
authored
Add missing volumePerformance/spark/all endpoint (#434)
1 parent ed00e4e commit 6ad63e4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Opserver.Web/Controllers/GraphController.Spark.cs

+12
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@ public async Task<ActionResult> VolumeSpark(string direction, string id, string
167167
return SparkSVG(points, Convert.ToInt64(points.Max(getter)), p => getter(p));
168168
}
169169

170+
[OnlyAllow(DashboardRoles.Viewer)]
171+
[ResponseCache(Duration = SparkGraphDuration, Location = ResponseCacheLocation.Client)]
172+
[Route("graph/volumePerformance/spark/all"), AlsoAllow(Roles.InternalRequest)]
173+
public Task<ActionResult> VolumeSparkSvgAll()
174+
{
175+
return SparkSvgAll(
176+
"Volume",
177+
getPoints: n => n.GetVolumePerformanceUtilization(SparkStart, null, SparkPoints),
178+
getMax: (_, points) => Convert.ToInt64(points.Max(p => p.Value + p.BottomValue).GetValueOrDefault()),
179+
getVal: p => (p.Value + p.BottomValue).GetValueOrDefault());
180+
}
181+
170182
[OnlyAllow(SQLRoles.Viewer)]
171183
[ResponseCache(Duration = SparkGraphDuration, VaryByQueryKeys = new string[] { "node" }, Location = ResponseCacheLocation.Client)]
172184
[Route("graph/sql/cpu/spark")]

0 commit comments

Comments
 (0)