mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: error accessing homepage when not logged in
This commit is contained in:
parent
12e2f83764
commit
7437ad6067
@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import tech.powerjob.common.OmsConstant;
|
import tech.powerjob.common.OmsConstant;
|
||||||
import tech.powerjob.common.enums.InstanceStatus;
|
import tech.powerjob.common.enums.InstanceStatus;
|
||||||
import tech.powerjob.common.response.ResultDTO;
|
import tech.powerjob.common.response.ResultDTO;
|
||||||
|
import tech.powerjob.server.auth.Permission;
|
||||||
|
import tech.powerjob.server.auth.RoleScope;
|
||||||
|
import tech.powerjob.server.auth.interceptor.ApiPermission;
|
||||||
import tech.powerjob.server.common.constants.SwitchableStatus;
|
import tech.powerjob.server.common.constants.SwitchableStatus;
|
||||||
import tech.powerjob.server.common.module.WorkerInfo;
|
import tech.powerjob.server.common.module.WorkerInfo;
|
||||||
import tech.powerjob.server.persistence.remote.model.AppInfoDO;
|
import tech.powerjob.server.persistence.remote.model.AppInfoDO;
|
||||||
@ -50,6 +53,7 @@ public class SystemInfoController {
|
|||||||
private final WorkerClusterQueryService workerClusterQueryService;
|
private final WorkerClusterQueryService workerClusterQueryService;
|
||||||
|
|
||||||
@GetMapping("/listWorker")
|
@GetMapping("/listWorker")
|
||||||
|
@ApiPermission(name = "System-ListWorker", roleScope = RoleScope.APP, requiredPermission = Permission.READ)
|
||||||
public ResultDTO<List<WorkerStatusVO>> listWorker(Long appId) {
|
public ResultDTO<List<WorkerStatusVO>> listWorker(Long appId) {
|
||||||
|
|
||||||
List<WorkerInfo> workerInfos = workerClusterQueryService.getAllWorkers(appId);
|
List<WorkerInfo> workerInfos = workerClusterQueryService.getAllWorkers(appId);
|
||||||
@ -57,6 +61,7 @@ public class SystemInfoController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/overview")
|
@GetMapping("/overview")
|
||||||
|
@ApiPermission(name = "System-Overview", roleScope = RoleScope.APP, requiredPermission = Permission.READ)
|
||||||
public ResultDTO<SystemOverviewVO> getSystemOverview(Long appId) {
|
public ResultDTO<SystemOverviewVO> getSystemOverview(Long appId) {
|
||||||
|
|
||||||
SystemOverviewVO overview = new SystemOverviewVO();
|
SystemOverviewVO overview = new SystemOverviewVO();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user