ignore add

dev_tymeleaf
jangwonseokicom 1 year ago
parent 4c89e1d524
commit bb91d6fe7e

43
.gitignore vendored

@ -0,0 +1,43 @@
HELP.md
.gradle
.idea
build/
**/.gradle
**/.idea
**/build
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/

Binary file not shown.

@ -18,6 +18,7 @@ import com.icomsys.main_vm.biz.common.system.vo.SystemServiceGroupViewVo;
import com.icomsys.main_vm.biz.test.controller.testvo.APINodeVo; import com.icomsys.main_vm.biz.test.controller.testvo.APINodeVo;
import com.icomsys.main_vm.common.code.EnumToMap; import com.icomsys.main_vm.common.code.EnumToMap;
import com.icomsys.main_vm.common.code.enumresource.MenuResource; import com.icomsys.main_vm.common.code.enumresource.MenuResource;
import com.icomsys.main_vm.common.code.enumresource.PolicyResource;
import com.icomsys.main_vm.db.jpa.entity.conversation.TbProjectSetting; import com.icomsys.main_vm.db.jpa.entity.conversation.TbProjectSetting;
import com.icomsys.main_vm.db.jpa.entity.system.TbIcsCustInfo; import com.icomsys.main_vm.db.jpa.entity.system.TbIcsCustInfo;
import com.icomsys.main_vm.db.jpa.repo.scenario.TbApiNodeRepo; import com.icomsys.main_vm.db.jpa.repo.scenario.TbApiNodeRepo;
@ -36,6 +37,7 @@ import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
@RequestMapping("/rest") @RequestMapping("/rest")
@RestController @RestController
@ -78,7 +80,7 @@ public class TestRestController {
@GetMapping("/test5") @GetMapping("/test5")
public Object test5() { public Object test5() {
log.info("test5 init"); log.info("test5 init");
return testRestService.authToMenuList(testRestService.initData(), 1000001); return testRestService.authToMenuList(PolicyResource.ALL.stream().map(e -> e.getName().toString()).collect(Collectors.toList()), 1000001);
} }
@ -91,7 +93,7 @@ public class TestRestController {
@GetMapping("/test6") @GetMapping("/test6")
public Object test6() { public Object test6() {
log.info("test6 init"); log.info("test6 init");
return testRestService.authToAuthList(testRestService.initData(), 1000001); return testRestService.authToAuthList(PolicyResource.ALL.stream().map(e -> e.getName().toString()).collect(Collectors.toList()), 1000001);
} }
@GetMapping("/test7") @GetMapping("/test7")

@ -5,6 +5,46 @@
<script type=text/javascript> <script type=text/javascript>
$(document).ready(function () {
testGetAuth();
})
function testGetAuth() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/rest/test5',
success: function (data) {
data.forEach(function (e, i) {
// console.log("e data: " + JSON.stringify(e))
if (e.level == '2') {
$("#menuList").append('<li><a href="#">' + e.menuName + '</a><ul class="depth' + e.level + '"></ul></li>');
} else if (e.level == '3') {
if (e.level >= e.nextLevel) {
$("#menuList").append('<li><a href="' + e.url + '"><span>' + e.menuName + '</span></a></li>');
} else if (e.nextLevel == '4') {
$("#menuList").append('<li><a href="#">' + e.menuName + '</a><ul class="depth' + e.level + '"></ul></li>');
}
} else if (e.level == '4') {
$("#menuList").append('<li><a href="' + e.url + '"><span>' + e.menuName + '</span></a></li>');
if (e.nextLevel == '2') {
$("#menuList").append('</ul></li>');
} else if (e.nextLevel == '3') {
$("#menuList").append('</ul></li>');
}
}
})
}
})
}
</script> </script>
<style> <style>
header + article { header + article {
@ -22,59 +62,7 @@
</a> </a>
</div> </div>
<nav> <nav>
<ul class="lnb"> <ul class="lnb" id="menuList">
<!-- <c:choose>-->
<!-- <c:when test="${empty list_menulist }">-->
<!-- <li>Refresh</li>-->
<!-- </ul>-->
<!-- </c:when>-->
<!-- <c:otherwise>-->
<!-- <c:forEach var="result" items="${list_menulist}" varStatus="status">-->
<!-- <c:choose>-->
<!-- <c:when test="${result.level eq '2'}">-->
<!-- <li>-->
<!-- <a href="#"><c:out value="${result.menuName}"/></a>-->
<!-- <ul class="depth<c:out value="${result.level}"/>">-->
<!-- </c:when>-->
<!-- <c:when test="${result.level eq '3'}">-->
<!-- <c:choose>-->
<!-- <c:when test="${result.level >= result.nextLevel}">-->
<!-- <li>-->
<!-- <a href="${pageContext.request.contextPath}<c:out value="${result.url}" />"><span><c:out-->
<!-- value="${result.menuName}"/></span></a>-->
<!-- </li>-->
<!-- </c:when>-->
<!-- <c:when test="${result.nextLevel eq '4'}">-->
<!-- <li>-->
<!-- <a href="#"><c:out value="${result.menuName}"/></a>-->
<!-- <ul class="depth<c:out value="${result.level}"/>">-->
<!-- </c:when>-->
<!-- </c:choose>-->
<!-- <c:if test="${result.nextLevel eq '2'}">-->
<!-- </ul>-->
<!-- </li>-->
<!-- </c:if>-->
<!-- </c:when>-->
<!-- <c:when test="${result.level eq '4'}">-->
<!-- <li>-->
<!-- <a href="${pageContext.request.contextPath}<c:out value="${result.url}" />"><span><c:out-->
<!-- value="${result.menuName}"/></span></a>-->
<!-- </li>-->
<!-- <c:if test="${empty result.nextLevel or result.nextLevel eq '2'}">-->
<!-- </ul>-->
<!-- </li>-->
<!-- </ul>-->
<!-- </li>-->
<!-- </c:if>-->
<!-- <c:if test="${result.nextLevel eq '3'}">-->
<!-- </ul>-->
<!-- </li>-->
<!-- </c:if>-->
<!-- </c:when>-->
<!-- </c:choose>-->
<!-- </c:forEach>-->
<!-- </c:otherwise>-->
<!-- </c:choose>-->
</ul> </ul>
</nav> </nav>
</article> </article>

Loading…
Cancel
Save