Skip to content

Latest commit

Β 

History

History
414 lines (355 loc) Β· 13.9 KB

File metadata and controls

414 lines (355 loc) Β· 13.9 KB

LSCable CMS V2 Project Analysis Document

1. Project Overview

Basic Information

Item Value
Project Name LSCable CMS
Version 2.0
Package com.i52soft.lscable.cms
Type Spring Boot Web Application

Project Description

LSCable CMS V2 is a cable management system for network infrastructure management. It provides web-based UI for managing cable connections, network devices, IP addresses, and data center infrastructure.

Technology Stack

Category Technology
Framework Spring Boot 1.4.4.RELEASE
Template Engine Thymeleaf
Database PostgreSQL 42.2.2.jre7
ORM MyBatis (mybatis-spring-boot-starter 1.1.1)
Security Spring Security + BCrypt
WebSocket Spring WebSocket
Logging SLF4J + Logback
Connection Pool HikariCP
Frontend Bootstrap 3.3.4, jQuery 1.11.3
Crypto BouncyCastle (bcprov-jdk15on, bcpkix-jdk15on)
Build Tool Maven
Java Version 1.7

2. Project Structure

LSCable CMS V2/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/com/i52soft/lscable/cms/
β”‚   β”‚   β”‚   β”œβ”€β”€ App.java                      # Main Application
β”‚   β”‚   β”‚   β”œβ”€β”€ config/                       # Configuration
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SecurityConfig.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ WebConfig.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ WebSocketConfig.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ThymeleafConfig.java
β”‚   β”‚   β”‚   β”‚   └── MyTomcatEmbeddedServletContainerFactory.java
β”‚   β”‚   β”‚   β”œβ”€β”€ controller/                  # Controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AdminController.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DefaultController.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HTBackendRestController.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ WebSocketController.java
β”‚   β”‚   β”‚   β”‚   └── WidgetDataProviderRestController.java
β”‚   β”‚   β”‚   β”œβ”€β”€ service/                      # Service Interfaces
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HTBackendService.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ WidgetDataProviderService.java
β”‚   β”‚   β”‚   β”‚   └── impl/
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ HTBackendServiceImpl.java
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ LogInServiceImpl.java
β”‚   β”‚   β”‚   β”‚       └── WidgetDataProviderServiceImpl.java
β”‚   β”‚   β”‚   β”œβ”€β”€ dao/                          # Data Access
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HTBackendDao.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ LogInDao.java
β”‚   β”‚   β”‚   β”‚   └── WidgetDataProviderDao.java
β”‚   β”‚   β”‚   β”œβ”€β”€ domain/                       # Domain Objects
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SystemUserVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EndUserVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ProductVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ NetworkVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ IPAddressVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CMSSiteVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RegionVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ EntityVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ InterfaceVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SiteTreeVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SiteTreeNodeVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ LinkageConnectionVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ConnectorVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ConnectionVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MainPageLayoutVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MainPageWidgetVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MapWidgetVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ChartWidgetVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ WidgetParam.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MapParam.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DeviceParam.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ NetworkSwitchVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PPInvalidVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SampleWidgetVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SampleWidgetVO2.java
β”‚   β”‚   β”‚   β”‚   └── SiteTreePlacementVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SiteTreeRackspacePositionVO.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ device.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ deviceInfo.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ regions.java
β”‚   β”‚   β”‚   β”‚   └── regionInfo.java
β”‚   β”‚   β”‚   └── common/                        # Common Utilities
β”‚   β”‚   β”‚       β”œβ”€β”€ CmsAuthenticationProvider.java
β”‚   β”‚   β”‚       β”œβ”€β”€ KeyUtil.java
β”‚   β”‚   β”‚       β”œβ”€β”€ PemFile.java
β”‚   β”‚   β”‚       β”œβ”€β”€ IPAddress.java
β”‚   β”‚   β”‚       β”œβ”€β”€ SimpleCORSFilter.java
β”‚   β”‚   β”‚       └── CmsACLHandler.java
β”‚   β”‚   └── resources/
β”‚   β”‚       β”œβ”€β”€ application.properties
β”‚   β”‚       β”œβ”€β”€ application.yml
β”‚   β”‚       β”œβ”€β”€ database.properties
β”‚   β”‚       β”œβ”€β”€ data.sql
β”‚   β”‚       β”œβ”€β”€ db_reset_sql.txt
β”‚   β”‚       β”œβ”€β”€ LicensedMac
β”‚   β”‚       β”œβ”€β”€ logback-spring.xml
β”‚   β”‚       β”œβ”€β”€ templates/                    # Thymeleaf Templates
β”‚   β”‚       β”‚   β”œβ”€β”€ login.html
β”‚   β”‚       β”‚   β”œβ”€β”€ layout/
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ default.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ default2.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ default3.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ default4.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ default5.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ default6.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ default7.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ default8.html
β”‚   β”‚       β”‚   β”‚   └── public.html
β”‚   β”‚       β”‚   β”œβ”€β”€ cms/
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ view.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ new.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ modifySite.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ setting.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ siteset.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ adminAuth.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ adminList.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ adminSearch.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ adminPortUsage.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ catalog.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ regions.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ manufacturer.html
β”‚   β”‚       β”‚   β”‚   └── linkage.html
β”‚   β”‚       β”‚   β”œβ”€β”€ cms2/                      # CMS v2 Theme
β”‚   β”‚       β”‚   β”œβ”€β”€ setting/
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ main.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ view.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ new.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ modify.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ system.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ adminsysuser.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ map-list.html
β”‚   β”‚       β”‚   β”‚   └── manage-widget-*.html   # Widget Management
β”‚   β”‚       β”‚   β”œβ”€β”€ setting2/                  # Setting v2 Theme
β”‚   β”‚       β”‚   β”œβ”€β”€ ipam/
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ user.html
β”‚   β”‚       β”‚   β”‚   └── setting.html
β”‚   β”‚       β”‚   β”œβ”€β”€ ipam2/
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ user.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ setting.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ terminalUser.html
β”‚   β”‚       β”‚   β”‚   β”œβ”€β”€ terminalList.html
β”‚   β”‚       β”‚   β”‚   └── adminNetwork.html
β”‚   β”‚       β”‚   β”œβ”€β”€ main-widgetMap.html
β”‚   β”‚       β”‚   └── pace.html
β”‚   β”‚       └── themes/
β”‚   β”‚           β”œβ”€β”€ bright.properties
β”‚   β”‚           └── dark.properties
β”‚   └── test/
β”‚       └── java/
β”‚           └── com/mysample/
β”‚               └── AppTest.java
β”œβ”€β”€ target/
β”‚   β”œβ”€β”€ LSCableCMS-2.0.jar
β”‚   β”œβ”€β”€ config.properties
β”‚   β”œβ”€β”€ startCMS.bat / startCMS.sh
β”‚   └── stopCMS.bat / stopCMS.sh
β”œβ”€β”€ doc/                              # Javadoc
β”œβ”€β”€ pom.xml
β”œβ”€β”€ .classpath
└── .project

3. Module Description

3.1 Controller Layer

AdminController.java

Main administrative controller handling:

  • /admin/setting/* - Dashboard layout and widget management
  • /admin/cms/* - CMS site management
  • /admin/ipam/* - IP Address Management
  • Theme-based routing (setting/ vs setting2/)

HTBackendRestController.java

REST API controller for backend operations

WidgetDataProviderRestController.java

REST API for widget data provisioning

WebSocketController.java

Real-time communication support

DefaultController.java

Default routing and main page handling

3.2 Service Layer

HTBackendService (Interface + Impl)

Core business logic for:

  • Widget management
  • Layout management
  • Site tree management
  • Product/Manufacturer management
  • User management
  • Network/IPAM management
  • Connection diagram
  • Alarm monitoring

WidgetDataProviderService

Widget data provider service

3.3 Domain Objects

Domain Class Description
UserVO General user
SystemUserVO System administrator
EndUserVO End user/terminal user
CMSSiteVO CMS site information
NetworkVO Network segment
IPAddressVO IP address
EntityVO Physical entity (device, rack, etc.)
InterfaceVO Network interface
SiteTreeVO Site tree structure
MainPageLayoutVO Dashboard layout
MainPageWidgetVO Dashboard widget
MapWidgetVO Map widget
WidgetParam Widget parameters

3.4 Security

  • Authentication: Spring Security with BCrypt password encoding
  • Authorization: Role-based access control
  • Session: Remember-me functionality
  • Public Resources: CSS, JS, images, static resources (permitAll)
  • Protected Resources: /admin/** requires Administrator role

4. API Endpoints

Authentication

Method Path Description
GET /login Login page
POST /login-process Login processing
GET /logout Logout

Admin - Setting

Method Path Description
GET /admin/setting/adminsysuser System user management
GET /admin/setting/new Create new layout
GET /admin/setting/modify Modify layout
GET /admin/setting/map-list Map widget list
GET /admin/setting/manage-layout Manage layout
GET /admin/setting/manage-widget Manage widget
GET /admin/setting/preview-layout Preview layout

Admin - CMS

Method Path Description
GET /admin/cms/setting CMS settings
GET /admin/cms/siteset Site settings
GET /admin/cms/view View site
GET /admin/cms/new Create new site
GET /admin/cms/modifySite Modify site
GET /admin/cms/catalog Product catalog
GET /admin/cms/regions Region management
GET /admin/cms/manufacturer Manufacturer management
GET /admin/cms/adminAuth Authorization management
GET /admin/cms/linkage Connection management

Admin - IPAM

Method Path Description
GET /admin/ipam/setting IPAM settings
GET /admin/ipam/user User IP management
GET /admin/ipam/adminNetwork Network administration

5. Database Configuration

Connection Pool

  • Type: HikariCP
  • Driver: PostgreSQL 42.2.2.jre7
  • Configuration: database.properties (externalized)

ORM

  • Type: MyBatis
  • Mapper: XML-based SQL mapping

6. Build & Deployment

Build

mvn clean package

Run

# Windows
target\startCMS.bat

# Linux
sh target/startCMS.sh

Stop

# Windows
target\stopCMS.bat

# Linux
sh target/stopCMS.sh

7. Features

Core Features

  1. Cable Management System (CMS)

    • Site management
    • Building/Floor/Room hierarchy
    • Patch panel management
    • Connection tracking
  2. Dashboard & Widgets

    • Customizable dashboard layouts
    • Line Chart, Pie Chart, Gauge Chart
    • Alarm Grid Table
    • Availability Grid Table
    • Map Widget
    • 3D Rack View (DCIM)
  3. IP Address Management (IPAM)

    • IP address allocation
    • Network segment management
    • L2/L3 switch management
    • Gateway configuration
  4. Real-time Monitoring

    • WebSocket-based updates
    • Alarm status monitoring
    • Port status monitoring
  5. User Management

    • System user administration
    • End user management
    • Role-based access control (RBAC)
  6. Theme Support

    • Bright theme
    • Dark theme

8. Configuration Files

application.properties

Spring Boot main configuration

database.properties

Database connection configuration (externalized)

config.properties

Application runtime configuration (in target/)

LicensedMac

License MAC address for hardware binding


9. Dependencies Summary

Group Artifact Version
org.springframework.boot spring-boot-starter-web 1.4.4.RELEASE
org.springframework.boot spring-boot-starter-security 1.4.4.RELEASE
org.springframework.boot spring-boot-starter-websocket 1.4.4.RELEASE
org.springframework.boot spring-boot-starter-thymeleaf 1.4.4.RELEASE
org.mybatis.spring.boot mybatis-spring-boot-starter 1.1.1
org.postgresql postgresql 42.2.2.jre7
org.projectlombok lombok 1.16.8
com.zaxxer HikariCP (from parent)
org.bouncycastle bcprov-jdk15on 1.56
org.bouncycastle bcpkix-jdk15on 1.56
org.webjars bootstrap 3.3.4
org.webjars jquery 1.11.3

10. Notes

  • This is a legacy Spring Boot 1.4.x application (Java 7)
  • Uses Thymeleaf for server-side rendering
  • Two theme versions exist: original (setting/) and v2 (setting2/)
  • CMS and IPAM modules with separate UI paths
  • Hardware license binding is implemented but currently disabled
  • Javadoc documentation available in /doc folder