use of com.orion.ops.annotation.EventLog in project orion-ops by lijiahangmax.
the class SftpController method transferPackage.
/**
* 传输打包 全部已完成未删除的文件
*/
@RequestMapping("/transfer/{sessionToken}/{packageType}/package")
@EventLog(EventType.SFTP_PACKAGE)
public void transferPackage(@PathVariable("sessionToken") String sessionToken, @PathVariable("packageType") Integer packageType) {
SftpPackageType sftpPackageType = Valid.notNull(SftpPackageType.of(packageType));
sftpService.transferPackage(sessionToken, sftpPackageType);
}
use of com.orion.ops.annotation.EventLog in project orion-ops by lijiahangmax.
the class SystemController method updateSystemOption.
/**
* 修改系统配置项
*/
@RequestMapping("/update-system-option")
@EventLog(EventType.UPDATE_SYSTEM_OPTION)
@RequireRole(RoleType.ADMINISTRATOR)
public HttpWrapper<?> updateSystemOption(@RequestBody SystemOptionRequest request) {
SystemConfigKey key = Valid.notNull(SystemConfigKey.of(request.getOption()));
String value = key.getValue(Valid.notBlank(request.getValue()));
systemService.updateSystemOption(key.getEnv(), value);
return HttpWrapper.ok();
}
use of com.orion.ops.annotation.EventLog in project orion-ops by lijiahangmax.
the class ApplicationReleaseController method auditAppRelease.
/**
* 发布审核
*/
@RequestMapping("/audit")
@RequireRole(RoleType.ADMINISTRATOR)
@EventLog(EventType.AUDIT_RELEASE)
public Integer auditAppRelease(@RequestBody ApplicationReleaseAuditRequest request) {
Valid.notNull(request.getId());
AuditStatus status = Valid.notNull(AuditStatus.of(request.getStatus()));
if (AuditStatus.REJECT.equals(status)) {
Valid.notBlank(request.getReason());
}
return applicationReleaseService.auditAppRelease(request);
}
use of com.orion.ops.annotation.EventLog in project orion-ops by lijiahangmax.
the class ApplicationReleaseController method setTimedRelease.
/**
* 设置定时发布
*/
@RequestMapping("/set-timed")
@EventLog(EventType.SET_TIMED_RELEASE)
public HttpWrapper<?> setTimedRelease(@RequestBody ApplicationReleaseRequest request) {
Long id = Valid.notNull(request.getId());
Date timedReleaseTime = Valid.notNull(request.getTimedReleaseTime());
Valid.isTrue(timedReleaseTime.compareTo(new Date()) > 0, MessageConst.TIMED_GREATER_THAN_NOW);
applicationReleaseService.setTimedRelease(id, timedReleaseTime);
return HttpWrapper.ok();
}
use of com.orion.ops.annotation.EventLog in project orion-ops by lijiahangmax.
the class ApplicationVcsController method addAppVcs.
/**
* 添加版本仓库
*/
@RequestMapping("/add")
@EventLog(EventType.ADD_VCS)
public Long addAppVcs(@RequestBody ApplicationVcsRequest request) {
Valid.allNotBlank(request.getName(), request.getUrl());
VcsAuthType authType = Valid.notNull(VcsAuthType.of(request.getAuthType()));
if (VcsAuthType.TOKEN.equals(authType)) {
Valid.notNull(VcsTokenType.of(request.getTokenType()));
Valid.notBlank(request.getPrivateToken());
}
return applicationVcsService.addAppVcs(request);
}
Aggregations