提交 5205800f 编写于 作者: lakernote's avatar lakernote

(update)[整体](nginxui功能新增)

上级 80b9d289
......@@ -24,10 +24,8 @@ import org.springframework.web.method.annotation.MethodArgumentTypeMismatchExcep
import org.springframework.web.multipart.MaxUploadSizeExceededException;
import org.springframework.web.servlet.NoHandlerFoundException;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolationException;
import javax.xml.bind.ValidationException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -139,9 +137,8 @@ public class GlobalExceptionHandler {
}
@ExceptionHandler(SaTokenException.class)
public Response handleMaxSizeException(SaTokenException e, HttpServletResponse response) throws IOException {
log.info(HttpServletRequestUtil.getAllRequestInfo());
log.error(e.getMessage());
public Response handleMaxSizeException(SaTokenException e) {
log.error("uri:{}, httpMethod:{}, errMsg:{}", HttpServletRequestUtil.getRequestURI(), HttpServletRequestUtil.getRequest().getMethod(), e.getMessage());
return Response.error("403", e.getMessage());
}
......
package com.laker.admin.module.sys.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.RuntimeUtil;
......@@ -50,6 +51,7 @@ public class NginxController {
}
@PostMapping
@SaCheckPermission("nginx.update")
public Response update(@RequestBody NginxQo nginxQo) {
if (StrUtil.isBlank(nginxQo.getPath())) {
nginxQo.setPath(lakerConfig.getNginx().getConfPath());
......@@ -60,6 +62,7 @@ public class NginxController {
}
@PostMapping("/check")
@SaCheckPermission("nginx.check")
public Response check(@RequestBody NginxQo nginxQo) {
if (StrUtil.isBlank(nginxQo.getPath())) {
nginxQo.setPath(lakerConfig.getNginx().getConfPath());
......@@ -69,6 +72,7 @@ public class NginxController {
}
@PostMapping("/reload")
@SaCheckPermission("nginx.reload")
public Response reload(@RequestBody NginxQo nginxQo) {
if (StrUtil.isBlank(nginxQo.getPath())) {
nginxQo.setPath(lakerConfig.getNginx().getConfPath());
......@@ -78,6 +82,7 @@ public class NginxController {
}
@PostMapping("/start")
@SaCheckPermission("nginx.start")
public Response start(@RequestBody NginxQo nginxQo) {
if (StrUtil.isBlank(nginxQo.getPath())) {
nginxQo.setPath(lakerConfig.getNginx().getConfPath());
......@@ -87,6 +92,7 @@ public class NginxController {
}
@PostMapping("/stop")
@SaCheckPermission("nginx.stop")
public Response stop() {
String res = RuntimeUtil.execForStr("nginx -s quit");
return Response.ok(res);
......
......@@ -79,7 +79,7 @@
{
icon: 2,
time: 2000,
area: ['220px', '70px']
area: ['250px', '70px']
}
);
}
......@@ -107,7 +107,7 @@
{
icon: 2,
time: 2000,
area: ['220px', '70px']
area: ['250px', '70px']
}
);
}
......@@ -134,7 +134,7 @@
{
icon: 2,
time: 2000,
area: ['220px', '70px']
area: ['250px', '70px']
}
);
}
......@@ -162,7 +162,7 @@
{
icon: 2,
time: 2000,
area: ['220px', '70px']
area: ['250px', '70px']
}
);
}
......@@ -193,7 +193,7 @@
{
icon: 2,
time: 2000,
area: ['220px', '70px']
area: ['250px', '70px']
}
);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册