├── src └── main │ ├── webapp │ ├── resources │ │ ├── images │ │ │ ├── select.png │ │ │ ├── favicon.ico │ │ │ ├── loading.gif │ │ │ ├── main │ │ │ │ ├── dev.png │ │ │ │ ├── logo.png │ │ │ │ ├── lnb_10.png │ │ │ │ ├── lnb_11.png │ │ │ │ ├── lnb_9.png │ │ │ │ └── logo_old.png │ │ │ ├── caas │ │ │ │ ├── lnb_1.png │ │ │ │ ├── lnb_2.png │ │ │ │ ├── lnb_3.png │ │ │ │ ├── lnb_4.png │ │ │ │ ├── lnb_5.png │ │ │ │ ├── graph-bar.png │ │ │ │ ├── graph-cpu-sample.png │ │ │ │ ├── graph-disk-sample.png │ │ │ │ └── graph-memory-sample.png │ │ │ ├── favicon_old.ico │ │ │ └── custom-caas │ │ │ │ ├── cpu_ico.png │ │ │ │ ├── ico_bg.png │ │ │ │ ├── disk_ico.png │ │ │ │ └── memory_ico.png │ │ ├── css │ │ │ ├── fonts │ │ │ │ ├── NanumGothic.woff │ │ │ │ ├── fa-solid-900.eot │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ ├── fa-solid-900.woff │ │ │ │ ├── NanumGothic-Bold.eot │ │ │ │ ├── NanumGothic-Bold.otf │ │ │ │ ├── fa-solid-900.woff2 │ │ │ │ ├── NanumGothic-Bold.woff │ │ │ │ ├── NanumGothic-Bold.woff2 │ │ │ │ ├── NanumGothic-Regular.eot │ │ │ │ ├── NanumGothic-Regular.otf │ │ │ │ └── NanumGothic-Regular.woff2 │ │ │ ├── jquery.jscrollpane.css │ │ │ ├── style.css │ │ │ └── gspinner.min.css │ │ ├── js │ │ │ ├── g-spinner.min.js │ │ │ ├── html5shiv.min.js │ │ │ └── jquery.cookie.js │ │ └── yaml │ │ │ ├── scripts │ │ │ ├── shBrushPython.js │ │ │ ├── shBrushCSharp.js │ │ │ └── shBrushYaml.js │ │ │ └── styles │ │ │ └── shThemeDefault.css │ ├── WEB-INF │ │ ├── views │ │ │ ├── common │ │ │ │ ├── emptyLayout.jsp │ │ │ │ ├── alert.jsp │ │ │ │ ├── loadingSpinner.jsp │ │ │ │ ├── footer.jsp │ │ │ │ ├── syntaxHighlighter.jsp │ │ │ │ ├── adminLeftMenu.jsp │ │ │ │ ├── defaultLayout.jsp │ │ │ │ ├── modal.jsp │ │ │ │ ├── commonYaml.jsp │ │ │ │ ├── unauthorized.jsp │ │ │ │ └── leftMenu.jsp │ │ │ ├── index.jsp │ │ │ ├── pods │ │ │ │ ├── main.jsp │ │ │ │ ├── yaml.jsp │ │ │ │ └── events.jsp │ │ │ ├── replicasets │ │ │ │ ├── main.jsp │ │ │ │ ├── yaml.jsp │ │ │ │ └── events.jsp │ │ │ ├── namespaces │ │ │ │ └── events.jsp │ │ │ ├── nodes │ │ │ │ └── events.jsp │ │ │ ├── services │ │ │ │ ├── yaml.jsp │ │ │ │ └── events.jsp │ │ │ ├── deployments │ │ │ │ ├── main.jsp │ │ │ │ ├── yaml.jsp │ │ │ │ └── events.jsp │ │ │ └── persistentVolumeClaims │ │ │ │ ├── yaml.jsp │ │ │ │ └── events.jsp │ │ ├── common │ │ │ └── customTag.tld │ │ └── tiles │ │ │ └── tiles.xml │ └── messages │ │ └── message.properties │ ├── resources │ ├── templates │ │ └── instance │ │ │ ├── create_account.ftl │ │ │ ├── create_roleBinding.ftl │ │ │ ├── create_init_role.ftl │ │ │ ├── create_role.ftl │ │ │ ├── create_admin_role.ftl │ │ │ └── create_regular_role.ftl │ ├── logback-spring.xml │ ├── application.yml │ └── public │ │ └── error │ │ ├── 401.html │ │ ├── 404.html │ │ ├── 500.html │ │ └── 403.html │ └── java │ └── org │ └── paasta │ └── caas │ └── dashboard │ ├── users │ ├── UsersList.java │ └── Users.java │ ├── nodes │ ├── support │ │ ├── NodesAddress.java │ │ ├── NodesStatus.java │ │ └── NodesSystemInfo.java │ ├── NodesList.java │ ├── Nodes.java │ ├── NodesService.java │ └── NodesController.java │ ├── common │ ├── model │ │ ├── CommonAddresses.java │ │ ├── AdminToken.java │ │ ├── CommonPodSpec.java │ │ ├── CommonNotReadyAddresses.java │ │ ├── CommonPort.java │ │ ├── CommonLabelSelector.java │ │ ├── CommonOwnerReferences.java │ │ ├── CommonPodTemplateSpec.java │ │ ├── CommonRoleRule.java │ │ ├── CommonTypedLocalObjectReference.java │ │ ├── CommonSubset.java │ │ ├── CommonResourceRequirement.java │ │ ├── CommonObjectReference.java │ │ ├── CommonCondition.java │ │ ├── CommonContainer.java │ │ ├── CommonStatus.java │ │ ├── CommonMetaData.java │ │ └── CommonSpec.java │ ├── CustomTag.java │ ├── PropertyService.java │ ├── TemplateService.java │ ├── AspectService.java │ └── CommonService.java │ ├── workloads │ ├── pods │ │ ├── support │ │ │ ├── Volume.java │ │ │ └── SecretVolumeSource.java │ │ ├── PodsList.java │ │ ├── Pods.java │ │ └── PodsService.java │ ├── deployments │ │ ├── support │ │ │ ├── DeploymentsStrategy.java │ │ │ ├── RollingUpdateDeployments.java │ │ │ ├── DeploymentsStatus.java │ │ │ └── DeploymentsSpec.java │ │ ├── DeploymentsList.java │ │ ├── Deployments.java │ │ └── DeploymentsService.java │ ├── replicaSets │ │ ├── ReplicaSetsList.java │ │ ├── ReplicaSets.java │ │ └── ReplicaSetsService.java │ └── overview │ │ └── WorkloadOverviewController.java │ ├── intro │ ├── accessInfo │ │ ├── AccessInfo.java │ │ ├── AccessInfoService.java │ │ └── AccessInfoController.java │ ├── privateRegistryInfo │ │ └── PrivateRegistryInfoController.java │ └── overview │ │ └── IntroOverviewController.java │ ├── clusters │ └── namespaces │ │ ├── ResourceQuotaStatus.java │ │ ├── ResourceQuotaSpec.java │ │ ├── ResourceQuotaList.java │ │ ├── ResourceQuota.java │ │ ├── Namespaces.java │ │ ├── NamespacesService.java │ │ └── NamespacesController.java │ ├── roles │ ├── RolesList.java │ ├── Roles.java │ └── RolesController.java │ ├── customServices │ ├── CustomServicesList.java │ ├── CustomServices.java │ └── CustomServicesService.java │ ├── persistentVolumeClaims │ ├── PersistentVolumeClaimsList.java │ ├── support │ │ ├── PersistentVolumeClaimsStatus.java │ │ └── PersistentVolumeClaimsSpec.java │ ├── PersistentVolumeClaims.java │ └── PersistentVolumeClaimsService.java │ ├── PaasTaCaasDashboardApplication.java │ ├── events │ ├── EventsList.java │ ├── Events.java │ ├── EventsService.java │ └── EventsController.java │ ├── config │ ├── security │ │ └── SsoFilterWrapper.java │ ├── RestTemplateConfig.java │ ├── DashboardController.java │ ├── TilesConfig.java │ ├── SpringMVCWebAppInitializer.java │ └── WebMvcConfig.java │ ├── endpoints │ ├── Endpoints.java │ ├── EndpointsController.java │ └── EndpointsService.java │ ├── security │ ├── SsoLogoutHandler.java │ ├── SsoLogoutRedirectStrategy.java │ ├── SSLUtils.java │ ├── SsoAuthenticationFailureHandler.java │ ├── SsoAuthenticationSuccessHandler.java │ └── SsoAuthenticationProcessingFilter.java │ ├── refreshSession │ └── RefreshSessionService.java │ └── cf │ └── CfService.java ├── README.md └── .gitignore /src/main/webapp/resources/images/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/select.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/favicon.ico -------------------------------------------------------------------------------- /src/main/webapp/resources/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/loading.gif -------------------------------------------------------------------------------- /src/main/webapp/resources/images/main/dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/main/dev.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/main/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/main/logo.png -------------------------------------------------------------------------------- /src/main/resources/templates/instance/create_account.ftl: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: ${userName} 5 | namespace: ${spaceName} -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/lnb_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/lnb_1.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/lnb_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/lnb_2.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/lnb_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/lnb_3.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/lnb_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/lnb_4.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/lnb_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/lnb_5.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/favicon_old.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/favicon_old.ico -------------------------------------------------------------------------------- /src/main/webapp/resources/images/main/lnb_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/main/lnb_10.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/main/lnb_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/main/lnb_11.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/main/lnb_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/main/lnb_9.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/graph-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/graph-bar.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/main/logo_old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/main/logo_old.png -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/NanumGothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/NanumGothic.woff -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/fa-solid-900.eot -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/fa-solid-900.woff -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/NanumGothic-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/NanumGothic-Bold.eot -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/NanumGothic-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/NanumGothic-Bold.otf -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /src/main/webapp/resources/images/custom-caas/cpu_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/custom-caas/cpu_ico.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/custom-caas/ico_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/custom-caas/ico_bg.png -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/NanumGothic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/NanumGothic-Bold.woff -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/NanumGothic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/NanumGothic-Bold.woff2 -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/graph-cpu-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/graph-cpu-sample.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/custom-caas/disk_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/custom-caas/disk_ico.png -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/NanumGothic-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/NanumGothic-Regular.eot -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/NanumGothic-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/NanumGothic-Regular.otf -------------------------------------------------------------------------------- /src/main/webapp/resources/css/fonts/NanumGothic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/css/fonts/NanumGothic-Regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/graph-disk-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/graph-disk-sample.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/caas/graph-memory-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/caas/graph-memory-sample.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/custom-caas/memory_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaaS-TA/PAAS-TA-CAAS-DASHBOARD/HEAD/src/main/webapp/resources/images/custom-caas/memory_ico.png -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/emptyLayout.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Default layout 3 | 4 | author: REX 5 | version: 1.0 6 | since: 2018.08.08 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> 10 | -------------------------------------------------------------------------------- /src/main/webapp/messages/message.properties: -------------------------------------------------------------------------------- 1 | #COMMON 2 | #common.info.result.success=요청하신 작업이 정상 처리 되었습니다. 3 | #insert.result.success={0} 정보가 생성 되었습니다. 4 | #update.result.success={0} 정보가 저장 되었습니다. 5 | #delete.result.success={0} 정보가 삭제 되었습니다. 6 | #update.result.failure={0} 정보가 유효하지 않습니다. 7 | #delete.confirm.message={0}를 삭제하시겠습니까? 8 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/users/UsersList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.users; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | @Data 8 | public class UsersList { 9 | private String resultCode; 10 | private String resultMessage; 11 | 12 | private List items; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/alert.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Alert 3 | 4 | author: REX 5 | version: 1.0 6 | since: 2018.09.04 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | 10 | 11 | Alertx 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/templates/instance/create_roleBinding.ftl: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: ${roleName}-binding 5 | namespace: ${spaceName} 6 | subjects: 7 | - kind: ServiceAccount 8 | name: ${userName} 9 | roleRef: 10 | kind: Role 11 | name: ${roleName} 12 | apiGroup: rbac.authorization.k8s.io 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PAAS-TA-CAAS-DASHBOARD 2 | PaaS-TA 에서 제공하는 Container 서비스의 관리와 모니터링을 용이하게 하기 위하여 제공하는 UI 서비스이다. 3 | 4 | ## 개발 환경 5 | - JDK 8 6 | - Gradle 4.4.1 7 | - Spring Io Platform Cairo-SR3 8 | - Spring Boot 2.0.4 9 | - Spring Security 5.0.7 10 | - TomcatEmded 8.5.32 11 | - JSTL 1.2 12 | - Gson 2.8.5 13 | - Apache Tiles 3.0.8 14 | - Lombok 1.18.2 15 | - Jacoco 0.8.1 -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/nodes/support/NodesAddress.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.nodes.support; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Nodes address 클래스 7 | * 8 | * @author Hyungu Cho 9 | * @version 1.0 10 | * @since 2018.09.17 11 | */ 12 | @Data 13 | class NodesAddress { 14 | private String address; 15 | private String type; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonAddresses.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Common Addresses Model 클래스 7 | * 8 | * @author REX 9 | * @version 1.0 10 | * @since 2018.08.13 11 | */ 12 | @Data 13 | class CommonAddresses { 14 | private String ip; 15 | private String nodeName; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/AdminToken.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * AdminToken Model 클래스 7 | * 8 | * @author Hyerin 9 | * @version 1.0 10 | * @since 2018.08.22 11 | */ 12 | @Data 13 | public class AdminToken { 14 | private String token_name; 15 | private String token_value; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/index.jsp: -------------------------------------------------------------------------------- 1 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 3 | 4 | 5 | 6 | 7 | 8 | index 9 | 10 | 11 | 인덱스 페이지 입니다. 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/pods/support/Volume.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.pods.support; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Volume Model 클래스 7 | * 8 | * @author Hyungu Cho 9 | * @version 1.0 10 | * @since 2018.09.04 11 | */ 12 | @Data 13 | public class Volume { 14 | private String name; 15 | private SecretVolumeSource secret; 16 | } -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonPodSpec.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * ReplicaSets Model 클래스 9 | * 10 | * @author CISS 11 | * @version 1.0 12 | * @since 2018.08.07 13 | */ 14 | @Data 15 | public class CommonPodSpec { 16 | private List containers; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonNotReadyAddresses.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Common Not Ready Addresses Model 클래스 7 | * 8 | * @author REX 9 | * @version 1.0 10 | * @since 2018.09.14 11 | */ 12 | @Data 13 | class CommonNotReadyAddresses { 14 | private String ip; 15 | private String nodeName; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonPort.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Common Ports Model 클래스 7 | * 8 | * @author REX 9 | * @version 1.0 10 | * @since 2018.08.13 11 | */ 12 | @Data 13 | public class CommonPort { 14 | private String name; 15 | private String port; 16 | private String protocol; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonLabelSelector.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * ReplicaSets Model 클래스 9 | * 10 | * @author CISS 11 | * @version 1.0 12 | * @since 2018.08.07 13 | */ 14 | @Data 15 | public class CommonLabelSelector { 16 | private Map matchLabels; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonOwnerReferences.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Common CommonOwnerReferences Model 클래스 7 | * 8 | * @author hyerin 9 | * @version 1.0 10 | * @since 2018.09.19 11 | */ 12 | @Data 13 | class CommonOwnerReferences { 14 | private String name; 15 | private boolean controller; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonPodTemplateSpec.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * ReplicaSets Model 클래스 7 | * 8 | * @author CISS 9 | * @version 1.0 10 | * @since 2018.08.07 11 | */ 12 | @Data 13 | public class CommonPodTemplateSpec { 14 | private CommonMetaData metadata; 15 | private CommonPodSpec spec; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonRoleRule.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author hrjin 9 | * @version 1.0 10 | * @since 2018-08-17 11 | */ 12 | @Data 13 | public class CommonRoleRule { 14 | private List apiGroups; 15 | private List resources; 16 | private List verbs; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/intro/accessInfo/AccessInfo.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.intro.accessInfo; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Intro AccessInfo Model 클래스 7 | * 8 | * @author hrjin 9 | * @version 1.0 10 | * @since 2018.09.10 11 | */ 12 | @Data 13 | class AccessInfo { 14 | private String resultCode; 15 | 16 | private String caCertToken; 17 | private String userAccessToken; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/pods/support/SecretVolumeSource.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.pods.support; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Secret Volume Source Model 클래스 (Secret 클래스가 아님) 7 | * 8 | * @author Hyungu Cho 9 | * @version 1.0 10 | * @since 2018.09.04 11 | */ 12 | @Data 13 | class SecretVolumeSource { 14 | private String secretName; 15 | private String defaultMode; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/nodes/NodesList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.nodes; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Nodes List Model 클래스 9 | * 10 | * @author Hyungu Cho 11 | * @version 1.0 12 | * @since 2018.08.13 13 | */ 14 | @Data 15 | public class NodesList { 16 | private String resultCode; 17 | private String resultMessage; 18 | 19 | private List items; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/deployments/support/DeploymentsStrategy.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.deployments.support; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * DeploymentsStrategy Model 클래스 7 | * 8 | * @author PHR 9 | * @version 1.0 10 | * @since 2018.08.13 11 | */ 12 | @Data 13 | public class DeploymentsStrategy { 14 | private String type; 15 | private RollingUpdateDeployments rollingUpdate; 16 | } -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/deployments/support/RollingUpdateDeployments.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.deployments.support; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * RollingUpdateDeployments 7 | * 8 | * @author PHR 9 | * @version 1.0 10 | * @since 2018.08.13 11 | */ 12 | @Data 13 | public class RollingUpdateDeployments { 14 | private String maxSurge; 15 | private String maxUnavailable; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonTypedLocalObjectReference.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * TypedLocalObjectReference Model 클래스 7 | * 8 | * @author hrjin 9 | * @version 1.0 10 | * @since 2019-10-24 11 | */ 12 | @Data 13 | public class CommonTypedLocalObjectReference { 14 | private String apiGroup; 15 | private String kind; 16 | private String name; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/clusters/namespaces/ResourceQuotaStatus.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.clusters.namespaces; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * ResourceQuotaStatus Model 클래스 9 | * 10 | * @author indra 11 | * @version 1.0 12 | * @since 2018.08.28 13 | */ 14 | @Data 15 | public class ResourceQuotaStatus { 16 | 17 | private Map hard; 18 | private Map used; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/clusters/namespaces/ResourceQuotaSpec.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.clusters.namespaces; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * ResourceQuotaSpec Model 클래스 10 | * 11 | * @author indra 12 | * @version 1.0 13 | * @since 2018.08.28 14 | */ 15 | @Data 16 | public class ResourceQuotaSpec { 17 | 18 | private Map hard; 19 | private List scopes; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/roles/RolesList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.roles; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * Roles List Model 클래스 10 | * 11 | * @author hrjin 12 | * @version 1.0 13 | * @since 2018-08-16 14 | */ 15 | @Data 16 | public class RolesList { 17 | private String resultCode; 18 | private String resultMessage; 19 | 20 | private List items = new ArrayList<>(); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/customServices/CustomServicesList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.customServices; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Custom Services List Model 클래스 9 | * 10 | * @author REX 11 | * @version 1.0 12 | * @since 2018.8.09 13 | */ 14 | @Data 15 | class CustomServicesList { 16 | 17 | private String resultCode; 18 | private String resultMessage; 19 | 20 | private List items; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/persistentVolumeClaims/PersistentVolumeClaimsList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.persistentVolumeClaims; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * PersistentVolumeClaims List Model 클래스 9 | * 10 | * @author hrjin 11 | * @version 1.0 12 | * @since 2019-10-24 13 | */ 14 | @Data 15 | public class PersistentVolumeClaimsList { 16 | private String resultCode; 17 | private List items; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/clusters/namespaces/ResourceQuotaList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.clusters.namespaces; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * ResourceQuotaList Model 클래스 9 | * 10 | * @author indra 11 | * @version 1.0 12 | * @since 2018.08.28 13 | */ 14 | @Data 15 | public class ResourceQuotaList { 16 | 17 | private String resultCode; 18 | private String resultMessage; 19 | private List items; 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonSubset.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Common Subsets Model 클래스 9 | * 10 | * @author REX 11 | * @version 1.0 12 | * @since 2018.08.13 13 | */ 14 | @Data 15 | public class CommonSubset { 16 | private List addresses; 17 | private List notReadyAddresses; 18 | private List ports; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/roles/Roles.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.roles; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Roles Model 클래스 7 | * 8 | * @author hrjin 9 | * @version 1.0 10 | * @since 2018-08-16 11 | */ 12 | @Data 13 | public class Roles { 14 | 15 | private String roleSetCode; 16 | private String resourceCode; 17 | private String verbCode; 18 | private String description; 19 | private String created; 20 | private String resultCode; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonResourceRequirement.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * Common Resource Requirement Model 클래스 9 | * 10 | * @author Hyungu Cho 11 | * @version 1.0 12 | * @since 2018.08.16 13 | */ 14 | @Data 15 | public class CommonResourceRequirement { 16 | // TODO :: USE MODEL 17 | private Map limits; 18 | private Map requests; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/loadingSpinner.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Common Syntax Highlighter 3 | 4 | author: REX 5 | version: 1.0 6 | since: 2018.09.13 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | 21 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/pods/PodsList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.pods; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Pods List Model 클래스 9 | * 10 | * @author Hyungu Cho 11 | * @version 1.0 12 | * @since 2018.8.13 13 | */ 14 | @Data 15 | public class PodsList { 16 | private String resultCode; 17 | private String resultMessage; 18 | 19 | private List items; 20 | 21 | private String selector; 22 | private String serviceName; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/replicaSets/ReplicaSetsList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.replicaSets; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * ReplicaSets List Model 클래스 10 | * 11 | * @author CISS 12 | * @version 1.0 13 | * @since 2018.08.07 14 | */ 15 | @Data 16 | public class ReplicaSetsList { 17 | 18 | private String resultCode; 19 | private String resultMessage; 20 | 21 | private List items; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/deployments/DeploymentsList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.deployments; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * Deployments List Model 클래스 10 | * 11 | * @author PHR 12 | * @version 1.0 13 | * @since 2018.08.13 14 | */ 15 | @Data 16 | public class DeploymentsList { 17 | private String resultCode; 18 | private String resultMessage; 19 | 20 | private List items = new ArrayList<>(); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonObjectReference.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * ObjectReference Model 클래스 7 | * 8 | * @author CISS 9 | * @version 1.0 10 | * @since 2018.08.23 11 | */ 12 | @Data 13 | public class CommonObjectReference { 14 | private String apiVersion; 15 | private String fieldPath; 16 | private String kind; 17 | private String name; 18 | private String namespace; 19 | private String resourceVersion; 20 | private String uid; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonCondition.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Common Condition Model 클래스 7 | * 8 | * @author REX 9 | * @author Hyungu Cho 10 | * @version 1.0 11 | * @since 2018.08.13 12 | */ 13 | @Data 14 | public class CommonCondition { 15 | private String type; 16 | private String status; 17 | 18 | private String message; 19 | private String reason; 20 | 21 | private String lastHeartbeatTime; 22 | private String lastTransitionTime; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/PaasTaCaasDashboardApplication.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; 7 | 8 | @SpringBootApplication 9 | public class PaasTaCaasDashboardApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(PaasTaCaasDashboardApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/events/EventsList.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.events; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Events List Model 클래스 10 | * 11 | * @author Ciss 12 | * @version 1.0 13 | * @since 2018.8.13 14 | */ 15 | @Data 16 | public class EventsList { 17 | 18 | private String resultCode; 19 | private String resultMessage; 20 | private List items; 21 | 22 | // FOR DASHBOARD 23 | private String resourceName; 24 | private String status; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/nodes/support/NodesStatus.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.nodes.support; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * Nodes status model 클래스 10 | * 11 | * @author Hyungu Cho 12 | * @version 1.0 13 | * @since 2018.08.17 14 | */ 15 | @Data 16 | public class NodesStatus { 17 | private Map capacity; 18 | private Map allocatable; 19 | 20 | private List> conditions; 21 | private List addresses; 22 | private NodesSystemInfo nodeInfo; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/config/security/SsoFilterWrapper.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.config.security; 2 | 3 | import javax.servlet.Filter; 4 | 5 | /** 6 | * SsoFilterWrapper 클래스. 7 | * 8 | * @author indra 9 | * @version 1.0 10 | * @since 2018.08.28 11 | */ 12 | class SsoFilterWrapper { 13 | 14 | static SsoFilterWrapper wrap(Filter filter){ 15 | return new SsoFilterWrapper(filter); 16 | } 17 | 18 | private final Filter filter; 19 | 20 | SsoFilterWrapper(Filter filter) { 21 | this.filter = filter; 22 | } 23 | 24 | Filter unwrap() { 25 | return filter; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/clusters/namespaces/ResourceQuota.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.clusters.namespaces; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | 6 | /** 7 | * ResourceQuota Model 클래스 8 | * 9 | * @author indra 10 | * @version 1.0 11 | * @since 2018.08.28 12 | */ 13 | @Data 14 | public class ResourceQuota { 15 | 16 | private String resultCode; 17 | private String resultMessage; 18 | 19 | private String apiVersion; 20 | private String kind; 21 | private CommonMetaData metadata; 22 | private ResourceQuotaSpec spec; 23 | private ResourceQuotaStatus status; 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonContainer.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * CommonContainer Model 클래스 10 | * 11 | * @author REX 12 | * @author CISS 13 | * @author Hyungu Cho 14 | * @version 1.0 15 | * @since 2018.08.13 16 | */ 17 | @Data 18 | public class CommonContainer { 19 | private String name; 20 | private String image; 21 | private List args; 22 | private List env; 23 | private List ports; 24 | private CommonResourceRequirement resources; 25 | private List command; 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/persistentVolumeClaims/support/PersistentVolumeClaimsStatus.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.persistentVolumeClaims.support; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonCondition; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * PersistentVolumeClaimsStatus Model 클래스 11 | * 12 | * @author hrjin 13 | * @version 1.0 14 | * @since 2019-10-24 15 | */ 16 | @Data 17 | public class PersistentVolumeClaimsStatus { 18 | private List accessModes; 19 | private Map capacity; 20 | private List conditions; 21 | private String phase; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/nodes/Nodes.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.nodes; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.common.model.CommonSpec; 6 | import org.paasta.caas.dashboard.nodes.support.NodesStatus; 7 | 8 | /** 9 | * Nodes Model 클래스 10 | * 11 | * @author Hyungu Cho 12 | * @version 1.0 13 | * @since 2018.08.13 14 | */ 15 | @Data 16 | public class Nodes { 17 | private String resultCode; 18 | private String resultMessage; 19 | 20 | private CommonMetaData metadata; 21 | private CommonSpec spec; 22 | private NodesStatus status; 23 | 24 | private String nodeName; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/config/RestTemplateConfig.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.client.RestTemplate; 6 | 7 | /** 8 | * RestTemplate Config 클래스 9 | * 10 | * @author REX 11 | * @version 1.0 12 | * @since 2018.08.02 13 | */ 14 | @Configuration 15 | public class RestTemplateConfig { 16 | 17 | /** 18 | * Rest template rest template. 19 | * 20 | * @return the rest template 21 | */ 22 | @Bean 23 | public RestTemplate restTemplate() { 24 | return new RestTemplate(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/nodes/support/NodesSystemInfo.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.nodes.support; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Nodes system information model 클래스 7 | * 8 | * @author Hyungu Cho 9 | * @version 1.0 10 | * @since 2018.09.17 11 | */ 12 | @Data 13 | class NodesSystemInfo { 14 | private String architecture; 15 | private String bootID; 16 | private String containerRuntimeVersion; 17 | private String kernelVersion; 18 | private String kubeProxyVersion; 19 | private String kubeletVersion; 20 | private String machineID; 21 | private String operatingSystem; 22 | private String osImage; 23 | private String systemUUID; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonStatus.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Common Status Model 클래스 9 | * 10 | * @author REX 11 | * @version 1.0 12 | * @since 2018.08.09 13 | */ 14 | @Data 15 | public class CommonStatus { 16 | private int availableReplicas; 17 | private int fullyLabeledReplicas; 18 | private long observedGeneration; 19 | private int readyReplicas; 20 | private int replicas; 21 | private String phase; 22 | private List containerStatuses; 23 | private List conditions; 24 | private String podIP; 25 | private String qosClass; 26 | } 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # ignore output and build directories 14 | build/** 15 | bin/** 16 | out/** 17 | 18 | # Package Files # 19 | *.jar 20 | *.war 21 | *.ear 22 | *.zip 23 | *.tar.gz 24 | *.rar 25 | 26 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 27 | hs_err_pid* 28 | 29 | # generated gradle directories and files 30 | .gradle 31 | .settings 32 | 33 | # eclise settings 34 | .classpath 35 | .project 36 | 37 | # idea settings 38 | *.iml 39 | *.idea 40 | .idea/** 41 | 42 | # remove spring bean configuration 43 | .spring* 44 | 45 | /logs/* -------------------------------------------------------------------------------- /src/main/webapp/resources/js/g-spinner.min.js: -------------------------------------------------------------------------------- 1 | !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(i,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(i)),e(n),n}:e(jQuery)}(function(e,i,n,d){e.fn.gSpinner=function(i){var n={loading:!0,scale:1},d=e(this);"hide"===i&&(i={loading:!1});var c=e.extend({},n,i);return this.each(function(){if(c.loading===!0){var i=e("").append(["","","",""].join("")).css({zoom:c.scale});d.empty().append(i)}else d.removeClass("loading").empty()})}}); 2 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/clusters/namespaces/Namespaces.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.clusters.namespaces; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.common.model.CommonSpec; 6 | import org.paasta.caas.dashboard.common.model.CommonStatus; 7 | 8 | /** 9 | * Namespace Model 클래스 10 | * 11 | * @author indra 12 | * @version 1.0 13 | * @since 2018.08.28 14 | */ 15 | @Data 16 | public class Namespaces { 17 | 18 | private String resultCode; 19 | private String resultMessage; 20 | 21 | private String kind; 22 | private String apiVersion; 23 | 24 | private CommonMetaData metadata; 25 | private CommonSpec spec; 26 | private CommonStatus status; 27 | } -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/deployments/support/DeploymentsStatus.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.deployments.support; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonCondition; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * DeploymentsStatus Model 클래스 10 | * 11 | * @author PHR 12 | * @version 1.0 13 | * @since 2018.08.13 14 | */ 15 | @Data 16 | public class DeploymentsStatus { 17 | private int availableReplicas; 18 | private int collisionCount; 19 | private List conditions; 20 | private long observedGeneration; 21 | private int readyReplicas; 22 | private int replicas; 23 | private int unavailableReplicas; 24 | private int updatedReplicas; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/replicaSets/ReplicaSets.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.replicaSets; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.common.model.CommonSpec; 6 | import org.paasta.caas.dashboard.common.model.CommonStatus; 7 | 8 | import java.util.Map; 9 | 10 | /** 11 | * ReplicaSets Model 클래스 12 | * 13 | * @author CISS 14 | * @version 1.0 15 | * @since 2018.08.07 16 | */ 17 | @Data 18 | public class ReplicaSets { 19 | 20 | private String resultCode; 21 | private String resultMessage; 22 | 23 | private CommonMetaData metadata; 24 | private CommonSpec spec; 25 | private CommonStatus status; 26 | 27 | private String sourceTypeYaml; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/pods/main.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Pods list 3 | @author Hyungu Cho 4 | @version 1.0 5 | @since 2018.09.04 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 27 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/config/DashboardController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.config; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | /** 8 | * Dashboard Controller 클래스. 9 | * 10 | * @author indra 11 | * @version 1.0 12 | * @since 2018.08.28 13 | */ 14 | @Controller 15 | public class DashboardController { 16 | 17 | 18 | /** 19 | * 권한없음 페이지로 이동한다. 20 | */ 21 | @RequestMapping(value = "/common/error/unauthorized") 22 | public ModelAndView pageError401() { 23 | ModelAndView model = new ModelAndView(); 24 | 25 | model.setViewName("/common/unauthorized"); 26 | return model; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/customServices/CustomServices.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.customServices; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.common.model.CommonSpec; 6 | import org.paasta.caas.dashboard.common.model.CommonStatus; 7 | 8 | /** 9 | * Custom Services Model 클래스 10 | * 11 | * @author REX 12 | * @version 1.0 13 | * @since 2018.08.09 14 | */ 15 | @Data 16 | class CustomServices { 17 | 18 | private String resultCode; 19 | private String resultMessage; 20 | 21 | private CommonMetaData metadata; 22 | private CommonSpec spec; 23 | private CommonStatus status; 24 | private String sourceTypeYaml; 25 | 26 | // FOR DASHBOARD 27 | private String serviceName; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/deployments/support/DeploymentsSpec.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.deployments.support; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonLabelSelector; 5 | import org.paasta.caas.dashboard.common.model.CommonPodTemplateSpec; 6 | 7 | /** 8 | * DeploymentsSpec Model 클래스 9 | * 10 | * @author PHR 11 | * @version 1.0 12 | * @since 2018.08.13 13 | */ 14 | @Data 15 | public class DeploymentsSpec { 16 | private int minReadySeconds; 17 | private boolean paused; 18 | private int progressDeadlineSeconds; 19 | private int replicas; 20 | private int revisionHistoryLimit; 21 | private CommonLabelSelector selector; 22 | private DeploymentsStrategy strategy; 23 | private CommonPodTemplateSpec template; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/replicasets/main.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | ReplicaSet main 3 | @author CISS 4 | @version 1.0 5 | @since 2018.08.09 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/namespaces/events.jsp: -------------------------------------------------------------------------------- 1 | <%--TODO :: CREATE COMMENTS--%> 2 | <%@ page contentType="text/html;charset=UTF-8" %> 3 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 4 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 5 | 6 | 7 | 8 | 9 | 28 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/pods/Pods.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.pods; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.common.model.CommonSpec; 6 | import org.paasta.caas.dashboard.common.model.CommonStatus; 7 | 8 | import java.util.Map; 9 | 10 | /** 11 | * Pods Model 클래스 12 | * 13 | * @author Hyungu Cho 14 | * @version 1.0 15 | * @since 2018.08.13 16 | */ 17 | @Data 18 | public class Pods { 19 | private String resultCode; 20 | private String resultMessage; 21 | 22 | private CommonMetaData metadata; 23 | private CommonSpec spec; 24 | private CommonStatus status; 25 | 26 | private String selector; 27 | private String serviceName; 28 | 29 | private Map source; 30 | private String sourceTypeYaml; 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/deployments/Deployments.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.deployments; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.workloads.deployments.support.DeploymentsSpec; 6 | import org.paasta.caas.dashboard.workloads.deployments.support.DeploymentsStatus; 7 | 8 | import java.util.Map; 9 | 10 | /** 11 | * Deployments Model 클래스 12 | * 13 | * @author PHR 14 | * @version 1.0 15 | * @since 2018.08.13 16 | */ 17 | @Data 18 | public class Deployments { 19 | private String resultCode; 20 | private String resultMessage; 21 | 22 | private CommonMetaData metadata; 23 | private DeploymentsSpec spec; 24 | private DeploymentsStatus status; 25 | 26 | private Map source; 27 | private String sourceTypeYaml; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/endpoints/Endpoints.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.endpoints; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.common.model.CommonSpec; 6 | import org.paasta.caas.dashboard.common.model.CommonStatus; 7 | import org.paasta.caas.dashboard.common.model.CommonSubset; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * Endpoints Model 클래스 13 | * 14 | * @author REX 15 | * @version 1.0 16 | * @since 2018.08.13 17 | */ 18 | @Data 19 | public class Endpoints { 20 | 21 | private String resultCode; 22 | private String resultMessage; 23 | 24 | private CommonMetaData metadata; 25 | private CommonSpec spec; 26 | private CommonStatus status; 27 | private List subsets; 28 | 29 | // FOR DASHBOARD 30 | private String serviceName; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/security/SsoLogoutHandler.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.security; 2 | 3 | import org.springframework.beans.factory.annotation.Qualifier; 4 | import org.springframework.security.core.Authentication; 5 | import org.springframework.security.core.context.SecurityContextHolder; 6 | import org.springframework.security.web.authentication.logout.LogoutHandler; 7 | import org.springframework.stereotype.Component; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | 12 | 13 | @Component 14 | @Qualifier("ssoLogoutHandler") 15 | public class SsoLogoutHandler implements LogoutHandler { 16 | 17 | @Override 18 | public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { 19 | SecurityContextHolder.getContext().setAuthentication(null); 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/persistentVolumeClaims/PersistentVolumeClaims.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.persistentVolumeClaims; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.persistentVolumeClaims.support.PersistentVolumeClaimsSpec; 6 | import org.paasta.caas.dashboard.persistentVolumeClaims.support.PersistentVolumeClaimsStatus; 7 | 8 | 9 | import java.util.Map; 10 | 11 | /** 12 | * PersistentVolumeClaims Model 클래스 13 | * 14 | * @author hrjin 15 | * @version 1.0 16 | * @since 2019-10-24 17 | */ 18 | @Data 19 | public class PersistentVolumeClaims { 20 | private String resultCode; 21 | 22 | private CommonMetaData metadata; 23 | private PersistentVolumeClaimsSpec spec; 24 | private PersistentVolumeClaimsStatus status; 25 | 26 | private Map source; 27 | private String sourceTypeYaml; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/pods/yaml.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Pods YAML 3 | @author Hyungu Cho 4 | @version 1.0 5 | @since 2018.08.14 6 | --%> 7 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 29 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/users/Users.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.users; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * User Model 클래스 7 | * 8 | * @author hrjin 9 | * @version 1.0 10 | * @since 2018.08.02 11 | */ 12 | @Data 13 | public class Users { 14 | 15 | private String resultCode; 16 | private String resultMessage; 17 | 18 | private long id; 19 | private String userId; 20 | private String serviceInstanceId; 21 | private String caasNamespace; 22 | private String caasAccountTokenName; 23 | private String caasAccountName; 24 | private String organizationGuid; 25 | private String spaceGuid; 26 | private String roleSetCode; 27 | 28 | private String description; 29 | private String created; 30 | private String lastModified; 31 | 32 | private String caasUrl; 33 | private String caasClusterName; 34 | 35 | private String planName; 36 | private String planDescription; 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/persistentVolumeClaims/support/PersistentVolumeClaimsSpec.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.persistentVolumeClaims.support; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonLabelSelector; 5 | import org.paasta.caas.dashboard.common.model.CommonResourceRequirement; 6 | import org.paasta.caas.dashboard.common.model.CommonTypedLocalObjectReference; 7 | 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * PersistentVolumeClaimsSpec Model 클래스 13 | * 14 | * @author hrjin 15 | * @version 1.0 16 | * @since 2019-10-24 17 | */ 18 | @Data 19 | public class PersistentVolumeClaimsSpec { 20 | private List accessModes; 21 | private String volumeName; 22 | private String storageClassName; 23 | private String volumeMode; 24 | private CommonTypedLocalObjectReference dataSource; 25 | private CommonResourceRequirement resources; 26 | private CommonLabelSelector selector; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/nodes/events.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Nodes events 3 | @author Hyungu Cho 4 | @version 1.0 5 | @since 2018.08.14 6 | --%> 7 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/services/yaml.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Services yaml 3 | @author REX 4 | @version 1.0 5 | @since 2018.08.28 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | 34 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Footer 3 | 4 | author: REX 5 | version: 1.0 6 | since: 2018.08.07 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | 10 | 11 | 33 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/deployments/main.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 2 | <%-- 3 | Deployment main 4 | @author PHR 5 | @version 1.0 6 | @since 2018.08.14 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/deployments/yaml.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Deployment main 3 | @author PHR 4 | @version 1.0 5 | @since 2018.08.14 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/events/Events.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.events; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.common.model.CommonMetaData; 5 | import org.paasta.caas.dashboard.common.model.CommonObjectReference; 6 | 7 | 8 | /** 9 | * Events Model 클래스 10 | * 11 | * @author CISS 12 | * @version 1.0 13 | * @since 2018.08.13 14 | */ 15 | @Data 16 | public class Events { 17 | 18 | private String resultCode; 19 | private CommonMetaData metadata; 20 | //private String action; 21 | private int count; 22 | //private String eventTime; 23 | private String firstTimestamp; 24 | private String lastTimestamp; 25 | private String message; 26 | //private String reason; 27 | private EventSource source; 28 | private String type; 29 | private CommonObjectReference involvedObject; 30 | 31 | @Data 32 | public class EventSource { 33 | private String component; 34 | private String host; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/replicasets/yaml.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Replicaset yaml 3 | @author CISS 4 | @version 1.0 5 | @since 2018.08.14 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | 34 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/deployments/events.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Deployment events 3 | @author PHR 4 | @version 1.0 5 | @since 2018.08.14 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | 34 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/CustomTag.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common; 2 | 3 | import javax.servlet.jsp.tagext.SimpleTagSupport; 4 | 5 | /** 6 | * CustomTag 클래스. 7 | * 8 | * @author hyerin 9 | * @version 1.0 10 | * @since 2018.07.24 11 | */ 12 | public class CustomTag extends SimpleTagSupport { 13 | 14 | /** 15 | * Camel Case로 되어 있는 것을 분리해준다 16 | * ex) hyerinTest -> Hyerin Test 17 | * @param str 18 | * @return String 19 | */ 20 | public static String camelCaseParser(String str) { 21 | if(str == null || str.length() == 0) { 22 | return ""; 23 | } 24 | String TempStr = "" + str.toUpperCase().charAt(0); 25 | for(int index = 1; index < str.length(); index++) { 26 | 27 | if(Character.isUpperCase(str.charAt(index))) { 28 | TempStr += " " + str.charAt(index); 29 | continue; 30 | } 31 | TempStr += str.charAt(index); 32 | 33 | } 34 | return TempStr; 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/syntaxHighlighter.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Syntax Highlighter 3 | 4 | author: REX 5 | version: 1.0 6 | since: 2018.09.13 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | "> 13 | "> 14 | "> 15 | "> 16 | 17 | 18 | 22 | 23 | 24 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/refreshSession/RefreshSessionService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.refreshSession; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpSession; 7 | import java.util.Enumeration; 8 | 9 | /** 10 | * Refresh Session Service 클래스 11 | * 12 | * @author hrjin 13 | * @version 1.0 14 | * @since 2018-09-07 15 | */ 16 | @Service 17 | public class RefreshSessionService { 18 | 19 | public void removeRolesSession(HttpServletRequest request){ 20 | 21 | // refresh session -> controller 로 만들어서 javascript 에서 호출. 22 | // 롤 변경해주는 시점에 변경 후 호출한 다음 callback 해줄 때 화면 reload. 23 | HttpSession session = request.getSession(); 24 | 25 | Enumeration se = session.getAttributeNames(); 26 | while(se.hasMoreElements()){ 27 | String rsCode = (String)se.nextElement(); 28 | 29 | if(rsCode.indexOf("RS_") == 0){ 30 | session.removeAttribute(rsCode); 31 | } 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/persistentVolumeClaims/yaml.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: hrjin 4 | Date: 2019-10-28 5 | Time: 오후 4:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 10 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 11 | 12 | 13 | 14 | 34 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/persistentVolumeClaims/events.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: hrjin 4 | Date: 2019-10-28 5 | Time: 오후 4:32 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 10 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 11 | 12 | 13 | 14 | 34 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/services/events.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Services events 3 | @author REX 4 | @version 1.0 5 | @since 2018.08.28 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | 33 | -------------------------------------------------------------------------------- /src/main/resources/logback-spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true 7 | 8 | application.%d{yyyy-MM-dd}.log 9 | 7 10 | 11 | 12 | INFO 13 | 14 | 15 | 16 | %d{yyyy:MM:dd HH:mm:ss.SSS} %-5level --- [%thread] %logger{35} : %msg %n 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonMetaData.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | import lombok.Data; 5 | import lombok.experimental.Accessors; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * ListMeta Model 클래스 12 | * 13 | * @author REX 14 | * @version 1.0 15 | * @since 2018.08.09 16 | */ 17 | @Data 18 | public class CommonMetaData { 19 | private Map labels; 20 | private String name; 21 | private String namespace; 22 | private Map annotations; 23 | private String clusterName; 24 | private String creationTimestamp; 25 | private long deletionGracePeriodSeconds; 26 | private String deletionTimestamp; 27 | private List finalizers; 28 | private String generateName; 29 | private long generation; 30 | private String uid; 31 | private String resourceVersion; 32 | private String selfLink; 33 | private List ownerReferences; 34 | 35 | @Accessors(prefix = "_") 36 | @SerializedName("continue") 37 | private String _continue; 38 | } 39 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/common/customTag.tld: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | CommonUtil functions library 7 | CommonUtil functions 8 | 1.1 9 | 10 | cfn 11 | 12 | common/customTag.tld 13 | 14 | 15 | 16 | 카멜케이스를 분리하기 17 | 18 | camelCaseParser 19 | 20 | org.paasta.caas.dashboard.common.CustomTag 21 | 22 | java.lang.String camelCaseParser(java.lang.String) 23 | 24 | ${cfn:camelCaseParser(str)} 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/nodes/NodesService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.nodes; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Nodes Service 클래스 11 | * 12 | * @author Hyungu Cho 13 | * @version 1.0 14 | * @since 2018.08.13 15 | */ 16 | @Service 17 | public class NodesService { 18 | private final RestTemplateService restTemplateService; 19 | 20 | /** 21 | * Instantiates a new Nodes service. 22 | * 23 | * @param restTemplateService the rest template service 24 | */ 25 | @Autowired 26 | public NodesService(RestTemplateService restTemplateService) { 27 | this.restTemplateService = restTemplateService; 28 | } 29 | 30 | 31 | /** 32 | * Nodes 상세 정보를 조회한다. 33 | * 34 | * @param nodeName the node name 35 | * @return the node 36 | */ 37 | Nodes getNode(String nodeName) { 38 | return restTemplateService.send(Constants.TARGET_CAAS_API, 39 | Constants.URI_API_NODES_LIST.replace("{nodeName:.+}", nodeName), HttpMethod.GET, null, Nodes.class); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/pods/events.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Pods events 3 | @author Hyungu Cho 4 | @version 1.0 5 | @since 2018.08.14 6 | --%> 7 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 39 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/replicasets/events.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | ReplicaSet events 3 | @author CISS 4 | @version 1.0 5 | @since 2018.08.15 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | 42 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # Spring properties 2 | spring: 3 | application: 4 | name: CaasDashboard # Identify this application 5 | main: 6 | allow-bean-definition-overriding: true 7 | mvc: 8 | view: 9 | prefix: /WEB-INF/views/ 10 | suffix: .jsp 11 | freemarker: 12 | template-loader-path: classpath:/templates/ 13 | 14 | 15 | ##INFRA_ADMIN Settings 16 | project: 17 | name: paasta-caas-dashboard 18 | artifactId: paasta-caas-dashboard 19 | description: paasta-caas-dashboard 20 | info: 21 | app: 22 | encoding: Encoding - UTF-8 23 | java: 24 | source: Source - java ver 25 | target: Instance1 - Java ver 26 | spring: 27 | profiles: ${spring.profiles.active:default} 28 | build: 29 | name: ${project.name} 30 | artifact: ${project.artifactId} 31 | description: ${project.description} 32 | 33 | 34 | management: 35 | security: 36 | enabled: false 37 | 38 | # HTTP Server 39 | server: 40 | port: ${PORT:8091} # HTTP (Tomcat) port 41 | 42 | --- 43 | spring: 44 | profiles: local 45 | datasource: 46 | caas: 47 | driver-class-name: com.mysql.jdbc.Driver 48 | url: jdbc:mysql:// 49 | username: 50 | password: 51 | jpa: 52 | hibernate.ddl-auto: update 53 | show-sql: true 54 | database-platform: org.hibernate.dialect.MySQL5InnoDBDialect 55 | 56 | 57 | 58 | --- 59 | spring: 60 | profiles: dev 61 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/config/TilesConfig.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.view.tiles3.TilesConfigurer; 6 | import org.springframework.web.servlet.view.tiles3.TilesView; 7 | import org.springframework.web.servlet.view.tiles3.TilesViewResolver; 8 | 9 | /** 10 | * Tiles Config 클래스 11 | * 12 | * @author REX 13 | * @version 1.0 14 | * @since 2018.08.07 15 | */ 16 | @Configuration 17 | public class TilesConfig { 18 | 19 | /** 20 | * Tiles configurer tiles configurer. 21 | * 22 | * @return the tiles configurer 23 | */ 24 | @Bean 25 | public TilesConfigurer tilesConfigurer() { 26 | final TilesConfigurer configurer = new TilesConfigurer(); 27 | configurer.setDefinitions("WEB-INF/tiles/tiles.xml"); 28 | configurer.setCheckRefresh(true); 29 | return configurer; 30 | } 31 | 32 | 33 | /** 34 | * Tiles view resolver tiles view resolver. 35 | * 36 | * @return the tiles view resolver 37 | */ 38 | @Bean 39 | public TilesViewResolver tilesViewResolver() { 40 | final TilesViewResolver resolver = new TilesViewResolver(); 41 | resolver.setViewClass(TilesView.class); 42 | return resolver; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/adminLeftMenu.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Admin Left Menu 3 | 4 | author: REX 5 | version: 1.0 6 | since: 2018.08.23 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Users 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Roles 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/PropertyService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common; 2 | 3 | import lombok.Data; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.stereotype.Service; 6 | 7 | /** 8 | * Property Service 클래스 9 | * 10 | * @author REX 11 | * @version 1.0 12 | * @since 2018.08.07 13 | */ 14 | @Service 15 | @Data 16 | public class PropertyService { 17 | 18 | @Value("${caas.url}") 19 | private String caasUrl; 20 | 21 | @Value("${caas.cluster-name}") 22 | private String caasClusterName; 23 | 24 | @Value("${caasApi.url}") 25 | private String caasApiUrl; 26 | 27 | @Value("${commonApi.url}") 28 | private String commonApiUrl; 29 | 30 | @Value("${roleSet.administratorCode}") 31 | private String administratorCode; 32 | 33 | @Value("${roleSet.regularUserCode}") 34 | private String regularUserCode; 35 | 36 | @Value("${roleSet.initUserCode}") 37 | private String initUserCode; 38 | 39 | @Value("${roleSet.administratorName}") 40 | private String administratorName; 41 | 42 | @Value("${roleSet.regularUserName}") 43 | private String regularUserName; 44 | 45 | @Value("${roleSet.initUserName}") 46 | private String initUserName; 47 | 48 | @Value("${private.registry.imageName}") 49 | private String privateRegistryImageName; 50 | 51 | @Value("${private.registry.url}") 52 | private String privateRegistryUrl; 53 | } 54 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/defaultLayout.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Default layout 3 | 4 | author: REX 5 | version: 1.0 6 | since: 2018.08.08 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | <%@include file="commonLibs.jsp" %> 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/modal.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Modal 3 | 4 | author: REX 5 | version: 1.0 6 | since: 2018.09.03 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | × 17 | 18 | - 19 | 20 | 21 | 22 | - 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/config/SpringMVCWebAppInitializer.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.config; 2 | 3 | import org.springframework.web.filter.CharacterEncodingFilter; 4 | import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; 5 | 6 | import javax.servlet.FilterRegistration; 7 | import javax.servlet.ServletContext; 8 | import javax.servlet.ServletException; 9 | 10 | /** 11 | * Spring MVC Web App Initializer 클래스 12 | * 13 | * @author CISS 14 | * @version 1.0 15 | * @since 2018.07.31 16 | */ 17 | public class SpringMVCWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { 18 | 19 | @Override 20 | protected Class>[] getRootConfigClasses() { 21 | return null; 22 | } 23 | 24 | 25 | @Override 26 | protected Class>[] getServletConfigClasses() { 27 | return null; 28 | } 29 | 30 | @Override 31 | protected String[] getServletMappings() { 32 | return new String[]{"/"}; 33 | } 34 | 35 | @Override 36 | public void onStartup(ServletContext servletContext) throws ServletException { 37 | super.onStartup(servletContext); 38 | 39 | FilterRegistration.Dynamic encodingFilter = servletContext.addFilter("encoding-filter", new CharacterEncodingFilter()); 40 | encodingFilter.setInitParameter("encoding", "UTF-8"); 41 | encodingFilter.setInitParameter("forceEncoding", "true"); 42 | encodingFilter.addMappingForUrlPatterns(null, true, "/*"); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/intro/accessInfo/AccessInfoService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.intro.accessInfo; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Intro AccessInfo service 클래스 11 | * 12 | * @author REX 13 | * @version 1.0 14 | * @since 2018.09.10 15 | */ 16 | @Service 17 | public class AccessInfoService { 18 | 19 | private final RestTemplateService restTemplateService; 20 | 21 | /** 22 | * Instantiates a new Access info service. 23 | * 24 | * @param restTemplateService the rest template service 25 | */ 26 | @Autowired 27 | public AccessInfoService(RestTemplateService restTemplateService) {this.restTemplateService = restTemplateService;} 28 | 29 | 30 | /** 31 | * Secret 을 조회한다. 32 | * 33 | * @param namespace the namespace 34 | * @param accessTokenName the access token name 35 | * @return the token 36 | */ 37 | AccessInfo getToken(String namespace, String accessTokenName) { 38 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_SECRETS_DETAIL 39 | .replace("{namespace:.+}", namespace) 40 | .replace("{accessTokenName:.+}", accessTokenName), 41 | HttpMethod.GET, null, AccessInfo.class); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/endpoints/EndpointsController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.endpoints; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | /** 11 | * Endpoints Controller 클래스 12 | * 13 | * @author REX 14 | * @version 1.0 15 | * @since 2018.08.13 16 | */ 17 | @Controller 18 | public class EndpointsController { 19 | 20 | private final EndpointsService endpointsService; 21 | 22 | /** 23 | * Instantiates a new Endpoints controller. 24 | * 25 | * @param endpointsService the endpoints service 26 | */ 27 | @Autowired 28 | public EndpointsController(EndpointsService endpointsService) { 29 | this.endpointsService = endpointsService; 30 | } 31 | 32 | 33 | /** 34 | * Endpoints 상세 정보를 조회한다. 35 | * 36 | * @param namespace the namespace 37 | * @param serviceName the service name 38 | * @return the endpoints 39 | */ 40 | @GetMapping(value = Constants.API_URL + Constants.URI_API_ENDPOINTS_DETAIL) 41 | @ResponseBody 42 | public Endpoints getEndpoints(@PathVariable(value = "namespace") String namespace, @PathVariable(value = "serviceName") String serviceName) { 43 | return endpointsService.getEndpoints(namespace, serviceName); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/endpoints/EndpointsService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.endpoints; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Endpoints Service 클래스 11 | * 12 | * @author REX 13 | * @version 1.0 14 | * @since 2018.08.13 15 | */ 16 | @Service 17 | public class EndpointsService { 18 | 19 | private final RestTemplateService restTemplateService; 20 | 21 | /** 22 | * Instantiates a new Endpoints service. 23 | * 24 | * @param restTemplateService the rest template service 25 | */ 26 | @Autowired 27 | public EndpointsService(RestTemplateService restTemplateService) {this.restTemplateService = restTemplateService;} 28 | 29 | 30 | /** 31 | * Endpoints 상세 정보를 조회한다. 32 | * 33 | * @param namespace the namespace 34 | * @param serviceName the service name 35 | * @return the endpoints 36 | */ 37 | Endpoints getEndpoints(String namespace, String serviceName) { 38 | String TARGET_CAAS_API = Constants.TARGET_CAAS_API; 39 | return restTemplateService.send(TARGET_CAAS_API, Constants.URI_API_ENDPOINTS_DETAIL 40 | .replace("{namespace:.+}", namespace) 41 | .replace("{serviceName:.+}", serviceName), 42 | HttpMethod.GET, null, Endpoints.class); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/overview/WorkloadOverviewController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.overview; 2 | 3 | import org.paasta.caas.dashboard.common.CommonService; 4 | import org.paasta.caas.dashboard.common.Constants; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | 12 | /** 13 | * Workload Overview Controller 클래스 14 | * 15 | * @author REX 16 | * @version 1.0 17 | * @since 2018.08.23 18 | */ 19 | @RestController 20 | public class WorkloadOverviewController { 21 | 22 | private static final String VIEW_URL = "/workloads"; 23 | private final CommonService commonService; 24 | 25 | /** 26 | * Instantiates a new Workload overview controller. 27 | * 28 | * @param commonService the common service 29 | */ 30 | @Autowired 31 | public WorkloadOverviewController(CommonService commonService) {this.commonService = commonService;} 32 | 33 | 34 | /** 35 | * Workload Overview 페이지로 이동한다. 36 | * 37 | * @param httpServletRequest the http servlet request 38 | * @return the workload overview 39 | */ 40 | @GetMapping(value = Constants.URI_WORKLOAD_OVERVIEW) 41 | public ModelAndView getWorkloadOverview(HttpServletRequest httpServletRequest) { 42 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/overview", new ModelAndView()); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/model/CommonSpec.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common.model; 2 | 3 | import lombok.Data; 4 | import org.paasta.caas.dashboard.workloads.pods.support.Volume; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * Common Spec Model 클래스 11 | * 12 | * @author CISS 13 | * @version 1.0 14 | * @since 2018.08.07 15 | */ 16 | @Data 17 | public class CommonSpec { 18 | private int minReadySeconds; 19 | private int replicas; 20 | private CommonPodTemplateSpec template; 21 | private long activeDeadlineSeconds; 22 | private boolean automountServiceAccountToken; 23 | private String dnsPolicy; 24 | private boolean hostIPC; 25 | private boolean hostNetwork; 26 | private boolean hostPID; 27 | private String hostname; 28 | private String nodeName; 29 | private Map nodeSelector; 30 | private int priority; 31 | private String priorityClassName; 32 | private String restartPolicy; 33 | private String schedulerName; 34 | private String serviceAccount; 35 | private String serviceAccountName; 36 | private boolean shareProcessNamespace; 37 | private String subdomain; 38 | private long terminationGracePeriodSeconds; 39 | private String type; 40 | private String clusterIP; 41 | private List ports; 42 | private String sessionAffinity; 43 | private Map selector; 44 | private List containers; 45 | private String podCIDR; 46 | private List> taints; 47 | private List volumes; 48 | private List externalIPs; 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/TemplateService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common; 2 | 3 | import freemarker.template.Configuration; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.context.annotation.Lazy; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.ui.freemarker.FreeMarkerTemplateUtils; 10 | 11 | import java.util.Map; 12 | 13 | /** 14 | * TemplateService 클래스. 15 | * 16 | * @author hyerin 17 | * @version 1.0 18 | * @since 2018.07.24 19 | */ 20 | @Service 21 | public class TemplateService { 22 | 23 | private static final Logger logger = LoggerFactory.getLogger(TemplateService.class); 24 | 25 | private Configuration configuration; 26 | 27 | @Lazy 28 | @Autowired 29 | public TemplateService(Configuration configuration) { 30 | this.configuration = configuration; 31 | logger.info( "freemaker.Configuration : {}", this.configuration.toString()); 32 | } 33 | 34 | /** 35 | * Template 내용 중 일부를 입력받은 모델의 내용으로 치환하여 반환하는 클래스 36 | * @param templateName 37 | * @param model 38 | * @return String 39 | */ 40 | public String convert(String templateName, Map model) { 41 | String yml; 42 | try { 43 | yml = FreeMarkerTemplateUtils.processTemplateIntoString(configuration.getTemplate(templateName), model); 44 | logger.info("original yml {}",yml); 45 | } catch (Exception e) { 46 | logger.error( "Occured unexpected exception...", e ); 47 | return null; 48 | } 49 | return yml; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/clusters/namespaces/NamespacesService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.clusters.namespaces; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Namespaces Service 클래스. 11 | * 12 | * @author indra 13 | * @version 1.0 14 | * @since 2018.08.28 15 | */ 16 | @Service 17 | public class NamespacesService { 18 | 19 | private final RestTemplateService restTemplateService; 20 | 21 | /** 22 | * Instantiates a new Namespace service. 23 | * 24 | * @param restTemplateService the rest template service 25 | */ 26 | @Autowired 27 | public NamespacesService(RestTemplateService restTemplateService) {this.restTemplateService = restTemplateService;} 28 | 29 | /** 30 | * Namespaces 상세 정보를 조회한다. 31 | * 32 | * @param namespace the namespaces 33 | * @return the Namespaces 34 | */ 35 | Namespaces getNamespaces(String namespace) { 36 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_NAME_SPACES_DETAIL 37 | .replace("{namespace:.+}", namespace), HttpMethod.GET, null, Namespaces.class); 38 | } 39 | 40 | /** 41 | * Namespaces ResourceQuota 정보를 조회한다. 42 | * 43 | * @param namespace the namespaces 44 | * @return the ResourceQuotaList 45 | */ 46 | ResourceQuotaList getResourceQuotaList(String namespace) { 47 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_NAME_SPACES_RESOURCE_QUOTAS 48 | .replace("{namespace:.+}", namespace), HttpMethod.GET, null, ResourceQuotaList.class); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/events/EventsService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.events; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Events Service 클래스 11 | * 12 | * @author CISS 13 | * @version 1.0 14 | * @since 2018.08.13 15 | */ 16 | @Service 17 | public class EventsService { 18 | 19 | private final RestTemplateService restTemplateService; 20 | 21 | /** 22 | * Instantiates a new Events service. 23 | * 24 | * @param restTemplateService the rest template service 25 | */ 26 | @Autowired 27 | public EventsService(RestTemplateService restTemplateService) {this.restTemplateService = restTemplateService;} 28 | 29 | /** 30 | * Events 목록을 조회한다. 31 | * 32 | * @param namespace the namespace Name 33 | * @param resourceUid the resource Uid 34 | * @return the events list 35 | */ 36 | EventsList getEventsList(String namespace, String resourceUid, String type) { 37 | if(type != null) { 38 | return restTemplateService.send(Constants.TARGET_CAAS_API, "/namespaces/"+namespace+"/events/resources/"+resourceUid+"?type="+type, HttpMethod.GET, null, EventsList.class); 39 | } 40 | return restTemplateService.send(Constants.TARGET_CAAS_API, "/namespaces/"+namespace+"/events/resources/"+resourceUid, HttpMethod.GET, null, EventsList.class); 41 | } 42 | 43 | /** 44 | * Events 목록을 조회한다.(for namespace) 45 | * 46 | * @param namespace the namespace Name 47 | * @return the events list 48 | */ 49 | EventsList getNamespaceEventsList(String namespace) { 50 | return restTemplateService.send(Constants.TARGET_CAAS_API, "/namespaces/"+namespace+"/events", HttpMethod.GET, null, EventsList.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/security/SsoLogoutRedirectStrategy.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.security; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.security.web.RedirectStrategy; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | import java.io.IOException; 10 | 11 | /** 12 | * {@link RedirectStrategy} redirecting to the UAA logout page. 13 | * 14 | * When the UAA has performed the logout on its side, the page is 15 | * redirected again to the specified URL. 16 | * 17 | * @author Sebastien Gerard 18 | */ 19 | public class SsoLogoutRedirectStrategy implements RedirectStrategy { 20 | 21 | private static final Logger LOGGER = LoggerFactory.getLogger(SsoLogoutRedirectStrategy.class); 22 | 23 | private final String uaaLogoutUrl; 24 | 25 | public SsoLogoutRedirectStrategy(String uaaLogoutUrl) { 26 | this.uaaLogoutUrl = uaaLogoutUrl; 27 | } 28 | 29 | 30 | @Override 31 | public void sendRedirect(HttpServletRequest request, HttpServletResponse response, String url) throws IOException { 32 | LOGGER.info("Logout : " + uaaLogoutUrl + "?redirect=" + getServerDomain(request)); 33 | request.getSession().invalidate(); 34 | // response.sendRedirect(uaaLogoutUrl + "?redirect=" + serverDomain(request) + "/login"); 35 | } 36 | 37 | private String getServerDomain(HttpServletRequest request) { 38 | String forward = request.getHeader("x-forwarded-proto"); 39 | LOGGER.info("Forward ::::::::: " + forward); 40 | String serverDomain = request.getRequestURL().toString().replace("/logout", ""); 41 | if (forward != null) { 42 | serverDomain = serverDomain.replace("http", "").replace("https", ""); 43 | serverDomain = forward + serverDomain; 44 | } 45 | LOGGER.info("Logout :::::::: " + serverDomain + "/login"); 46 | return serverDomain; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/roles/RolesController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.roles; 2 | 3 | import org.paasta.caas.dashboard.common.CommonService; 4 | import org.paasta.caas.dashboard.common.Constants; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | 12 | /** 13 | * Roles controller 클래스 14 | * 15 | * @author hrjin 16 | * @version 1.0 17 | * @since 2018-08-16 18 | */ 19 | @Controller 20 | @RequestMapping 21 | public class RolesController { 22 | 23 | private static final String CAAS_BASE_URL = Constants.CAAS_BASE_URL; 24 | private static final String BASE_URL = "/admin/roles"; 25 | private final CommonService commonService; 26 | private final RolesService roleService; 27 | 28 | /** 29 | * Instantiates a new Roles controller. 30 | * 31 | * @param commonService the common service 32 | * @param roleService the role service 33 | */ 34 | @Autowired 35 | public RolesController(CommonService commonService, RolesService roleService) { 36 | this.commonService = commonService; 37 | this.roleService = roleService; 38 | } 39 | 40 | /** 41 | * Role 메인 화면으로 이동한다. 42 | * 43 | * @param httpServletRequest the http servlet request 44 | * @return the role main 45 | */ 46 | @GetMapping(value = CAAS_BASE_URL + "/roles") 47 | public ModelAndView getRoleMain(HttpServletRequest httpServletRequest){ 48 | return commonService.setPathVariables(httpServletRequest, BASE_URL + "/main", new ModelAndView()); 49 | } 50 | 51 | /** 52 | * Roles 목록을 조회한다. 53 | * 54 | * @return RoleList 55 | */ 56 | @GetMapping(value = "/roles/getList") 57 | @ResponseBody 58 | public RolesList getRoleList(){ 59 | return roleService.getRoleList(); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/resources/public/error/401.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Container Service 4 | 5 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Container Service 49 | 50 | 51 | 52 | 53 | 사용자 인증에 실패했습니다. 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/main/resources/public/error/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Container Service 4 | 5 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Container Service 49 | 50 | 51 | 52 | 53 | 페이지를 찾을 수 없습니다. 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/main/resources/public/error/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Container Service 4 | 5 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Container Service 49 | 50 | 51 | 52 | 53 | 서버 내부 오류가 발생했습니다. 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/main/resources/public/error/403.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Container Service 4 | 5 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Container Service 49 | 50 | 51 | 52 | 53 | 페이지를 볼 수 있는 권한이 없습니다. 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/commonYaml.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Common yaml 3 | @author REX 4 | @version 1.0 5 | @since 2018.10.01 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 9 | 10 | 11 | - 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | YAML 20 | 21 | 22 | 23 | - 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | <%--SyntexHighlighter--%> 35 | 36 | 37 | 38 | 62 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/intro/privateRegistryInfo/PrivateRegistryInfoController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.intro.privateRegistryInfo; 2 | 3 | import org.paasta.caas.dashboard.common.CommonService; 4 | import org.paasta.caas.dashboard.common.Constants; 5 | import org.paasta.caas.dashboard.common.PropertyService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.servlet.ModelAndView; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | 13 | /** 14 | * Private Registry Info Controller 클래스 15 | * 16 | * @author hrjin 17 | * @version 1.0 18 | * @since 2019.11.19 19 | */ 20 | @Controller 21 | public class PrivateRegistryInfoController { 22 | 23 | private static final String VIEW_URL = "/intro"; 24 | private final CommonService commonService; 25 | private final PropertyService propertyService; 26 | 27 | /** 28 | * Instantiates a new Access info controller. 29 | * @param commonService the common service 30 | * @param propertyService the property service 31 | */ 32 | @Autowired 33 | public PrivateRegistryInfoController(CommonService commonService, PropertyService propertyService) { 34 | this.commonService = commonService; 35 | this.propertyService = propertyService; 36 | } 37 | 38 | 39 | /** 40 | * Private Registry info 페이지로 이동한다. 41 | * 42 | * @param httpServletRequest the http servlet request 43 | * @return the model and view 44 | */ 45 | @GetMapping(value = Constants.URI_INTRO_PRIVATE_REGISTRY_INFO) 46 | public ModelAndView getIntroAccessInfo(HttpServletRequest httpServletRequest) { 47 | ModelAndView mv = new ModelAndView(); 48 | mv.addObject("privateRegistryImageName", propertyService.getPrivateRegistryImageName()); 49 | mv.addObject("privateRegistryUrl", propertyService.getPrivateRegistryUrl()); 50 | 51 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/privateRegistryInfo", mv); 52 | } 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/security/SSLUtils.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.security; 2 | 3 | import javax.net.ssl.*; 4 | import java.security.KeyManagementException; 5 | import java.security.NoSuchAlgorithmException; 6 | import java.security.cert.X509Certificate; 7 | 8 | /* 9 | resttemplate로 api 요청시 SSL 유효성 체크를 건너뜀 10 | */ 11 | public final class SSLUtils { 12 | //private static final Logger LOGGER = LoggerFactory.getLogger(SSLUtils.class); 13 | static { 14 | //for localhost testing only 15 | HttpsURLConnection.setDefaultHostnameVerifier( 16 | new HostnameVerifier(){ 17 | 18 | public boolean verify(String hostname, SSLSession sslSession) { 19 | if (hostname.equals("localhost")) { 20 | return true; 21 | } 22 | return false; 23 | } 24 | }); 25 | } 26 | 27 | private static final TrustManager[] UNQUESTIONING_TRUST_MANAGER = new TrustManager[]{ 28 | new X509TrustManager() { 29 | public X509Certificate[] getAcceptedIssuers(){ 30 | return null; 31 | } 32 | public void checkClientTrusted(X509Certificate[] certs, String authType ){} 33 | public void checkServerTrusted(X509Certificate[] certs, String authType ){} 34 | } 35 | }; 36 | 37 | public static void turnOffSslChecking() throws NoSuchAlgorithmException, KeyManagementException { 38 | // Install the all-trusting trust manager 39 | final SSLContext sc = SSLContext.getInstance("SSL"); 40 | sc.init( null, UNQUESTIONING_TRUST_MANAGER, null ); 41 | HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); 42 | } 43 | 44 | public static void turnOnSslChecking() throws KeyManagementException, NoSuchAlgorithmException { 45 | // Return it to the initial state (discovered by reflection, now hardcoded) 46 | SSLContext.getInstance("SSL").init( null, null, null ); 47 | } 48 | 49 | private SSLUtils(){ 50 | throw new UnsupportedOperationException( "Do not instantiate libraries."); 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/resources/templates/instance/create_init_role.ftl: -------------------------------------------------------------------------------- 1 | kind: Role 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | metadata: 4 | namespace: ${spaceName} 5 | name: ${roleName} 6 | rules: 7 | - apiGroups: [""] 8 | resources: ["pods", "pods/attach", "pods/exec", "pods/portforward", "pods/proxy"] 9 | verbs: ["get", "list", "watch"] 10 | - apiGroups: [""] 11 | resources: ["configmaps", "endpoints", "persistentvolumeclaims", "replicationcontrollers", "replicationcontrollers/scale", "secrets", "serviceaccounts", "services", "services/proxy"] 12 | verbs: ["get", "list", "watch"] 13 | - apiGroups: ["apps"] 14 | resources: ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets", "statefulsets/scale"] 15 | verbs: ["get", "list", "watch"] 16 | - apiGroups: [""] 17 | resources: ["bindings", "events", "limitranges", "namespaces/status", "pods/log", "pods/status", "replicationcontrollers/status", "resourcequotas", "resourcequotas/status"] 18 | verbs: ["get", "list", "watch"] 19 | - apiGroups: [""] 20 | resources: ["namespaces"] 21 | verbs: ["get", "list", "watch"] 22 | - apiGroups: ["apps"] 23 | resources: ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets", "statefulsets/scale"] 24 | verbs: ["get", "list", "watch"] 25 | - apiGroups: ["autoscaling"] 26 | resources: ["horizontalpodautoscalers"] 27 | verbs: ["get", "list", "watch"] 28 | - apiGroups: ["batch"] 29 | resources: ["cronjobs", "jobs"] 30 | verbs: ["get", "list", "watch"] 31 | - apiGroups: ["extensions"] 32 | resources: ["deployments", "deployments", "deployments/rollback", "deployments/scale", "ingresses", "networkpolicies", "replicasets", "replicasets/scale", "replicationcontrollers", "replicationcontrollers/scale"] 33 | verbs: ["get", "list", "watch"] 34 | - apiGroups: ["policy"] 35 | resources: ["poddisruptionbudgets"] 36 | verbs: ["get", "list", "watch"] 37 | - apiGroups: ["rbac.authorization.k8s.io"] 38 | resources: ["rolebindings", "roles"] 39 | verbs: ["get", "list", "watch"] 40 | - apiGroups: ["core"] 41 | resources: ["serviceaccount"] 42 | verbs: ["get", "list", "watch"] -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/unauthorized.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Unauthorized 3 | @author dojjang 4 | @version 1.0 5 | @since 2018.07.31 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 9 | 10 | 11 | Container Service 12 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | " style="width: 60px; height: 48px;"> 55 | Container Service 56 | 57 | 58 | 59 | 60 | 사용자 인증에 실패했습니다. 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/main/webapp/resources/css/jquery.jscrollpane.css: -------------------------------------------------------------------------------- 1 | /* 2 | * CSS Styles that are needed by jScrollPane for it to operate correctly. 3 | * 4 | * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane 5 | * may not operate correctly without them. 6 | */ 7 | 8 | .jspContainer 9 | { 10 | overflow: hidden; 11 | position: relative; 12 | } 13 | 14 | .jspPane 15 | { 16 | position: absolute; 17 | } 18 | 19 | .jspVerticalBar 20 | { 21 | position: absolute; 22 | top: 0; 23 | right: 0; 24 | width: 8px; 25 | height: 100%; 26 | } 27 | 28 | .jspHorizontalBar 29 | { 30 | position: absolute; 31 | bottom: 0; 32 | left: 0; 33 | width: 100%; 34 | height: 8px; 35 | background:rgba(223,223,223,0.8); 36 | } 37 | 38 | .jspCap 39 | { 40 | display: none; 41 | } 42 | 43 | .jspHorizontalBar .jspCap 44 | { 45 | float: left; 46 | } 47 | 48 | /* 배경 */ 49 | .table_wrap .jspTrack 50 | { 51 | background: #dfdfdf; 52 | background:rgba(223,223,223,0.8); 53 | position: relative; 54 | } 55 | 56 | .jspTrack 57 | { 58 | background: #dde; 59 | position: relative; 60 | } 61 | 62 | .table_wrap .jspDrag 63 | { 64 | background:rgba(191,191,191,0.1); 65 | background: #bfbfbf; 66 | } 67 | 68 | 69 | .jspDrag 70 | { 71 | background: #bbd; 72 | position: relative; 73 | top: 0; 74 | left: 0; 75 | cursor: pointer; 76 | } 77 | 78 | .jspHorizontalBar .jspTrack, 79 | .jspHorizontalBar .jspDrag 80 | { 81 | float: left; 82 | height: 100%; 83 | } 84 | 85 | .jspArrow 86 | { 87 | background: #50506d; 88 | text-indent: -20000px; 89 | display: block; 90 | cursor: pointer; 91 | padding: 0; 92 | margin: 0; 93 | } 94 | 95 | .jspArrow.jspDisabled 96 | { 97 | cursor: default; 98 | background: #80808d; 99 | } 100 | 101 | .jspVerticalBar .jspArrow 102 | { 103 | height: 16px; 104 | } 105 | 106 | .jspHorizontalBar .jspArrow 107 | { 108 | width: 8px; 109 | float: left; 110 | height: 100%; 111 | } 112 | 113 | .jspVerticalBar .jspArrow:focus 114 | { 115 | outline: none; 116 | } 117 | 118 | .jspCorner 119 | { 120 | background: #eeeef4; 121 | float: left; 122 | height: 100%; 123 | } 124 | 125 | /* Yuk! CSS Hack for IE6 3 pixel bug :( */ 126 | * html .jspCorner 127 | { 128 | margin: 0 -3px 0 0; 129 | } -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/events/EventsController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.events; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | 11 | /** 12 | * Events Controller 클래스 13 | * 14 | * @author CISS 15 | * @version 1.0 16 | * @since 2018.08.13 17 | */ 18 | @Controller 19 | public class EventsController { 20 | private final EventsService eventsService; 21 | 22 | /** 23 | * Instantiates a new Events controller. 24 | * 25 | * @param eventsService the event service 26 | */ 27 | @Autowired 28 | public EventsController(EventsService eventsService) { 29 | this.eventsService = eventsService; 30 | } 31 | 32 | /** 33 | * Events 목록을 조회한다. 34 | * 35 | * @param namespace the namespace 36 | * @param resourceUid the resourceUid 37 | * @return the events list 38 | */ 39 | @GetMapping(value = Constants.API_URL + Constants.URI_API_EVENTS_LIST) 40 | @ResponseBody 41 | EventsList getEventsList(@PathVariable("namespace") String namespace, @PathVariable("resourceUid") String resourceUid, @RequestParam(value="type", required=false) String type, @RequestParam(value="status", required=false) String status) { 42 | EventsList resultList = eventsService.getEventsList(namespace, resourceUid, type); 43 | 44 | // FOR DASHBOARD 45 | resultList.setResourceName(resourceUid); 46 | if(status != null) { 47 | resultList.setStatus(status); 48 | } 49 | return resultList; 50 | } 51 | 52 | /** 53 | * Events 목록을 조회한다.(for namespace) 54 | * 55 | * @param namespace the namespace 56 | * @return the events list 57 | */ 58 | @GetMapping(value = Constants.API_URL + Constants.URI_API_NAMESPACE_EVENTS_LIST) 59 | @ResponseBody 60 | EventsList getNamespaceEventsList(@PathVariable("namespace") String namespace) { 61 | return eventsService.getNamespaceEventsList(namespace); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.config; 2 | 3 | import org.paasta.caas.dashboard.config.security.CustomInterceptor; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.http.CacheControl; 7 | import org.springframework.web.servlet.ViewResolver; 8 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 9 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 10 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 11 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 12 | import org.springframework.web.servlet.view.InternalResourceViewResolver; 13 | import org.springframework.web.servlet.view.JstlView; 14 | 15 | import java.util.concurrent.TimeUnit; 16 | 17 | /** 18 | * Web Mvc Config 클래스 19 | * 20 | * @author REX 21 | * @version 1.0 22 | * @since 2018.08.08 23 | */ 24 | @Configuration 25 | @EnableWebMvc 26 | public class WebMvcConfig implements WebMvcConfigurer { 27 | 28 | @Override 29 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 30 | registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); 31 | registry.addResourceHandler("/resources/css/fonts/**").addResourceLocations("/resources/css/fonts/").setCacheControl(CacheControl.maxAge(86400, TimeUnit.SECONDS)); 32 | } 33 | 34 | /** 35 | * View resolver view resolver. 36 | * 37 | * @return the view resolver 38 | */ 39 | @Bean 40 | public ViewResolver viewResolver() { 41 | InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); 42 | viewResolver.setViewClass(JstlView.class); 43 | viewResolver.setPrefix("/WEB-INF/views"); 44 | viewResolver.setSuffix(".jsp"); 45 | return viewResolver; 46 | } 47 | 48 | /** 49 | * Custom interceptor custom interceptor. 50 | * 51 | * @return the custom interceptor 52 | */ 53 | @Bean 54 | CustomInterceptor customInterceptor() { 55 | return new CustomInterceptor(); 56 | } 57 | 58 | @Override 59 | public void addInterceptors(InterceptorRegistry registry) { 60 | registry.addInterceptor(customInterceptor()); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/leftMenu.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Left Menu 3 | author: REX 4 | version: 1.0 5 | since: 2018.08.07 6 | --%> 7 | <%@ page contentType="text/html;charset=UTF-8" %> 8 | <%@ page import="org.paasta.caas.dashboard.common.Constants" %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Intro 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | Workloads 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Services 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Storages 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/security/SsoAuthenticationFailureHandler.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.security; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.security.core.AuthenticationException; 7 | import org.springframework.security.core.context.SecurityContextHolder; 8 | import org.springframework.security.web.authentication.AuthenticationFailureHandler; 9 | 10 | import javax.servlet.ServletException; 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | import java.io.IOException; 14 | import java.util.Enumeration; 15 | 16 | /** 17 | * CustomInterceptor 클래스. 18 | * 19 | * @author indra 20 | * @version 1.0 21 | * @since 2018.08.28 22 | */ 23 | public class SsoAuthenticationFailureHandler implements AuthenticationFailureHandler { 24 | 25 | private static final Logger LOGGER = LoggerFactory.getLogger(SsoAuthenticationFailureHandler.class); 26 | 27 | @Override 28 | public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { 29 | LOGGER.info("** onAuthenticationFailure in"); 30 | LOGGER.info("REQUEST URL : "+ request.getRequestURL()); 31 | 32 | StringBuffer addParam = new StringBuffer(); 33 | Enumeration paramNames = request.getParameterNames(); 34 | String serviceInstanceId = ""; 35 | 36 | int i = 0; 37 | while (paramNames.hasMoreElements()) { 38 | String key = paramNames.nextElement(); 39 | String value = request.getParameter(key); 40 | 41 | LOGGER.info("REQUEST PARAM ==> " + key + " : " + value + ""); 42 | 43 | if(key.equals("serviceInstanceId")){ 44 | serviceInstanceId = value; 45 | } 46 | 47 | if(i == 0) { 48 | addParam.append("?"); 49 | } else { 50 | addParam.append("&"); 51 | } 52 | addParam.append(key+"="+value); 53 | i++; 54 | } 55 | 56 | LOGGER.info(Constants.CAAS_INIT_URI+addParam); 57 | 58 | request.getSession().invalidate(); 59 | SecurityContextHolder.clearContext(); 60 | 61 | response.sendRedirect(Constants.CAAS_INIT_URI + "/" + serviceInstanceId); 62 | 63 | LOGGER.info("** onAuthenticationFailure out"); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/deployments/DeploymentsService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.deployments; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Deployments Service 클래스 11 | * 12 | * @author PHR 13 | * @version 1.0 14 | * @since 2018.08.14 15 | */ 16 | @Service 17 | public class DeploymentsService { 18 | 19 | private final RestTemplateService restTemplateService; 20 | 21 | @Autowired 22 | public DeploymentsService(RestTemplateService restTemplateService) { 23 | this.restTemplateService = restTemplateService; 24 | } 25 | 26 | 27 | /** 28 | * Deployments 목록을 조회한다. 29 | * @param namespace the namespace 30 | * @return the deployments list 31 | */ 32 | public DeploymentsList getDeploymentsList (String namespace ) { 33 | return restTemplateService.send( Constants.TARGET_CAAS_API, 34 | Constants.URI_API_DEPLOYMENTS_LIST 35 | .replace( "{namespace:.+}", namespace ), 36 | HttpMethod.GET, null, DeploymentsList.class); 37 | } 38 | 39 | /** 40 | * Deployments 상세 정보를 조회한다. 41 | * 42 | * @param namespace the namespace 43 | * @param deploymentName the deployments name 44 | * @return the deployments 45 | */ 46 | public Deployments getDeployments (String namespace, String deploymentName ) { 47 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_DEPLOYMENTS_DETAIL 48 | .replace( "{namespace:.+}", namespace ) 49 | .replace( "{deploymentName:.+}", deploymentName ) 50 | , HttpMethod.GET, null, Deployments.class); 51 | } 52 | 53 | /** 54 | * Deployments YAML을 조회한다. 55 | * 56 | * @param namespace the namespace 57 | * @param deploymentName the deployments name 58 | * @return the deployments yaml 59 | */ 60 | Deployments getDeploymentsYaml(String namespace, String deploymentName) { 61 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_DEPLOYMENTS_YAML 62 | .replace("{namespace:.+}", namespace) 63 | .replace("{deploymentName:.+}", deploymentName), 64 | HttpMethod.GET, null, Deployments.class); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/webapp/resources/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document); -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/customServices/CustomServicesService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.customServices; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Custom Services Service 클래스 11 | * 12 | * @author REX 13 | * @version 1.0 14 | * @since 2018.08.09 15 | */ 16 | @Service 17 | public class CustomServicesService { 18 | 19 | private final RestTemplateService restTemplateService; 20 | 21 | /** 22 | * Instantiates a new Custom services service. 23 | * 24 | * @param restTemplateService the rest template service 25 | */ 26 | @Autowired 27 | public CustomServicesService(RestTemplateService restTemplateService) {this.restTemplateService = restTemplateService;} 28 | 29 | 30 | /** 31 | * Services 목록을 조회한다. 32 | * 33 | * @param namespace the namespace 34 | * @return the custom services list 35 | */ 36 | CustomServicesList getCustomServicesList(String namespace) { 37 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_SERVICES_LIST 38 | .replace("{namespace:.+}", namespace), 39 | HttpMethod.GET, null, CustomServicesList.class); 40 | } 41 | 42 | 43 | /** 44 | * Services 상세 정보를 조회한다. 45 | * 46 | * @param namespace the namespace 47 | * @param serviceName the service name 48 | * @return the custom services 49 | */ 50 | CustomServices getCustomServices(String namespace, String serviceName) { 51 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_SERVICES_DETAIL 52 | .replace("{namespace:.+}", namespace) 53 | .replace("{serviceName:.+}", serviceName), 54 | HttpMethod.GET, null, CustomServices.class); 55 | } 56 | 57 | 58 | /** 59 | * Services YAML을 조회한다. 60 | * 61 | * @param namespace the namespace 62 | * @param serviceName the service name 63 | * @return the custom services yaml 64 | */ 65 | CustomServices getCustomServicesYaml(String namespace, String serviceName) { 66 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_SERVICES_YAML 67 | .replace("{namespace:.+}", namespace) 68 | .replace("{serviceName:.+}", serviceName), 69 | HttpMethod.GET, null, CustomServices.class); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/main/webapp/resources/yaml/scripts/shBrushPython.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | ;(function() 18 | { 19 | // CommonJS 20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; 21 | 22 | function Brush() 23 | { 24 | // Contributed by Gheorghe Milas and Ahmad Sherif 25 | 26 | var keywords = 'and assert break class continue def del elif else ' + 27 | 'except exec finally for from global if import in is ' + 28 | 'lambda not or pass print raise return try yield while'; 29 | 30 | var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' + 31 | 'chr classmethod cmp coerce compile complex delattr dict dir ' + 32 | 'divmod enumerate eval execfile file filter float format frozenset ' + 33 | 'getattr globals hasattr hash help hex id input int intern ' + 34 | 'isinstance issubclass iter len list locals long map max min next ' + 35 | 'object oct open ord pow print property range raw_input reduce ' + 36 | 'reload repr reversed round set setattr slice sorted staticmethod ' + 37 | 'str sum super tuple type type unichr unicode vars xrange zip'; 38 | 39 | var special = 'None True False self cls class_'; 40 | 41 | this.regexList = [ 42 | { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, 43 | { regex: /^\s*@\w+/gm, css: 'decorator' }, 44 | { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' }, 45 | { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' }, 46 | { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' }, 47 | { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' }, 48 | { regex: /\b\d+\.?\w*/g, css: 'value' }, 49 | { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, 50 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, 51 | { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' } 52 | ]; 53 | 54 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); 55 | }; 56 | 57 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 58 | Brush.aliases = ['py', 'python']; 59 | 60 | SyntaxHighlighter.brushes.Python = Brush; 61 | 62 | // CommonJS 63 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 64 | })(); 65 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/intro/overview/IntroOverviewController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.intro.overview; 2 | 3 | import org.paasta.caas.dashboard.common.CommonService; 4 | import org.paasta.caas.dashboard.common.Constants; 5 | import org.paasta.caas.dashboard.config.security.userdetail.User; 6 | import org.paasta.caas.dashboard.roles.RolesService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.servlet.ModelAndView; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpSession; 14 | 15 | /** 16 | * Intro Overview Controller 클래스 17 | * 18 | * @author REX 19 | * @version 1.0 20 | * @since 2018.09.10 21 | */ 22 | @Controller 23 | public class IntroOverviewController { 24 | 25 | private static final String VIEW_URL = "/intro"; 26 | private final CommonService commonService; 27 | private final RolesService rolesService; 28 | 29 | 30 | /** 31 | * Instantiates a new Intro overview controller. 32 | * 33 | * @param commonService the common service 34 | * @param rolesService the roles service 35 | */ 36 | @Autowired 37 | public IntroOverviewController(CommonService commonService, RolesService rolesService) { 38 | this.commonService = commonService; 39 | this.rolesService = rolesService; 40 | } 41 | 42 | 43 | /** 44 | * Intro overview 페이지로 이동한다. 45 | * 46 | * @param httpServletRequest the http servlet request 47 | * @return the intro overview 48 | */ 49 | @GetMapping(value = Constants.URI_INTRO_OVERVIEW) 50 | public ModelAndView getIntroOverview(HttpServletRequest httpServletRequest) { 51 | // 사용자가 처음 들어오는 곳에서 권한 관련 세션 설정 52 | HttpSession session = httpServletRequest.getSession(); 53 | User user = (User) session.getAttribute("custom_user_role"); 54 | rolesService.setRolesListFirst(user); 55 | 56 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/overview", new ModelAndView()); 57 | } 58 | 59 | 60 | /** 61 | * Intro overview 페이지로 이동한다. (Service instance id) 62 | * 63 | * @param httpServletRequest the http servlet request 64 | * @return the intro overview by service instance id 65 | */ 66 | @GetMapping(value = Constants.URI_INTRO_OVERVIEW + "/{serviceInstanceId:.+}") 67 | public ModelAndView getIntroOverviewByServiceInstanceId(HttpServletRequest httpServletRequest) { 68 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/overview", new ModelAndView()); 69 | } 70 | 71 | } 72 | 73 | -------------------------------------------------------------------------------- /src/main/resources/templates/instance/create_role.ftl: -------------------------------------------------------------------------------- 1 | kind: Role 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | metadata: 4 | namespace: ${spaceName} 5 | name: ${roleName} 6 | rules: 7 | - apiGroups: [""] 8 | resources: ["pods", "pods/attach", "pods/exec", "pods/portforward", "pods/proxy"] 9 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 10 | - apiGroups: [""] 11 | resources: ["configmaps", "endpoints", "persistentvolumeclaims", "replicationcontrollers", "replicationcontrollers/scale", "secrets", "serviceaccounts", "services", "services/proxy"] 12 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 13 | - apiGroups: ["apps"] 14 | resources: ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets", "statefulsets/scale"] 15 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 16 | - apiGroups: [""] 17 | resources: ["bindings", "events", "limitranges", "namespaces/status", "pods/log", "pods/status", "replicationcontrollers/status", "resourcequotas", "resourcequotas/status"] 18 | verbs: ["get", "list", "watch"] 19 | - apiGroups: [""] 20 | resources: ["namespaces"] 21 | verbs: ["get", "list", "watch"] 22 | - apiGroups: ["apps"] 23 | resources: ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets", "statefulsets/scale"] 24 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 25 | - apiGroups: ["autoscaling"] 26 | resources: ["horizontalpodautoscalers"] 27 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 28 | - apiGroups: ["batch"] 29 | resources: ["cronjobs", "jobs"] 30 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 31 | - apiGroups: ["extensions"] 32 | resources: ["deployments", "deployments", "deployments/rollback", "deployments/scale", "ingresses", "networkpolicies", "replicasets", "replicasets/scale", "replicationcontrollers", "replicationcontrollers/scale"] 33 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 34 | - apiGroups: ["policy"] 35 | resources: ["poddisruptionbudgets"] 36 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 37 | - apiGroups: ["rbac.authorization.k8s.io"] 38 | resources: ["rolebindings", "roles"] 39 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 40 | - apiGroups: ["core"] 41 | resources: ["serviceaccount"] 42 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 43 | -------------------------------------------------------------------------------- /src/main/resources/templates/instance/create_admin_role.ftl: -------------------------------------------------------------------------------- 1 | kind: Role 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | metadata: 4 | namespace: ${spaceName} 5 | name: ${roleName} 6 | rules: 7 | - apiGroups: [""] 8 | resources: ["pods", "pods/attach", "pods/exec", "pods/portforward", "pods/proxy"] 9 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 10 | - apiGroups: [""] 11 | resources: ["configmaps", "endpoints", "persistentvolumeclaims", "replicationcontrollers", "replicationcontrollers/scale", "secrets", "serviceaccounts", "services", "services/proxy"] 12 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 13 | - apiGroups: ["apps"] 14 | resources: ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets", "statefulsets/scale"] 15 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 16 | - apiGroups: [""] 17 | resources: ["bindings", "events", "limitranges", "namespaces/status", "pods/log", "pods/status", "replicationcontrollers/status", "resourcequotas", "resourcequotas/status"] 18 | verbs: ["get", "list", "watch"] 19 | - apiGroups: [""] 20 | resources: ["namespaces"] 21 | verbs: ["get", "list", "watch"] 22 | - apiGroups: ["apps"] 23 | resources: ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets", "statefulsets/scale"] 24 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 25 | - apiGroups: ["autoscaling"] 26 | resources: ["horizontalpodautoscalers"] 27 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 28 | - apiGroups: ["batch"] 29 | resources: ["cronjobs", "jobs"] 30 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 31 | - apiGroups: ["extensions"] 32 | resources: ["deployments", "deployments", "deployments/rollback", "deployments/scale", "ingresses", "networkpolicies", "replicasets", "replicasets/scale", "replicationcontrollers", "replicationcontrollers/scale"] 33 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 34 | - apiGroups: ["policy"] 35 | resources: ["poddisruptionbudgets"] 36 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 37 | - apiGroups: ["rbac.authorization.k8s.io"] 38 | resources: ["rolebindings", "roles"] 39 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 40 | - apiGroups: ["core"] 41 | resources: ["serviceaccount"] 42 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 43 | -------------------------------------------------------------------------------- /src/main/resources/templates/instance/create_regular_role.ftl: -------------------------------------------------------------------------------- 1 | kind: Role 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | metadata: 4 | namespace: ${spaceName} 5 | name: ${roleName} 6 | rules: 7 | - apiGroups: [""] 8 | resources: ["pods", "pods/attach", "pods/exec", "pods/portforward", "pods/proxy"] 9 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 10 | - apiGroups: [""] 11 | resources: ["configmaps", "endpoints", "persistentvolumeclaims", "replicationcontrollers", "replicationcontrollers/scale", "secrets", "serviceaccounts", "services", "services/proxy"] 12 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 13 | - apiGroups: ["apps"] 14 | resources: ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets", "statefulsets/scale"] 15 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 16 | - apiGroups: [""] 17 | resources: ["bindings", "events", "limitranges", "namespaces/status", "pods/log", "pods/status", "replicationcontrollers/status", "resourcequotas", "resourcequotas/status"] 18 | verbs: ["get", "list", "watch"] 19 | - apiGroups: [""] 20 | resources: ["namespaces"] 21 | verbs: ["get", "list", "watch"] 22 | - apiGroups: ["apps"] 23 | resources: ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets", "statefulsets/scale"] 24 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 25 | - apiGroups: ["autoscaling"] 26 | resources: ["horizontalpodautoscalers"] 27 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 28 | - apiGroups: ["batch"] 29 | resources: ["cronjobs", "jobs"] 30 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 31 | - apiGroups: ["extensions"] 32 | resources: ["deployments", "deployments", "deployments/rollback", "deployments/scale", "ingresses", "networkpolicies", "replicasets", "replicasets/scale", "replicationcontrollers", "replicationcontrollers/scale"] 33 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 34 | - apiGroups: ["policy"] 35 | resources: ["poddisruptionbudgets"] 36 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 37 | - apiGroups: ["rbac.authorization.k8s.io"] 38 | resources: ["rolebindings", "roles"] 39 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 40 | - apiGroups: ["core"] 41 | resources: ["serviceaccount"] 42 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"] 43 | -------------------------------------------------------------------------------- /src/main/webapp/resources/yaml/scripts/shBrushCSharp.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | ;(function() 18 | { 19 | // CommonJS 20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; 21 | 22 | function Brush() 23 | { 24 | var keywords = 'abstract as base bool break byte case catch char checked class const ' + 25 | 'continue decimal default delegate do double else enum event explicit ' + 26 | 'extern false finally fixed float for foreach get goto if implicit in int ' + 27 | 'interface internal is lock long namespace new null object operator out ' + 28 | 'override params private protected public readonly ref return sbyte sealed set ' + 29 | 'short sizeof stackalloc static string struct switch this throw true try ' + 30 | 'typeof uint ulong unchecked unsafe ushort using virtual void while'; 31 | 32 | function fixComments(match, regexInfo) 33 | { 34 | var css = (match[0].indexOf("///") == 0) 35 | ? 'color1' 36 | : 'comments' 37 | ; 38 | 39 | return [new SyntaxHighlighter.Match(match[0], match.index, css)]; 40 | } 41 | 42 | this.regexList = [ 43 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments 44 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments 45 | { regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings 46 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings 47 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings 48 | { regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion 49 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword 50 | { regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial' 51 | { regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield' 52 | ]; 53 | 54 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); 55 | }; 56 | 57 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 58 | Brush.aliases = ['c#', 'c-sharp', 'csharp']; 59 | 60 | SyntaxHighlighter.brushes.CSharp = Brush; 61 | 62 | // CommonJS 63 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 64 | })(); 65 | 66 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/tiles/tiles.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/security/SsoAuthenticationSuccessHandler.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.security; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.security.core.Authentication; 7 | import org.springframework.security.web.access.ExceptionTranslationFilter; 8 | import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; 9 | import org.springframework.security.web.savedrequest.HttpSessionRequestCache; 10 | import org.springframework.security.web.savedrequest.RequestCache; 11 | 12 | import javax.servlet.ServletException; 13 | import javax.servlet.http.HttpServletRequest; 14 | import javax.servlet.http.HttpServletResponse; 15 | import java.io.IOException; 16 | 17 | /** 18 | * Extension of {@link SavedRequestAwareAuthenticationSuccessHandler} 19 | * for the dashboard. In this case, {@link ExceptionTranslationFilter} 20 | * in charge of persisting the request is not called. So, this handler 21 | * is not able to recover the original request that was redirected 22 | * to the OAuth server. Once logged, the OAuth server redirects to the 23 | * original page, i.e., the current request. In order to continue 24 | * the filter chain, a refresh is performed. 25 | * 26 | * @author Sebastien Gerard 27 | */ 28 | public class SsoAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler { 29 | 30 | private static final Logger LOGGER = LoggerFactory.getLogger(SsoAuthenticationSuccessHandler.class); 31 | 32 | private final RequestCache requestCache = new HttpSessionRequestCache(); 33 | 34 | 35 | @Override 36 | public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException { 37 | LOGGER.info("** onAuthenticationSuccess in"); 38 | requestCache.saveRequest(request, response); 39 | 40 | Object obj = request.getSession().getAttribute("sessionRedirectUrl"); 41 | String sessionRedirectUrl = obj != null ? obj.toString(): ""; 42 | 43 | if(request.getSession() != null && sessionRedirectUrl != "") { 44 | LOGGER.info("[onAuthenticationSuccess] Process Start - sessionRedirectUrl:" + sessionRedirectUrl); 45 | 46 | if(sessionRedirectUrl.contains("?serviceInstanceId=")) { 47 | sessionRedirectUrl = Constants.CAAS_INIT_URI; 48 | } 49 | } 50 | 51 | if(!sessionRedirectUrl.equals("")) { 52 | LOGGER.info("[onAuthenticationSuccess] sendRedirect URL: " + sessionRedirectUrl); 53 | getRedirectStrategy().sendRedirect(request, response, sessionRedirectUrl); 54 | } else { 55 | LOGGER.info("[onAuthenticationSuccess] Request-Attribute not include sessionRedirectUrl."); 56 | super.onAuthenticationSuccess(request, response, authentication); 57 | } 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/persistentVolumeClaims/PersistentVolumeClaimsService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.persistentVolumeClaims; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * PersistentVolumeClaims Service 클래스 11 | * 12 | * @author hrjin 13 | * @version 1.0 14 | * @since 2019-10-24 15 | */ 16 | @Service 17 | public class PersistentVolumeClaimsService { 18 | 19 | private final RestTemplateService restTemplateService; 20 | 21 | /** 22 | * Instantiates a new deployments service. 23 | * 24 | * @param restTemplateService the rest template service 25 | */ 26 | @Autowired 27 | public PersistentVolumeClaimsService(RestTemplateService restTemplateService) { 28 | this.restTemplateService = restTemplateService; 29 | } 30 | 31 | 32 | /** 33 | * PersistentVolumeClaims 목록을 조회한다. 34 | * 35 | * @param namespace the namespace 36 | * @return the Persistent Volume Claims List 37 | */ 38 | PersistentVolumeClaimsList getPersistentVolumeClaimsList(String namespace) { 39 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_STORAGES_LIST 40 | .replace("{namespace:.+}", namespace), 41 | HttpMethod.GET, null, PersistentVolumeClaimsList.class); 42 | } 43 | 44 | /** 45 | * PersistentVolumeClaims 상세 정보를 조회한다. 46 | * 47 | * @param namespace the namespace 48 | * @param persistentVolumeClaimName the Persistent Volume Claim name 49 | * @return the Persistent Volume Claims 50 | */ 51 | PersistentVolumeClaims getPersistentVolumeClaims(String namespace, String persistentVolumeClaimName) { 52 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_STORAGES_DETAIL 53 | .replace("{namespace:.+}", namespace) 54 | .replace("{persistentVolumeClaimName:.+}", persistentVolumeClaimName), 55 | HttpMethod.GET, null, PersistentVolumeClaims.class); 56 | } 57 | 58 | 59 | /** 60 | * PersistentVolumeClaims YAML 을 조회한다. 61 | * 62 | * @param namespace the namespace 63 | * @param persistentVolumeClaimName the Persistent Volume Claim name 64 | * @return the Persistent Volume Claims 65 | */ 66 | public PersistentVolumeClaims getPersistentVolumeClaimYaml(String namespace, String persistentVolumeClaimName) { 67 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_STORAGES_YAML 68 | .replace("{namespace:.+}", namespace) 69 | .replace("{persistentVolumeClaimName:.+}", persistentVolumeClaimName), 70 | HttpMethod.GET, null, PersistentVolumeClaims.class); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/webapp/resources/yaml/scripts/shBrushYaml.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/ 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate 7 | * 8 | * @version 9 | * 2.0.320 (July 26 2009) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2009 Alex Gorbatchev. 13 | * Copyright (C) 2009 Nicolas Perriault 14 | * 15 | * @license 16 | * This file is part of SyntaxHighlighter. 17 | * 18 | * SyntaxHighlighter is free software: you can redistribute it and/or modify 19 | * it under the terms of the GNU Lesser General Public License as published by 20 | * the Free Software Foundation, either version 3 of the License, or 21 | * (at your option) any later version. 22 | * 23 | * SyntaxHighlighter is distributed in the hope that it will be useful, 24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | * GNU General Public License for more details. 27 | * 28 | * You should have received a copy of the GNU General Public License 29 | * along with SyntaxHighlighter. If not, see . 30 | */ 31 | 32 | ;(function() 33 | { 34 | // CommonJS 35 | SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); 36 | 37 | function Brush() 38 | { 39 | // Contributed by Nicolas Perriault 40 | 41 | var constants = '~ true false on off'; 42 | 43 | this.regexList = [ 44 | { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // comment 45 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted string 46 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted string 47 | { regex: /^\s*([a-z0-9\._-])+\s*:/gmi, css: 'variable' }, // key 48 | { regex: /\s?(\.)([a-z0-9\._-])+\s?:/gmi, css: 'comments' }, // section 49 | { regex: /\s(@|:)([a-z0-9\._-])+\s*$/gmi, css: 'variable bold' }, // variable, reference 50 | { regex: /\s+\d+\s?$/gm, css: 'color2 bold' }, // integers 51 | { regex: /(\{|\}|\[|\]|,|~|:)/gm, css: 'constants' }, // inline hash and array, comma, null 52 | { regex: /^\s+(-)+/gm, css: 'string bold' }, // array list entry 53 | { regex: /^---/gm, css: 'string bold' }, // category 54 | { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' } // constants 55 | ]; 56 | 57 | }; 58 | 59 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 60 | Brush.aliases = ['yaml', 'yml']; 61 | 62 | SyntaxHighlighter.brushes.Cside = Brush; 63 | 64 | // CommonJS 65 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 66 | })(); 67 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/clusters/namespaces/NamespacesController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.clusters.namespaces; 2 | 3 | import org.paasta.caas.dashboard.common.CommonService; 4 | import org.paasta.caas.dashboard.common.Constants; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.*; 7 | import org.springframework.web.servlet.ModelAndView; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | 11 | /** 12 | * Namespaces Controller 클래스. 13 | * 14 | * @author indra 15 | * @version 1.0 16 | * @since 2018.08.28 17 | */ 18 | @RestController 19 | public class NamespacesController { 20 | 21 | private static final String VIEW_URL = "/namespaces"; 22 | 23 | private final CommonService commonService; 24 | private final NamespacesService namespacesService; 25 | 26 | /** 27 | * Instantiates a Namespaces controller. 28 | * 29 | * @param commonService the common service 30 | * @param namespacesService the namespaces service 31 | */ 32 | @Autowired 33 | public NamespacesController(CommonService commonService, NamespacesService namespacesService) { 34 | this.commonService = commonService; 35 | this.namespacesService = namespacesService; 36 | } 37 | 38 | /** 39 | * Namespaces detail 페이지로 이동한다. 40 | * 41 | * @param httpServletRequest the http servlet request 42 | * @return the namespaces detail 43 | */ 44 | @GetMapping(value = Constants.URI_CLUSTER_NAMESPACES + "/{namespace:.+}") 45 | public ModelAndView getNamespaceDetail(HttpServletRequest httpServletRequest) { 46 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/detail", new ModelAndView()); 47 | } 48 | 49 | /** 50 | * Namespaces 상세 정보를 조회한다. 51 | * 52 | * @param namespace the namespaces 53 | * @return the Namespaces 54 | */ 55 | @GetMapping(value = Constants.API_URL + Constants.URI_API_NAME_SPACES_DETAIL) 56 | public Namespaces getNamespaces(@PathVariable String namespace) { 57 | return namespacesService.getNamespaces(namespace); 58 | } 59 | 60 | /** 61 | * Namespaces ResourceQuota 정보를 조회한다. 62 | * 63 | * @param namespace the namespaces 64 | * @return the ResourceQuotaList 65 | */ 66 | @GetMapping(value = Constants.API_URL + Constants.URI_API_NAME_SPACES_RESOURCE_QUOTAS) 67 | public ResourceQuotaList getResourceQuotaList(@PathVariable String namespace) { 68 | return namespacesService.getResourceQuotaList(namespace); 69 | } 70 | 71 | /** 72 | * Namespaces events 페이지로 이동한다. 73 | * 74 | * @param httpServletRequest the http servlet request 75 | * @return the namespaces events 76 | */ 77 | @GetMapping(value = Constants.URI_CLUSTER_NAMESPACES + "/{namespace:.+}/events") 78 | public ModelAndView getNamespaceEvents(HttpServletRequest httpServletRequest, @PathVariable String namespace) { 79 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/events", new ModelAndView()); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/AspectService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common; 2 | 3 | import org.aspectj.lang.JoinPoint; 4 | import org.aspectj.lang.annotation.Aspect; 5 | import org.aspectj.lang.annotation.Before; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.web.context.request.RequestContextHolder; 10 | import org.springframework.web.context.request.ServletRequestAttributes; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import java.util.Arrays; 14 | import java.util.Enumeration; 15 | import java.util.Objects; 16 | 17 | /** 18 | * Aspect Service 클래스 19 | * 20 | * @author REX 21 | * @version 1.0 22 | * @since 2018.08.06 23 | */ 24 | @Aspect 25 | @Service 26 | public class AspectService { 27 | 28 | private static final Logger LOGGER = LoggerFactory.getLogger(AspectService.class); 29 | 30 | /** 31 | * On before log service access. 32 | * 33 | * @param joinPoint the join point 34 | */ 35 | @Before("execution(* org.paasta.caas..*Service.*(..))") 36 | public void onBeforeLogServiceAccess(JoinPoint joinPoint) { 37 | LOGGER.warn("######## ON BEFORE SERVICE ACCESS :: {}", joinPoint); 38 | } 39 | 40 | 41 | /** 42 | * On before log controller access. 43 | * 44 | * @param joinPoint the join point 45 | */ 46 | @Before("execution(* org.paasta.caas..*Controller.*(..))") 47 | public void onBeforeLogControllerAccess(JoinPoint joinPoint) { 48 | LOGGER.warn("#### DASHBOARD :: ON BEFORE CONTROLLER ACCESS :: {}", joinPoint); 49 | HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest(); 50 | 51 | LOGGER.warn("## Entering in Method: {}", joinPoint.getSignature().getName()); 52 | LOGGER.warn("## Class Name: {}", joinPoint.getSignature().getDeclaringTypeName()); 53 | LOGGER.warn("## Arguments: {}", Arrays.toString(joinPoint.getArgs())); 54 | LOGGER.warn("## Target class: {}", joinPoint.getTarget().getClass().getName()); 55 | 56 | if (null != request) { 57 | LOGGER.warn("## Request Path info: {}", request.getServletPath()); 58 | LOGGER.warn("## Method Type: {}", request.getMethod()); 59 | LOGGER.warn("================================================================================"); 60 | LOGGER.warn("Start Header Section of request"); 61 | Enumeration headerNames = request.getHeaderNames(); 62 | while (headerNames.hasMoreElements()) { 63 | String headerName = (String) headerNames.nextElement(); 64 | String headerValue = request.getHeader(headerName); 65 | LOGGER.warn(" Header Name: {} || Header Value: {}", headerName, headerValue); 66 | } 67 | LOGGER.warn("End Header Section of request"); 68 | LOGGER.warn("================================================================================"); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/replicaSets/ReplicaSetsService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.replicaSets; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * ReplicaSets Service 클래스 11 | * 12 | * @author CISS 13 | * @version 1.0 14 | * @since 2018.08.13 15 | */ 16 | @Service 17 | public class ReplicaSetsService { 18 | 19 | private final RestTemplateService restTemplateService; 20 | 21 | /** 22 | * Instantiates a new ReplicaSets service. 23 | * 24 | * @param restTemplateService the rest template service 25 | */ 26 | @Autowired 27 | public ReplicaSetsService(RestTemplateService restTemplateService) {this.restTemplateService = restTemplateService;} 28 | 29 | 30 | /** 31 | * ReplicaSets 목록을 조회한다. 32 | * @param namespace the namespace 33 | * @return the replicaSets list 34 | */ 35 | ReplicaSetsList getReplicaSetsList(String namespace) { 36 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_REPLICA_SETS_LIST 37 | .replace("{namespace:.+}", namespace), 38 | HttpMethod.GET, null, ReplicaSetsList.class); 39 | } 40 | 41 | 42 | /** 43 | * ReplicaSets 상세 정보를 조회한다. 44 | * 45 | * @param namespace the namespace 46 | * @param replicaSetName the replicaSet name 47 | * @return the replicaSets 48 | */ 49 | ReplicaSets getReplicaSets(String namespace, String replicaSetName) { 50 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_REPLICA_SETS_DETAIL 51 | .replace("{namespace:.+}", namespace) 52 | .replace("{replicaSetName:.+}", replicaSetName) 53 | , HttpMethod.GET, null, ReplicaSets.class); 54 | } 55 | 56 | 57 | /** 58 | * ReplicaSets YAML을 조회한다. 59 | * 60 | * @param namespace the namespace 61 | * @param replicaSetName the service name 62 | * @return the replicaSets yaml 63 | */ 64 | ReplicaSets getReplicaSetsYaml(String namespace, String replicaSetName) { 65 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_REPLICA_SETS_YAML 66 | .replace("{namespace:.+}", namespace) 67 | .replace("{replicaSetName:.+}", replicaSetName), 68 | HttpMethod.GET, null, ReplicaSets.class); 69 | } 70 | 71 | 72 | /** 73 | * ReplicaSets 목록을 조회한다. (Label Selector) 74 | * 75 | * @param namespace the namespace 76 | * @param selectors the selectors 77 | * @return the replicaSets list 78 | */ 79 | ReplicaSetsList getReplicaSetsListLabelSelector(String namespace, String selectors) { 80 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_REPLICA_SETS_RESOURCES 81 | .replace("{namespace:.+}", namespace) 82 | .replace("{selector:.+}", selectors), 83 | HttpMethod.GET, null, ReplicaSetsList.class); 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/workloads/pods/PodsService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.workloads.pods; 2 | 3 | import org.paasta.caas.dashboard.common.Constants; 4 | import org.paasta.caas.dashboard.common.RestTemplateService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Pods Service 11 | * 12 | * @author Hyungu Cho 13 | * @version 1.0 14 | * @since 2018.08.01 15 | */ 16 | @Service 17 | public class PodsService { 18 | private final RestTemplateService restTemplateService; 19 | 20 | /** 21 | * Instantiates a new Pods service. 22 | * 23 | * @param restTemplateService the rest template service 24 | */ 25 | @Autowired 26 | public PodsService(RestTemplateService restTemplateService) { 27 | this.restTemplateService = restTemplateService; 28 | } 29 | 30 | /** 31 | * Selector를 이용해 Pods 목록을 조회한다. 32 | * 33 | * @param namespace the namespace 34 | * @param selector the selector 35 | * @return the pods list 36 | */ 37 | PodsList getPodListBySelector(String namespace, String selector) { 38 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_PODS_LIST_BY_SELECTOR 39 | .replace("{namespace:.+}", namespace).replace("{selector:.+}", selector), HttpMethod.GET, null, PodsList.class); 40 | } 41 | 42 | /** 43 | * Pods 목록을 조회한다. (특정 네임스페이스) 44 | * 45 | * @param namespace the namespace 46 | * @return the pods list 47 | */ 48 | PodsList getPodList(String namespace) { 49 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_PODS_LIST 50 | .replace("{namespace:.+}", namespace), HttpMethod.GET, null, PodsList.class); 51 | } 52 | 53 | /** 54 | * Node 이름을 이용해 Pods 목록을 조회한다. 55 | * 56 | * @param namespace the namespace 57 | * @param nodeName the node name 58 | * @return the pods list 59 | */ 60 | PodsList getPodListNamespaceByNode(String namespace, String nodeName) { 61 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_PODS_LIST_BY_NODE 62 | .replace("{namespace:.+}", namespace).replace("{nodeName:.+}", nodeName), HttpMethod.GET, null, PodsList.class); 63 | } 64 | 65 | /** 66 | * Pods 상세 정보를 조회한다. 67 | * 68 | * @param namespace the namespace 69 | * @param podName the pods name 70 | * @return the pods 71 | */ 72 | Pods getPod(String namespace, String podName) { 73 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_PODS_DETAIL 74 | .replace("{namespace:.+}", namespace).replace("{podName:.+}", podName), HttpMethod.GET, null, Pods.class); 75 | } 76 | 77 | /** 78 | * Pods YAML을 조회한다. 79 | * 80 | * @param namespace the namespace 81 | * @param podName the pods name 82 | * @return the pods 83 | */ 84 | Pods getPodYaml(String namespace, String podName) { 85 | return restTemplateService.send(Constants.TARGET_CAAS_API, Constants.URI_API_PODS_YAML 86 | .replace("{namespace:.+}", namespace).replace("{podName:.+}", podName), HttpMethod.GET, null, Pods.class); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/nodes/NodesController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.nodes; 2 | 3 | import org.paasta.caas.dashboard.common.CommonService; 4 | import org.paasta.caas.dashboard.common.Constants; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RestController; 9 | import org.springframework.web.servlet.ModelAndView; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | 13 | /** 14 | * Nodes Controller 클래스 15 | * 16 | * @author Hyungu Cho 17 | * @version 1.0 18 | * @since 2018.08.13 19 | */ 20 | @RestController 21 | public class NodesController { 22 | private static final String VIEW_URL = "/nodes"; 23 | private final CommonService commonService; 24 | private final NodesService nodesService; 25 | 26 | /** 27 | * Instantiates a new Nodes controller. 28 | * 29 | * @param commonService the common service 30 | * @param nodesService the nodes service 31 | */ 32 | @Autowired 33 | public NodesController(CommonService commonService, NodesService nodesService) { 34 | this.commonService = commonService; 35 | this.nodesService = nodesService; 36 | } 37 | 38 | /** 39 | * Nodes detail 페이지로 이동한다. 40 | * 41 | * @param httpServletRequest the http servlet request 42 | * @param nodeName the nodes name 43 | * @return the nodes details 44 | */ 45 | @GetMapping(value = Constants.URI_CLUSTER_NODES + "/{nodeName:.+}") 46 | public ModelAndView getNodeDetails(HttpServletRequest httpServletRequest, @PathVariable(value = "nodeName") String nodeName) { 47 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/details", new ModelAndView()); 48 | } 49 | 50 | /** 51 | * Nodes summary 페이지로 이동한다. 52 | * 53 | * @param httpServletRequest the http servlet request 54 | * @param nodeName the nodes name 55 | * @return the nodes summary 56 | */ 57 | @GetMapping(value = Constants.URI_CLUSTER_NODES + "/{nodeName:.+}/summary") 58 | public ModelAndView getNodeSummary(HttpServletRequest httpServletRequest, @PathVariable("nodeName") String nodeName) { 59 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/summary", new ModelAndView()); 60 | } 61 | 62 | /** 63 | * Nodes event 페이지로 이동한다. 64 | * 65 | * @param httpServletRequest the http servlet request 66 | * @param nodeName the nodes name 67 | * @return the nodes events 68 | */ 69 | @GetMapping(value = Constants.URI_CLUSTER_NODES + "/{nodeName:.+}/events") 70 | public ModelAndView getNodeEvents(HttpServletRequest httpServletRequest, @PathVariable("nodeName") String nodeName) { 71 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/events", new ModelAndView()); 72 | } 73 | 74 | /** 75 | * Nodes 상세 정보를 조회한다. 76 | * 77 | * @param nodeName the nodes name 78 | * @return the nodes 79 | */ 80 | @GetMapping(value = Constants.API_URL + Constants.URI_API_NODES_LIST) 81 | public Nodes getNode(@PathVariable("nodeName") String nodeName) { 82 | return nodesService.getNode(nodeName); 83 | } 84 | } -------------------------------------------------------------------------------- /src/main/webapp/resources/css/style.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:url(../fonts/openSans/OpenSans-Regular.eot);src:local(※),url(../fonts/openSans/OpenSans-Regular.eot?iefix) format('embedded-opentype'),url(../fonts/openSans/OpenSans-Regular.woff2) format('woff2'),url(../fonts/openSans/OpenSans-Regular.woff) format('woff');} 4 | @font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:url(../fonts/openSans/OpenSans-Bold.eot);src:local(※),url(../fonts/openSans/OpenSans-Bold.eot?iefix) format('embedded-opentype'),url(../fonts/openSans/OpenSans-Bold.woff2) format('woff2'),url(../fonts/openSans/OpenSans-Bold.woff) format('woff');} 5 | 6 | *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-box-sizing:border-box;resize:none;outline:0;} 7 | body{font-family:'Open Sans','맑은 고딕',Arial,verdana,sans-serif;font-style:normal;font-size:100%;font-weight:normal;color:#333;line-height:1;} 8 | ul,ol,dl,menu,li{padding:0;margin:0;list-style:none;} 9 | h1,h2,h3,h4,h5,h6{margin:0;} 10 | a{color:inherit;text-decoration:none; /*-webkit-transition:all 0.2s ease; -ms-transition:all 0.2s ease; transition:all 0.2s ease;*/cursor:pointer} 11 | a:hover,a:active,a:focus{text-decoration:none;} 12 | table{border-spacing:0;width:100%;empty-cells:show;table-layout:fixed;border-collapse:collapse;} 13 | legend,caption{display:none;} 14 | img,fieldset,iframe{border:0} 15 | button,input,optgroup,select,textarea{padding:0;font-family:inherit;font-size:inherit;color:inherit;vertical-align:middle;outline:none;-o-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} 16 | input,textarea,select{border:1px solid #cfcfcf;color:rgba(0,0,0,0.6);outline:none;padding:6px 12px;background:#fff;border-radius: 4px;-webkit-transition:border-color ease-in-out .15s;-o-transition:border-color ease-in-out .15s;transition:border-color ease-in-out .15s} 17 | textarea{height: auto;overflow:auto;resize:none;} 18 | input[type="checkbox"],input[type="radio"]{vertical-align:middle;outline:none;-o-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} 19 | select[disabled],input[disabled],input[readonly],textarea[readonly]{background-color:#eee;opacity:1;} 20 | input[disabled],select[disabled]{cursor:not-allowed !important;} 21 | input.error{border-color:#ef5350;box-shadow:none;} 22 | textarea:focus,input:focus,select:focus{outline:none;background:#ffffff;border-color:#a2a2a2;} 23 | input.error:focus{border-color:#843534;} 24 | select{padding: 0 0 0 6px} 25 | /*select{-webkit-appearance:none;-moz-appearance:none;appearance:none;} 26 | select::-ms-expand{display:none;}*/ 27 | button{display:inline-block;font-family:inherit;vertical-align:middle;cursor:pointer;white-space:nowrap;text-decoration:none;background:transparent;border:none;outline:0;*overflow:visible;} 28 | button[disabled],input[disabled]{cursor:default} 29 | button::-moz-focus-inner{border:0;padding:0;} 30 | .btn,.btn:hover,.btn:active,.btn:focus,.btn:active:focus{outline: 0px;box-shadow: none;} 31 | .clear{clear:both} 32 | .clearfix:after{display:table;clear:both;content:'';overflow:hidden;visibility:hidden;height:0;width:0;} 33 | .hide{display:none!important;} 34 | .hidden{visibility:hidden;} 35 | .txt_hidden{text-indent: -9999px; font-size: 0;} 36 | .disabled{color:#bfbfbf} 37 | .pd0{padding:0!important} 38 | .mr0{margin:0!important} 39 | .clear{clear:both!important;} 40 | -------------------------------------------------------------------------------- /src/main/webapp/resources/yaml/styles/shThemeDefault.css: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | .syntaxhighlighter { 18 | background-color: white !important; 19 | } 20 | .syntaxhighlighter .line.alt1 { 21 | background-color: white !important; 22 | } 23 | .syntaxhighlighter .line.alt2 { 24 | background-color: white !important; 25 | } 26 | .syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { 27 | background-color: #e0e0e0 !important; 28 | } 29 | .syntaxhighlighter .line.highlighted.number { 30 | color: black !important; 31 | } 32 | .syntaxhighlighter table caption { 33 | color: black !important; 34 | } 35 | .syntaxhighlighter .gutter { 36 | color: #afafaf !important; 37 | } 38 | .syntaxhighlighter .gutter .line { 39 | border-right: 3px solid #6ce26c !important; 40 | } 41 | .syntaxhighlighter .gutter .line.highlighted { 42 | background-color: #6ce26c !important; 43 | color: white !important; 44 | } 45 | .syntaxhighlighter.printing .line .content { 46 | border: none !important; 47 | } 48 | .syntaxhighlighter.collapsed { 49 | overflow: visible !important; 50 | } 51 | .syntaxhighlighter.collapsed .toolbar { 52 | color: blue !important; 53 | background: white !important; 54 | border: 1px solid #6ce26c !important; 55 | } 56 | .syntaxhighlighter.collapsed .toolbar a { 57 | color: blue !important; 58 | } 59 | .syntaxhighlighter.collapsed .toolbar a:hover { 60 | color: red !important; 61 | } 62 | .syntaxhighlighter .toolbar { 63 | color: white !important; 64 | background: #6ce26c !important; 65 | border: none !important; 66 | } 67 | .syntaxhighlighter .toolbar a { 68 | color: white !important; 69 | } 70 | .syntaxhighlighter .toolbar a:hover { 71 | color: black !important; 72 | } 73 | .syntaxhighlighter .plain, .syntaxhighlighter .plain a { 74 | color: black !important; 75 | } 76 | .syntaxhighlighter .comments, .syntaxhighlighter .comments a { 77 | color: #008200 !important; 78 | } 79 | .syntaxhighlighter .string, .syntaxhighlighter .string a { 80 | color: blue !important; 81 | } 82 | .syntaxhighlighter .keyword { 83 | color: #006699 !important; 84 | } 85 | .syntaxhighlighter .preprocessor { 86 | color: gray !important; 87 | } 88 | .syntaxhighlighter .variable { 89 | color: #aa7700 !important; 90 | } 91 | .syntaxhighlighter .value { 92 | color: #009900 !important; 93 | } 94 | .syntaxhighlighter .functions { 95 | color: #ff1493 !important; 96 | } 97 | .syntaxhighlighter .constants { 98 | color: #0066cc !important; 99 | } 100 | .syntaxhighlighter .script { 101 | font-weight: bold !important; 102 | color: #006699 !important; 103 | background-color: none !important; 104 | } 105 | .syntaxhighlighter .color1, .syntaxhighlighter .color1 a { 106 | color: gray !important; 107 | } 108 | .syntaxhighlighter .color2, .syntaxhighlighter .color2 a { 109 | color: #ff1493 !important; 110 | } 111 | .syntaxhighlighter .color3, .syntaxhighlighter .color3 a { 112 | color: red !important; 113 | } 114 | 115 | .syntaxhighlighter .keyword { 116 | font-weight: bold !important; 117 | } 118 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/intro/accessInfo/AccessInfoController.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.intro.accessInfo; 2 | 3 | import org.paasta.caas.dashboard.common.CommonService; 4 | import org.paasta.caas.dashboard.common.Constants; 5 | import org.paasta.caas.dashboard.common.PropertyService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | import org.springframework.web.servlet.ModelAndView; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import java.util.HashMap; 15 | import java.util.Map; 16 | 17 | /** 18 | * Intro AccessInfo Controller 클래스 19 | * 20 | * @author REX 21 | * @version 1.0 22 | * @since 2018.09.10 23 | */ 24 | @Controller 25 | public class AccessInfoController { 26 | 27 | private static final String VIEW_URL = "/intro"; 28 | private final CommonService commonService; 29 | private final AccessInfoService accessInfoService; 30 | private final PropertyService propertyService; 31 | 32 | /** 33 | * Instantiates a new Access info controller. 34 | * @param commonService the common service 35 | * @param accessInfoService the access info service 36 | * @param propertyService the property service 37 | */ 38 | @Autowired 39 | public AccessInfoController(CommonService commonService, AccessInfoService accessInfoService, PropertyService propertyService) { 40 | this.commonService = commonService; 41 | this.accessInfoService = accessInfoService; 42 | this.propertyService = propertyService; 43 | } 44 | 45 | 46 | /** 47 | * Intro access info 페이지로 이동한다. 48 | * 49 | * @param httpServletRequest the http servlet request 50 | * @return the intro access info 51 | */ 52 | @GetMapping(value = Constants.URI_INTRO_ACCESS_INFO) 53 | public ModelAndView getIntroAccessInfo(HttpServletRequest httpServletRequest) { 54 | Map roleSetCodeList = new HashMap<>(); 55 | roleSetCodeList.put("administratorCode", propertyService.getAdministratorCode()); 56 | roleSetCodeList.put("regularUserCode", propertyService.getRegularUserCode()); 57 | roleSetCodeList.put("initUserCode", propertyService.getInitUserCode()); 58 | 59 | Map roleSetNameList = new HashMap<>(); 60 | roleSetNameList.put("administratorName", propertyService.getAdministratorName()); 61 | roleSetNameList.put("regularUserName", propertyService.getRegularUserName()); 62 | roleSetNameList.put("initUserName", propertyService.getInitUserName()); 63 | 64 | ModelAndView mv = new ModelAndView(); 65 | mv.addObject("roleSetCodeList", roleSetCodeList); 66 | mv.addObject("roleSetNameList", roleSetNameList); 67 | return commonService.setPathVariables(httpServletRequest, VIEW_URL + "/accessInfo", mv); 68 | } 69 | 70 | 71 | /** 72 | * Secret을 조회한다. 73 | * 74 | * @param namespace the namespace 75 | * @param accessTokenName the access token name 76 | * @return the secret 77 | */ 78 | @GetMapping(value = Constants.CAAS_BASE_URL + Constants.URI_API_SECRETS_DETAIL) 79 | @ResponseBody 80 | public AccessInfo getSecret(@PathVariable("namespace") String namespace, @PathVariable("accessTokenName") String accessTokenName) { 81 | return accessInfoService.getToken(namespace, accessTokenName); 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/cf/CfService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.cf; 2 | 3 | import org.paasta.caas.dashboard.common.RestTemplateService; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.beans.factory.annotation.Value; 6 | import org.springframework.http.HttpMethod; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | /** 13 | * Cf Service 클래스. 14 | * 15 | * @author indra 16 | * @version 1.0 17 | * @since 2018.08.28 18 | */ 19 | @Service 20 | public class CfService { 21 | 22 | private final RestTemplateService restTemplateService; 23 | 24 | @Value("${cf.api.url}") 25 | private String apiUrl; 26 | 27 | /** 28 | * Instantiates a new Cf service. 29 | * 30 | * @param restTemplateService the rest template service 31 | */ 32 | @Autowired 33 | public CfService(RestTemplateService restTemplateService) { 34 | this.restTemplateService = restTemplateService; 35 | } 36 | 37 | /** 38 | * Organization 정보를 조회한다. 39 | * 40 | * @param uaaid the uaaid 41 | * @param token the token 42 | * @return the Map 43 | */ 44 | public Map getCfOrgsByUaaId(String uaaid, String token) { 45 | Map resultMap = new HashMap(); 46 | 47 | try { 48 | resultMap = restTemplateService.cfSend(token, apiUrl + "/v2/users/" + uaaid + "/organizations", HttpMethod.GET, null, Map.class); 49 | } catch (Exception e) { 50 | e.printStackTrace(); 51 | } 52 | 53 | return resultMap; 54 | } 55 | 56 | /** 57 | * Space Guid를 조회한다. 58 | * 59 | * @param serviceInstanceId the serviceInstance Id 60 | * @param token the token 61 | * @return the Map 62 | */ 63 | public Map getCfServiceInstancesById(String serviceInstanceId, String token) { 64 | Map resultMap = new HashMap(); 65 | 66 | try { 67 | resultMap = restTemplateService.cfSend(token, apiUrl + "/v2/service_instances/" + serviceInstanceId, HttpMethod.GET, null, Map.class); 68 | } catch (Exception e) { 69 | e.printStackTrace(); 70 | } 71 | 72 | return resultMap; 73 | } 74 | 75 | /** 76 | * Organization Guid를 조회한다. 77 | * 78 | * @param space_guid the space guid 79 | * @param token the token 80 | * @return the Map 81 | */ 82 | public Map getCfServiceById(String space_guid, String token) { 83 | Map resultMap = new HashMap(); 84 | 85 | try { 86 | resultMap = restTemplateService.cfSend(token, apiUrl + "/v2/spaces/" + space_guid, HttpMethod.GET, null, Map.class); 87 | } catch (Exception e) { 88 | e.printStackTrace(); 89 | } 90 | 91 | return resultMap; 92 | } 93 | 94 | /** 95 | * Organization Name을 조회한다. 96 | * 97 | * @param organization_guid the organization guid 98 | * @param token the token 99 | * @return the Map 100 | */ 101 | public Map getCfOrgById(String organization_guid, String token) { 102 | Map resultMap = new HashMap(); 103 | 104 | try { 105 | resultMap = restTemplateService.cfSend(token, apiUrl + "/v2/organizations/" + organization_guid + "/summary", HttpMethod.GET, null, Map.class); 106 | } catch (Exception e) { 107 | e.printStackTrace(); 108 | } 109 | 110 | return resultMap; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/common/CommonService.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.common; 2 | 3 | import org.springframework.stereotype.Service; 4 | import org.springframework.web.servlet.HandlerMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import java.util.Map; 9 | 10 | /** 11 | * Common Service 클래스 12 | * 13 | * @author REX 14 | * @version 1.0 15 | * @since 2018.08.02 16 | */ 17 | @Service 18 | public class CommonService { 19 | 20 | /** 21 | * Sets path variables. 22 | * 23 | * @param httpServletRequest the http servlet request 24 | * @param viewName the view name 25 | * @param mv the mv 26 | * @return the path variables 27 | */ 28 | public ModelAndView setPathVariables(HttpServletRequest httpServletRequest, String viewName, ModelAndView mv) { 29 | Map pathVariablesMap = (Map) httpServletRequest.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE); 30 | Object pathVariablesObject; 31 | String pathVariablesKey; 32 | 33 | Map parametersMap = httpServletRequest.getParameterMap(); 34 | String[] parametersObject; 35 | String parametersKey; 36 | 37 | for (int i = 0; i < PathVariablesList.values().length; i++) { 38 | pathVariablesKey = PathVariablesList.values()[i].actualValue; 39 | pathVariablesObject = pathVariablesMap.get(pathVariablesKey); 40 | 41 | if (pathVariablesObject != null) { 42 | mv.addObject(pathVariablesKey, String.valueOf(pathVariablesObject)); 43 | } 44 | } 45 | 46 | for (int i = 0; i < ParametersList.values().length; i++) { 47 | parametersKey = ParametersList.values()[i].actualValue; 48 | parametersObject = parametersMap.get(parametersKey); 49 | 50 | if (parametersObject != null && !"".equals(parametersObject[0])) { 51 | mv.addObject(parametersKey, parametersObject[0]); 52 | } 53 | } 54 | 55 | mv.setViewName(viewName); 56 | 57 | return mv; 58 | } 59 | 60 | 61 | /** 62 | * The enum Path variables list. 63 | */ 64 | enum PathVariablesList { 65 | /** 66 | * Path service name path variables list. 67 | */ 68 | PATH_SERVICE_NAME("serviceName"), 69 | /** 70 | * Path variables id path variables list. 71 | */ 72 | PATH_VARIABLES_ID("id"); 73 | 74 | private String actualValue; 75 | 76 | PathVariablesList(String actualValue) { 77 | this.actualValue = actualValue; 78 | } 79 | } 80 | 81 | 82 | /** 83 | * The enum Parameters list. 84 | */ 85 | enum ParametersList { 86 | /** 87 | * Parameters id parameters list. 88 | */ 89 | PARAMETERS_ID("id"), 90 | /** 91 | * Parameters name parameters list. 92 | */ 93 | PARAMETERS_NAME("name"), 94 | /** 95 | * Parameters page parameters list. 96 | */ 97 | PARAMETERS_PAGE("page"), 98 | /** 99 | * Parameters size parameters list. 100 | */ 101 | PARAMETERS_SIZE("size"), 102 | /** 103 | * Parameters sort parameters list. 104 | */ 105 | PARAMETERS_SORT("sort"); 106 | 107 | private String actualValue; 108 | 109 | ParametersList(String actualValue) { 110 | this.actualValue = actualValue; 111 | } 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/main/webapp/resources/css/gspinner.min.css: -------------------------------------------------------------------------------- 1 | #g-spinner{top:40%;position:relative;margin:0 auto;height:200px;width:200px;border-radius:50%;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}#g-spinner.loading{opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";-webkit-transition:1s ease-in-out all;transition:1s ease-in-out all;-webkit-animation:rotate 2s cubic-bezier(.465,.183,.153,.946) infinite;animation:rotate 2s cubic-bezier(.465,.183,.153,.946) infinite}#g-spinner>.circle{position:absolute;height:40px;width:40px;border-radius:50%}#g-spinner.loading>.circle.c1{left:80px;top:5px;background:#4384f8;-webkit-animation:c1Center 4s cubic-bezier(.645,.045,.355,1) infinite;animation:c1Center 4s cubic-bezier(.645,.045,.355,1) infinite}#g-spinner.loading>.circle.c2{left:5px;top:80px;background:#34a855;-webkit-animation:c2Center 4s cubic-bezier(.645,.045,.355,1) infinite;animation:c2Center 4s cubic-bezier(.645,.045,.355,1) infinite}#g-spinner.loading>.circle.c3{left:80px;bottom:5px;background:#fbbd06;-webkit-animation:c3Center 4s cubic-bezier(.645,.045,.355,1) infinite;animation:c3Center 4s cubic-bezier(.645,.045,.355,1) infinite}#g-spinner.loading>.circle.c4{right:5px;top:80px;background:#ea4436;-webkit-animation:c4Center 4s cubic-bezier(.645,.045,.355,1) infinite;animation:c4Center 4s cubic-bezier(.645,.045,.355,1) infinite}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes c1Center{0%{top:5px;background:#4384f8}24%{background:#4384f8}24%{background:#4384f8}25%{background:#fbbd06;top:80px}50%{background:#fbbd06;top:5px}55%{background:#fbbd06;top:5px}74%{background:#fbbd06}75%{background:#4384f8;top:80px}100%{background:#4384f8;top:5px}}@keyframes c1Center{0%{top:5px;background:#4384f8}24%{background:#4384f8}24%{background:#4384f8}25%{background:#fbbd06;top:80px}50%{background:#fbbd06;top:5px}55%{background:#fbbd06;top:5px}74%{background:#fbbd06}75%{background:#4384f8;top:80px}100%{background:#4384f8;top:5px}}@-webkit-keyframes c2Center{0%{background:#34a855;left:5px}24%{background:#34a855}25%{background:#ea4436;left:80px}50%{background:#ea4436;left:5px}55%{background:#ea4436;left:5px}74%{background:#ea4436}75%{background:#34a855;left:80px}100%{background:#34a855;left:5px}}@keyframes c2Center{0%{background:#34a855;left:5px}24%{background:#34a855}25%{background:#ea4436;left:80px}50%{background:#ea4436;left:5px}55%{background:#ea4436;left:5px}74%{background:#ea4436}75%{background:#34a855;left:80px}100%{background:#34a855;left:5px}}@-webkit-keyframes c3Center{0%{background:#fbbd06;bottom:5px}24%{background:#fbbd06}25%{background:#4384f8;bottom:80px}50%{background:#4384f8;bottom:5px}55%{background:#4384f8;bottom:5px}74%{background:#4384f8}75%{background:#fbbd06;bottom:80px}100%{background:#fbbd06;bottom:5px}}@keyframes c3Center{0%{background:#fbbd06;bottom:5px}24%{background:#fbbd06}25%{background:#4384f8;bottom:80px}50%{background:#4384f8;bottom:5px}55%{background:#4384f8;bottom:5px}74%{background:#4384f8}75%{background:#fbbd06;bottom:80px}100%{background:#fbbd06;bottom:5px}}@-webkit-keyframes c4Center{0%{background:#ea4436;right:5px}24%{background:#ea4436}25%{background:#34a855;right:80px}50%{background:#34a855;right:5px}55%{background:#34a855;right:5px}74%{background:#34a855}75%{background:#ea4436;right:80px}100%{background:#ea4436;right:5px}}@keyframes c4Center{0%{background:#ea4436;right:5px}24%{background:#ea4436}25%{background:#34a855;right:80px}50%{background:#34a855;right:5px}55%{background:#34a855;right:5px}74%{background:#34a855}75%{background:#ea4436;right:80px}100%{background:#ea4436;right:5px}} 2 | -------------------------------------------------------------------------------- /src/main/webapp/resources/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Cookie Plugin v1.4.1 3 | * https://github.com/carhartl/jquery-cookie 4 | * 5 | * Copyright 2006, 2014 Klaus Hartl 6 | * Released under the MIT license 7 | */ 8 | (function (factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD (Register as an anonymous module) 11 | define(['jquery'], factory); 12 | } else if (typeof exports === 'object') { 13 | // Node/CommonJS 14 | module.exports = factory(require('jquery')); 15 | } else { 16 | // Browser globals 17 | factory(jQuery); 18 | } 19 | }(function ($) { 20 | 21 | var pluses = /\+/g; 22 | 23 | function encode(s) { 24 | return config.raw ? s : encodeURIComponent(s); 25 | } 26 | 27 | function decode(s) { 28 | return config.raw ? s : decodeURIComponent(s); 29 | } 30 | 31 | function stringifyCookieValue(value) { 32 | return encode(config.json ? JSON.stringify(value) : String(value)); 33 | } 34 | 35 | function parseCookieValue(s) { 36 | if (s.indexOf('"') === 0) { 37 | // This is a quoted cookie as according to RFC2068, unescape... 38 | s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 39 | } 40 | 41 | try { 42 | // Replace server-side written pluses with spaces. 43 | // If we can't decode the cookie, ignore it, it's unusable. 44 | // If we can't parse the cookie, ignore it, it's unusable. 45 | s = decodeURIComponent(s.replace(pluses, ' ')); 46 | return config.json ? JSON.parse(s) : s; 47 | } catch(e) {} 48 | } 49 | 50 | function read(s, converter) { 51 | var value = config.raw ? s : parseCookieValue(s); 52 | return $.isFunction(converter) ? converter(value) : value; 53 | } 54 | 55 | var config = $.cookie = function (key, value, options) { 56 | 57 | // Write 58 | 59 | if (arguments.length > 1 && !$.isFunction(value)) { 60 | options = $.extend({}, config.defaults, options); 61 | 62 | if (typeof options.expires === 'number') { 63 | var days = options.expires, t = options.expires = new Date(); 64 | t.setMilliseconds(t.getMilliseconds() + days * 864e+5); 65 | } 66 | 67 | return (document.cookie = [ 68 | encode(key), '=', stringifyCookieValue(value), 69 | options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 70 | options.path ? '; path=' + options.path : '', 71 | options.domain ? '; domain=' + options.domain : '', 72 | options.secure ? '; secure' : '' 73 | ].join('')); 74 | } 75 | 76 | // Read 77 | 78 | var result = key ? undefined : {}, 79 | // To prevent the for loop in the first place assign an empty array 80 | // in case there are no cookies at all. Also prevents odd result when 81 | // calling $.cookie(). 82 | cookies = document.cookie ? document.cookie.split('; ') : [], 83 | i = 0, 84 | l = cookies.length; 85 | 86 | for (; i < l; i++) { 87 | var parts = cookies[i].split('='), 88 | name = decode(parts.shift()), 89 | cookie = parts.join('='); 90 | 91 | if (key === name) { 92 | // If second argument (value) is a function it's a converter... 93 | result = read(cookie, value); 94 | break; 95 | } 96 | 97 | // Prevent storing a cookie that we couldn't decode. 98 | if (!key && (cookie = read(cookie)) !== undefined) { 99 | result[name] = cookie; 100 | } 101 | } 102 | 103 | return result; 104 | }; 105 | 106 | config.defaults = {}; 107 | 108 | $.removeCookie = function (key, options) { 109 | // Must not alter options, thus extending a fresh object... 110 | $.cookie(key, '', $.extend({}, options, { expires: -1 })); 111 | return !$.cookie(key); 112 | }; 113 | 114 | })); 115 | -------------------------------------------------------------------------------- /src/main/java/org/paasta/caas/dashboard/security/SsoAuthenticationProcessingFilter.java: -------------------------------------------------------------------------------- 1 | package org.paasta.caas.dashboard.security; 2 | 3 | import org.paasta.caas.dashboard.common.CommonService; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.security.authentication.AuthenticationDetailsSource; 7 | import org.springframework.security.authentication.AuthenticationManager; 8 | import org.springframework.security.core.Authentication; 9 | import org.springframework.security.core.AuthenticationException; 10 | import org.springframework.security.core.context.SecurityContextHolder; 11 | import org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter; 12 | import org.springframework.security.oauth2.provider.OAuth2Authentication; 13 | 14 | import javax.servlet.ServletException; 15 | import javax.servlet.http.HttpServletRequest; 16 | import javax.servlet.http.HttpServletResponse; 17 | import java.io.IOException; 18 | 19 | /** 20 | * Extension of {@link OAuth2ClientAuthenticationProcessingFilter} that uses the 21 | * {@link org.springframework.security.authentication.AuthenticationManager}. 22 | * This implementation also starts authentication if there is no authentication and 23 | * if the current request requires authentication. 24 | * 25 | * @author Sebastien Gerard 26 | */ 27 | public class SsoAuthenticationProcessingFilter extends OAuth2ClientAuthenticationProcessingFilter { 28 | 29 | private static final Logger LOGGER = LoggerFactory.getLogger(SsoAuthenticationProcessingFilter.class); 30 | 31 | private AuthenticationDetailsSource detailsSource; 32 | 33 | private CommonService commonService; 34 | 35 | public SsoAuthenticationProcessingFilter() { 36 | super("/"); 37 | } 38 | 39 | 40 | @Override 41 | protected boolean requiresAuthentication(HttpServletRequest request, HttpServletResponse response) { 42 | Authentication securityAuthentication = SecurityContextHolder.getContext().getAuthentication(); 43 | 44 | if(!(securityAuthentication == null && super.requiresAuthentication(request, response))){ 45 | return false; 46 | } else { 47 | return true; 48 | } 49 | } 50 | 51 | @Override 52 | public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) 53 | throws AuthenticationException, IOException, ServletException { 54 | final Authentication authentication = super.attemptAuthentication(request, response); 55 | 56 | LOGGER.info("** attemptAuthentication"); 57 | 58 | if (detailsSource != null) { 59 | request.getSession().invalidate(); 60 | ((OAuth2Authentication) authentication).setDetails(detailsSource.buildDetails(request)); 61 | } 62 | 63 | Object obj = request.getSession().getAttribute("serviceInstanceId"); 64 | String serviceInstanceId = obj != null ? obj.toString() : ""; 65 | 66 | if (request.getSession() != null && serviceInstanceId != "") { 67 | SsoAuthenticationDetails ssoAuthenticationDetails = (SsoAuthenticationDetails) authentication.getDetails(); 68 | ssoAuthenticationDetails.setManagingServiceInstance(serviceInstanceId); 69 | } 70 | 71 | AuthenticationManager authenticationManager = getAuthenticationManager(); 72 | 73 | return authenticationManager.authenticate(authentication); 74 | } 75 | 76 | /** 77 | * Sets the optional source providing {@link Authentication#getDetails() authentication details}. 78 | */ 79 | public void setDetailsSource(AuthenticationDetailsSource detailsSource) { 80 | this.detailsSource = detailsSource; 81 | } 82 | 83 | public void setCommonService(CommonService commonService) { 84 | this.commonService = commonService; 85 | } 86 | 87 | 88 | 89 | 90 | 91 | 92 | } 93 | --------------------------------------------------------------------------------
22 | Users 23 |
36 | Roles 37 |
YAML
- 24 |
20 | Intro 21 |
34 | Workloads 35 |
48 | Services 49 |
62 | Storages 63 |