diff --git a/main_vm/build/classes/java/main/com/icomsys/main_vm/biz/common/login/controller/LoginController.class b/main_vm/build/classes/java/main/com/icomsys/main_vm/biz/common/login/controller/LoginController.class index 155f71c..476a923 100644 Binary files a/main_vm/build/classes/java/main/com/icomsys/main_vm/biz/common/login/controller/LoginController.class and b/main_vm/build/classes/java/main/com/icomsys/main_vm/biz/common/login/controller/LoginController.class differ diff --git a/main_vm/build/classes/java/main/com/icomsys/main_vm/biz/common/login/service/LoginService.class b/main_vm/build/classes/java/main/com/icomsys/main_vm/biz/common/login/service/LoginService.class index bb44c68..3af5769 100644 Binary files a/main_vm/build/classes/java/main/com/icomsys/main_vm/biz/common/login/service/LoginService.class and b/main_vm/build/classes/java/main/com/icomsys/main_vm/biz/common/login/service/LoginService.class differ diff --git a/main_vm/build/classes/java/main/com/icomsys/main_vm/common/filter/LoginFilter.class b/main_vm/build/classes/java/main/com/icomsys/main_vm/common/filter/LoginFilter.class index 1db6fdb..4723d8d 100644 Binary files a/main_vm/build/classes/java/main/com/icomsys/main_vm/common/filter/LoginFilter.class and b/main_vm/build/classes/java/main/com/icomsys/main_vm/common/filter/LoginFilter.class differ diff --git a/main_vm/build/tmp/compileJava/previous-compilation-data.bin b/main_vm/build/tmp/compileJava/previous-compilation-data.bin index 791fd14..e8f213c 100644 Binary files a/main_vm/build/tmp/compileJava/previous-compilation-data.bin and b/main_vm/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/TokenProvider.java b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/TokenProvider.java index 71b0f41..5ef21c0 100644 --- a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/TokenProvider.java +++ b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/TokenProvider.java @@ -4,12 +4,15 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.google.gson.Gson; +import com.google.gson.JsonObject; import com.icomsys.main_vm.db.jpa.entity.system.TbBotUser; import com.icomsys.main_vm.db.jpa.repo.system.TbUserAuthGroupRepo; import io.jsonwebtoken.*; import io.jsonwebtoken.io.Decoders; import io.jsonwebtoken.security.Keys; import lombok.extern.slf4j.Slf4j; +import org.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; @@ -21,6 +24,7 @@ import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletResponse; import java.security.Key; import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.Arrays; import java.util.Collection; @@ -35,7 +39,6 @@ public class TokenProvider { private static final long ACCESS_TOKEN_EXPIRE_TIME = 20 * 60 * 1000L; private static final long REFRESH_TOKEN_EXPIRE_TIME = 24 * 60 * 60 * 1000L; - private final Key key; public TokenProvider(@Value("${spring.jwt.secret}") String secretKey, TbUserAuthGroupRepo tbUserAuthGroupRepo) { @@ -44,11 +47,11 @@ public class TokenProvider { this.key = Keys.hmacShaKeyFor(keyBytes); } - public String generateToken(Authentication authentication, TbBotUser user) throws JsonProcessingException { + public String generateToken(TbBotUser user) throws JsonProcessingException { // 권한 가져오기 - String authorities = authentication.getAuthorities().stream() - .map(GrantedAuthority::getAuthority) - .collect(Collectors.joining(",")); +// String authorities = authentication.getAuthorities().stream() +// .map(GrantedAuthority::getAuthority) +// .collect(Collectors.joining(",")); long now = (new Date()).getTime(); // Access Token 생성 @@ -56,51 +59,52 @@ public class TokenProvider { Date accessTokenExpiresIn = new Date(now + ACCESS_TOKEN_EXPIRE_TIME); // Todo: Access Token 만료 기간 설정 파일 추가 Claims claims = Jwts.claims() - .setSubject(authentication.getName()) - .setExpiration(accessTokenExpiresIn); - - claims.put("auth", authorities); - - ObjectMapper mapper = new ObjectMapper(); + .setSubject(user.getUserName()) + .setExpiration(accessTokenExpiresIn); +// claims.put("auth", authorities); +// ObjectMapper mapper = new ObjectMapper(); // claims.put("UserVO", mapper.registerModule(new JavaTimeModule()).writeValueAsString(user.toUserVO())); - try { - JavaTimeModule javaTimeModule = new JavaTimeModule(); - - LocalDateTimeSerializer localDateTimeSerializer = new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); - - javaTimeModule.addSerializer(LocalDateTime.class, localDateTimeSerializer); - - // claims.put("UserVO", mapper.registerModule(javaTimeModule).readValue(user.toUserVO(), UserVo.class)); - claims.put("UserVO", mapper.registerModule(javaTimeModule).writeValueAsString(user.toUserVO())); - // claims.put("PolicyList", tbUserAuthGroupRepo.userPolicyListSelect(user.getUserSeq(), user.getLastUseServiceGroup())); - } - catch (Exception e) { - e.printStackTrace(); - } - - String accessToken = Jwts.builder() - .setSubject(authentication.getName()) - .setClaims(claims) - .setExpiration(accessTokenExpiresIn) - .signWith(key, SignatureAlgorithm.HS256) - .compact(); - +// try { +// JavaTimeModule javaTimeModule = new JavaTimeModule(); +// LocalDateTimeSerializer localDateTimeSerializer = new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); +// javaTimeModule.addSerializer(LocalDateTime.class, localDateTimeSerializer); +// // claims.put("UserVO", mapper.registerModule(javaTimeModule).readValue(user.toUserVO(), UserVo.class)); +// claims.put("UserVO", mapper.registerModule(javaTimeModule).writeValueAsString(user.toUserVO())); +// // claims.put("PolicyList", tbUserAuthGroupRepo.userPolicyListSelect(user.getUserSeq(), user.getLastUseServiceGroup())); +// } +// +// catch (Exception e) { +// e.printStackTrace(); +// } +// claims.put("UserVO", user.toUserVO()); + + String accessToken = createAccessToken(user, accessTokenExpiresIn); // Refresh Token 생성 - String refreshToken = Jwts.builder() - .setExpiration(new Date(now + REFRESH_TOKEN_EXPIRE_TIME)) // Todo: Refresh Token 만료 기간 설정 파일에 추가 - .signWith(key, SignatureAlgorithm.HS256) - .compact(); - - CinnamonToken token = CinnamonToken.builder() - .grantType("Bearer") - .accessToken(accessToken) - .refreshToken(refreshToken) - .build(); + String refreshToken = createRefreshToken(accessTokenExpiresIn); return accessToken; } + private String createAccessToken(TbBotUser user, Date accessTokenExpiresIn) { + return Jwts.builder() + .setSubject(user.getUserName()) + .setClaims(Jwts.claims() + .setSubject(user.getUserName()) + .setExpiration(accessTokenExpiresIn) + ).claim("UserVO", new Gson().toJson(user.toUserVO())) + .setExpiration(accessTokenExpiresIn) + .signWith(key, SignatureAlgorithm.HS256) + .compact(); + } + + private String createRefreshToken(Date accessTokenExpiresIn) { + return Jwts.builder() + .setExpiration(accessTokenExpiresIn) // Todo: Refresh Token 만료 기간 설정 파일에 추가 + .signWith(key, SignatureAlgorithm.HS256) + .compact(); + } + // JWT 토큰을 복호화하여 토큰에 들어있는 정보를 꺼내는 메서드 public Authentication getAuthentication(String accessToken) { // 토큰 복호화 @@ -116,8 +120,8 @@ public class TokenProvider { // 클레임에서 권한 정보 가져오기 Collection authorities = Arrays.stream(claims.get("auth").toString().split(",")) - .map(SimpleGrantedAuthority::new) - .collect(Collectors.toList()); + .map(SimpleGrantedAuthority::new) + .collect(Collectors.toList()); // UserDetails 객체를 만들어서 Authentication 리턴 // UserDetails principal = new User(claims.getSubject(), "", authorities); diff --git a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/controller/LoginController.java b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/controller/LoginController.java index f6ba277..a41adf2 100644 --- a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/controller/LoginController.java +++ b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/controller/LoginController.java @@ -54,12 +54,14 @@ public class LoginController { } @RequestMapping(value = "/adm/main/actionSecurityLogin.do") - public ModelAndView actionSecurityLogin(@Valid LoginReq loginReq, ModelMap model) { + public ModelAndView actionSecurityLogin( +// @Valid LoginReq loginReq, + ModelMap model) { log.info("actionlogin"); // return loginService.LoginValidService(loginReq, model); - String url = loginService.LoginValidService(loginReq, model); - log.info("redi url? - -{}", url); - return new ModelAndView(url); +// String url = loginService.LoginValidService(loginReq, model); +// log.info("redi url? - -{}", url); + return new ModelAndView("layout/main"); } @RequestMapping(value = "/adm/main/actionMain.do") @@ -100,70 +102,6 @@ public class LoginController { loginService.LastUserServiceGroupUpdate(userSeq, updateService); } - /** - * 멀티서치용 oprMngCode - * 내가가지고있는 서비스그룹을보여줌 - * - * @param serviceType - * @return - * @throws CustomNoSuchFieldException - */ - @GetMapping("/adm/menu/oprmng") - @ResponseBody - public List getOprmngCode(@RequestParam(name = "serviceType", required = false) String serviceType, - @RequestParam(name = "menuval", required = false) String menuval) throws CustomNoSuchFieldException { - if (loginService.getUserVo() == null) { - throw new CustomNoSuchFieldException(); - } - log.info("getOPR INIT"); - return loginService.getOprmngCode(serviceType, menuval); - } - - /** - * 어드민용 oprMngCode - * 서비스그룹생성용 - * 해당서비스그룹의 코드를 보여줌 - * - * @param serviceType - * @return - * @throws CustomNoSuchFieldException - */ - @GetMapping("/adm/menu/oprmng/admin") - @ResponseBody - public List getOprmngCodeAdmin(@RequestParam(name = "serviceType", required = false) String serviceType) throws CustomNoSuchFieldException { - if (loginService.getUserVo() == null) { - throw new CustomNoSuchFieldException(); - } - log.info("getOPR INIT"); - return loginService.getOprmngCodeAdmin(serviceType); - } - - @GetMapping("/adm/menu/main/oprmng") - @ResponseBody - public ResponseEntity getMainOprmngCode() throws CustomNoSuchFieldException, NoSuchFieldException { - //List - - if (httpServletRequest.getSession() == null) { - log.info("SESSION NULL"); - return ResponseEntity.badRequest().build(); - } - if (loginService.getUserVo() == null) { - log.info("getMainOprmngCode NULL"); - return ResponseEntity.badRequest().build(); - } - log.info("getOPR INIT"); - return ResponseEntity.ok(loginService.getMainOprmngCode()); - } - - @PostMapping("/adm/menu/main/oprmng/update") - @ResponseBody - public void getMainOprmngCodeUpdate(@RequestBody MainOprReq dto) throws CustomNoSuchFieldException, CustomNotFoundException { - if (loginService.getUserVo() == null) { - throw new CustomNoSuchFieldException(); - } - log.info("getOPR INIT - {}", new Gson().toJson(dto)); - loginService.getMainOprmngCodeUpdate(dto); - } @GetMapping("/adm/menu/jstree/policy/parent") @@ -185,16 +123,8 @@ public class LoginController { return fileService.PdfDownload(name); } - @GetMapping("/adm/main/uv") - @ResponseBody - public UserVo getUserVo() throws CustomNoSuchFieldException { - if (loginService.getUserVo() == null) { - throw new CustomNoSuchFieldException(); - } else { - return loginService.getUserVo(); - } - } -} + +} diff --git a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/controller/TokenController.java b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/controller/TokenController.java new file mode 100644 index 0000000..2839367 --- /dev/null +++ b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/controller/TokenController.java @@ -0,0 +1,114 @@ +package com.icomsys.main_vm.biz.common.login.controller; + +import com.google.gson.Gson; +import com.icomsys.main_vm.biz.advice.excep.CustomNoSuchFieldException; +import com.icomsys.main_vm.biz.advice.excep.CustomNotFoundException; +import com.icomsys.main_vm.biz.common.login.TokenProvider; +import com.icomsys.main_vm.biz.common.login.req.MainOprReq; +import com.icomsys.main_vm.biz.common.login.res.OprmngCodeRes; +import com.icomsys.main_vm.biz.common.login.res.UserVo; +import com.icomsys.main_vm.biz.common.login.service.LoginService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@RestController +@RequiredArgsConstructor +@Slf4j +@RequestMapping("/api/v1") +public class TokenController { + + private final TokenProvider tokenProvider; + private final LoginService loginService; + private final HttpServletRequest httpServletRequest; + + @GetMapping("/token/check") + public String checkToken(){ +// return tokenProvider.parseClaims( +// httpServletRequest.getHeader("Authorization").split(" ")[1]); + return ""; + } + + @GetMapping("/token/main/oprmng") + @ResponseBody + public ResponseEntity getMainOprmngCode() throws CustomNoSuchFieldException, NoSuchFieldException { + //List + + if (httpServletRequest.getSession() == null) { + log.info("SESSION NULL"); + return ResponseEntity.badRequest().build(); + } + if (loginService.getUserVo() == null) { + log.info("getMainOprmngCode NULL"); + return ResponseEntity.badRequest().build(); + } + log.info("getOPR INIT"); + return ResponseEntity.ok(loginService.getMainOprmngCode()); + } + + @GetMapping("/token/main/uv") + @ResponseBody + public UserVo getUserVo() throws CustomNoSuchFieldException { + if (loginService.getUserVo() == null) { + throw new CustomNoSuchFieldException(); + } else { + return loginService.getUserVo(); + } + } + + + /** + * 멀티서치용 oprMngCode + * 내가가지고있는 서비스그룹을보여줌 + * + * @param serviceType + * @return + * @throws CustomNoSuchFieldException + */ + @GetMapping("/token/menu/oprmng") + @ResponseBody + public List getOprmngCode(@RequestParam(name = "serviceType", required = false) String serviceType, + @RequestParam(name = "menuval", required = false) String menuval) throws CustomNoSuchFieldException { + if (loginService.getUserVo() == null) { + throw new CustomNoSuchFieldException(); + } + log.info("getOPR INIT"); + return loginService.getOprmngCode(serviceType, menuval); + } + + /** + * 어드민용 oprMngCode + * 서비스그룹생성용 + * 해당서비스그룹의 코드를 보여줌 + * + * @param serviceType + * @return + * @throws CustomNoSuchFieldException + */ + @GetMapping("/token/menu/oprmng/admin") + @ResponseBody + public List getOprmngCodeAdmin(@RequestParam(name = "serviceType", required = false) String serviceType) throws CustomNoSuchFieldException { + if (loginService.getUserVo() == null) { + throw new CustomNoSuchFieldException(); + } + log.info("getOPR INIT"); + return loginService.getOprmngCodeAdmin(serviceType); + } + + + + @PostMapping("/token/menu/main/oprmng/update") + @ResponseBody + public void getMainOprmngCodeUpdate(@RequestBody MainOprReq dto) throws CustomNoSuchFieldException, CustomNotFoundException { + if (loginService.getUserVo() == null) { + throw new CustomNoSuchFieldException(); + } + log.info("getOPR INIT - {}", new Gson().toJson(dto)); + loginService.getMainOprmngCodeUpdate(dto); + } + +} diff --git a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/service/LoginService.java b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/service/LoginService.java index 906a8aa..2c79ad6 100644 --- a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/service/LoginService.java +++ b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/login/service/LoginService.java @@ -4,6 +4,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.google.gson.Gson; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonObject; import com.icomsys.main_vm.biz.advice.excep.CustomBadRequestException; import com.icomsys.main_vm.biz.advice.excep.CustomNotFoundException; import com.icomsys.main_vm.biz.common.common.service.LogService; @@ -28,6 +30,8 @@ import com.icomsys.main_vm.db.mybatis.alias.LoginVO; import io.jsonwebtoken.Claims; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.catalina.User; +import org.json.JSONObject; import org.springframework.context.MessageSource; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.http.ResponseEntity; @@ -47,7 +51,10 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -107,6 +114,7 @@ public class LoginService { LoginVO userResult = user.toLoginVO(); // return "forward:/adm/main/actionMain.do"; + // return "layout/adm/common/dashboard"; return "layout/main"; } else { @@ -172,51 +180,10 @@ public class LoginService { } public UserVo getUserVo() { - String payloadJWT = ""; - String accessToken = ""; - - // String bearerToken = httpServletRequest.getHeader("Authorization"); - // - // if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer")) { - // payload = bearerToken.substring(7); - // } - - // todo request header에서 token 값 가져오기 - Cookie[] cookies = httpServletRequest.getCookies(); - - if(cookies!=null){ - for (Cookie c : cookies) { - String name = c.getName(); // 쿠키 이름 가져오기 - String value = c.getValue(); // 쿠키 값 가져오기 - if (name.equals("accessToken")) { - payloadJWT = value.split("[.]")[1]; - accessToken = value; - } - } - } - - Claims claims = tokenProvider.parseClaims(accessToken); - - // Base64.Decoder decoder = Base64.getUrlDecoder(); - // final String payload = new String(decoder.decode(payloadJWT)); - // JsonParser jsonParser = new BasicJsonParser(); - // Map jsonArray = jsonParser.parseMap(payload); - - Gson gson =new Gson(); - Map map =new HashMap(); - // map = gson.fromJson((String) jsonArray.get("UserVO"), map.getClass()); - map = gson.fromJson((String) claims.get("UserVO"), map.getClass()); - - map.put("registDate", map.get("registDate").toString().replace(" ", "T")); - map.put("updateDate", map.get("updateDate").toString().replace(" ", "T")); - - ObjectMapper objectMapper = new ObjectMapper(); - UserVo user = objectMapper.registerModule(new JavaTimeModule()).convertValue(map, UserVo.class); - -// UserVo user = (UserVo) httpServletRequest.getSession().getAttribute(SessionResource.UserVO.getName()); -// if (user == null || user.equals("")) { -// httpServletResponse.setStatus(401); -// } + UserVo user = (UserVo) httpServletRequest.getAttribute("UserVO"); + log.info("get User Vo!!!! - {}", new Gson().toJson((user) )); + log.info("get User Vo!!!! - {}", user.getRegistDate()); + log.info("get User Vo!!!! - {}", user.getUpdateDate()); return user; } @@ -450,11 +417,9 @@ public class LoginService { // 2. 실제 검증 (사용자 비밀번호 체크)이 이루어지는 부분 // authenticate 매서드가 실행될 때 CustomUserDetailsService 에서 만든 loadUserByUsername 메서드가 실행 try { - Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); - +// Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); // 3. 인증 정보를 기반으로 JWT 토큰 생성 - String accessToken = tokenProvider.generateToken(authentication, user); - + String accessToken = tokenProvider.generateToken(user); return accessToken; } catch (JsonProcessingException e) { throw new RuntimeException(e); diff --git a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/view/RcpViewController.java b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/view/RcpViewController.java index a2d7428..4cba9cc 100644 --- a/main_vm/src/main/java/com/icomsys/main_vm/biz/common/view/RcpViewController.java +++ b/main_vm/src/main/java/com/icomsys/main_vm/biz/common/view/RcpViewController.java @@ -1,4 +1,29 @@ package com.icomsys.main_vm.biz.common.view; +import com.icomsys.main_vm.biz.rcp.statistics.dashboard.service.StatisticsDashboardService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + + +@Controller +@RequiredArgsConstructor +@RequestMapping("/view") +@Slf4j public class RcpViewController { + + + private final StatisticsDashboardService statisticsDashboardService; + + @GetMapping("/admin/common/dashboard/manage.do") + public ModelAndView DashboardView() { +// return "/adm/common/dashboard"; + return new ModelAndView("/layout/adm/common/dashboard"); + } + + + } diff --git a/main_vm/src/main/java/com/icomsys/main_vm/common/code/enumresource/MenuResource.java b/main_vm/src/main/java/com/icomsys/main_vm/common/code/enumresource/MenuResource.java index 0172fde..cb0a912 100644 --- a/main_vm/src/main/java/com/icomsys/main_vm/common/code/enumresource/MenuResource.java +++ b/main_vm/src/main/java/com/icomsys/main_vm/common/code/enumresource/MenuResource.java @@ -12,71 +12,71 @@ public enum MenuResource { root("common", 1L, 0L, 1, "대쉬보드", "대쉬보드", "/layout/adm/common/dashboard"), // root("common", 1L, 0L, 1, "대쉬보드", "대쉬보드", "0"), rcpconversation("rcp", 1800000L, 1L, 2, "대화관리", "대화관리", "0"), - rcpconversationintentmanage("rcp", 1800001L, 1800000L, 3, "인텐트관리", "인텐트관리", "/admin/rcp/conversation/intent/manage.do"), - rcpconversationscenariomanage("rcp", 1800002L, 1800000L, 3, "시나리오관리", "시나리오관리", "/admin/rcp/conversation/scenario/manage.do"), - rcpconversationsynonymmanage("rcp", 1800003L, 1800000L, 3, "동의어관리", "동의어관리", "/admin/rcp/conversation/synonym/manage.do"), - rcpconversationsystemEntitymanage("rcp", 1800004L, 1800000L, 3, "시스템엔티티", "시스템엔티티", "/admin/rcp/conversation/systemEntity/manage.do"), - rcpconversationapiNodemanage("rcp", 1800005L, 1800000L, 3, "API노드관리", "API노드관리", "/admin/rcp/conversation/apiNode/manage.do"), - rcpconversationcmmNodemanage("rcp", 1800006L, 1800000L, 3, "COMMON노드관리", "COMMON노드관리", "/admin/rcp/conversation/cmmNode/manage.do"), + rcpconversationintentmanage("rcp", 1800001L, 1800000L, 3, "인텐트관리", "인텐트관리", "/view/admin/rcp/conversation/intent/manage.do"), + rcpconversationscenariomanage("rcp", 1800002L, 1800000L, 3, "시나리오관리", "시나리오관리", "/view/admin/rcp/conversation/scenario/manage.do"), + rcpconversationsynonymmanage("rcp", 1800003L, 1800000L, 3, "동의어관리", "동의어관리", "/view/admin/rcp/conversation/synonym/manage.do"), + rcpconversationsystemEntitymanage("rcp", 1800004L, 1800000L, 3, "시스템엔티티", "시스템엔티티", "/view/admin/rcp/conversation/systemEntity/manage.do"), + rcpconversationapiNodemanage("rcp", 1800005L, 1800000L, 3, "API노드관리", "API노드관리", "/view/admin/rcp/conversation/apiNode/manage.do"), + rcpconversationcmmNodemanage("rcp", 1800006L, 1800000L, 3, "COMMON노드관리", "COMMON노드관리", "/view/admin/rcp/conversation/cmmNode/manage.do"), rcplearningTest("rcp", 1900000L, 1L, 2, "학습및테스트", "학습및테스트", "0"), - rcplearningTestsimulatormanage("rcp", 1900001L, 1900000L, 3, "시뮬레이터", "시뮬레이터", "/admin/rcp/learningTest/simulator/manage.do"), - rcplearningTestinferencemanage("rcp", 1900002L, 1900000L, 3, "의도추론 테스트", "의도추론 테스트", "/admin/rcp/learningTest/inference/manage.do"), - rcplearningTeststttestmanage("rcp", 1900003L, 1900000L, 3, "STT 테스트", "STT 테스트", "/admin/rcp/learningTest/stttest/manage.do"), - rcplearningTestttstestmanage("rcp", 1900004L, 1900000L, 3, "TTS 테스트", "TTS 테스트", "/admin/rcp/learningTest/ttstest/manage.do"), + rcplearningTestsimulatormanage("rcp", 1900001L, 1900000L, 3, "시뮬레이터", "시뮬레이터", "/view/admin/rcp/learningTest/simulator/manage.do"), + rcplearningTestinferencemanage("rcp", 1900002L, 1900000L, 3, "의도추론 테스트", "의도추론 테스트", "/view/admin/rcp/learningTest/inference/manage.do"), + rcplearningTeststttestmanage("rcp", 1900003L, 1900000L, 3, "STT 테스트", "STT 테스트", "/view/admin/rcp/learningTest/stttest/manage.do"), + rcplearningTestttstestmanage("rcp", 1900004L, 1900000L, 3, "TTS 테스트", "TTS 테스트", "/view/admin/rcp/learningTest/ttstest/manage.do"), rcpmonitoring("rcp", 2000000L, 1L, 2, "모니터링", "모니터링", "0"), - rcpmonitoringconsultingmanage("rcp", 2000001L, 2000000L, 3, "응대이력", "응대이력", "/admin/rcp/statistics/monitoring/consulting/manage.do"), - rcpmonitoringconversationMarkmanage("rcp", 2000002L, 2000000L, 3, "대화책갈피", "대화책갈피", "/admin/rcp/statistics/monitoring/conversationMark/manage.do"), - rcpmonitoringintentAnalysismanage("rcp", 2000003L, 2000000L, 3, "인텐트분석관리", "인텐트분석관리", "/admin/rcp/statistics/monitoring/intentAnalysis/manage.do"), - rcpmonitoringoutscenariomanage("rcp", 2000004L, 2000000L, 3, "시나리오이탈노드관리", "시나리오이탈노드관리", "/admin/rcp/statistics/monitoring/outscenario/manage.do"), - rcpmonitoringworkhistorymanage("rcp", 2000005L, 2000000L, 3, "작업이력조회", "작업이력조회", "/admin/rcp/statistics/monitoring/workhistory/manage.do"), - rcpmonitoringaienginemanage("rcp", 2000006L, 2000000L, 3, "AI엔진 트래픽모니터링", "AI엔진 트래픽모니터링", "/admin/rcp/statistics/monitoring/aiengine/manage.do"), + rcpmonitoringconsultingmanage("rcp", 2000001L, 2000000L, 3, "응대이력", "응대이력", "/view/admin/rcp/statistics/monitoring/consulting/manage.do"), + rcpmonitoringconversationMarkmanage("rcp", 2000002L, 2000000L, 3, "대화책갈피", "대화책갈피", "/view/admin/rcp/statistics/monitoring/conversationMark/manage.do"), + rcpmonitoringintentAnalysismanage("rcp", 2000003L, 2000000L, 3, "인텐트분석관리", "인텐트분석관리", "/view/admin/rcp/statistics/monitoring/intentAnalysis/manage.do"), + rcpmonitoringoutscenariomanage("rcp", 2000004L, 2000000L, 3, "시나리오이탈노드관리", "시나리오이탈노드관리", "/view/admin/rcp/statistics/monitoring/outscenario/manage.do"), + rcpmonitoringworkhistorymanage("rcp", 2000005L, 2000000L, 3, "작업이력조회", "작업이력조회", "/view/admin/rcp/statistics/monitoring/workhistory/manage.do"), + rcpmonitoringaienginemanage("rcp", 2000006L, 2000000L, 3, "AI엔진 트래픽모니터링", "AI엔진 트래픽모니터링", "/view/admin/rcp/statistics/monitoring/aiengine/manage.do"), rcpstatistics("rcp", 2100000L, 1L, 2, "통계", "통계", "0"), rcpstatisticsintent("rcp", 2100100L, 2100000L, 3, "인텐트통계", "인텐트통계", "0"), - rcpstatisticsintentdaymanage("rcp", 2100101L, 2100100L, 4, "날짜별통계", "인텐트날짜별통계", "/admin/rcp/statistics/intent/day/manage.do"), - rcpstatisticsintentitemmanage("rcp", 2100102L, 2100100L, 4, "항목별통계", "인텐트항목별통계", "/admin/rcp/statistics/intent/item/manage.do"), + rcpstatisticsintentdaymanage("rcp", 2100101L, 2100100L, 4, "날짜별통계", "인텐트날짜별통계", "/view/admin/rcp/statistics/intent/day/manage.do"), + rcpstatisticsintentitemmanage("rcp", 2100102L, 2100100L, 4, "항목별통계", "인텐트항목별통계", "/view/admin/rcp/statistics/intent/item/manage.do"), rcpstatisticsscenario("rcp", 2100200L, 2100000L, 3, "시나리오통계", "시나리오통계", "0"), - rcpstatisticsscenariodaymanage("rcp", 2100201L, 2100200L, 4, "날짜별통계", "시나리오날짜별통계", "/admin/rcp/statistics/scenario/day/manage.do"), - rcpstatisticsscenarioitemmanage("rcp", 2100202L, 2100200L, 4, "항목별통계", "시나리오항목별통계", "/admin/rcp/statistics/scenario/item/manage.do"), + rcpstatisticsscenariodaymanage("rcp", 2100201L, 2100200L, 4, "날짜별통계", "시나리오날짜별통계", "/view/admin/rcp/statistics/scenario/day/manage.do"), + rcpstatisticsscenarioitemmanage("rcp", 2100202L, 2100200L, 4, "항목별통계", "시나리오항목별통계", "/view/admin/rcp/statistics/scenario/item/manage.do"), rcpstatisticscall("rcp", 2100300L, 2100000L, 3, "콜통계", "콜통계", "0"), - rcpstatisticscallinfomanage("rcp", 2100301L, 2100300L, 4, "콜통계", "콜통계", "/admin/rcp/statistics/call/info/manage.do"), - rcpstatisticsaienginemanage("rcp", 2100302L, 2100300L, 4, "AI엔진통계", "AI엔진통계", "/admin/rcp/statistics/call/aiengine/manage.do"), - rcpstatisticsdashboardmanage("rcp", 2100400L, 2100000L, 3, "대쉬보드", "대쉬보드", "/admin/common/dashboard/manage.do"), + rcpstatisticscallinfomanage("rcp", 2100301L, 2100300L, 4, "콜통계", "콜통계", "/view/admin/rcp/statistics/call/info/manage.do"), + rcpstatisticsaienginemanage("rcp", 2100302L, 2100300L, 4, "AI엔진통계", "AI엔진통계", "/view/admin/rcp/statistics/call/aiengine/manage.do"), + rcpstatisticsdashboardmanage("rcp", 2100400L, 2100000L, 3, "대쉬보드", "대쉬보드", "/view/admin/common/dashboard/manage.do"), rcpoprmanage("rcp", 2200000L, 1L, 2, "운영관리", "운영관리", "0"), - rcpoprmanagenlpSettingmanage("rcp", 2200001L, 2200000L, 3, "NLP설정", "NLP설정", "/admin/rcp/oprmanage/nlpSetting/manage.do"), - rcpoprmanagebgmmanage("rcp", 2200002L, 2200000L, 3, "배경음관리", "배경음관리", "/admin/rcp/oprmanage/bgm/manage.do"), - rcpoprmanagettstagmanage("rcp", 2200003L, 2200000L, 3, "TTS태그관리", "TTS태그관리", "/admin/rcp/oprmanage/ttstag/manage.do"), + rcpoprmanagenlpSettingmanage("rcp", 2200001L, 2200000L, 3, "NLP설정", "NLP설정", "/view/admin/rcp/oprmanage/nlpSetting/manage.do"), + rcpoprmanagebgmmanage("rcp", 2200002L, 2200000L, 3, "배경음관리", "배경음관리", "/view/admin/rcp/oprmanage/bgm/manage.do"), + rcpoprmanagettstagmanage("rcp", 2200003L, 2200000L, 3, "TTS태그관리", "TTS태그관리", "/view/admin/rcp/oprmanage/ttstag/manage.do"), gudguide("gud", 2300000L, 1L, 2, "상담가이드", "상담가이드", "0"), - gudguideconsultationRealtimemanage("gud", 2300100L, 2300000L, 3, "실시간상담", "실시간상담", "/admin/gud/guide/consultationRealtime/manage.do"), - gudguideadminMonitoringmanage("gud", 2300200L, 2300000L, 3, "관리자모니터링", "관리자모니터링", "/admin/gud/guide/adminMonitoring/manage.do"), + gudguideconsultationRealtimemanage("gud", 2300100L, 2300000L, 3, "실시간상담", "실시간상담", "/view/admin/gud/guide/consultationRealtime/manage.do"), + gudguideadminMonitoringmanage("gud", 2300200L, 2300000L, 3, "관리자모니터링", "관리자모니터링", "/view/admin/gud/guide/adminMonitoring/manage.do"), gudguidehistory("gud", 2300300L, 2300000L, 3, "상담이력관리", "상담이력관리", "0"), - gudguidehistoryscrchmanage("gud", 2300301L, 2300300L, 4, "상담이력조회", "상담이력조회", "/admin/gud/guide/history/scrch/manage.do"), - gudguidehistoryoutboxmanage("gud", 2300302L, 2300300L, 4, "상담이력전송함", "상담이력전송함", "/admin/gud/guide/history/outbox/manage.do"), - gudguidehistoryinboxmanage("gud", 2300303L, 2300300L, 4, "상담이력수신함", "상담이력수신함", "/admin/gud/guide/history/inbox/manage.do"), + gudguidehistoryscrchmanage("gud", 2300301L, 2300300L, 4, "상담이력조회", "상담이력조회", "/view/admin/gud/guide/history/scrch/manage.do"), + gudguidehistoryoutboxmanage("gud", 2300302L, 2300300L, 4, "상담이력전송함", "상담이력전송함", "/view/admin/gud/guide/history/outbox/manage.do"), + gudguidehistoryinboxmanage("gud", 2300303L, 2300300L, 4, "상담이력수신함", "상담이력수신함", "/view/admin/gud/guide/history/inbox/manage.do"), gudguidecontents("gud", 2300400L, 2300000L, 3, "상담컨텐츠", "상담컨텐츠", "0"), - gudguidecontentslistmanage("gud", 2300401L, 2300400L, 4, "상담가이드조회", "상담가이드조회", "/admin/gud/guide/contents/list/manage.do"), - gudguidecontentsmanagermanage("gud", 2300402L, 2300400L, 4, "상담가이드관리", "상담가이드관리", "/admin/gud/guide/contents/manager/manage.do"), - gudguidecontentscontentsAssessmentmanage("gud", 2300403L, 2300400L, 4, "상담가이드평가", "상담가이드평가", "/admin/gud/guide/contents/contentsAssessment/manage.do"), - gudguidecontentscontentsAssessmentHistorymanage("gud", 2300404L, 2300400L, 4, "상담가이드평가이력", "상담가이드평가이력", "/admin/gud/guide/contents/contentsAssessmentHistory/manage.do"), + gudguidecontentslistmanage("gud", 2300401L, 2300400L, 4, "상담가이드조회", "상담가이드조회", "/view/admin/gud/guide/contents/list/manage.do"), + gudguidecontentsmanagermanage("gud", 2300402L, 2300400L, 4, "상담가이드관리", "상담가이드관리", "/view/admin/gud/guide/contents/manager/manage.do"), + gudguidecontentscontentsAssessmentmanage("gud", 2300403L, 2300400L, 4, "상담가이드평가", "상담가이드평가", "/view/admin/gud/guide/contents/contentsAssessment/manage.do"), + gudguidecontentscontentsAssessmentHistorymanage("gud", 2300404L, 2300400L, 4, "상담가이드평가이력", "상담가이드평가이력", "/view/admin/gud/guide/contents/contentsAssessmentHistory/manage.do"), gudguideai("gud", 2300500L, 2300000L, 3, "NLP연동", "NLP연동", "0"), - gudguideainluIntentListmanage("gud", 2300501L, 2300500L, 4, "대화의도", "대화의도", "/admin/gud/guide/ai/nluIntentList/manage.do"), - gudguideainluEntityListmanage("gud", 2300502L, 2300500L, 4, "엔티티", "엔티티", "/admin/gud/guide/ai/nluEntityList/manage.do"), - gudguideainluLogmanage("gud", 2300503L, 2300500L, 4, "대화의도이력", "대화의도이력", "/admin/gud/guide/ai/nluLog/manage.do"), - gudguideainluTrainingmanage("gud", 2300504L, 2300500L, 4, "기계학습", "기계학습", "/admin/gud/guide/ai/nluTraining/manage.do"), - gudguideainluIntenttestmanage("gud", 2300505L, 2300500L, 4, "대화의도테스트", "대화의도테스트", "/admin/gud/guide/ai/nluIntenttest/manage.do"), - gudguideaisynonymListmanage("gud", 2300506L, 2300500L, 4, "고유용어사전", "고유용어사전", "/admin/gud/guide/ai/synonymList/manage.do"), - gudguideainluRecommendedLearningmanage("gud", 2300507L, 2300500L, 4, "학습추천", "학습추천", "/admin/gud/guide/ai/nluRecommendedLearning/manage.do"), + gudguideainluIntentListmanage("gud", 2300501L, 2300500L, 4, "대화의도", "대화의도", "/view/admin/gud/guide/ai/nluIntentList/manage.do"), + gudguideainluEntityListmanage("gud", 2300502L, 2300500L, 4, "엔티티", "엔티티", "/view/admin/gud/guide/ai/nluEntityList/manage.do"), + gudguideainluLogmanage("gud", 2300503L, 2300500L, 4, "대화의도이력", "대화의도이력", "/view/admin/gud/guide/ai/nluLog/manage.do"), + gudguideainluTrainingmanage("gud", 2300504L, 2300500L, 4, "기계학습", "기계학습", "/view/admin/gud/guide/ai/nluTraining/manage.do"), + gudguideainluIntenttestmanage("gud", 2300505L, 2300500L, 4, "대화의도테스트", "대화의도테스트", "/view/admin/gud/guide/ai/nluIntenttest/manage.do"), + gudguideaisynonymListmanage("gud", 2300506L, 2300500L, 4, "고유용어사전", "고유용어사전", "/view/admin/gud/guide/ai/synonymList/manage.do"), + gudguideainluRecommendedLearningmanage("gud", 2300507L, 2300500L, 4, "학습추천", "학습추천", "/view/admin/gud/guide/ai/nluRecommendedLearning/manage.do"), addraddrbot("addr", 2400000L, 1L, 2, "주소봇", "주소봇", "0"), - addraddrbotmanageAddrSectionmanage("addr", 2400100L, 2400000L, 3, "지명유사어관리", "지명유사어관리", "/admin/addr/addrbot/manageAddrSection/manage.do"), - addraddrbotmanageBuildNamemanage("addr", 2400200L, 2400000L, 3, "빌딩유사어관리", "빌딩유사어관리", "/admin/addr/addrbot/manageBuildName/manage.do"), - addraddrbotmanageSynonymmanage("addr", 2400300L, 2400000L, 3, "유의어전처리관리", "유의어전처리관리", "/admin/addr/addrbot/manageSynonym/manage.do"), - addraddrbotmanageBuildTypemanage("addr", 2400400L, 2400000L, 3, "발화건물유형관리", "발화건물유형관리", "/admin/addr/addrbot/manageBuildType/manage.do"), - addraddrbotmanageJusoUploadmanage("addr", 2400500L, 2400000L, 3, "주소월별업데이트", "주소월별업데이트", "/admin/addr/addrbot/manageJusoUpload/manage.do"), + addraddrbotmanageAddrSectionmanage("addr", 2400100L, 2400000L, 3, "지명유사어관리", "지명유사어관리", "/view/admin/addr/addrbot/manageAddrSection/manage.do"), + addraddrbotmanageBuildNamemanage("addr", 2400200L, 2400000L, 3, "빌딩유사어관리", "빌딩유사어관리", "/view/admin/addr/addrbot/manageBuildName/manage.do"), + addraddrbotmanageSynonymmanage("addr", 2400300L, 2400000L, 3, "유의어전처리관리", "유의어전처리관리", "/view/admin/addr/addrbot/manageSynonym/manage.do"), + addraddrbotmanageBuildTypemanage("addr", 2400400L, 2400000L, 3, "발화건물유형관리", "발화건물유형관리", "/view/admin/addr/addrbot/manageBuildType/manage.do"), + addraddrbotmanageJusoUploadmanage("addr", 2400500L, 2400000L, 3, "주소월별업데이트", "주소월별업데이트", "/view/admin/addr/addrbot/manageJusoUpload/manage.do"), addraddrbotmanageAddrProcessmanage("addr", 2400600L, 2400000L, 3, "주소봇처리내역", "주소봇처리내역", "/admin/addr/addrbot/manageAddrProcess/manage.do"), addraddrbotaddrRealtimeListmanage("addr", 2400700L, 2400000L, 3, "실시간처리리스트", "실시간처리리스트", "/admin/addr/addrbot/addrRealtimeList/manage.do"), diff --git a/main_vm/src/main/java/com/icomsys/main_vm/common/filter/LoginFilter.java b/main_vm/src/main/java/com/icomsys/main_vm/common/filter/LoginFilter.java index d77feb0..dd61836 100644 --- a/main_vm/src/main/java/com/icomsys/main_vm/common/filter/LoginFilter.java +++ b/main_vm/src/main/java/com/icomsys/main_vm/common/filter/LoginFilter.java @@ -4,8 +4,11 @@ import com.fasterxml.jackson.databind.ObjectMapper; //import com.icomsys.main_vm.db.jpa.repo.bot.TbBotAuthMenuRepo; //import com.icomsys.main_vm.db.jpa.repo.bot.TbBotMenuRepo; import com.google.gson.Gson; +import com.icomsys.main_vm.biz.common.login.TokenProvider; +import com.icomsys.main_vm.biz.common.login.res.UserVo; import com.icomsys.main_vm.common.code.enumresource.SessionResource; import com.icomsys.main_vm.db.mybatis.alias.LoginVO; +import io.jsonwebtoken.Claims; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; @@ -26,6 +29,8 @@ import java.time.LocalDateTime; @RequiredArgsConstructor public class LoginFilter extends OncePerRequestFilter { + + private final TokenProvider tokenProvider; private final ObjectMapper objectMapper; // private final TbBotAuthMenuRepo tbBotAuthMenuRepo; // private final TbBotMenuRepo tbBotMenuRepo; @@ -57,11 +62,13 @@ public class LoginFilter extends OncePerRequestFilter { || reqUrl.startsWith("/view") || reqUrl.equals("/") ) { - log.info("static file check"); filterChain.doFilter(request, response); } else { + UserVo user = new Gson().fromJson((String) tokenProvider + .parseClaims(request.getHeader("Authorization") + .split(" ")[1]).get("UserVO"), UserVo.class); + request.setAttribute("UserVO", user); filterChain.doFilter(request, response); } } - } diff --git a/main_vm/src/main/resources/static/aajs/statisticsDashboard.js b/main_vm/src/main/resources/static/aajs/statisticsDashboard.js index 2789f30..906f6e0 100644 --- a/main_vm/src/main/resources/static/aajs/statisticsDashboard.js +++ b/main_vm/src/main/resources/static/aajs/statisticsDashboard.js @@ -23,7 +23,7 @@ var StatisticsDashboard = { async: false, datatype: "JSON", contentType : "application/json; charset=utf-8", - url: "/adm/menu/oprmng", + url: "/api/v1/token/menu/oprmng", headers: {'Authorization': getToken()}, data: {menuval: 'root'}, // data: {serviceType: 'S'}, @@ -242,22 +242,6 @@ var StatisticsDashboard = { } -$(document).ready(function () { - StatisticsDashboard.setOprMngCode(); - StatisticsDashboard.setDashboardChart(); - - dashboardChartCall(); // 빌보드 차트 디자인 및 호출 - // LNG 메뉴 접었다 필 경우 레이아웃을 다시 새로고침하기 위해 dashboardChartCall 재 호출 함. - $('.lnb_menu_menu').on('click', function () { - setTimeout(() => { - dashboardChartCall(); - }, 500); - }) - -}); -$(window).resize(function () { - dashboardChartCall(); -}) function dashboardChartCall() { // 차트 디자인 커스텀 변수 (색상 및 외형) diff --git a/main_vm/src/main/resources/templates/layout/adm/common/dashboard.html b/main_vm/src/main/resources/templates/layout/adm/common/dashboard.html index 834dacf..8b28e0d 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/dashboard.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/dashboard.html @@ -1,119 +1,134 @@ - - -대시보드 + + + 대시보드 - - -
-
- -
+ +
+
+ +
- -
-
-
-
- -
-
-
- 조회 -
-
-
-
- - - - - - - - - + + + +
+
-
-
-
-
-
전체 콜 그래프 (단위 : 건)
-
-
-
-
-
-
-
-
-
+
+
+
+
+
전체 콜 그래프 (단위 : 건)
+
+
+
+
+
+
+
+
+
-
-
-
인텐트 그래프 (단위 : 건)
-
-
-
-
-
-
-
-
-
+
+
+
인텐트 그래프 (단위 : 건)
+
+
+
+
+
+
+
+
+
-
-
-
시나리오 그래프 (단위 : 건)
-
-
-
-
-
-
-
-
-
+
+
+
시나리오 그래프 (단위 : 건)
+
+
+
+
+
+
+
+
+
-
-
-
오늘 시간대별 통화량 (단위 : 건)
-
현재 통화량 : 0건
-
-
-
-
-
-
-
-
-
+
+
+
오늘 시간대별 통화량 (단위 : 건)
+
현재 통화량 : 0건
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+ -
+
- \ No newline at end of file + + + \ No newline at end of file diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/commoncode.html b/main_vm/src/main/resources/templates/layout/adm/common/system/commoncode.html index a9f4bef..4495305 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/commoncode.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/commoncode.html @@ -3,202 +3,407 @@ 시나리오코드 - - - - -

ICOMSYS ADMIN

- - - - -
- - - -
- - + { + targets: 4, + orderable: false, + render: function (data) { + return '' + data + ''; + } + }, + { + targets: 5, + orderable: false, + render: function (data) { + return '' + data + ''; + } + }, + { + targets: 6, + orderable: false, + // visible: false, + // searchable: false, + render: function (data) { + return '' + data + ''; + } + }, + { + targets: 7, + visible: false, + searchable: false, + orderable: false, + render: function (data) { + return '' + data + ''; + } + }, + { + targets: 8, + visible: false, + searchable: false, + orderable: false, + render: function (data) { + return '' + data + ''; + } + }, + { + targets: 9, + visible: false, + searchable: false, + orderable: false, + render: function (data) { + // console.log($(this).parents("tr")); + return '' + data + ''; + } + } + ], - - - - diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/cust.html b/main_vm/src/main/resources/templates/layout/adm/common/system/cust.html index 2075831..9514e8b 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/cust.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/cust.html @@ -3,31 +3,107 @@ 고객사관리 + - - - - -

ICOMSYS ADMIN

-

대시보드

- -
- - - -
- + diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/custInsert.html b/main_vm/src/main/resources/templates/layout/adm/common/system/custInsert.html index ee425a2..d252d4e 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/custInsert.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/custInsert.html @@ -15,65 +15,196 @@ - - -
- - -
-
-
-
-

고객사 등록

-
-
-
- - - - - - - - - - - - - - - - - - - - -
고객사명 * -
- -
-
고객사코드 * -
- - - 중복확인 -
-
사용여부 * -
- -
-
-
-
- -
-
-
-

서비스 그룹 *

-
-
- 추가 -
-
- - -
-
    -
-
-
- -
-
- 취소 - 저장 -
-
-
-
- - - + $('#newServiceGroup').keyup(function (e) { + // newOprCreate(e.keyCode) + }); + $('#btnSaveCust').on('click', function () { + addServiceGroup(); + // $('.tbl-card-li').each(function () { + // // console.log("???"); + // $(this).find('.tbl-card-title').on('click', function () { + // $(this).parents('.tbl-card-li').toggleClass('on'); + // }) + // }); - + // console.log($('.tbl-card').find('.tbl-card-li').last()); + // $('.tbl-card').find('.tbl-card-li').last() + $('.tbl-card').find('.tbl-card-title').last() + .on('click', function () { + $(this).parents('.tbl-card-li').toggleClass('on') + } + ); + }); + \ No newline at end of file diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/custUpdate.html b/main_vm/src/main/resources/templates/layout/adm/common/system/custUpdate.html index 2b6ce34..ab48ad9 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/custUpdate.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/custUpdate.html @@ -15,9 +15,6 @@ - - - - - - -

ICOMSYS ADMIN

-

대시보드

- - - -
- - - -
- - - + //선택 이벤트 + $('#insertServiceGroup').change(function () { + getRoleAndOpr($(this).val()); + }); + - diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/groupAuthUpdate.html b/main_vm/src/main/resources/templates/layout/adm/common/system/groupAuthUpdate.html index 3877474..d62f78e 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/groupAuthUpdate.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/groupAuthUpdate.html @@ -4,41 +4,128 @@ - - - - - -

ICOMSYS ADMIN

-

대시보드

- - - -
- - - -
-
-
-
-

권한그룹편집

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
그룹명 -
- -
-
그룹설명 -
- -
-
소속사용자 * -
- - 조회 -
- - + //유저조회 + $('#btnSearchUser').on('click', function () { + getUserSearch() + // $('#serviceInfo').reset(); + }); + //유저 선택 이벤트 + $('#selectorUser').change(function () { + userAdd($(this).val(), $('#selectorUser option:selected').text()) + }); -
-
-
소속사용자
-
    -
-
+ $('#btnSave').on('click', function () { + // console.log("저장클릭") + ServiceGroupAuthModifyUpdate(); + }); - -
-
소속제외
-
    + $('#btnDel').on('click', function () { + // console.log("취소버튼"); + delBtn(); + }); -
-
-
-
권한 -
-
-
-
-
-
-
- -
-
- 취소 - 저장 -
-
-
- -
+ - \ No newline at end of file diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/groupAuthUpdatelegacy.html b/main_vm/src/main/resources/templates/layout/adm/common/system/groupAuthUpdatelegacy.html index 026e3b5..311e983 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/groupAuthUpdatelegacy.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/groupAuthUpdatelegacy.html @@ -3,45 +3,6 @@ 그룹별권한 - - @@ -317,3 +278,43 @@ + + + + diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/policyMenu.html b/main_vm/src/main/resources/templates/layout/adm/common/system/policyMenu.html index 53c9528..ed6cf31 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/policyMenu.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/policyMenu.html @@ -3,27 +3,141 @@ 정책별메뉴 + - - - - - - - - - -
- - - -
+ - diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupInsert.html b/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupInsert.html index 9dcfb93..54c25f9 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupInsert.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupInsert.html @@ -3,207 +3,6 @@ 서비스그룹 관리 - - @@ -452,4 +251,206 @@ - \ No newline at end of file + + + + + diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupList.html b/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupList.html index 021ea9e..272b422 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupList.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupList.html @@ -4,34 +4,118 @@ - + getMainOprSelectBox(); + PagingDataTable(); + $('#listTable tbody').on('dblclick', 'tr', function () { + var data = $('#listTable').DataTable().row(this).data(); + viewPage(data) + }); - + $('#btnSearchOpr').on('click', function () { + fnCustSearchBtn(); + }); -

ICOMSYS ADMIN

-

대시보드

- - - -
- - - -
+ - diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupView.html b/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupView.html index 122ce98..c9b4266 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupView.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/serviceGroupView.html @@ -3,59 +3,201 @@ 서비스그룹 관리 - - - -

ICOMSYS ADMIN

- - -

ICOMSYS ADMIN

- -
- - - - -
-
-
-
-

서비스 그룹관리

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
서비스그룹명 -
- -
-
서비스코드 -
- -
-
시나리오코드 -
- -
-
사용여부 - -
-
-
- - -
-
-
-

시나리오 그룹 *

-
-
- 추가 -
-
- - -
-
    -
-
-
-
- -
+ $('.tbl-card-li').each(function () { + $(this).find('.tbl-card-title').on('click', function () { + $(this).parents('.tbl-card-li').toggleClass('on'); + }) + }); + $('.tbl-card').find('.tbl-card-li .title-connect').each(function () { + const submitVal = $(this).val(); + if (submitVal.length > 0) { + $(this).parents('.tbl-card-li').find('.title-connected').text(submitVal); + } + $(this).on('keyup', function () { + const thisVal = $(this).val(); - + - diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/user.html b/main_vm/src/main/resources/templates/layout/adm/common/system/user.html index 3e8f704..d729d08 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/user.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/user.html @@ -4,34 +4,138 @@ - - - - - -

ICOMSYS ADMIN

- - - -
- - - -
- - - - - diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/userAdmin.html b/main_vm/src/main/resources/templates/layout/adm/common/system/userAdmin.html index df0f0f8..5e28c4a 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/userAdmin.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/userAdmin.html @@ -4,32 +4,139 @@ - + getCust(); + PagingDataTable(); + $('#listTable tbody').on('dblclick', 'tr', function () { + var data = $('#listTable').DataTable().row(this).data(); + viewPage(data) + }); + $('#btnSearchOpr').on('click', function () { + fnCustSearchBtn(); + }); - + $('#btnRegModal').on('click', function () { + fnInsertBtn(); + }); -

ICOMSYS ADMIN

- - - -
- - - -
+ $("#Content").on("keyup", function (key) { + if (key.keyCode == 13) { + fnCustSearchBtn(); + } + }); - + diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/userAdminInsert.html b/main_vm/src/main/resources/templates/layout/adm/common/system/userAdminInsert.html index afb540e..7719c2d 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/userAdminInsert.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/userAdminInsert.html @@ -4,91 +4,217 @@ - - - - - -

ICOMSYS ADMIN

- - - - -
- - -
-
-
-
-

운영자 생성

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
고객사 * -
- -
-
운영자 ID * -
- - - 중복확인 -
-
비밀번호* -
- -
- -
비밀번호 확인* -
- -
- -
이름 * -
- -
-
사용여부 * -
- -
-
이메일 주소 -
- -
-
핸드폰 번호 -
- -
-
등급선택 -
- -
-
-
-
- -
- -
-
- 추가 -
-
- -
-
    -
-
- -
-
-
- 취소 - 저장 -
-
-
-
- - - - - - - - diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/userAdminView.html b/main_vm/src/main/resources/templates/layout/adm/common/system/userAdminView.html index 7112804..fc4e294 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/userAdminView.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/userAdminView.html @@ -4,59 +4,204 @@ - - - - - -

ICOMSYS ADMIN

- - - - -
- - -
-
-
-
-

운영자 수정

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
운영자 ID * -
- - -
-
비밀번호 변경* -
- - -
-
오류회수 초기화* - -
이름 * -
- -
-
사용여부 * -
- -
-
이메일 주소 -
- -
-
핸드폰 번호 -
- -
-
등급선택 -
- -
-
-
-
- -
- -
-
- 추가 -
-
- -
-
    -
-
- -
-
-
- 취소 - 저장 -
-
-
-
- - + $('#btnSave').on('click', function () { + // console.log("저장버튼"); + saveBtn(); + }); + $('#failCheckBtn').on('click', function () { + failCheckBtn(); + }); - + //서비스그룹 추가 -> 적용버튼 + $('#btnSaveCust').on('click', function () { + addServiceGroup(); + // $('.tbl-card-li').each(function () { + // // console.log("???"); + // $(this).find('.tbl-card-title').on('click', function () { + // $(this).parents('.tbl-card-li').toggleClass('on'); + // }) + // }); + + // console.log($('.tbl-card').find('.tbl-card-li').last()); + // $('.tbl-card').find('.tbl-card-li').last() + $('.tbl-card').find('.tbl-card-title').last() + .on('click', function () { + $(this).parents('.tbl-card-li').toggleClass('on') + } + ); + }); + diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/userInsert.html b/main_vm/src/main/resources/templates/layout/adm/common/system/userInsert.html index 829899b..a19f1a0 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/userInsert.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/userInsert.html @@ -3,86 +3,217 @@ 사용자관리 + - - - - - -

ICOMSYS ADMIN

- - - - -
- - -
-
-
-
-

사용자 생성

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
고객사 * -
- -
-
사용자 ID * -
- - - 중복확인 -
-
비밀번호* -
- -
- -
비밀번호 확인* -
- -
- -
이름 * -
- -
-
사용여부 * -
- -
-
이메일 주소 -
- -
-
핸드폰 번호 -
- -
-
등급선택 -
- -
-
-
-
- -
- -
-
- 추가 -
-
- -
-
    -
-
- -
-
-
- 취소 - 저장 -
-
-
-
- - - + getCust(); + getOpr(); + authChoice($('#newServiceGroup option:selected').val()); + $("#Content").on("keyup", function (key) { + if (key.keyCode == 13) { + fnCustSearchBtn(); + } + }); + + //선택 이벤트 + $('#newServiceGroup').change(function () { + authChoice($(this).val()) + }); + + // $('.tbl-card-li').each(function () { + // $(this).find('.tbl-card-title').on('click', function () { + // $(this).parents('.tbl-card-li').toggleClass('on'); + // }) + // }); + + //선택 이벤트 + $('#newCustUser').change(function () { + SelectServiceGroupUpdate($(this).val()) + }); + + + //서비스그룹 추가 -> 적용버튼 + $('#btnSaveCust').on('click', function () { + addServiceGroup(); + // $('.tbl-card-li').each(function () { + // // console.log("???"); + // $(this).find('.tbl-card-title').on('click', function () { + // $(this).parents('.tbl-card-li').toggleClass('on'); + // }) + // }); + + // console.log($('.tbl-card').find('.tbl-card-li').last()); + + + }); + + $('#btnSave').on('click', function () { + // console.log("저장버튼"); + saveBtn(); + }); + $('#btnDel').on('click', function () { + // console.log("삭제버튼"); + delBtn(); + }); + $('#doubleCheckBtn').on('click', function () { + // console.log("중복확인버튼"); + userDoubleCheck(); + }); + + $('#newUserPass').keyup(function (e) { + newUserPassCheck(e.keyCode) + }); + + $('#newUserPassChk').keyup(function (e) { + newUserDoublePassCheck(e.keyCode) + }); + $('.tbl-card').find('.tbl-card-li .title-connect').each(function () { + const submitVal = $(this).val(); + if (submitVal.length > 0) { + $(this).parents('.tbl-card-li').find('.title-connected').text(submitVal); + } + $(this).on('keyup', function () { + const thisVal = $(this).val(); + if (thisVal.length === 0) { + $(this).parents('.tbl-card-li').find('.title-connected').text('새로운 시나리오 그룹'); + } else { + $(this).parents('.tbl-card-li').find('.title-connected').text(thisVal); + } + }) + }); - + diff --git a/main_vm/src/main/resources/templates/layout/adm/common/system/userView.html b/main_vm/src/main/resources/templates/layout/adm/common/system/userView.html index 97f5e74..8f57bc9 100644 --- a/main_vm/src/main/resources/templates/layout/adm/common/system/userView.html +++ b/main_vm/src/main/resources/templates/layout/adm/common/system/userView.html @@ -3,76 +3,201 @@ 사용자관리 + - - - - - -

ICOMSYS ADMIN

- - - - -
- - -
-
-
-
-

사용자 수정

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
사용자 ID * -
- - -
-
비밀번호 변경* -
- -
-
비밀번호 오류회수* - -
이름 * -
- -
-
사용여부 * -
- -
-
이메일 주소 -
- -
-
핸드폰 번호 -
- -
-
등급선택 -
- -
-
-
-
- -
+ getOpr(); + getQueryString(); + getViewPageData(); + authChoice($('#newServiceGroup option:selected').val()); + $("#Content").on("keyup", function (key) { + if (key.keyCode == 13) { + fnCustSearchBtn(); + } + }); + //선택 이벤트 + $('#newServiceGroup').change(function () { + authChoice($(this).val()) + }); + $("#Content").on("keyup", function (key) { + if (key.keyCode == 13) { + fnCustSearchBtn(); + } + }) -
-
- 추가 -
-
+ $('#btnSave').on('click', function () { + // console.log("저장버튼"); + saveBtn(); + }); + $('#btnDel').on('click', function () { + // console.log("취소버튼"); + delBtn(); + }); -
-
    -
-
+ function delBtn() { + listgo(); + } -
-
-
- 취소 - 저장 -
-
-
-
+ function listgo() { + // document.location.href = "/BotMain_VM/admin/common/system/user/manage.do"; + document.location.href = '/admin/common/system/user/manage.do'; + } - + $('#failCheckBtn').on('click', function () { + failCheckBtn(); + }); - + diff --git a/main_vm/src/main/resources/templates/layout/adm/rcp/statistics/intent/day.jsp b/main_vm/src/main/resources/templates/layout/adm/rcp/statistics/intent/day.jsp index 59496a3..43b2f93 100644 --- a/main_vm/src/main/resources/templates/layout/adm/rcp/statistics/intent/day.jsp +++ b/main_vm/src/main/resources/templates/layout/adm/rcp/statistics/intent/day.jsp @@ -1,11 +1,7 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - 인텐트날짜별통계 -<%@ include file="/WEB-INF/jsp/adm/include/topLinkTag.jsp"%> +

DASH BOARD

diff --git a/main_vm/src/main/resources/templates/layout/fragments/head.html b/main_vm/src/main/resources/templates/layout/fragments/head.html index 68c418a..3d77bbc 100644 --- a/main_vm/src/main/resources/templates/layout/fragments/head.html +++ b/main_vm/src/main/resources/templates/layout/fragments/head.html @@ -8,6 +8,7 @@ + @@ -41,129 +42,241 @@ - - + function getUv() { + var uv = $.ajax({ + type: "GET" + ,contentType: "application/json; charset=utf-8" + ,datatype: "JSON" + ,url: '/api/v1/token/main/uv' + , headers: {'Authorization': getToken()} + ,success: function (data) { + $('#naviseq').val(data.userSeq); + return data; + }, + error: function () { + document.location.href = '/adm/main/egovLoginUsr.do'; + } + }) + return uv; + } - - diff --git a/main_vm/src/main/resources/templates/layout/fragments/sidebar.html b/main_vm/src/main/resources/templates/layout/fragments/sidebar.html index 575d6bf..d05be99 100644 --- a/main_vm/src/main/resources/templates/layout/fragments/sidebar.html +++ b/main_vm/src/main/resources/templates/layout/fragments/sidebar.html @@ -23,7 +23,7 @@ $(document).ready(function () { GetAuth(); - PageControll('/admin/common/dashboard/manage.do'); + PageControll('/view/admin/common/dashboard/manage.do'); }).off(lnbEvt()) function GetAuth() { @@ -34,31 +34,35 @@ async: false, url: '/rest/test5', success: function (data) { - data.forEach(function (e, i) { - var addMenu = ''; - if (!(e.level == '0' || e.level == '1') && !$("#menuSeq" + e.seq).length > 0) { - var menuUrl = "#"; - if (e.url != '0') { - menuUrl = e.url; - } - addMenu += '
  • ' - //+ '' - + '' - // + '' - + '' - + e.menuName + '' - + '' - + '
  • ' - $('#menuSeq' + e.seqUpper).append(addMenu); - } - }) - $(".lnb").on("click", "a", function() { - PageControll($(this).attr("value")); - }); + menuBar(data); + } + }) + }; + function menuBar(data){ + data.forEach(function (e, i) { + var addMenu = ''; + if (!(e.level == '0' || e.level == '1') && !$("#menuSeq" + e.seq).length > 0) { + var menuUrl = "#"; + if (e.url != '0') { + menuUrl = e.url; + } + addMenu += '
  • ' + + '' + + '' + + e.menuName + '' + + '' + + '
  • ' + $('#menuSeq' + e.seqUpper).append(addMenu); } }) + $(".lnb").on("click", "a", function () { + // $('#pageControll').load(location.href+'#pageControll'); + $(window).off("resize"); + PageControll($(this).attr("value")); + // $('#pageControll').load(location.href+'#pageControll'); + }); }; function PageControll(e) { @@ -67,15 +71,14 @@ } var redi = ''; if (e == "" || e == null) { - redi = '/admin/common/dashboard/manage.do' + redi = '/view/admin/common/dashboard/manage.do' } else { redi = e; } - $.ajax({ type: "GET", contentType: "application/json; charset=utf-8", - datatype: "HTML", + datatype: "html", async: false, url: redi, success: function (data) { diff --git a/main_vm/src/main/resources/templates/layout/main.html b/main_vm/src/main/resources/templates/layout/main.html index cadf0a3..02ad583 100644 --- a/main_vm/src/main/resources/templates/layout/main.html +++ b/main_vm/src/main/resources/templates/layout/main.html @@ -3,6 +3,8 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/layout}"> +
    diff --git a/main_vm/src/main/resources/templates/layout/signin.html b/main_vm/src/main/resources/templates/layout/signin.html index 7ddf814..5e03137 100644 --- a/main_vm/src/main/resources/templates/layout/signin.html +++ b/main_vm/src/main/resources/templates/layout/signin.html @@ -74,6 +74,7 @@ fncCheck(); }); }); + function fncKeyPresshandler(e) { if (event.keyCode == 13) { // fncSend(); @@ -142,9 +143,11 @@ if (data.status == 200) { console.log(data); document.cookie = 'accessToken=' + data.responseText + '; path=/;'; - console.log("cookie ="+document.cookie) - document.signinInfoForm.action = '/adm/main/actionSecurityLogin.do'; - document.signinInfoForm.submit(); + console.log("cookie =" + document.cookie) + alert("cookie = " + document.cookie) + // document.signinInfoForm.action = '/adm/main/actionSecurityLogin.do'; + document.location.href = '/adm/main/actionSecurityLogin.do'; + // document.signinInfoForm.submit(); } else if (data.status == 400) { // alert("비밀번호 5회 실패로 계정이 잠겼습니다. 관리자에게 잠금해제 요청하세요."); $.utils.warning("계정이 잠겼습니다. 관리자에게 잠금해제 요청하세요.");