use of org.wso2.ei.dashboard.core.rest.model.LogConfigs in project product-mi-tooling by wso2.
the class GroupsApi method updateLogLevelByNodeId.
@PATCH
@Path("/{group-id}/log-configs/nodes/{node-id}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Operation(summary = "Update log level by nodeId", description = "", tags = { "logConfigs" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Logger update status", content = @Content(schema = @Schema(implementation = SuccessStatus.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response updateLogLevelByNodeId(@PathParam("group-id") @Parameter(description = "Group ID of the node") String groupId, @PathParam("node-id") @Parameter(description = "NodeId") String nodeId, @Valid LogConfigUpdateRequest request) throws ManagementApiException {
LogConfigDelegate logConfigDelegate = new LogConfigDelegate();
Ack ack = logConfigDelegate.updateLogLevelByNodeId(groupId, nodeId, request);
return Response.ok().entity(ack).build();
}
use of org.wso2.ei.dashboard.core.rest.model.LogConfigs in project product-mi-tooling by wso2.
the class GroupsApi method getLogConfigs.
@GET
@Path("/{group-id}/log-configs")
@Produces({ "application/json" })
@Operation(summary = "Get log configs", description = "", tags = { "logConfigs" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of log configs", content = @Content(schema = @Schema(implementation = LogConfigs.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response getLogConfigs(@PathParam("group-id") @Parameter(description = "Group ID of the node") String groupId) throws ManagementApiException {
LogConfigDelegate logConfigDelegate = new LogConfigDelegate();
LogConfigs logConfigs = logConfigDelegate.fetchLogConfigs(groupId);
Response.ResponseBuilder responseBuilder = Response.ok().entity(logConfigs);
HttpUtils.setHeaders(responseBuilder);
return responseBuilder.build();
}
use of org.wso2.ei.dashboard.core.rest.model.LogConfigs in project product-mi-tooling by wso2.
the class GroupsApi method addLogger.
@POST
@Path("/{group-id}/log-configs")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Operation(summary = "Add logger", description = "", tags = { "logConfigs" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Logger insert status", content = @Content(schema = @Schema(implementation = SuccessStatus.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response addLogger(@PathParam("group-id") @Parameter(description = "Group ID of the node") String groupId, @Valid LogConfigAddRequest request) throws ManagementApiException {
LogConfigDelegate logConfigDelegate = new LogConfigDelegate();
Ack ack = logConfigDelegate.addLogger(groupId, request);
Response.ResponseBuilder responseBuilder = Response.ok().entity(ack);
HttpUtils.setHeaders(responseBuilder);
return responseBuilder.build();
}
use of org.wso2.ei.dashboard.core.rest.model.LogConfigs in project product-mi-tooling by wso2.
the class GroupsApi method getLogConfigsByNodeIds.
@GET
@Path("/{group-id}/log-configs/nodes/{node-id}")
@Produces({ "application/json" })
@Operation(summary = "Get log configs by node id", description = "", tags = { "logConfigs" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of log configs in provided node id", content = @Content(schema = @Schema(implementation = LogConfigs.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response getLogConfigsByNodeIds(@PathParam("group-id") @Parameter(description = "Group ID of the node") String groupId, @PathParam("node-id") @Parameter(description = "NodeId") String nodeId) throws ManagementApiException {
LogConfigDelegate logConfigDelegate = new LogConfigDelegate();
LogConfigs logConfigs = logConfigDelegate.fetchLogConfigsByNodeId(groupId, nodeId);
Response.ResponseBuilder responseBuilder = Response.ok().entity(logConfigs);
HttpUtils.setHeaders(responseBuilder);
return responseBuilder.build();
}
use of org.wso2.ei.dashboard.core.rest.model.LogConfigs in project product-mi-tooling by wso2.
the class LogConfigDelegate method createLogConfigsObject.
private LogConfigs createLogConfigsObject(JsonArray logConfigsArray) {
LogConfigs logConfigs = new LogConfigs();
for (JsonElement element : logConfigsArray) {
LogConfigsInner logConfigsInner = createLogConfig(element);
logConfigs.add(logConfigsInner);
}
return logConfigs;
}
Aggregations