minor fixes
This commit is contained in:
parent
79ba8313f7
commit
4f27a39b68
2 changed files with 8 additions and 6 deletions
|
@ -64,12 +64,14 @@ public class GraphsController extends AbstractController implements GraphsApi {
|
|||
@Override
|
||||
public Mono<ResponseEntity<GraphDescriptionsDTO>> getGraphsList(String clusterName,
|
||||
ServerWebExchange exchange) {
|
||||
var context = AccessContext.builder()
|
||||
.cluster(clusterName)
|
||||
.operationName("getGraphsList")
|
||||
.build();
|
||||
|
||||
var graphs = graphsService.getGraphs(getCluster(clusterName));
|
||||
return Mono.just(
|
||||
ResponseEntity.ok(
|
||||
new GraphDescriptionsDTO().graphs(graphs.map(this::map).toList())
|
||||
)
|
||||
);
|
||||
return accessControlService.validateAccess(context).then(
|
||||
Mono.just(ResponseEntity.ok(new GraphDescriptionsDTO().graphs(graphs.map(this::map).toList()))));
|
||||
}
|
||||
|
||||
private GraphDescriptionDTO map(GraphDescription graph) {
|
||||
|
|
|
@ -42,7 +42,7 @@ public interface MetricsSink {
|
|||
return compoundSink(sinks);
|
||||
}
|
||||
|
||||
static MetricsSink compoundSink(List<MetricsSink> sinks) {
|
||||
private static MetricsSink compoundSink(List<MetricsSink> sinks) {
|
||||
return metricsStream -> {
|
||||
var materialized = metricsStream.toList();
|
||||
return Flux.fromIterable(sinks)
|
||||
|
|
Loading…
Add table
Reference in a new issue