package com.starry.admin.modules.monitor.controller;


import com.starry.admin.modules.monitor.entity.Server;
import com.starry.common.result.R;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author huoqiang
 * 服务器监控
 * @since 2022/10/17
 */
@RestController
@RequestMapping("/monitor/server")
public class ServerController {

    @PreAuthorize("@customSs.hasPermission('monitor:server:list')")
    @GetMapping()
    public R getInfo() throws Exception {
        Server server = new Server();
        server.setServeInfo();
        return R.ok(server);
    }
}
