|
|
|
@ -120,7 +120,7 @@ public class DashboardController extends BaseController { |
|
|
|
"Used to adjust view of the dashboards according to the difference between browser and server time.") |
|
|
|
@PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')") |
|
|
|
@GetMapping(value = "/dashboard/serverTime") |
|
|
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", examples = @ExampleObject(value = "1636023857137"))) |
|
|
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(type = "integer", format = "int64", example = "1636023857137"))) |
|
|
|
public long getServerTime() { |
|
|
|
return System.currentTimeMillis(); |
|
|
|
} |
|
|
|
@ -132,7 +132,7 @@ public class DashboardController extends BaseController { |
|
|
|
"The actual value of the limit is configurable in the system configuration file.") |
|
|
|
@PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')") |
|
|
|
@GetMapping(value = "/dashboard/maxDatapointsLimit") |
|
|
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", examples = @ExampleObject(value = "5000"))) |
|
|
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(type = "integer", format = "int64", example = "1636023857137"))) |
|
|
|
public long getMaxDatapointsLimit() { |
|
|
|
return maxDatapointsLimit; |
|
|
|
} |
|
|
|
@ -177,6 +177,8 @@ public class DashboardController extends BaseController { |
|
|
|
"Referencing non-existing dashboard Id will cause 'Not Found' error. " + |
|
|
|
"Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. " + |
|
|
|
TENANT_AUTHORITY_PARAGRAPH) |
|
|
|
@ApiResponse(responseCode = "200", description = "OK", |
|
|
|
content = @Content(schema = @Schema(implementation = Dashboard.class))) |
|
|
|
@PreAuthorize("hasAuthority('TENANT_ADMIN')") |
|
|
|
@PostMapping(value = "/dashboard") |
|
|
|
public void saveDashboard(@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "A JSON value representing the dashboard.") |
|
|
|
|