package cn.reghao.autodop.dmaster.sys.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

/**
 * @author reghao
 * @date 2021-04-04 21:24:18
 */
@Api(tags = "日志页面")
@RequestMapping("/sys/log")
@Controller
public class SysLogPageController {
    @ApiOperation(value = "运行日志页面")
    @GetMapping("/runtime")
    public String runtimeLogPage(Model model) {
        return "/sys/log/runtime";
    }

    @GetMapping("/runtime/detail/{machineId}/{appId}")
    public String runtimeLogDeatilPage(@PathVariable("machineId") String machineId,
                                       @PathVariable("appId") String appId,
                                       Model model) {
        return "/sys/log/runtimeinfo";
    }

    @GetMapping("/runtime/detail/{machineId}/{appId}/{yearMonthDay}")
    public String apRruntimeLogDeatilPage(@PathVariable("machineId") String machineId,
                                       @PathVariable("appId") String appId,
                                       @PathVariable("yearMonthDay") String yearMonthDay,
                                       Model model) {
        return "/sys/log/runtimedetail";
    }

    @ApiOperation(value = "访问日志页面")
    @GetMapping("/access")
    public String accessLogPage(Model model) {
        return "/sys/log/access";
    }
}
