├── .classpath ├── .gitattributes ├── .project ├── .settings ├── .jsdtscope ├── com.genuitec.eclipse.migration.prefs ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs ├── org.eclipse.wst.common.component ├── org.eclipse.wst.common.project.facet.core.prefs.xml ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.wst.jsdt.ui.superType.container ├── org.eclipse.wst.jsdt.ui.superType.name └── org.eclipse.wst.validation.prefs ├── .tern-project ├── LICENSE ├── README.md ├── out └── .gitignore ├── src └── com │ └── uniplore │ └── graph │ ├── common │ └── entity │ │ └── IPerson.java │ ├── dsm │ ├── common │ │ └── controller │ │ │ └── DispatcherMain.java │ ├── db │ │ ├── controller │ │ │ └── DbController.java │ │ ├── entity │ │ │ ├── DbPO.java │ │ │ ├── DbVO.java │ │ │ ├── EdgeDataVO.java │ │ │ ├── EdgeVO.java │ │ │ ├── NodeDataVO.java │ │ │ └── NodeVO.java │ │ └── service │ │ │ ├── IDbService.java │ │ │ └── impl │ │ │ └── DbService.java │ └── file │ │ └── controller │ │ ├── DispatcherJson.java │ │ └── FileUpload.java │ ├── exception │ ├── CustomException.java │ └── HandlerException.java │ ├── ms │ ├── login │ │ ├── controller │ │ │ └── LoginController.java │ │ ├── dao │ │ │ ├── ILoginDao.java │ │ │ └── impl │ │ │ │ └── LoginDao.java │ │ ├── mapper │ │ │ ├── LoginMapper.java │ │ │ └── LoginMapper.xml │ │ └── service │ │ │ ├── ILoginService.java │ │ │ └── impl │ │ │ └── LoginService.java │ └── sign │ │ ├── captcha │ │ ├── controller │ │ │ ├── StartCaptchaController.java │ │ │ └── VerifyLoginController.java │ │ ├── dao │ │ │ └── GeetestConfig.java │ │ └── service │ │ │ └── GeetestLib.java │ │ ├── controller │ │ ├── DispatcherLoginController.java │ │ ├── DispatcherSignController.java │ │ └── SignUpController.java │ │ ├── dao │ │ ├── IUserDao.java │ │ └── impl │ │ │ └── UserDao.java │ │ ├── dbsql │ │ └── user.sql │ │ ├── entity │ │ └── UserPO.java │ │ ├── mapper │ │ ├── UserMapper.java │ │ └── UserMapper.xml │ │ ├── properties │ │ ├── db.properties │ │ └── log4j.properties │ │ └── service │ │ ├── IUserService.java │ │ └── impl │ │ └── UserService.java │ └── util │ ├── email │ ├── GMailAuthenticator.java │ └── SendEmail.java │ ├── fileoperation │ └── FileOperation.java │ ├── jdbcutils │ └── JDBCUtils.java │ ├── mybatisutils │ └── MybatisUtils.java │ └── time │ └── ComputeTime.java └── web ├── META-INF └── MANIFEST.MF ├── WEB-INF ├── .gitignore ├── lib │ ├── activation.jar │ ├── classmate-0.8.0.jar │ ├── com.springsource.net.sf.cglib-2.2.0.jar │ ├── com.springsource.org.aopalliance-1.0.0.jar │ ├── com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar │ ├── commons-beanutils-1.7.0.jar │ ├── commons-collections-3.2.1.jar │ ├── commons-fileupload-1.3.2.jar │ ├── commons-httpclient-3.1.jar │ ├── commons-io-2.0.jar │ ├── commons-lang-2.3.jar │ ├── commons-logging-1.1.3.jar │ ├── druid-1.0.27.jar │ ├── druid-1.0.29.jar │ ├── ezmorph-1.0.3.jar │ ├── fastjson-1.2.7.jar │ ├── greenplum.jar │ ├── hibernate-validator-5.0.0.CR2.jar │ ├── hibernate-validator-annotation-processor-5.0.0.CR2.jar │ ├── jackson-annotations-2.1.5.jar │ ├── jackson-core-2.1.5.jar │ ├── jackson-databind-2.1.5.jar │ ├── java-json.jar │ ├── javax.servlet-api-3.0.1.jar │ ├── jboss-logging-3.1.1.GA.jar │ ├── jcaptcha-1.0-all.jar │ ├── jedis-2.9.0.jar │ ├── json-lib-2.2.3-jdk15.jar │ ├── jsqlparser-0.9.5.jar │ ├── jstl.jar │ ├── junit.jar │ ├── log4j-1.2.17.jar │ ├── log4j-api-2.0-rc1.jar │ ├── log4j-core-2.0-rc1.jar │ ├── lombok.jar │ ├── mail.jar │ ├── mybatis-3.3.1.jar │ ├── mybatis-spring-1.2.4.jar │ ├── mysql-connector-java-5.1.7-bin.jar │ ├── ojdbc7.jar │ ├── pagehelper-4.1.6.jar │ ├── postgresql-9.4.1208.jre7.jar │ ├── slf4j-api-1.7.5.jar │ ├── slf4j-log4j12-1.7.5.jar │ ├── spring-aop-4.0.0.RELEASE.jar │ ├── spring-aspects-4.0.0.RELEASE.jar │ ├── spring-beans-4.0.0.RELEASE.jar │ ├── spring-context-4.0.0.RELEASE.jar │ ├── spring-core-4.0.0.RELEASE.jar │ ├── spring-expression-4.0.0.RELEASE.jar │ ├── spring-jdbc-4.0.0.RELEASE.jar │ ├── spring-orm-4.0.0.RELEASE.jar │ ├── spring-test-4.0.0.RELEASE.jar │ ├── spring-tx-4.0.0.M2.jar │ ├── spring-tx-4.0.0.RELEASE.jar │ ├── spring-web-4.0.0.RELEASE.jar │ ├── spring-webmvc-4.0.0.RELEASE.jar │ ├── standard.jar │ └── validation-api-1.1.0.CR1.jar ├── spring.xml ├── upload │ └── README.md ├── views │ ├── common │ │ ├── error │ │ │ └── error.jsp │ │ └── header │ │ │ └── header.jsp │ ├── dsm │ │ ├── db │ │ │ └── dbPage.jsp │ │ ├── file │ │ │ └── json │ │ │ │ └── json.jsp │ │ └── main.jsp │ └── ms │ │ ├── active_error.jsp │ │ ├── login.jsp │ │ ├── sign.jsp │ │ └── success.jsp └── web.xml ├── css ├── common │ ├── footer │ │ └── footer.css │ └── header │ │ └── header.css ├── dsm │ ├── db │ │ └── db.css │ ├── file │ │ └── json.css │ └── main.css └── ms │ ├── login.css │ └── sign.css ├── html └── test.html ├── img ├── dsm │ └── background.png ├── main │ └── icon.png └── ms │ ├── background.png │ └── topback.gif ├── index.jsp ├── js ├── dsm │ ├── db │ │ └── db.js │ ├── file │ │ └── json.js │ └── main.js └── ms │ ├── login.js │ └── sign.js └── utils ├── bootstrap ├── css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ └── bootstrap.min.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── js │ ├── bootstrap.js │ ├── bootstrap.min.js │ └── npm.js ├── cytoscape └── js │ ├── cytoscape.js │ └── cytoscape.min.js ├── dropzone ├── css │ └── dropzone.css └── js │ ├── dropzone-amd-module.js │ └── dropzone.js ├── easyui ├── css │ ├── easyui.css │ └── icon.css └── js │ ├── easyui-lang-zh_CN.js │ └── jquery.easyui.min.js ├── font-awesome ├── css │ ├── font-awesome-ie7.min.css │ └── font-awesome.min.css └── font │ └── fontawesome-webfont.woff ├── jRange ├── css │ └── jquery.range.css └── js │ └── jquery.range.js ├── jquery ├── jquery-3.1.0.js └── jquery-3.1.0.min.js ├── jscolor └── js │ └── jscolor.min.js ├── materialize ├── css │ ├── materialize.css │ └── materialize.min.css ├── fonts │ └── roboto │ │ ├── Roboto-Bold.eot │ │ ├── Roboto-Bold.ttf │ │ ├── Roboto-Bold.woff │ │ ├── Roboto-Bold.woff2 │ │ ├── Roboto-Light.eot │ │ ├── Roboto-Light.ttf │ │ ├── Roboto-Light.woff │ │ ├── Roboto-Light.woff2 │ │ ├── Roboto-Medium.eot │ │ ├── Roboto-Medium.ttf │ │ ├── Roboto-Medium.woff │ │ ├── Roboto-Medium.woff2 │ │ ├── Roboto-Regular.eot │ │ ├── Roboto-Regular.ttf │ │ ├── Roboto-Regular.woff │ │ ├── Roboto-Regular.woff2 │ │ ├── Roboto-Thin.eot │ │ ├── Roboto-Thin.ttf │ │ ├── Roboto-Thin.woff │ │ └── Roboto-Thin.woff2 └── js │ ├── materialize.js │ └── materialize.min.js ├── normalize └── css │ └── normalize.css └── sweetalert ├── css └── sweetalert.css └── js └── sweetalert.min.js /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=Java 2 | *.css linguist-language=Java 3 | *.html linguist-language=Java 4 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | graphanalysis 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator 30 | 31 | 32 | 33 | 34 | com.genuitec.eclipse.springframework.springbuilder 35 | 36 | 37 | 38 | 39 | net.sf.eclipsecs.core.CheckstyleBuilder 40 | 41 | 42 | 43 | 44 | 45 | com.genuitec.eclipse.springframework.springnature 46 | org.eclipse.jem.workbench.JavaEMFNature 47 | org.eclipse.wst.common.modulecore.ModuleCoreNature 48 | org.eclipse.wst.common.project.facet.core.nature 49 | org.eclipse.jdt.core.javanature 50 | org.eclipse.wst.jsdt.core.jsNature 51 | net.sf.eclipsecs.core.CheckstyleNature 52 | 53 | 54 | -------------------------------------------------------------------------------- /.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.settings/com.genuitec.eclipse.migration.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | performed.operation.me.install.springfacet=1.0 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/com/uniplore/graph/ms/sign/properties/db.properties=UTF-8 3 | encoding//web/WEB-INF/views/dsm/db/dbPage.jsp=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.source=1.8 13 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.prefs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | DELEGATES_PREFERENCE=delegateValidatorList 2 | USER_BUILD_PREFERENCE=enabledBuildValidatorList 3 | USER_MANUAL_PREFERENCE=enabledManualValidatorList 4 | USER_PREFERENCE=overrideGlobalPreferencesfalse 5 | eclipse.preferences.version=1 6 | override=false 7 | suspend=false 8 | vf.version=3 9 | -------------------------------------------------------------------------------- /.tern-project: -------------------------------------------------------------------------------- 1 | {"ide":{},"libs":["ecma5","browser"],"plugins":{"guess-types":{}}} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Junpeng Zhu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### **图分析系统设计与实现** 2 | 3 | #### **概述** 4 | 5 | 图分析系统(Graph Analysis System)又名关联分析系统(Association Analysis System), 6 | 该系统的研发旨在支持大规模图数据的交互式可视化分析,图数据在当今世界数量极其庞大, 7 | 怎么利用这些数据成为数据科学家不得不考虑的问题,该系统解提供了一种解决方案,博士阶段会集成分类、模式挖掘等算法, 8 | 逐渐开源该系统。 9 | 10 | #### **功能模块** 11 | 12 | * 用户管理模块 13 | * 数据源模块 14 | * 支持数据库 15 | * 目前数据库支持MySQL、PostgreSQL、Greenplum(2017/4/26)、pipelineDB(2017-7-5),后期会考虑OrientDB作为中间数据库层 16 | * 还需要尝试TimescaleDB、deepgreen这些基于PostgreSQL 9.5.X版本的数据库 17 | * 支持文件格式 18 | * 目前只支持JSON数据格式,需要扩展支持的文件格式 19 | * 图展示模块 20 | * 图分析模块 21 | * 目前支持下面算法 22 | * firstNeighbors 23 | * breadthFirstSearch 24 | * depthFirstSearch 25 | * pageRank 26 | * MCL Cluster Algorithm 27 | * Sampling Algorithm(10个) 28 | * 异常处理模块 29 | * 当出现异常会给固定的用户发送邮件提示,用户点击的页面会跳转到error提示页面 (2017/4/20) 30 | * 采用的是Spring的全局异常处理器操作,但是当前版本还不完善的情况下,注释掉了该段代码,目前还是希望能抛出异常,方便调试 (2017/4/20) 31 | 32 | #### **版本迭代历史** 33 | 34 | * 2017/2/28 实现了第一个版本的迭代,其中包含了从数据库中读取数据,并构造JSON字符串,达到了系统基本可用的状态; 35 | * 2017/3/7 实现了第二个版本的迭代,并对前一个版本中出现的bug进行了修复,并在后台实现了计算节点的度,并将节点的度赋值为weight属性;(2017/3/16目前可能会废弃这个版本,极其影响性能,而且目前来看这个操作没意义) 36 | * 2017/3/13 实现了将上述两个版本的代码融合到一个版本中,在DbService.java文件的函数dbDataFormatJson有三个版本,每一个版本的实现的功能请参见相应的Javadoc说明 37 | * 2017/3/15 在分支paging上实现了数据库分页操作,一页页的构造JSON字符串(每次都是发起一个ajax请求),能将支持渲染的点增加到8000左右 38 | * 2017/4/22 完成数据库的更换,目前支持MySQL、PostgreSQL、Greenplum,在更换数据库之后,得到一个意外的收获,点为7699,边为80000,这样差不多10倍的关系的数据,能够显示出来,并且追踪代码的执行时间,发现需要半分钟显示这些点,慢的原因是浏览器渲染比较慢,但是后台在生成这些点和边的数据时,只需要1s 39 | * 2017/4/23 该版本实现增量加载,提高用户的友好性,选用redis缓存中间计算结果,具体采用redis中的hash数据结构,在该版本中仅仅缓存了sourceNode和targetNode的数据,sourceNode设计的hash结构为(用redis中的语法表示): hset sourceNode "sourceNode:ip地址:数据库名:数据库类型:表名:列名:列值" "节点编号" ;targetNode设计的hash结构为(用redis中的语法表示): hset targetNode "targetNode:ip地址:数据库名:数据库类型:表名:列名:列值" "节点编号",并且对结果的正确性进行了测试 40 | * 2017/4/26 在increseGetJsonData方法上加锁,使得从客户端发来的请求能一个个的完成,而不是一次一组(通常会是6个SQL请求为一组),提升了整个系统的交互性能 41 | * 2017/4/26 实现了不分页情况下的数据缓存,减少后台构造字符串的时间,将之前的计算结果缓存到redis中 42 | * 2017/7/5 增加了PipelineDB数据库,**非核心功能** 43 | * 2017/8/6 增加中间数据库层,该层对用户透明,目的是为了方便算法的实现,比如路径检索算法 44 | * 2017/8/9 完成均匀随机点抽样算法、均匀随机边抽样算法、均匀随机边抽样改进算法、均匀临近点抽样算法,并且证明了均匀随机点抽样改进算法效果出奇的好 45 | * 2017/8/11 完成了不均匀随机点抽样、不均匀随机边抽样算法、基于宽度优先遍历的抽样算法,不均匀是根据点的度来衡量每个点的重要性 46 | * 2017/8/14 完成了基于深度优先遍历的抽样算法,该算法性能很差,几乎没有改进的余地 47 | * 2017/8/15 完成了基于markov-chain Monte Carlo的抽样算法,当前被认为是最好的算法之一 48 | * 2017/8/16 实现了最基本的基于随机游走的抽样算法、森林火灾抽样算法,随机游走算法本身的性能也是优于其它不是基于随机游走的抽样算法,森林火灾抽样算法 49 | 本身是基于BFS的抽样算法,改进后没发现性能有很大的变化 50 | * 2017/8/22 集成了KMeans、EM、DBSCAN、HDBSCAN、KMedoids五个向量聚类算法,用于度的聚类(核心功能) 51 | * 2017/8/25 处理实验用的数据集,处理完成的数据集见com.uniplore.graph.dataset 52 | 53 | -------------------------------------------------------------------------------- /out/.gitignore: -------------------------------------------------------------------------------- 1 | /production/ 2 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/common/entity/IPerson.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.common.entity; 2 | 3 | /** 4 | * 版权所有 2016-ACMIS Lab 5 | * 项目名称 graphanalysis 6 | * 类描述 IPerson接口,所有在代码中出现的人(普通用户、管理员)都要实现该接口,该接口实际上没有任何的方法,只是为了使得所有用户均有发送邮件的公共方法 7 | * 类名称 com.uniplore.graph.common.entity.IPerson 8 | * 创建人 朱君鹏 9 | * 创建时间 2016年12月27日 上午9:21:31 10 | * 修改人 11 | * 修改时间 2016年12月27日 上午9:21:31 12 | * 修改备注 13 | * @version 1.0 14 | */ 15 | public interface IPerson { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/common/controller/DispatcherMain.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.common.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | /** 当成功登陆之后,转发到主页上. 7 | * @author 朱君鹏 8 | * 9 | */ 10 | @Controller 11 | @RequestMapping(value = "/") 12 | public class DispatcherMain { 13 | 14 | @RequestMapping(value = "/dsm/main") 15 | public String dispatcherMain() { 16 | return "dsm/main"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/db/controller/DbController.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.db.controller; 2 | 3 | 4 | import com.alibaba.fastjson.JSON; 5 | import com.uniplore.graph.dsm.db.entity.DbPO; 6 | import com.uniplore.graph.dsm.db.entity.DbVO; 7 | import com.uniplore.graph.dsm.db.service.IDbService; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | 15 | import org.springframework.beans.factory.annotation.Autowired; 16 | import org.springframework.stereotype.Controller; 17 | import org.springframework.web.bind.annotation.RequestMapping; 18 | import org.springframework.web.bind.annotation.RequestMethod; 19 | import org.springframework.web.bind.annotation.RequestParam; 20 | import org.springframework.web.bind.annotation.ResponseBody; 21 | 22 | @Controller 23 | @RequestMapping(value = "/dsm/db") 24 | public class DbController { 25 | @Autowired 26 | private IDbService dbService; 27 | 28 | /** 接收用户客户端传来的参数,使用JDBC建立连接测试是否能够成功的连接数据库. 29 | * @param dbPo 接收并保存数据库连接参数 30 | * @return Srting类型返回值,返回的时连接数据库返回的信息,该信息从数据库服务器端得到 31 | * @throws Exception 提供全局异常处理机制 32 | */ 33 | @RequestMapping(value = "/connection",method = RequestMethod.POST) 34 | public @ResponseBody String testConnectDatabase(DbPO dbPo)throws Exception { 35 | //查看是否正确的接受到从客户端传来的参数 36 | //System.out.println("从客户端接收到的连接参数为:"+dbPO.toString()); 37 | return dbService.connectDataBase(dbPo); //service层完成连接数据库的功能 38 | } 39 | 40 | /** 41 | * 功能描述: 当成功的连接上数据库之后,跳转到指定的显示页面. 42 | * @return 返回值 43 | * @throws Exception 抛出异常 44 | */ 45 | @RequestMapping(value = "/dbPage",method = {RequestMethod.POST}) 46 | public String dispatcherDb(HttpServletRequest request) throws Exception { 47 | System.out.println(request.getParameter("dataBaseName")); 48 | return "/dsm/db/dbPage"; 49 | } 50 | 51 | /** 52 | * 功能描述: 接收数据库的连接信息,将此ip下的所有数据库返回给用户. 53 | * @param dbPo 接收数据库的连接信息,封装为对象 54 | * @return 返回值,返回此连接下的所有的数据库名 55 | * @throws Exception 抛出异常 56 | */ 57 | @RequestMapping(value = "/showDatabase",method = RequestMethod.POST) 58 | public @ResponseBody Map showDatabase(DbPO dbPo)throws Exception { 59 | //System.out.println("接收到的数据库连接信息为:" + dbPo.toString()); 60 | 61 | List dbList = dbService.showDataBase(dbPo); 62 | 63 | Map map = new HashMap(); 64 | map.put("dbNames",dbList); 65 | return map; 66 | } 67 | 68 | /** 69 | * 功能说明: . 70 | * @param dbPo 接收客户端传来的数据库连接参数 71 | * @param dbName 接收从客户端传来的数据库名参数 72 | * @return 返回该数据库的所有表集合 73 | * @throws Exception 抛出异常 74 | */ 75 | @RequestMapping(value = "/showTable",method = RequestMethod.POST) 76 | public @ResponseBody Map showTable(DbPO dbPo , @RequestParam(value = "dbName", 77 | required = true) String dbName) throws Exception { 78 | //System.out.println("获取到的数据库连接信息为:" + dbPo.toString()); 79 | //System.out.println("获取到的数据库名为:" + dbName); 80 | 81 | //使用JDBC连接数据库,并返回相应的表 82 | List tableList = dbService.showTable(dbPo,dbName); 83 | Map map = new HashMap(); 84 | map.put("tables", tableList); 85 | return map; 86 | } 87 | 88 | /** 89 | * 功能说明: 根据从客户端传来的表,返回该表中的列名. 90 | * @param dbPo 封装客户端传来的数据库连接信息参数 91 | * @param dbName 接收客户端传来的数据库名参数 92 | * @param tableName 接收客户端传来的表名参数 93 | * @return 返回该表对应的列名 94 | * @throws Exception 抛出异常,方便全局异常处理 95 | */ 96 | @RequestMapping(value = "/showColumn",method = RequestMethod.POST) 97 | public @ResponseBody Map showColumn(DbPO dbPo,String dbName,String tableName) 98 | throws Exception { 99 | //System.out.println("-----显示表时传来的参数-----"); 100 | //System.out.println(dbPo.toString()); 101 | //System.out.println(dbName); 102 | //System.out.println(tableName); 103 | 104 | //使用JDBC连接数据库,并获取表中的列名 105 | List columnList = dbService.showColumn(dbPo,dbName,tableName); 106 | Map map = new HashMap(); 107 | map.put("columns", columnList); 108 | return map; 109 | } 110 | 111 | /** 112 | * 功能说明: 接收从客户端传来的参数,从指定的数据库表中获取到数据,将其构造成符合cytoscape格式的数据. 113 | * @param dbPo 接收数据库的连接参数 114 | * @param dbVo 接收数据库名、数据库表名、源点、目标点的 115 | * @return 返回JSON字符串,需要用alibaba开源的fastJSON将任意字符串转成JSON串 116 | * @throws Exception 抛出异常 117 | */ 118 | @RequestMapping(value = "/dbDataFormatJson" ,method = RequestMethod.POST) 119 | public @ResponseBody String dbDataFormatJson(DbPO dbPo,DbVO dbVo) throws Exception { 120 | //System.out.println("从客户端接收到的数据库连接信息为:" + dbPo.toString()); 121 | //System.out.println("从客户端接收到的表单信息为:" + dbVo.toString()); 122 | 123 | String jsonContent = dbService.dbDataFormatJson(dbPo,dbVo); 124 | 125 | //将上述字符串重新解析 126 | Object parse = JSON.parse(jsonContent); 127 | String outputString = parse.toString(); 128 | //System.out.println("------在控制器端得到的数据------"); 129 | //System.out.println(outputString); 130 | //System.out.println("拼接完成"); 131 | return outputString; 132 | } 133 | 134 | /** 135 | * 功能: 保存从客户端接收到的用户点击node的id值,并保存到session,供后续的事件获取. 136 | * @param request 客户端请求 137 | */ 138 | @RequestMapping(value = "/saveNodeId" ,method = RequestMethod.POST) 139 | public @ResponseBody Map saveNodeId(HttpServletRequest request) { 140 | String nodeId = request.getParameter("nodeID"); 141 | String color = request.getParameter("color"); 142 | Map map = new HashMap(); 143 | map.put("nodeID", nodeId); 144 | map.put("color", color); 145 | return map; 146 | } 147 | 148 | } 149 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/db/entity/DbPO.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.db.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * 功能: 数据库的连接信息. 9 | * @author 朱君鹏 10 | * 11 | */ 12 | public @Data @NoArgsConstructor @AllArgsConstructor class DbPO { 13 | 14 | private int id; //唯一的id标识每一个连接信息 15 | private String driverName; //驱动名称 16 | private String dataBaseType; //数据库类型 17 | private String ipAddress; //ip或者主机地址 18 | private String portNumber; //端口号 19 | private String connectionName; //连接名称,自己定 20 | private String dataBaseName; //mysql连接时不需要提供初始数据库,但是PostgreSQL和Greenplum需要 21 | private String userName; //连接用户名 22 | private String password; //连接密码 23 | } 24 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/db/entity/DbVO.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.db.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * 功能: 封装从客户端出来的数据库名、选择的表名、选择的源点、选择的目标点. 9 | * @author 朱君鹏 10 | * 11 | */ 12 | public @Data @NoArgsConstructor @AllArgsConstructor class DbVO { 13 | private String dbName ; 14 | private String tableName; 15 | private String sourceNode ; 16 | private String targetNode; 17 | } 18 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/db/entity/EdgeDataVO.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.db.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | public @Data @NoArgsConstructor @AllArgsConstructor class EdgeDataVO { 8 | private String id; 9 | private String source; 10 | private String target; 11 | private Integer weight; 12 | } 13 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/db/entity/EdgeVO.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.db.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | public @Data @NoArgsConstructor @AllArgsConstructor class EdgeVO { 8 | private EdgeDataVO data; 9 | private String group; 10 | private boolean removed; 11 | private boolean selected; 12 | private boolean selectable; 13 | private boolean locked; 14 | private boolean grabbed; 15 | private boolean grabbable; 16 | private String classess; 17 | } 18 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/db/entity/NodeDataVO.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.db.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | public @Data @NoArgsConstructor @AllArgsConstructor class NodeDataVO { 8 | private String id; //标记节点的id 9 | private String name; //标记节点的名字 10 | private Integer weight; //标记节点的权重,节点出现的次数 11 | } 12 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/db/entity/NodeVO.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.db.entity; 2 | 3 | import com.alibaba.druid.support.json.JSONParser; 4 | import com.alibaba.fastjson.JSON; 5 | import com.alibaba.fastjson.JSONObject; 6 | 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.NoArgsConstructor; 10 | 11 | /** 12 | * 功能:封装节点对象. 13 | * @author 朱君鹏 14 | * 15 | */ 16 | public @Data @NoArgsConstructor @AllArgsConstructor class NodeVO { 17 | private NodeDataVO data; 18 | private String group; 19 | private boolean removed; 20 | private boolean selected; 21 | private boolean selectable; 22 | private boolean locked; 23 | private boolean grabbed; 24 | private boolean grabbable; 25 | private String classess; 26 | } 27 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/db/service/IDbService.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.db.service; 2 | 3 | import com.uniplore.graph.dsm.db.entity.DbPO; 4 | import com.uniplore.graph.dsm.db.entity.DbVO; 5 | 6 | import java.util.List; 7 | 8 | public interface IDbService { 9 | 10 | public String connectDataBase(DbPO dbPo)throws Exception; 11 | 12 | public List showDataBase(DbPO dbPo)throws Exception; 13 | 14 | public List showTable(DbPO dbPo,String dbName) throws Exception; 15 | 16 | public List showColumn(DbPO dbPo, String dbName, String tableName)throws Exception; 17 | 18 | public String dbDataFormatJson(DbPO dbPo, DbVO dbVo) throws Exception; 19 | } 20 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/file/controller/DispatcherJson.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.file.controller; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RequestMethod; 7 | 8 | 9 | @Controller 10 | public class DispatcherJson { 11 | 12 | /** 功能: 将页面跳转到JSON数据展示页面. 13 | * @param request 接收请求参数 14 | * @return 返回值为model 15 | * @throws Exception 抛出异常,在该程序中使用全局异常处理机制 16 | */ 17 | @RequestMapping(value = "/JsonTypeDataAnalysis",method = RequestMethod.GET) 18 | public String dispatcherJson(HttpServletRequest request) throws Exception { 19 | /*request.setCharacterEncoding("UTF-8");*/ 20 | String id = request.getParameter("id"); 21 | String fileName = request.getParameter("fileName"); 22 | System.out.println("接受到的文件的唯一识别id为" + id + "--" + "接受到的文件名为" + fileName); //判断是否成功的接收到文件参数信息 23 | return "/dsm/file/json/json"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/dsm/file/controller/FileUpload.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.dsm.file.controller; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.uniplore.graph.util.fileoperation.FileOperation; 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | import java.util.UUID; 10 | import javax.servlet.http.HttpServletRequest; 11 | import org.apache.commons.io.FileUtils; 12 | import org.springframework.stereotype.Controller; 13 | 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.bind.annotation.RequestMethod; 16 | import org.springframework.web.bind.annotation.RequestParam; 17 | import org.springframework.web.bind.annotation.ResponseBody; 18 | import org.springframework.web.multipart.MultipartFile; 19 | 20 | 21 | 22 | @Controller 23 | @RequestMapping(value = "/file/Upload") 24 | public class FileUpload { 25 | 26 | /** 27 | * 功能描述:实现文件上传保存操作. 28 | * @param file 上传的文件参数 29 | * @throws Exception 抛出异常 30 | */ 31 | @RequestMapping(value = "/Text",method = RequestMethod.POST) 32 | public void fileUploadText(@RequestParam(value = "file",required = false) 33 | MultipartFile file)throws Exception { 34 | System.out.println("从客户端接收到文件" + file.getOriginalFilename()); 35 | 36 | } 37 | 38 | /** 39 | * 功能描述:将JSON文件上传之后,跳转到此链接,该部分完成将JSON文件保存的过程,保存之后将文件名、上传时间、id保存到数据库中. 40 | * 接着将该唯一的id返回给客户端,使用apache的fileUpload组件实现文件的上传保存过程,还需要当上传文件同名时,避免覆盖 41 | * @param file 文件参数 42 | * @return 返回值为集合类型,加上@ResponseBody注解之后,将集合类型转换成JSON格式返回 43 | * @throws Exception 抛出异常 44 | */ 45 | @RequestMapping(value = "/Json",method = RequestMethod.POST) 46 | public @ResponseBody Map fileUploadJson( 47 | @RequestParam(value = "file",required = true) MultipartFile file, 48 | HttpServletRequest request)throws Exception { 49 | //如果用的是tomcat服务器,则文件会上传到\\%TOMCAT_HOME%\\webapps\\graphanalysis\\WEB-INF\\upload\\文件夹中 50 | String realPath = request.getSession().getServletContext() 51 | .getRealPath("/WEB-INF/upload"); //路径中的/代表tomcat中当前项目路径 52 | //避免文件被覆盖,也就是重名问题 53 | String id = UUID.randomUUID().toString(); 54 | String fileOriginalName = file.getOriginalFilename(); //得到上传的原始文件名 55 | System.out.println(fileOriginalName); 56 | String saveFileName = id + "#" + fileOriginalName; //保存到服务器的文件名由两部分组成:生成的唯一id和原始的文件名 57 | //这里不必处理IO流关闭的问题,因为FileUtils.copyInputStreamToFile()方法内部会自动把用到的IO流关掉,我是看它的源码才知道的 58 | FileUtils.copyInputStreamToFile(file.getInputStream(), new File(realPath, saveFileName)); 59 | 60 | //将文件的唯一id(避免文件重名)和原始文件名以JSON形式返回给服务器端 61 | Map map = new HashMap(); 62 | map.put("id", id); //将每个文件的唯一id编号传递给客户端 63 | map.put("fileName", fileOriginalName); //将原始的文件名传递给客户端 64 | return map; 65 | } 66 | 67 | /** 68 | * 功能描述: 实现数据集的预览. 69 | * @param request 请求参数 70 | * @return 返回值 71 | * @throws Exception 抛出异常 72 | */ 73 | @RequestMapping(value = "/FindData",method = RequestMethod.POST) 74 | public @ResponseBody String viewData(HttpServletRequest request)throws Exception { 75 | String id = request.getParameter("id"); 76 | String fileName = request.getParameter("fileName"); 77 | 78 | String realPath = request.getSession().getServletContext().getRealPath("/WEB-INF/upload"); 79 | //System.out.println("拼接的路径为:"+realPath+"\\"+id+"#"+fileName); //查看拼接的路径是否正确 80 | File file = new File(realPath + "\\" + id + "#" + fileName); //获取到指定路径下的文件 81 | //System.out.println("读取到的文件大小为:"+file.length()); 82 | 83 | FileInputStream fileInputStream = new FileInputStream(file); //建立数据通道 84 | String jsonContent = FileOperation.readFileContent(fileInputStream); 85 | System.out.println("--原始JSON字符串--:"); 86 | System.out.println(jsonContent); 87 | 88 | //使用fastjson将字符串构造成标准的JSON对象对应的字符串 89 | Object formatJson = JSON.parse(jsonContent); //将字符串解析为一个JSON对象 90 | String outputJson = formatJson.toString(); //将得到的JSON对象格式化为标准的字符串,无需做美化的操作 91 | System.out.println("--格式化JSON字符串--"); 92 | System.out.println(outputJson); 93 | return outputJson; //返回标准的JSON字符串 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/exception/CustomException.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.exception; 2 | 3 | /** 4 | * 版权所有 2016-ACMIS Lab . 5 | * 项目名称 graphanalysis 6 | * 类描述 全局异常处理 7 | * 类名称 com.uniplore.graph.exception.CustomException 8 | * 创建人 朱君鹏 9 | * 创建时间 2016年12月21日 下午9:42:03 10 | * 修改人 11 | * 修改时间 2016年12月21日 下午9:42:03 12 | * 修改备注 13 | * @version 1.0 14 | */ 15 | public class CustomException extends Exception { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | //异常信息 20 | public String message; 21 | 22 | public CustomException(String message) { 23 | super(message); 24 | this.message = message; 25 | } 26 | 27 | public String getMessage() { 28 | return message; 29 | } 30 | 31 | public void setMessage(String message) { 32 | this.message = message; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/exception/HandlerException.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.exception; 2 | 3 | import java.io.PrintWriter; 4 | import java.io.StringWriter; 5 | import java.util.Date; 6 | import java.util.Properties; 7 | 8 | import javax.mail.Address; 9 | import javax.mail.Message; 10 | import javax.mail.Session; 11 | import javax.mail.Transport; 12 | import javax.mail.internet.InternetAddress; 13 | import javax.mail.internet.MimeMessage; 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | 17 | import org.springframework.web.servlet.HandlerExceptionResolver; 18 | import org.springframework.web.servlet.ModelAndView; 19 | 20 | import com.uniplore.graph.util.email.GMailAuthenticator; 21 | import com.uniplore.graph.util.email.SendEmail; 22 | 23 | public class HandlerException implements HandlerExceptionResolver { 24 | 25 | @Override 26 | public ModelAndView resolveException(HttpServletRequest request, 27 | HttpServletResponse response, Object handler, Exception exception) { 28 | 29 | CustomException customException = null; 30 | if (exception instanceof CustomException) { 31 | customException = (CustomException)exception; 32 | }else { 33 | customException = new CustomException("未知错误"); 34 | } 35 | 36 | String message = customException.getMessage(); //获取到错误信息 37 | StringWriter writer = new StringWriter(); 38 | customException.printStackTrace(new PrintWriter(writer, true)); 39 | String error = writer.toString(); //得到堆栈的错误信息 40 | 41 | try { 42 | String host = "smtp.qq.com"; //邮件服务器 43 | String from = "13101900@qq.com"; //发送邮件的QQ 44 | String authcode = "ecdudaqyndcibhag"; //对于QQ的个人邮箱而言,密码使用的是客户端的授权码,而不是用户的邮箱密码 45 | Properties props = System.getProperties(); 46 | props.put("mail.smtp.host", host); 47 | props.setProperty("mail.transport.protocol", "smtp"); // 发送邮件协议名称 48 | props.put("mail.smtp.auth", "true"); //开启授权 49 | props.put("mail.smtp.user", from); 50 | props.put("mail.smtp.password", authcode); 51 | props.put("mail.smtp.port", "587"); //smtp邮件服务器的端口号,必须是587,465调试时失败 52 | props.setProperty("mail.smtp.ssl.enable", "true"); 53 | props.setProperty("mail.smtp.connectiontimeout", "5000"); 54 | 55 | Session session = Session.getDefaultInstance(props,new GMailAuthenticator("13101900@qq.com", "ecdudaqyndcibhag")); 56 | 57 | props.put("mail.debug", "true"); 58 | 59 | MimeMessage emailMessage = new MimeMessage(session); 60 | Address fromAddress = new InternetAddress(from,"优联博睿"); 61 | Address toAddress = new InternetAddress("13101900@qq.com"); 62 | 63 | emailMessage.setFrom(fromAddress); 64 | emailMessage.setRecipient(Message.RecipientType.TO, toAddress); 65 | 66 | emailMessage.setSubject("报错信息"); 67 | emailMessage.setSentDate(new Date()); 68 | emailMessage.setContent(error,"text/html;charset=utf-8"); 69 | Transport transport = session.getTransport(); 70 | transport.connect(host, from, authcode); 71 | emailMessage.saveChanges(); 72 | Transport.send(emailMessage); 73 | transport.close(); 74 | 75 | }catch(Exception ex){ 76 | throw new RuntimeException(ex); 77 | } 78 | 79 | 80 | ModelAndView modelAndView = new ModelAndView(); 81 | modelAndView.addObject("message", message); 82 | modelAndView.setViewName("common/error/error"); //error是逻辑视图名,视图解析器会将其解析为真正的物理视图error.jsp 83 | 84 | return modelAndView; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/login/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.login.controller; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpSession; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestMethod; 10 | 11 | import com.uniplore.graph.ms.login.service.ILoginService; 12 | import com.uniplore.graph.ms.sign.entity.UserPO; 13 | 14 | @Controller 15 | @RequestMapping(value="/ms/login") 16 | public class LoginController { 17 | 18 | @Autowired 19 | private ILoginService loginService; 20 | /** 21 | * 22 | * @Title loginSys 23 | * @Description 登录到系统 24 | * @param user 25 | */ 26 | @RequestMapping(value="/Login",method=RequestMethod.POST) 27 | public String loginSys(String name, String password,HttpSession session,HttpServletRequest request)throws Exception{ 28 | //System.out.println("接收到的名字为:"+name); 29 | //System.out.println("接收到的密码为:"+password); 30 | 31 | //判断接收到的名字究竟是username还是email地址,只要判断字符串中是否包含@符号即可 32 | boolean nameIsEmail = name.contains("@"); 33 | //System.out.println("是否是email"+nameIsEmail); 34 | if(nameIsEmail){ 35 | //如果登录时采用的是email登录,检查数据库中是否已经有该email 36 | Integer id = loginService.queryIDbyEmail(name); 37 | //System.out.println(id); 38 | if(id != null){ 39 | //说明在数据库中存在这样的用户 40 | //接下来需要验证密码是否正确,根据用户id查找密码,验证密码是否匹配 41 | String dbPassword = loginService.queryPasswordbyID(id); 42 | //System.out.println(dbPassword); 43 | if(password.equals(dbPassword)){ 44 | //说明从客户端传来的密码和数据库中的密码是一致的 45 | //接下来查看激活状态码active_state是否为1 46 | boolean state = loginService.queryStatebyID(id); 47 | //System.out.println("用户的状态为:"+state); 48 | if (true == state) { 49 | //说明用户已经被激活 50 | //System.out.println("用户已经被激活"); 51 | //接下来获得用户的全部信息写入到session中,登录成功 52 | UserPO userInto = loginService.queryInfobyID(id); 53 | //System.out.println("获取到的用户信息为:"+userInto.toString()); 54 | session.setAttribute("userInfo", userInto); 55 | //完成登录,跳转到指定的页面 56 | return "redirect:/dsm/main"; 57 | }else{ 58 | //说明用户还没有被激活,提醒用户激活 59 | System.out.println("用户还没有被激活"); 60 | return null; 61 | } 62 | }else{ 63 | //说明密码不一致,终止登录 64 | return null; 65 | } 66 | }else{ 67 | //说明在数据库中不存在当前邮箱用户 68 | return null; 69 | } 70 | }else{ 71 | //说明登录时采用的userName登录,需要判断用户名在数据库中是否存在 72 | Integer id = loginService.queryIDbyUserName(name); 73 | //System.out.println(id); 74 | if (id != null) { 75 | //说明在数据库中存在这样的用户 76 | //接下来需要验证密码是否正确,根据用户id查找密码,验证密码是否匹配 77 | String dbPassword = loginService.queryPasswordbyID(id); 78 | //System.out.println(dbPassword); 79 | if(password.equals(dbPassword)){ 80 | //说明从客户端传来的密码和数据库中的密码是一致的 81 | //接下来查看激活状态码active_state是否为1 82 | boolean state = loginService.queryStatebyID(id); 83 | //System.out.println("用户的状态为:"+state); 84 | if(true == state){ 85 | //说明用户已经被激活 86 | //System.out.println("用户已经被激活"); 87 | //接下来获得用户的全部信息写入到session中,登录成功 88 | UserPO userInto = loginService.queryInfobyID(id); 89 | //System.out.println("获取到的用户信息为:"+userInto.toString()); 90 | session.setAttribute("userInfo", userInto); 91 | //完成登录 92 | return "dsm/main"; 93 | }else{ 94 | //说明用户还没有被激活 95 | System.out.println("用户还没有被激活"); 96 | return null; 97 | } 98 | }else{ 99 | //说明密码不一致,终止登录 100 | return null; 101 | } 102 | }else{ 103 | //说明在数据库中不存在当前用户,终止登录 104 | return null; 105 | } 106 | } 107 | } 108 | 109 | /** 110 | * 111 | * @Title logoutSys 112 | * @Description 退出系统 113 | */ 114 | @RequestMapping(value="/Logout",method=RequestMethod.GET) 115 | public String logoutSys(HttpSession session){ 116 | //获取session信息 117 | UserPO userInfo = (UserPO)session.getAttribute("userInfo"); 118 | if(userInfo != null){ 119 | session.removeAttribute("userInfo"); 120 | session.invalidate(); // 使得session失效 121 | } 122 | return "redirect:/ms/login/Login"; // 重定向到登录页面 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/login/dao/ILoginDao.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.login.dao; 2 | 3 | import com.uniplore.graph.ms.sign.entity.UserPO; 4 | 5 | public interface ILoginDao { 6 | 7 | public Integer queryIDbyEmail(String email)throws Exception; 8 | 9 | public Integer queryIDbyUserName(String userName)throws Exception; 10 | 11 | public String queryPasswordbyID(Integer id)throws Exception; 12 | 13 | public boolean queryStatebyID(Integer id) throws Exception; 14 | 15 | public UserPO queryInfobyID(Integer id)throws Exception; 16 | } 17 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/login/dao/impl/LoginDao.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.login.dao.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Repository; 5 | 6 | import com.uniplore.graph.ms.login.dao.ILoginDao; 7 | import com.uniplore.graph.ms.login.mapper.LoginMapper; 8 | import com.uniplore.graph.ms.sign.entity.UserPO; 9 | 10 | @Repository 11 | public class LoginDao implements ILoginDao { 12 | 13 | @Autowired 14 | private LoginMapper lm; 15 | 16 | @Override 17 | public Integer queryIDbyEmail(String email) throws Exception { 18 | return lm.queryIDbyEmail(email); 19 | } 20 | 21 | @Override 22 | public Integer queryIDbyUserName(String userName) throws Exception { 23 | return lm.queryIDbyUserName(userName); 24 | } 25 | 26 | @Override 27 | public String queryPasswordbyID(Integer id) throws Exception { 28 | return lm.queryPasswordbyID(id); 29 | } 30 | 31 | @Override 32 | public boolean queryStatebyID(Integer id) throws Exception { 33 | return lm.queryStatebyID(id); 34 | } 35 | 36 | @Override 37 | public UserPO queryInfobyID(Integer id) throws Exception { 38 | return lm.queryInfobyID(id); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/login/mapper/LoginMapper.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.login.mapper; 2 | 3 | import com.uniplore.graph.ms.sign.entity.UserPO; 4 | 5 | public interface LoginMapper { 6 | 7 | public Integer queryIDbyEmail(String email)throws Exception; 8 | 9 | public Integer queryIDbyUserName(String userName)throws Exception; 10 | 11 | public String queryPasswordbyID(Integer id)throws Exception; 12 | 13 | public boolean queryStatebyID(Integer id)throws Exception; 14 | 15 | public UserPO queryInfobyID(Integer id)throws Exception; 16 | } 17 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/login/mapper/LoginMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 36 | 37 | 38 | 41 | 42 | 43 | 46 | 47 | 48 | 51 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/login/service/ILoginService.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.login.service; 2 | 3 | import com.uniplore.graph.ms.sign.entity.UserPO; 4 | 5 | public interface ILoginService { 6 | 7 | public Integer queryIDbyEmail(String email)throws Exception; //根据用户的email查找用户的id,并且保证一个email对应唯一的一个账户 8 | 9 | public Integer queryIDbyUserName(String userName)throws Exception; //根据用户名查找数据库中是否存在相应的用户 10 | 11 | public String queryPasswordbyID(Integer id)throws Exception; //根据用户的id查找密码 12 | 13 | public boolean queryStatebyID(Integer id)throws Exception; //根据用户id查找用户的激活状态 14 | 15 | public UserPO queryInfobyID(Integer id)throws Exception; //根据用户的id获取用户的全部信息 16 | } 17 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/login/service/impl/LoginService.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.login.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | import org.springframework.transaction.annotation.Transactional; 6 | 7 | import com.uniplore.graph.ms.login.dao.ILoginDao; 8 | import com.uniplore.graph.ms.login.service.ILoginService; 9 | import com.uniplore.graph.ms.sign.entity.UserPO; 10 | 11 | @Service 12 | @Transactional 13 | public class LoginService implements ILoginService { 14 | 15 | @Autowired 16 | private ILoginDao loginDao; 17 | 18 | @Override 19 | public Integer queryIDbyEmail(String email) throws Exception { 20 | return loginDao.queryIDbyEmail(email); 21 | } 22 | 23 | @Override 24 | public Integer queryIDbyUserName(String userName) throws Exception { 25 | return loginDao. queryIDbyUserName(userName); 26 | } 27 | 28 | @Override 29 | public String queryPasswordbyID(Integer id) throws Exception { 30 | return loginDao.queryPasswordbyID(id); 31 | } 32 | 33 | @Override 34 | public boolean queryStatebyID(Integer id) throws Exception { 35 | return loginDao.queryStatebyID(id); 36 | } 37 | 38 | @Override 39 | public UserPO queryInfobyID(Integer id) throws Exception { 40 | return loginDao.queryInfobyID(id); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/captcha/controller/StartCaptchaController.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.captcha.controller; 2 | 3 | import java.io.PrintWriter; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | 12 | import com.uniplore.graph.ms.sign.captcha.dao.GeetestConfig; 13 | import com.uniplore.graph.ms.sign.captcha.service.GeetestLib; 14 | 15 | 16 | @Controller 17 | public class StartCaptchaController { 18 | 19 | @RequestMapping(value="/graphanalysis/imageCaptcha",method=RequestMethod.GET) 20 | protected void doGet(HttpServletRequest request,HttpServletResponse response) throws Exception{ 21 | GeetestLib gtSdk = new GeetestLib(GeetestConfig.getGeetest_id(), GeetestConfig.getGeetest_key()); 22 | 23 | String resStr = "{}"; 24 | 25 | //自定义userid 26 | String userid = "test"; 27 | 28 | //进行验证预处理 29 | int gtServerStatus = gtSdk.preProcess(userid); 30 | 31 | //将服务器状态设置到session中 32 | request.getSession().setAttribute(gtSdk.gtServerStatusSessionKey, gtServerStatus); 33 | //将userid设置到session中 34 | request.getSession().setAttribute("userid", userid); 35 | 36 | resStr = gtSdk.getResponseStr(); 37 | 38 | PrintWriter out = response.getWriter(); 39 | out.println(resStr); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/captcha/controller/VerifyLoginController.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.captcha.controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | import org.json.JSONException; 10 | import org.json.JSONObject; 11 | 12 | import com.uniplore.graph.ms.sign.captcha.dao.GeetestConfig; 13 | import com.uniplore.graph.ms.sign.captcha.service.GeetestLib; 14 | 15 | 16 | public class VerifyLoginController { 17 | 18 | protected void doPost(HttpServletRequest request,HttpServletResponse response) throws Exception{ 19 | GeetestLib gtSdk = new GeetestLib(GeetestConfig.getGeetest_id(), GeetestConfig.getGeetest_key()); 20 | 21 | String challenge = request.getParameter(GeetestLib.fn_geetest_challenge); 22 | String validate = request.getParameter(GeetestLib.fn_geetest_validate); 23 | String seccode = request.getParameter(GeetestLib.fn_geetest_seccode); 24 | 25 | //从session中获取gt-server状态 26 | int gt_server_status_code = (Integer) request.getSession().getAttribute(gtSdk.gtServerStatusSessionKey); 27 | 28 | //从session中获取userid 29 | String userid = (String)request.getSession().getAttribute("userid"); 30 | 31 | int gtResult = 0; 32 | 33 | if (gt_server_status_code == 1) { 34 | //gt-server正常,向gt-server进行二次验证 35 | 36 | gtResult = gtSdk.enhencedValidateRequest(challenge, validate, seccode, userid); 37 | System.out.println(gtResult); 38 | } else { 39 | // gt-server非正常情况下,进行failback模式验证 40 | 41 | System.out.println("failback:use your own server captcha validate"); 42 | gtResult = gtSdk.failbackValidateRequest(challenge, validate, seccode); 43 | System.out.println(gtResult); 44 | } 45 | 46 | 47 | if (gtResult == 1) { 48 | // 验证成功 49 | PrintWriter out = response.getWriter(); 50 | JSONObject data = new JSONObject(); 51 | try { 52 | data.put("status", "success"); 53 | data.put("version", gtSdk.getVersionInfo()); 54 | } catch (JSONException e) { 55 | e.printStackTrace(); 56 | } 57 | out.println(data.toString()); 58 | } 59 | else { 60 | // 验证失败 61 | JSONObject data = new JSONObject(); 62 | try { 63 | data.put("status", "fail"); 64 | data.put("version", gtSdk.getVersionInfo()); 65 | } catch (JSONException e) { 66 | e.printStackTrace(); 67 | } 68 | PrintWriter out = response.getWriter(); 69 | out.println(data.toString()); 70 | } 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/captcha/dao/GeetestConfig.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.captcha.dao; 2 | 3 | /** 4 | * GeetestWeb配置文件 5 | * 6 | * 7 | */ 8 | public class GeetestConfig { 9 | 10 | // 填入自己的captcha_id和private_key 11 | private static final String geetest_id = "030860a9df40bc2bf6b3544502bf027e"; 12 | private static final String geetest_key = "3794a85bbe9d2e75b77a7076be9442b1"; 13 | 14 | public static final String getGeetest_id() { 15 | return geetest_id; 16 | } 17 | 18 | public static final String getGeetest_key() { 19 | return geetest_key; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/controller/DispatcherLoginController.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | @Controller 7 | @RequestMapping(value="/") 8 | public class DispatcherLoginController { 9 | 10 | @RequestMapping(value="/sign_in") 11 | public String dispatcherLogin(){ 12 | return "ms/login"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/controller/DispatcherSignController.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | @Controller 7 | @RequestMapping(value="/") 8 | public class DispatcherSignController { 9 | 10 | @RequestMapping(value="sign_up") 11 | public String dispatcherSign(){ 12 | return "ms/sign"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/controller/SignUpController.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.controller; 2 | 3 | 4 | import javax.servlet.http.HttpServletRequest; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.ui.Model; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | 13 | import com.uniplore.graph.ms.sign.entity.UserPO; 14 | import com.uniplore.graph.ms.sign.service.IUserService; 15 | /** 16 | * 17 | * 版权所有 2016-ACMIS Lab 18 | * 项目名称 graphanalysis 19 | * 类描述 接收sign.jsp的输入参数,并将信息传入到dao层,将其信息保存到数据库中 20 | * 类名称 com.uniplore.graph.ms.sign.controller.SignUpController 21 | * 创建人 朱君鹏 22 | * 创建时间 2016年12月26日 下午4:17:27 23 | * 修改人 24 | * 修改时间 2016年12月26日 下午4:17:27 25 | * 修改备注 26 | * @version 1.0 27 | */ 28 | @Controller 29 | @RequestMapping(value="/ms/sign") 30 | public class SignUpController { 31 | 32 | @Autowired 33 | private IUserService userService; 34 | 35 | @RequestMapping(value="/SignUp",method=RequestMethod.POST) 36 | public String signUp(UserPO user,Model model) throws Exception{ 37 | //System.out.println(user.toString()); //判断是否正确的接收到从客户端传来的用户信息 38 | 39 | //将user信息保存到数据库中 40 | userService.saveUserInfo(user); 41 | 42 | //数据回显到sign.jsp页面中 43 | model.addAttribute("user", user); 44 | 45 | //成功发送邮件之后,提醒用户到邮箱中激活 46 | return "ms/login"; 47 | } 48 | 49 | @RequestMapping(value="/CheckUserNameExisted",method=RequestMethod.POST) 50 | public @ResponseBody Integer checkUserNameExisted(HttpServletRequest request)throws Exception{ 51 | String userName = request.getParameter("userName"); 52 | //System.out.println("接收到的用户名为:"+userName); 53 | Integer id = userService.queryUserExisted(userName); 54 | return id; 55 | } 56 | 57 | @RequestMapping(value="/CheckEmailExisted",method=RequestMethod.POST) 58 | public @ResponseBody Integer checkEmailExisted(HttpServletRequest request) throws Exception{ 59 | String email = request.getParameter("email"); 60 | //System.out.println("接收到的email为:"+email); 61 | Integer id = userService.queryEmailExisted(email); 62 | return id; 63 | } 64 | 65 | @RequestMapping(value="/ActiveAccount",method={RequestMethod.GET,RequestMethod.POST}) 66 | public String activeAccount(HttpServletRequest request) throws Exception{ 67 | String code = request.getParameter("code"); 68 | //System.out.println(code); //判断是否成功的接收到QueryString 69 | 70 | //将接收到的code传到Service层 71 | if(userService.activeUserAccount(code)){ 72 | //如果返回true,说明能够激活账户 73 | return "ms/success"; 74 | }else{ 75 | //由于种种原因,用户的账户没有激活,此时提醒用户重新注册,并激活 76 | return "ms/active_error"; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/dao/IUserDao.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.dao; 2 | 3 | import java.util.Date; 4 | 5 | import com.uniplore.graph.ms.sign.entity.UserPO; 6 | 7 | public interface IUserDao { 8 | 9 | public void saveUserInfo(UserPO user) throws Exception; //保存用户的注册信息到数据库中 10 | 11 | public Date queryCreateTime(String code) throws Exception; //查询账户的创建时间 12 | 13 | public void updateActiveTime(UserPO user) throws Exception; //将激活时间写入到数据库中 14 | 15 | public Integer queryIDbyActiveCode(String code) throws Exception; //根据用户的激活码,查询用户的ID是否存在 16 | 17 | public void deleteUserByID(Integer id) throws Exception; //根据用户的id删除用户 18 | 19 | public Date queryActiveTime(Integer id) throws Exception; //根据用户的id查询用户的激活时间,如果没有激活返回null 20 | 21 | public Integer queryUserExisted(String userName)throws Exception; //查询用户名在数据库中是否已经存在 22 | 23 | public Integer queryEmailExisted(String email)throws Exception; //查询email在数据库中是否存在 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/dao/impl/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.dao.impl; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import com.uniplore.graph.ms.sign.dao.IUserDao; 9 | import com.uniplore.graph.ms.sign.entity.UserPO; 10 | import com.uniplore.graph.ms.sign.mapper.UserMapper; 11 | 12 | @Repository 13 | public class UserDao implements IUserDao { 14 | 15 | @Autowired 16 | private UserMapper um; 17 | 18 | @Override 19 | public void saveUserInfo(UserPO user) throws Exception { 20 | um.saveUserInfo(user); 21 | } 22 | 23 | @Override 24 | public Date queryCreateTime(String code) throws Exception { 25 | return um.queryCreateTime(code); 26 | } 27 | 28 | @Override 29 | public void updateActiveTime(UserPO user) throws Exception { 30 | um.updateActiveTime(user); 31 | } 32 | 33 | @Override 34 | public Integer queryIDbyActiveCode(String code)throws Exception{ 35 | Integer queryIDbyActiveCode = um.queryIDbyActiveCode(code); 36 | return queryIDbyActiveCode; 37 | } 38 | 39 | @Override 40 | public Date queryActiveTime(Integer id) throws Exception { 41 | return um.queryActiveTime(id); 42 | } 43 | 44 | @Override 45 | public void deleteUserByID(Integer id) throws Exception{ 46 | um.deleteUserByID(id); 47 | } 48 | 49 | @Override 50 | public Integer queryUserExisted(String userName) throws Exception { 51 | return um.queryUserExisted(userName); 52 | } 53 | 54 | @Override 55 | public Integer queryEmailExisted(String email) throws Exception { 56 | return um. queryEmailExisted(email); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/dbsql/user.sql: -------------------------------------------------------------------------------- 1 | -- mysql 2 | -- 普通用户表信息 3 | create table user ( 4 | id int primary key auto_increment, -- 唯一的id去标识不同的用户,存放到数据库时采用MD5对其进行加密 5 | email varchar(20), -- 邮箱,在登录时使用 6 | user_name varchar(20), -- 用户名,需要校验,规定用户名在6位到20位之间 7 | pwd varchar(32), -- 密码,在存入数据库时采用MD5进行加密,,原本密码在6到20位之间,加密后全部为32位 8 | account_state boolean, -- 判断用户的用户名和密码所在的账户是否已经激活,发送激活邮件 9 | create_time datetime, -- 账户的创建时间 10 | active_time datetime, -- 账户的激活时间 11 | active_code varchar(50) -- 账户的激活码,使用系统自带的UUID 12 | ) -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/entity/UserPO.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.entity; 2 | 3 | import com.uniplore.graph.common.entity.IPerson; 4 | import java.util.Date; 5 | 6 | 7 | 8 | import lombok.AllArgsConstructor; 9 | import lombok.Data; 10 | import lombok.NoArgsConstructor; 11 | 12 | public @Data @NoArgsConstructor @AllArgsConstructor class UserPO implements IPerson{ 13 | private Integer id; //唯一标识用户的id,使用mysql的自增主键 14 | private String email; //用户的email 15 | private String userName; //用户名,用户自己设定 16 | private String password; //用户密码 17 | private Boolean accountState; //用户状态,注册必须要激活用户 18 | private Date createTime; //账户的创建时间 19 | private Date activeTime; //账户的激活事件 20 | private String activeCode; //账户的激活码,发送邮件时使用 21 | } 22 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.mapper; 2 | 3 | import java.util.Date; 4 | 5 | import com.uniplore.graph.ms.sign.entity.UserPO; 6 | 7 | public interface UserMapper { 8 | 9 | public void saveUserInfo(UserPO user) throws Exception; 10 | 11 | public Date queryCreateTime(String code) throws Exception; 12 | 13 | public void updateActiveTime(UserPO user) throws Exception; 14 | 15 | public Integer queryIDbyActiveCode(String code)throws Exception; 16 | 17 | public Date queryActiveTime(Integer id)throws Exception; 18 | 19 | public void deleteUserByID(Integer id)throws Exception; 20 | 21 | public Integer queryUserExisted(String userName)throws Exception; 22 | 23 | public Integer queryEmailExisted(String email)throws Exception; 24 | } 25 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | insert into user(email,user_name,pwd,account_state,create_time,active_code) values(#{email},#{userName},#{password},#{accountState},#{createTime},#{activeCode}); 31 | 32 | 33 | 34 | 37 | 38 | 39 | 40 | update user set active_time=#{activeTime},account_state=#{accountState} where id=#{id} 41 | 42 | 43 | 44 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | delete from user where id=#{id} 56 | 57 | 58 | 59 | 62 | 63 | 64 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/properties/db.properties: -------------------------------------------------------------------------------- 1 | -- MySQL properties 2 | 3 | mysql.driver=com.mysql.jdbc.Driver 4 | mysql.url=jdbc\:mysql\://192.168.100.172/graph_analysis 5 | mysql.username=root 6 | mysql.password=mysql 7 | 8 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/properties/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=debug,stdout,logfile 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout 4 | log4j.appender.logfile=org.apache.log4j.FileAppender 5 | log4j.appender.logfile.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.logfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %F %p %m%n 7 | log4j.logger.com.ibatis=DEBUG 8 | log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG 9 | log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG 10 | log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG 11 | log4j.logger.java.sql.Connection=DEBUG 12 | log4j.logger.java.sql.Statement=DEBUG 13 | log4j.logger.java.sql.PreparedStatement=DEBUG 14 | log4j.logger.com.uniplore.graph=TRACE -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.service; 2 | 3 | import com.uniplore.graph.ms.sign.entity.UserPO; 4 | 5 | 6 | public interface IUserService { 7 | 8 | public void saveUserInfo(UserPO user) throws Exception; 9 | 10 | public boolean activeUserAccount(String code) throws Exception; 11 | 12 | public Integer queryUserExisted(String userName)throws Exception; 13 | 14 | public Integer queryEmailExisted(String email)throws Exception; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/ms/sign/service/impl/UserService.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.ms.sign.service.impl; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import com.uniplore.graph.ms.sign.dao.IUserDao; 11 | import com.uniplore.graph.ms.sign.dao.impl.UserDao; 12 | import com.uniplore.graph.ms.sign.entity.UserPO; 13 | import com.uniplore.graph.ms.sign.service.IUserService; 14 | import com.uniplore.graph.util.email.SendEmail; 15 | import com.uniplore.graph.util.time.ComputeTime; 16 | 17 | @Service 18 | @Transactional 19 | public class UserService implements IUserService { 20 | 21 | @Autowired 22 | private IUserDao userDao; 23 | 24 | @Override 25 | public void saveUserInfo(UserPO user) throws Exception { 26 | //设置用户的状态为0,也就是账户还没有被激活 27 | boolean flag = false; 28 | user.setAccountState(flag); 29 | 30 | //设置创建用户的时间 31 | Date date = new Date(); 32 | user.setCreateTime(date); 33 | 34 | //生成一个特定的UUID 35 | String uuid = UUID.randomUUID().toString(); 36 | 37 | //给用户设置uuid 38 | user.setActiveCode(uuid); 39 | 40 | //保存用户信息到数据库中 41 | userDao.saveUserInfo(user); 42 | 43 | //在服务层设置发送邮件的内容,规定只能设置html格式的内容 44 | String emailContent = "

欢迎您使用Graph Analysis提供的服务!

您的账户已经成功的创建,请点击或复制以下链接激活账号(30分钟之内有效):

http://localhost:8080/graphanalysis/ms/sign/ActiveAccount?code="+user.getActiveCode()+""+"

"+"

请妥善保管这封电子邮件,您的账号名为:"+user.getUserName()+"

"+"

如果您忘记了密码,可以在用户登录界面通过'找回密码'链接,重置您的密码。

Graph Analysis同您一同成长,感谢您的注册

"; 45 | 46 | //发送邮件给用户,提醒其激活用户,同时传递了用户的激活码 47 | new SendEmail(user.getEmail(),user,emailContent); 48 | } 49 | 50 | @Override 51 | public boolean activeUserAccount(String code) throws Exception { 52 | 53 | UserPO user = new UserPO(); 54 | //首先应该判断此code是否在数据库中是存在的,如果不存在就直接结束整个过程 55 | //根据code去获取用户的id 56 | Integer queryID = userDao.queryIDbyActiveCode(code); 57 | 58 | if(queryID > 0 ){ 59 | //设置只能激活一次,也就是去查询用户的active_time,看是否为空,如果为空说明还没有被激活, 60 | //如果不为空,说明已经激活了,此时应该不允许用户再次激活 61 | Date queryActiveTime = userDao.queryActiveTime(queryID); 62 | if (queryActiveTime != null) { 63 | return true; 64 | } 65 | //获取到当前时间 66 | Date activeTime = new Date(); 67 | //System.out.println("当前时间为:"+activeTime); 68 | 69 | //从数据库中拿出创建账户的时间 70 | Date createTime = userDao.queryCreateTime(code); 71 | //System.out.println("创建账户的时间为:"+createTime); 72 | 73 | //计算当前时间和创建账户的时间差 74 | long computeTime = ComputeTime.computeTime(createTime,activeTime); 75 | //System.out.println("创建账户和激活账户之间的时间差:"+computeTime); 76 | 77 | if(computeTime > 30){ 78 | //当在给定的时间内不能激活用户,当用户再次点击这个链接时,要求用户重新进行注册 79 | //此时首先应该删除用户原来的注册信息 80 | userDao.deleteUserByID(queryID); 81 | return false; 82 | } 83 | 84 | //更新用户的状态,将active_state设置为1 85 | boolean accountState = true; 86 | user.setAccountState(accountState); 87 | 88 | //将激活时间设置到user中 89 | user.setActiveTime(activeTime); 90 | user.setId(queryID); 91 | //如果时间没有超过30分钟,将激活时间写入到数据库中 92 | userDao.updateActiveTime(user); 93 | return true; 94 | }else{ 95 | //否则说明用户的激活码根本就是错误的,直接退出程序 96 | return false; 97 | } 98 | 99 | 100 | } 101 | 102 | @Override 103 | public Integer queryUserExisted(String userName) throws Exception { 104 | return userDao.queryUserExisted(userName); 105 | } 106 | 107 | @Override 108 | public Integer queryEmailExisted(String email) throws Exception { 109 | return userDao.queryEmailExisted(email); 110 | } 111 | 112 | } 113 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/util/email/GMailAuthenticator.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.util.email; 2 | 3 | import javax.mail.Authenticator; 4 | import javax.mail.PasswordAuthentication; 5 | 6 | public class GMailAuthenticator extends Authenticator{ 7 | 8 | String user; 9 | String pw; 10 | public GMailAuthenticator (String username, String password) 11 | { 12 | super(); 13 | this.user = username; 14 | this.pw = password; 15 | } 16 | public PasswordAuthentication getPasswordAuthentication() 17 | { 18 | return new PasswordAuthentication(user, pw); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/util/email/SendEmail.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.util.email; 2 | 3 | import java.util.Date; 4 | import java.util.Properties; 5 | 6 | import javax.mail.Address; 7 | import javax.mail.Message; 8 | import javax.mail.Session; 9 | import javax.mail.Transport; 10 | import javax.mail.internet.InternetAddress; 11 | import javax.mail.internet.MimeMessage; 12 | 13 | import com.uniplore.graph.common.entity.IPerson; 14 | import com.uniplore.graph.ms.sign.entity.UserPO; 15 | import com.uniplore.graph.util.email.GMailAuthenticator; 16 | public class SendEmail { 17 | 18 | public SendEmail(String desAddress,IPerson person,String emailContent) throws Exception{ 19 | try { 20 | String host = "smtp.qq.com"; //邮件服务器 21 | String from = "13101900@qq.com"; //发送邮件的QQ 22 | String authcode = "ecdudaqyndcibhag"; //对于QQ的个人邮箱而言,密码使用的是客户端的授权码,而不是用户的邮箱密码 23 | Properties props = System.getProperties(); 24 | props.put("mail.smtp.host", host); 25 | props.setProperty("mail.transport.protocol", "smtp"); // 发送邮件协议名称 26 | props.put("mail.smtp.auth", "true"); //开启授权 27 | props.put("mail.smtp.user", from); 28 | props.put("mail.smtp.password", authcode); 29 | props.put("mail.smtp.port", "587"); //smtp邮件服务器的端口号,必须是587,465调试时失败 30 | props.setProperty("mail.smtp.ssl.enable", "true"); 31 | props.setProperty("mail.smtp.connectiontimeout", "5000"); 32 | 33 | Session session = Session.getDefaultInstance(props,new GMailAuthenticator("13101900@qq.com", "ecdudaqyndcibhag")); 34 | 35 | props.put("mail.debug", "true"); 36 | 37 | MimeMessage message = new MimeMessage(session); 38 | Address fromAddress = new InternetAddress(from,"优联博睿"); 39 | Address toAddress = new InternetAddress(desAddress); 40 | 41 | message.setFrom(fromAddress); 42 | message.setRecipient(Message.RecipientType.TO, toAddress); 43 | 44 | message.setSubject("激活Graph Analysis账户"); 45 | message.setSentDate(new Date()); 46 | message.setContent(emailContent,"text/html;charset=utf-8"); 47 | Transport transport = session.getTransport(); 48 | transport.connect(host, from, authcode); 49 | message.saveChanges(); 50 | Transport.send(message); 51 | transport.close(); 52 | 53 | }catch(Exception ex){ 54 | throw new RuntimeException(ex); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/util/fileoperation/FileOperation.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.util.fileoperation; 2 | 3 | import java.io.FileNotFoundException; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.io.InputStreamReader; 7 | import java.io.Reader; 8 | import java.io.UnsupportedEncodingException; 9 | 10 | public class FileOperation { 11 | public static String readFileContent(InputStream in) { 12 | StringBuffer sb = new StringBuffer(); 13 | try { 14 | Reader r = new InputStreamReader(in); 15 | int length = 0; 16 | for (char[] c = new char[1024]; (length = r.read(c)) != -1;) { 17 | sb.append(c, 0, length); 18 | } 19 | r.close(); 20 | } catch (UnsupportedEncodingException e) { 21 | e.printStackTrace(); 22 | } catch (FileNotFoundException e) { 23 | e.printStackTrace(); 24 | } catch (IOException e) { 25 | e.printStackTrace(); 26 | } 27 | return sb.toString(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/util/jdbcutils/JDBCUtils.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.util.jdbcutils; 2 | 3 | import com.uniplore.graph.dsm.db.entity.DbPO; 4 | import java.sql.Connection; 5 | import java.sql.DriverManager; 6 | 7 | public class JDBCUtils { 8 | /** 9 | * 功能:连接数据库. 10 | * @param dbPo 连接数据库所需要的参数 11 | * @return 返回connection对象 12 | */ 13 | public static Connection getConnection(DbPO dbPo) { 14 | // 使用JDBC连接数据库 15 | String driverName = dbPo.getDriverName();// 首先应该得到其驱动,判断究竟是何种数据库 16 | //System.out.println("驱动名为:" + driverName); 17 | String url = null; 18 | String dataBaseName = dbPo.getDataBaseName(); 19 | if (driverName != null && driverName.contains("mysql")) { 20 | if (dataBaseName == null) { 21 | url = "jdbc:mysql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber(); 22 | } else { 23 | url = "jdbc:mysql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/" 24 | + dataBaseName; 25 | } 26 | } else if (driverName != null && driverName.contains("postgresql")) { 27 | if (dataBaseName == null) { 28 | url = "jdbc:postgresql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/?"; 29 | } else { 30 | url = "jdbc:postgresql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/" 31 | + dataBaseName ; 32 | } 33 | 34 | } else if (driverName != null && driverName.contains("pivotal")) { 35 | url = "jdbc:pivotal:greenplum://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() 36 | + ";DatabaseName=" + dataBaseName ; 37 | } else if (driverName != null && driverName.contains("oracle")) { 38 | url = "jdbc:oracle:thin:@" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + ":" 39 | + dataBaseName ; 40 | } 41 | String user = dbPo.getUserName(); 42 | String password = dbPo.getPassword(); 43 | Connection connection; 44 | try { 45 | Class.forName(driverName); 46 | // 连接数据库 47 | connection = DriverManager.getConnection(url, user, password); 48 | } catch (Exception ex) { 49 | throw new RuntimeException(ex.getMessage()); 50 | } 51 | return connection; 52 | } 53 | 54 | /** 55 | * 功能: 关闭连接流. 56 | * @param connection 连接对象 57 | * @throws Exception 异常对象 58 | */ 59 | public static void close(Connection connection) throws Exception { 60 | if (connection != null) { 61 | connection.close(); 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/util/mybatisutils/MybatisUtils.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.util.mybatisutils; 2 | 3 | import com.alibaba.druid.pool.DruidDataSource; 4 | import com.uniplore.graph.dsm.db.entity.DbPO; 5 | import java.sql.Connection; 6 | import java.util.Properties; 7 | 8 | import javax.sql.DataSource; 9 | 10 | import org.apache.ibatis.datasource.DataSourceFactory; 11 | import org.apache.ibatis.mapping.Environment; 12 | import org.apache.ibatis.session.Configuration; 13 | import org.apache.ibatis.session.SqlSession; 14 | import org.apache.ibatis.session.SqlSessionFactory; 15 | import org.apache.ibatis.session.SqlSessionFactoryBuilder; 16 | import org.apache.ibatis.transaction.TransactionFactory; 17 | import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory; 18 | 19 | 20 | public class MybatisUtils implements DataSourceFactory { 21 | private Properties properties; 22 | 23 | @Override 24 | public DataSource getDataSource() { 25 | //MyBatis自带的数据库连接 26 | //PooledDataSource dataSource = new PooledDataSource(); 27 | //dataSource.setDriver(properties.getProperty("driverName")); 28 | //dataSource.setUrl(properties.getProperty("url")); 29 | //dataSource.setUsername(properties.getProperty("userName")); 30 | //dataSource.setPassword(properties.getProperty("password")); 31 | //return dataSource; 32 | //本例采用阿里巴巴druid连接池,当然你也可以采用c3p0、DBCP等连接池,但是Druid的性能最好 33 | DruidDataSource dataSource = new DruidDataSource(); 34 | dataSource.setDriverClassName(properties.getProperty("driverName")); 35 | dataSource.setUrl(properties.getProperty("url")); 36 | dataSource.setUsername(properties.getProperty("userName")); 37 | return dataSource; 38 | } 39 | 40 | @Override 41 | public void setProperties(Properties properties) { 42 | this.properties = properties; 43 | } 44 | 45 | /** 46 | * 功能: 使用mybatis创建Connection对象,使用了mybatis的特性. 47 | * @param dbPo 数据库连接参数 48 | * @return 返回值 49 | */ 50 | public static Connection getConnection(DbPO dbPo) { 51 | String driverName = dbPo.getDriverName(); 52 | String url = null; 53 | String dataBaseName = dbPo.getDataBaseName(); 54 | if (driverName != null && driverName.contains("mysql")) { 55 | if (dataBaseName == null) { 56 | url = "jdbc:mysql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber(); 57 | } else { 58 | url = "jdbc:mysql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/" 59 | + dataBaseName; 60 | } 61 | } else if (driverName != null && driverName.contains("postgresql")) { 62 | if (dataBaseName == null) { 63 | url = "jdbc:postgresql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/?"; 64 | } else { 65 | url = "jdbc:postgresql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/" 66 | + dataBaseName ; 67 | } 68 | 69 | } else if (driverName != null && driverName.contains("pivotal")) { 70 | url = "jdbc:pivotal:greenplum://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() 71 | + ";DatabaseName=" + dataBaseName ; 72 | } else if (driverName != null && driverName.contains("oracle")) { 73 | url = "jdbc:oracle:thin:@" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + ":" 74 | + dataBaseName ; 75 | } 76 | String userName = dbPo.getUserName(); 77 | String password = dbPo.getPassword(); 78 | 79 | Properties properties = new Properties(); 80 | properties.setProperty("driverName", driverName); 81 | properties.setProperty("url", url); 82 | properties.setProperty("userName", userName); 83 | properties.setProperty("password", password); 84 | MybatisUtils mybatisUtils = new MybatisUtils(); 85 | mybatisUtils.setProperties(properties); 86 | DataSource dataSource = mybatisUtils.getDataSource(); 87 | TransactionFactory transactionFactory = new JdbcTransactionFactory(); 88 | Environment environment = new Environment("development", transactionFactory, dataSource); 89 | Configuration config = new Configuration(environment); 90 | SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(config); 91 | SqlSession sesssion = sqlSessionFactory.openSession(); 92 | Connection connection = null; 93 | try { 94 | connection = sesssion.getConnection(); 95 | } catch (Exception ex) { 96 | throw new RuntimeException(ex.getMessage()); 97 | } 98 | return connection; 99 | } 100 | 101 | /** 102 | * 功能:获取mybatis连接session. 103 | * @param dbPo 数据库连接参数 104 | * @return 返回值 105 | */ 106 | public static SqlSession getSqlSession(DbPO dbPo) { 107 | String driverName = dbPo.getDriverName(); 108 | String url = null; 109 | String dataBaseName = dbPo.getDataBaseName(); 110 | if (driverName != null && driverName.contains("mysql")) { 111 | if (dataBaseName == null) { 112 | url = "jdbc:mysql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber(); 113 | } else { 114 | url = "jdbc:mysql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/" 115 | + dataBaseName; 116 | } 117 | } else if (driverName != null && driverName.contains("postgresql")) { 118 | if (dataBaseName == null) { 119 | url = "jdbc:postgresql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/?"; 120 | } else { 121 | url = "jdbc:postgresql://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + "/" 122 | + dataBaseName ; 123 | } 124 | 125 | } else if (driverName != null && driverName.contains("pivotal")) { 126 | url = "jdbc:pivotal:greenplum://" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() 127 | + ";DatabaseName=" + dataBaseName ; 128 | } else if (driverName != null && driverName.contains("oracle")) { 129 | url = "jdbc:oracle:thin:@" + dbPo.getIpAddress() + ":" + dbPo.getPortNumber() + ":" 130 | + dataBaseName ; 131 | } 132 | String userName = dbPo.getUserName(); 133 | String password = dbPo.getPassword(); 134 | 135 | Properties properties = new Properties(); 136 | properties.setProperty("driverName", driverName); 137 | properties.setProperty("url", url); 138 | properties.setProperty("userName", userName); 139 | properties.setProperty("password", password); 140 | MybatisUtils mybatisUtils = new MybatisUtils(); 141 | mybatisUtils.setProperties(properties); 142 | DataSource dataSource = mybatisUtils.getDataSource(); 143 | TransactionFactory transactionFactory = new JdbcTransactionFactory(); 144 | Environment environment = new Environment("development", transactionFactory, dataSource); 145 | Configuration config = new Configuration(environment); 146 | SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(config); 147 | SqlSession sesssion = sqlSessionFactory.openSession(); 148 | return sesssion; 149 | } 150 | 151 | /** 152 | * 功能: 测试上述代码是否能够正常工作. 153 | * @param args 主函数参数 154 | */ 155 | public static void main(String[] args) { 156 | Properties prop = new Properties(); 157 | prop.setProperty("driverName", "com.mysql.jdbc.Driver"); 158 | prop.setProperty("url", "jdbc:mysql://192.168.100.172:3306"); 159 | prop.setProperty("userName", "root"); 160 | prop.setProperty("password", "mysql"); 161 | 162 | 163 | /* 164 | MybatisUtils mybatisUtils = new MybatisUtils(); 165 | mybatisUtils.setProperties(prop); 166 | DataSource dataSource = mybatisUtils.getDataSource();*/ 167 | /*try { 168 | connection = dataSource.getConnection(); 169 | System.out.println(connection); 170 | } catch (SQLException ex) { 171 | String message = ex.getMessage(); 172 | System.out.println(message); 173 | }*/ 174 | //System.out.println(dataSource == null ? "dataSource为空" : "dataSource不为空") ; 175 | /*TransactionFactory transactionFactory = new JdbcTransactionFactory(); 176 | Environment environment = new Environment("development", transactionFactory, dataSource); 177 | Configuration configuration = new Configuration(environment); 178 | SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration); 179 | SqlSession session = sqlSessionFactory.openSession(); 180 | System.out.println("session:" + session); 181 | try { 182 | Connection connection = session.getConnection(); 183 | System.out.println(connection); 184 | } catch (Exception ex) { 185 | String message = ex.getMessage(); 186 | System.out.println(message); 187 | }*/ 188 | 189 | // 参考资料 http://stackoverflow.com/questions/22517318/cant-find-some-mybatis-classes-to-import-in-getting-started-guide 190 | // mybatis中获取session http://www.programcreek.com/java-api-examples/index.php?class=org.apache.ibatis.session.SqlSession&method=getConnection 191 | // Druidp配置,不适用Spring,使用Java代码实现 http://www.itdadao.com/articles/c15a617684p0.html 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /src/com/uniplore/graph/util/time/ComputeTime.java: -------------------------------------------------------------------------------- 1 | package com.uniplore.graph.util.time; 2 | 3 | import java.util.Date; 4 | 5 | public class ComputeTime { 6 | 7 | public static long computeTime(Date time1,Date time2) throws Exception{ 8 | 9 | //计算两个时间差,并将其换算成分钟数 10 | long time1_long = time1.getTime(); 11 | long time2_long = time2.getTime(); 12 | long diff = time2_long -time1_long; 13 | long minute = diff/(1000*60); 14 | return minute; 15 | } 16 | } -------------------------------------------------------------------------------- /web/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /web/WEB-INF/.gitignore: -------------------------------------------------------------------------------- 1 | /classes/ 2 | -------------------------------------------------------------------------------- /web/WEB-INF/lib/activation.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/activation.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/classmate-0.8.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/classmate-0.8.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/com.springsource.net.sf.cglib-2.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/com.springsource.net.sf.cglib-2.2.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/com.springsource.org.aopalliance-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/com.springsource.org.aopalliance-1.0.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-beanutils-1.7.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/commons-beanutils-1.7.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-collections-3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/commons-collections-3.2.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-fileupload-1.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/commons-fileupload-1.3.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-httpclient-3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/commons-httpclient-3.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-io-2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/commons-io-2.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-lang-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/commons-lang-2.3.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-logging-1.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/commons-logging-1.1.3.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/druid-1.0.27.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/druid-1.0.27.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/druid-1.0.29.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/druid-1.0.29.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/ezmorph-1.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/ezmorph-1.0.3.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/fastjson-1.2.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/fastjson-1.2.7.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/greenplum.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/greenplum.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/hibernate-validator-5.0.0.CR2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/hibernate-validator-5.0.0.CR2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/hibernate-validator-annotation-processor-5.0.0.CR2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/hibernate-validator-annotation-processor-5.0.0.CR2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jackson-annotations-2.1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/jackson-annotations-2.1.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jackson-core-2.1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/jackson-core-2.1.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jackson-databind-2.1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/jackson-databind-2.1.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/java-json.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/java-json.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/javax.servlet-api-3.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/javax.servlet-api-3.0.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jboss-logging-3.1.1.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/jboss-logging-3.1.1.GA.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jcaptcha-1.0-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/jcaptcha-1.0-all.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jedis-2.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/jedis-2.9.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/json-lib-2.2.3-jdk15.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/json-lib-2.2.3-jdk15.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jsqlparser-0.9.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/jsqlparser-0.9.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jstl.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/jstl.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/junit.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/junit.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/log4j-api-2.0-rc1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/log4j-api-2.0-rc1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/log4j-core-2.0-rc1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/log4j-core-2.0-rc1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/lombok.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/lombok.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mail.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/mail.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mybatis-3.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/mybatis-3.3.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mybatis-spring-1.2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/mybatis-spring-1.2.4.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/ojdbc7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/ojdbc7.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/pagehelper-4.1.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/pagehelper-4.1.6.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/postgresql-9.4.1208.jre7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/postgresql-9.4.1208.jre7.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/slf4j-api-1.7.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/slf4j-api-1.7.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/slf4j-log4j12-1.7.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/slf4j-log4j12-1.7.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-aop-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-aop-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-aspects-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-aspects-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-beans-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-beans-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-context-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-context-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-core-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-core-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-expression-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-expression-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-jdbc-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-jdbc-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-orm-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-orm-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-test-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-test-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-tx-4.0.0.M2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-tx-4.0.0.M2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-tx-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-tx-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-web-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-web-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-webmvc-4.0.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/spring-webmvc-4.0.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/standard.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/standard.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/validation-api-1.1.0.CR1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/WEB-INF/lib/validation-api-1.1.0.CR1.jar -------------------------------------------------------------------------------- /web/WEB-INF/spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | classpath:com/uniplore/graph/ms/sign/properties/db.properties 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 88 | 89 | 90 | 91 | 92 | 97 | 98 | com.uniplore.graph.ms.sign.entity 99 | 100 | 104 | 105 | 106 | classpath:com/uniplore/graph/ms/sign/mapper/*Mapper.xml 107 | classpath:com/uniplore/graph/ms/login/mapper/*Mapper.xml 108 | 109 | 110 | 111 | 112 | 117 | 118 | 119 | 120 | 121 | 122 | com.uniplore.graph.ms.sign.mapper 123 | com.uniplore.graph.ms.login.mapper 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 148 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | text/plain;charset=UTF-8 160 | application/json;charset=UTF-8 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 174 | 175 | 176 | 177 | 180 | 182 | 183 | 184 | 185 | 186 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 5368709120 197 | 198 | 199 | -------------------------------------------------------------------------------- /web/WEB-INF/upload/README.md: -------------------------------------------------------------------------------- 1 | ###
**说明**
2 | *** 3 | 4 | 想要正确运行代码,必须在/WEB-INF/路径下创建upload文件夹,否则会报文件找不到的错误 -------------------------------------------------------------------------------- /web/WEB-INF/views/common/error/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ${message } 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/WEB-INF/views/common/header/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |

19 | 29 |
30 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /web/WEB-INF/views/dsm/file/json/json.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 37 | 38 | 39 |
40 |
41 | 49 | 50 |
51 |
连接
52 |
    53 |
  • 54 |
    <%= request.getParameter("fileName") %>
    55 |
    JSON文件
    56 |
  • 57 |
58 |
59 | 60 |
61 |
文件
62 |
    63 |
  • 64 | <%= request.getParameter("fileName") %> 65 | 68 |
  • 69 |
70 |
71 | 72 |
73 |
布局
74 |
    75 |
  • 77 |
  • 79 |
  • 81 |
  • 83 |
  • 85 |
  • 87 |
  • 89 |
90 |
91 |
92 | 93 |
94 | 95 |
96 |
97 | <%= request.getParameter("fileName") %>
98 |
99 | 100 | 101 |
102 |
请将数据集拖拽至此处
103 |
104 | 105 |
106 | 107 |
108 |
109 | 110 | 111 |
112 |
113 |
114 | 115 | 123 | 124 |
125 | 155 | 156 | 157 | 242 | 243 | 244 | -------------------------------------------------------------------------------- /web/WEB-INF/views/ms/active_error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | My JSP 'active_error.jsp' starting page 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 激活失败,请重新注册 27 | 28 | 29 | -------------------------------------------------------------------------------- /web/WEB-INF/views/ms/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | 3 | <%@include file="/WEB-INF/views/common/header/header.jsp" %> 4 | 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 |
登陆 Uniplore
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 | 58 |
59 |
60 |
61 |
62 | 63 |
64 |
65 |
使用自己的Uniplore账户来享用其他Uniplore的服务,例如
66 |
67 |
68 |
69 |
70 |
    71 |
  • 保存数据源信息
  • 72 |
  • 保存图
  • 73 |
  • 保存分析结果
  • 74 |
  • 资源隔离
  • 75 |
76 |
77 |
78 |
79 | 80 |
81 |
82 | 85 |
86 |
87 |
88 |
89 | 90 |
91 | 92 |
93 | 94 |
95 |
96 |
97 |
98 |
99 | 100 | 171 | 172 | 173 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /web/WEB-INF/views/ms/sign.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | 3 | <%@include file="/WEB-INF/views/common/header/header.jsp" %> 4 | 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 |
58 | 59 |
60 |
61 |
62 |
63 |

正在加载验证码

64 |

            请先拖动验证码到指定位置

65 |
66 |
67 |
68 | 69 |
70 |
71 | 74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | 103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | 115 |
116 |
117 |
118 |
119 | 120 | 191 | 192 | 193 | 200 | 201 | 202 | 203 | -------------------------------------------------------------------------------- /web/WEB-INF/views/ms/success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | My JSP 'success.jsp' starting page 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 成功激活账户,请登录 27 | 28 | 29 | -------------------------------------------------------------------------------- /web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | dispatcher 8 | org.springframework.web.servlet.DispatcherServlet 9 | 10 | 13 | contextConfigLocation 14 | /WEB-INF/spring.xml 15 | 16 | 1 17 | 18 | 19 | 20 | dispatcher 21 | 28 | / 29 | 30 | 31 | 32 | 33 | CharacterEncodingFilter 34 | org.springframework.web.filter.CharacterEncodingFilter 35 | 36 | encoding 37 | UTF-8 38 | 39 | 40 | 41 | CharacterEncodingFilter 42 | /* 43 | 44 | -------------------------------------------------------------------------------- /web/css/common/footer/footer.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | .footer{ 6 | width: 100%; 7 | height: 300px; 8 | background-color: #333C4E; 9 | } 10 | 11 | .footer-content{ 12 | width: 700px; 13 | margin: 0 auto; 14 | } 15 | .footer .footer-content .footer-content-1{ 16 | float: left; 17 | overflow: hide; 18 | padding-top: 40px; 19 | padding-right: 45px; 20 | } 21 | 22 | .footer .footer-content .footer-content-1 h5{ 23 | 24 | } 25 | 26 | .footer .footer-content .footer-content-1 h5 a{ 27 | color: #fff; 28 | font-size: 14px; 29 | } 30 | .footer .footer-content .footer-content-1 h5 a:hover{ 31 | color: #6AB512; 32 | } 33 | .footer .footer-content .footer-content-1 ul{ 34 | list-style: none; 35 | } 36 | 37 | .footer .footer-content .footer-content-1 ul li a{ 38 | color: #fff; 39 | font-size: 12px; 40 | } 41 | 42 | .footer .footer-content .footer-content-1 ul li a:hover{ 43 | color: #6AB512; 44 | } 45 | -------------------------------------------------------------------------------- /web/css/common/header/header.css: -------------------------------------------------------------------------------- 1 | ul,li,div{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | .header{ 6 | width:100%; 7 | height: 112px; 8 | background-color: #030502; 9 | } 10 | 11 | .header_content{ /*设置导航条的内容宽度为1200px*/ 12 | width: 1200px; 13 | margin: 0 auto; 14 | } 15 | 16 | .header .header_content h1{ /*让logo左浮动*/ 17 | float: left; 18 | } 19 | 20 | .cl{ /*使用外墙法清除浮动*/ 21 | clear: both; 22 | } 23 | 24 | .header .header_content h1 a img{ 25 | display: block; 26 | width: 50px; 27 | height: 50px; 28 | line-height: 50px; /*行高和本身的高一样,整个图片会居中*/ 29 | } 30 | 31 | .header .header_content ul { 32 | list-style: none; 33 | } 34 | 35 | .header .header_content ul li{ 36 | float: left; 37 | } 38 | 39 | .header .header_content ul li a{ 40 | display: block; 41 | width: 62px; 42 | height: 112px; 43 | line-height: 112px; 44 | margin-left: 40px; 45 | color: #fff; 46 | text-decoration: none; 47 | } 48 | 49 | .header .header_content ul li a:hover{ 50 | color: #6AB512; 51 | } 52 | 53 | .header .header_content ul li .cpml40{ 54 | margin-left: 180px; 55 | } -------------------------------------------------------------------------------- /web/css/dsm/db/db.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | body { 4 | font-family: Microsoft Yahei,Simsun,GillSans, Calibri, Trebuchet, sans-serif; 5 | } 6 | *{ 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | .main{ 12 | width: 100%; 13 | min-width: 1100px; 14 | } 15 | 16 | .main-side-bar-left{ 17 | float: left; 18 | height: 100%; 19 | width: 300px; 20 | min-width: 300px; 21 | margin: 0; 22 | padding: 0; 23 | overflow: hidden; 24 | background-color: #F5F5F5; 25 | } 26 | 27 | .main-side-bar-left .logo dl{ 28 | background-color: #2a2a2a; 29 | } 30 | 31 | .main-side-bar-left .logo dl a { 32 | display: block; 33 | padding-top : 15px; 34 | padding-bottom : 15px; 35 | padding-left: 18px; 36 | } 37 | 38 | .main-side-bar-left .logo dl a:hover{ 39 | background-color: #202020; 40 | } 41 | 42 | .main-side-bar-left .logo dl a img { 43 | width: 20px; 44 | height: 20px; 45 | } 46 | 47 | .main-side-bar-right { 48 | float: right; 49 | width: 340px; 50 | height: 100%; 51 | background-color: #F5F5F5; 52 | overflow: hidden; 53 | min-width: 340px; 54 | } 55 | 56 | /*增加右侧边栏属性*/ 57 | .main-side-bar-right .logo dl{ 58 | background-color: #2a2a2a; 59 | } 60 | 61 | .main-side-bar-right .logo dl a { 62 | display: block; 63 | padding-top : 15px; 64 | padding-bottom : 15px; 65 | padding-left: 18px; 66 | } 67 | 68 | .main-side-bar-right .logo dl a:hover{ 69 | background-color: #202020; 70 | } 71 | 72 | .main-side-bar-right .logo dl a img { 73 | width: 20px; 74 | height: 20px; 75 | } 76 | 77 | /*右侧边栏结束*/ 78 | .main-content-center { 79 | float: left; 80 | width: calc(100% - 300px - 340px); /*自动根据浏览器的大小计算除了左侧栏和右侧栏剩余部分的宽度*/ 81 | height: 100%; 82 | overflow: hidden; 83 | min-width: 460px; 84 | } 85 | 86 | 87 | .fr { 88 | float: right; 89 | padding-right: 10px; 90 | overflow: hidden; 91 | } 92 | 93 | .main-content-center .main-content-center-header { 94 | height: 50px; 95 | width: 100% ; 96 | } 97 | 98 | .main-side-bar-right .main-side-bar-right-header { 99 | width: 100% ; 100 | height: 50px; 101 | } 102 | 103 | 104 | #main-content-center-footer { 105 | width: 100%; 106 | height: calc(100% - 50px); 107 | background-color: #f9f9f9; 108 | } 109 | 110 | .main-side-bar-left .source { 111 | width: 100%; 112 | height: 100px; 113 | padding-left: 18px; 114 | margin-top: 20px; 115 | border-bottom: 2px solid #D5D5D5; 116 | } 117 | .main-side-bar-left .source h5 { 118 | font-size: 14px; 119 | } 120 | .main-side-bar-left .worksheet { 121 | margin-top: 20px; 122 | padding-left: 18px; 123 | width: 100%; 124 | height: 100px; 125 | border-bottom: 2px solid #D5D5D5; 126 | } 127 | .main-side-bar-left .worksheet h5 { 128 | font-size: 14px; 129 | } 130 | 131 | .main-side-bar-left .source { 132 | border-bottom: 2px solid #D5D5D5; 133 | } 134 | .main-side-bar-left .source ul li { 135 | background-color: #E7E7E7; 136 | padding-left: 14px; 137 | margin-right: 18px; 138 | padding-top : 8px; 139 | padding-bottom: 8px; 140 | } 141 | 142 | .main-side-bar-left .worksheet ul li { 143 | /* background-color: #E7E7E7; */ 144 | padding-left: 14px; 145 | margin-right: 18px; 146 | padding-top : 8px; 147 | padding-bottom: 8px; 148 | cursor: pointer; 149 | } 150 | 151 | .main-side-bar-left .source ul li:hover { 152 | background-color: #c0c0c0; 153 | } 154 | .source ul li .file-title { 155 | font-size: 16px; 156 | /* font-family: "Microsoft Yahei"; */ 157 | } 158 | .source ul li .file-type { 159 | font-size: 12px; 160 | padding-left: 22px; 161 | /* font-family: "Simsun"; */ 162 | } 163 | 164 | /*右侧边栏*/ 165 | .main-side-bar-right .source { 166 | width: 100%; 167 | height: 100px; 168 | padding-left: 18px; 169 | margin-top: 20px; 170 | border-bottom: 2px solid #D5D5D5; 171 | } 172 | .main-side-bar-right .source h5 { 173 | font-size: 14px; 174 | } 175 | .main-side-bar-right .worksheet { 176 | margin-top: 20px; 177 | padding-left: 18px; 178 | width: 100%; 179 | height: 100px; 180 | border-bottom: 2px solid #D5D5D5; 181 | } 182 | .main-side-bar-right .worksheet h5 { 183 | font-size: 14px; 184 | } 185 | 186 | .main-side-bar-right .source { 187 | border-bottom: 2px solid #D5D5D5; 188 | } 189 | .main-side-bar-right .source ul li { 190 | background-color: #E7E7E7; 191 | padding-left: 14px; 192 | margin-right: 18px; 193 | padding-top : 8px; 194 | padding-bottom: 8px; 195 | } 196 | 197 | .main-side-bar-right .worksheet ul li { 198 | /* background-color: #E7E7E7; */ 199 | padding-left: 14px; 200 | margin-right: 18px; 201 | padding-top : 8px; 202 | padding-bottom: 8px; 203 | cursor: pointer; 204 | } 205 | 206 | .main-side-bar-right .source ul li:hover { 207 | background-color: #c0c0c0; 208 | } 209 | 210 | #setting ul li { 211 | /* background-color: #E7E7E7; */ 212 | padding-left: 14px; 213 | margin-right: 18px; 214 | cursor: pointer; 215 | } 216 | 217 | #alogrithm-tabs ul { 218 | width: 90%; 219 | height: 105px; 220 | margin-left: 24px; 221 | margin-top: 24px; 222 | margin-right: 30px; 223 | 224 | } 225 | #alogrithm-tabs { 226 | overflow: hidden; 227 | } 228 | 229 | #alogrithm-tabs ul li { 230 | font-family: Microsoft Yahei,Simsun,GillSans, Calibri, Trebuchet, sans-serif; 231 | font-weight: 700; 232 | overflow: hidden; 233 | } 234 | 235 | #alogrithm-tabs span.title { 236 | float: left; 237 | } 238 | #alogrithm-tabs .go-run { 239 | float: right; 240 | } 241 | #setting-tabs ul { 242 | width: 90%; 243 | height: calc(100% - 105px); 244 | margin-left: 24px; 245 | margin-top: 24px; 246 | margin-right: 30px; 247 | } -------------------------------------------------------------------------------- /web/css/dsm/file/json.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | body { 4 | font-family: Microsoft Yahei,Simsun,GillSans, Calibri, Trebuchet, sans-serif; 5 | } 6 | *{ 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | .main{ 12 | width: 100%; 13 | min-width: 1100px; 14 | } 15 | 16 | 17 | .main-side-bar-left{ 18 | float: left; 19 | height: 100%; 20 | width: 300px; 21 | min-width: 300px; 22 | margin: 0; 23 | padding: 0; 24 | overflow: hidden; 25 | background-color: #F5F5F5; 26 | } 27 | 28 | .main-side-bar-left .logo dl{ 29 | background-color: #2a2a2a; 30 | } 31 | 32 | .main-side-bar-left .logo dl a { 33 | display: block; 34 | padding-top : 15px; 35 | padding-bottom : 15px; 36 | padding-left: 18px; 37 | } 38 | 39 | .main-side-bar-left .logo dl a:hover{ 40 | background-color: #202020; 41 | } 42 | 43 | .main-side-bar-left .logo dl a img { 44 | width: 20px; 45 | height: 20px; 46 | } 47 | 48 | .main-side-bar-right { 49 | float: right; 50 | width: 340px; 51 | height: 100%; 52 | background-color: #c0c0c0; 53 | overflow: hidden; 54 | min-width: 340px; 55 | } 56 | 57 | .main-content-center { 58 | float: left; 59 | width: calc(100% - 300px - 340px); /*自动根据浏览器的大小计算除了左侧栏和右侧栏剩余部分的宽度*/ 60 | height: 100%; 61 | overflow: hidden; 62 | min-width: 460px; 63 | } 64 | 65 | 66 | .fr { 67 | float: right; 68 | padding-right: 10px; 69 | overflow: hidden; 70 | } 71 | 72 | .main-content-center .main-content-center-header { 73 | height: 50px; 74 | width: 100% ; 75 | } 76 | 77 | .main-side-bar-right .main-side-bar-right-header { 78 | width: 100% ; 79 | height: 50px; 80 | } 81 | 82 | .main-content-center-center { 83 | width: 100%; /*自动根据浏览器的大小计算除了左侧栏和右侧栏剩余部分的宽度*/ 84 | height: 200px; 85 | border-bottom: 2px solid #F5F5F5; 86 | margin: 0 auto; 87 | line-height: 200px; 88 | text-align: center; 89 | } 90 | 91 | .main-content-center-center div{ 92 | font-size: 20px; 93 | color: #d20931; 94 | } 95 | 96 | #main-content-center-footer { 97 | width: 100%; 98 | height: calc(100% - 50px - 200px); 99 | background-color: #f9f9f9; 100 | } 101 | 102 | .main-side-bar-left .source { 103 | width: 100%; 104 | height: 100px; 105 | padding-left: 18px; 106 | margin-top: 20px; 107 | border-bottom: 2px solid #D5D5D5; 108 | } 109 | .main-side-bar-left .source h5 { 110 | font-size: 14px; 111 | } 112 | .main-side-bar-left .worksheet { 113 | margin-top: 20px; 114 | padding-left: 18px; 115 | width: 100%; 116 | height: 300px; 117 | border-bottom: 2px solid #D5D5D5; 118 | } 119 | .main-side-bar-left .worksheet h5 { 120 | font-size: 14px; 121 | } 122 | 123 | .main-side-bar-left .source ul li { 124 | background-color: #E7E7E7; 125 | padding-left: 14px; 126 | margin-right: 18px; 127 | padding-top : 8px; 128 | padding-bottom: 8px; 129 | cursor: default; 130 | } 131 | 132 | .main-side-bar-left .source ul li:hover { 133 | background-color: #c0c0c0; 134 | } 135 | .source ul li .file-title { 136 | font-size: 16px; 137 | /* font-family: "Microsoft Yahei"; */ 138 | } 139 | .source ul li .file-type { 140 | font-size: 12px; 141 | padding-left: 22px; 142 | /* font-family: "Simsun"; */ 143 | } 144 | 145 | .main-side-bar-left .worksheet ul li { 146 | background-color: #E7E7E7; 147 | padding-left: 14px; 148 | margin-right: 18px; 149 | padding-top : 8px; 150 | padding-bottom: 8px; 151 | cursor: move; 152 | } 153 | 154 | .main-side-bar-left .worksheet ul li:hover { 155 | background-color: #c0c0c0; 156 | } 157 | 158 | .main-side-bar-left .worksheet #free-table { 159 | float: right; 160 | padding-right: 14px; 161 | cursor: pointer; 162 | overflow: hidden; 163 | padding-top: 4px; 164 | } 165 | 166 | #modal-free-table { 167 | width: 600px; 168 | } 169 | 170 | .main-side-bar-left .graph-layout { 171 | margin-top: 20px; 172 | padding-left: 18px; 173 | width: 100%; 174 | height: calc(100% - 150px - 100px); 175 | } 176 | 177 | .main-side-bar-left .graph-layout h5 { 178 | font-size: 14px; 179 | } -------------------------------------------------------------------------------- /web/css/dsm/main.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | body{ 3 | background-image: url(../../img/dsm/background.png); 4 | font-family: Microsoft Yahei,Simsun,GillSans, Calibri, Trebuchet, sans-serif; 5 | } 6 | *{ 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | .main{ 12 | width: 100%; 13 | min-width: 1100px; 14 | } 15 | 16 | #modal-db-mysql{ 17 | width: 600px; 18 | min-width: 600px; 19 | height: 640px; 20 | min-height: 640px; 21 | background-image: url(../../img/dsm/background.png); 22 | } 23 | 24 | #modal-db-postgresql { 25 | width: 750px; 26 | min-width: 750px; 27 | height: 640px; 28 | min-height: 640px; 29 | background-image: url(../../img/dsm/background.png); 30 | } 31 | 32 | #modal-db-greenplum { 33 | width: 750px; 34 | min-width: 750px; 35 | height: 640px; 36 | min-height: 640px; 37 | background-image: url(../../img/dsm/background.png); 38 | } 39 | 40 | #modal-db-oracle { 41 | width: 600px; 42 | min-width: 600px; 43 | height: 640px; 44 | min-height: 640px; 45 | background-image: url(../../img/dsm/background.png); 46 | } 47 | 48 | #modal-db-text{ 49 | width: 600px; 50 | min-width: 600px; 51 | height: 500px; 52 | min-height: 500px; 53 | background-image: url(../../img/dsm/background.png); 54 | } 55 | 56 | #modal-db-json{ 57 | width: 600px; 58 | min-width: 600px; 59 | height: 500px; 60 | min-height: 500px; 61 | background-image: url(../../img/dsm/background.png); 62 | } 63 | 64 | .main-side-bar-left{ 65 | float: left; 66 | height: 100%; 67 | width: 300px; 68 | min-width: 300px; 69 | background-color: #313131; 70 | margin: 0; 71 | padding: 0; 72 | overflow: hidden; 73 | } 74 | 75 | .main-side-bar-left .logo dl{ 76 | background-color: #2a2a2a; 77 | } 78 | 79 | .main-side-bar-left .logo dl a { 80 | display: block; 81 | padding-top : 15px; 82 | padding-bottom : 15px; 83 | padding-left: 18px; 84 | } 85 | 86 | .main-side-bar-left .logo dl a:hover{ 87 | background-color: #202020; 88 | } 89 | 90 | .main-side-bar-left .logo dl a img { 91 | width: 20px; 92 | height: 20px; 93 | } 94 | 95 | .main-side-bar-right { 96 | float: right; 97 | width: 340px; 98 | height: 100%; 99 | background-color: #c0c0c0; 100 | overflow: hidden; 101 | min-width: 340px; 102 | } 103 | 104 | .main-content-center { 105 | float: left; 106 | width: calc(100% - 300px - 340px); /*自动根据浏览器的大小计算除了左侧栏和右侧栏剩余部分的宽度*/ 107 | height: 100%; 108 | overflow: hidden; 109 | min-width: 460px; 110 | } 111 | 112 | .connection { 113 | padding: 0 10px 0 0 ; 114 | } 115 | .connection h5 { 116 | padding-top: 30px; 117 | padding-left: 28px; 118 | } 119 | .connection h5 a{ 120 | font-size: 30px; 121 | color: #FFFFFF; 122 | } 123 | 124 | .connection .file ul li { 125 | padding-left: 44px; 126 | } 127 | .connection .file ul li a { 128 | display: block; 129 | padding-left: 10px; 130 | padding-top: 5px; 131 | padding-bottom: 5px; 132 | color: #fff; 133 | font-size: 18px; 134 | } 135 | .connection .file h5 a { 136 | color: #bdbdbd; 137 | font-size: 24px; 138 | } 139 | .connection .file ul li a:hover { 140 | background-color: #202020; 141 | } 142 | 143 | .connection .server ul li { 144 | padding-left: 44px; 145 | } 146 | .connection .server ul li a { 147 | display: block; 148 | padding-left: 10px; 149 | padding-top: 5px; 150 | padding-bottom: 5px; 151 | color: #fff; 152 | font-size: 18px; 153 | } 154 | .connection .server h5 a { 155 | color: #bdbdbd; 156 | font-size: 24px; 157 | } 158 | .connection .server ul li a:hover { 159 | background-color: #202020; 160 | } 161 | 162 | .fr { 163 | float: right; 164 | padding-right: 10px; 165 | overflow: hidden; 166 | } 167 | 168 | .main-content-center .main-content-center-header { 169 | height: 50px; 170 | width: 100% ; 171 | } 172 | 173 | .main-side-bar-right .main-side-bar-right-header { 174 | height: 50px; 175 | width: 100% ; 176 | } 177 | 178 | .main-side-bar-right .explore { 179 | padding: 0 10px 0 0 ; 180 | } 181 | 182 | .explore h5 { 183 | padding-top: 30px; 184 | padding-left: 28px; 185 | } 186 | 187 | .explore h5 a{ 188 | font-size: 30px; 189 | color: #535353; 190 | } 191 | 192 | .explore ul li { 193 | padding-left: 44px; 194 | } 195 | 196 | .explore ul li a { 197 | display: block; 198 | padding-left: 10px; 199 | padding-top: 5px; 200 | padding-bottom: 5px; 201 | color: #303030; 202 | font-size: 18px; 203 | } 204 | 205 | .explore ul li a:hover { 206 | background-color: #818181; 207 | } 208 | 209 | 210 | /*分割*/ 211 | .source h5 { 212 | padding-top: 30px; 213 | padding-left: 28px; 214 | } 215 | 216 | .source h5 a{ 217 | font-size: 30px; 218 | color: #535353; 219 | } 220 | 221 | .source ul li { 222 | padding-left: 44px; 223 | } 224 | 225 | .source ul li a { 226 | display: block; 227 | padding-left: 10px; 228 | padding-top: 5px; 229 | padding-bottom: 5px; 230 | color: #303030; 231 | font-size: 18px; 232 | } 233 | 234 | .source ul li a:hover { 235 | background-color: #818181; 236 | } 237 | 238 | .db-title-content { 239 | font-size: 22px; 240 | font-weight: 600; 241 | } -------------------------------------------------------------------------------- /web/css/ms/login.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | .box-shadow-big{ 4 | width: 100%; 5 | height: 460px; 6 | border-redius: 5px; 7 | border: 2px solid #ccc; 8 | margin-top:50px; 9 | box-shadow: 0 0 10px #c0c0c0; 10 | border-radius: 15px; //圆角效果 11 | margin-buttom: 0px; 12 | min-width: 600px; //定义最小宽度,使得中间的box-shadow部分最小能够将其中所有的内容包裹在其中,从而保证不会发生溢出 13 | } 14 | 15 | .box-shadow-big h1{ 16 | display: block; 17 | width: 175px; 18 | height: 35px; 19 | margin-top: 20px; 20 | margin-bottom: 20px; 21 | 22 | background-size: 175px 35px; 23 | font-weight: normal; 24 | font-size: 2em; 25 | -webkit-margin-before: 0.67em; 26 | -webkit-margin-after: 0.67em; 27 | -webkit-margin-start: 0px; 28 | -webkit-margin-end: 0px; 29 | margin-left: 20px; 30 | width: 95%; 31 | padding-buttom: 20px; 32 | border-bottom: 1px solid #c0c0c0 ; 33 | } 34 | 35 | body, input, textarea, button, legend { 36 | font-family: "微软雅黑"; 37 | color: #333; 38 | } 39 | 40 | 41 | .top{ 42 | margin-top: 20px; 43 | } 44 | 45 | .left{ 46 | width:100%; 47 | font-size: 16px; 48 | } 49 | 50 | .right h5 { 51 | font-size: 18px; 52 | font-family: "微软雅黑"; 53 | line-height: 30px; 54 | } 55 | 56 | .myul li{ 57 | font-size: 18px; 58 | font-family: "微软雅黑"; 59 | line-height: 30px; 60 | list-style: disc; 61 | } 62 | 63 | .row a:hover{ 64 | text-decoration: underline; 65 | } 66 | 67 | /*在登录页面中加一条竖线*/ 68 | .line{ 69 | border-left: 1px solid #D9D9D9; 70 | margin-left: 1px; 71 | adding-left: 5px; 72 | height: 350px; 73 | } 74 | body{ /*设置背景图片*/ 75 | background-image: url(../../img/ms/background.png); 76 | background-repeat: repeat; 77 | padding-top: -10px; 78 | } 79 | 80 | .button-self{ 81 | width:100%; 82 | } 83 | 84 | .backtop{ 85 | position: fixed; 86 | bottom: 100px; 87 | right: 40px; 88 | } -------------------------------------------------------------------------------- /web/css/ms/sign.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | .box-sign-10{ 4 | width: 100%; 5 | height: 580px; 6 | border-redius: 5px; 7 | border: 2px solid #ccc; 8 | margin-top:50px; 9 | box-shadow: 0 0 10px #c0c0c0; 10 | border-radius: 15px; /*圆角效果*/ 11 | margin-buttom: 0px; 12 | min-width: 400px; /*给定一个最小的宽度,这样能解决:当网页的宽度变小时,里面的内容不会溢出*/ 13 | } 14 | 15 | .button-self{ 16 | width: 100%; 17 | } 18 | 19 | body{ /*设置背景图片*/ 20 | background-image: url(../../img/ms/background.png); 21 | background-repeat: repeat; 22 | padding-top: -10px; 23 | } 24 | 25 | .sign-bg-10-small{ 26 | height: 60px; /*注册页面最下面一个box-shadow的高度*/ 27 | border-redius: 5px; 28 | border: 2px solid #ccc; 29 | margin-top: 0px; 30 | box-shadow: 0 0 10px #c0c0c0; 31 | border-radius: 15px; //圆角效果 32 | margin-buttom: 0px; 33 | width: 100%; 34 | min-width: 400px; //给定一个最小的宽度,这样能解决:当网页的宽度变小时,里面的内容不会溢出 35 | } 36 | 37 | .sign-bg-10-small a:hover{ 38 | text-decoration: underline; 39 | } 40 | 41 | .backtop{ 42 | position: fixed; 43 | bottom: 80px; 44 | right: 30px; 45 | opacity: 1; 46 | cursor: pointer; 47 | } -------------------------------------------------------------------------------- /web/img/dsm/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/img/dsm/background.png -------------------------------------------------------------------------------- /web/img/main/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/img/main/icon.png -------------------------------------------------------------------------------- /web/img/ms/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/img/ms/background.png -------------------------------------------------------------------------------- /web/img/ms/topback.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/img/ms/topback.gif -------------------------------------------------------------------------------- /web/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | 3 | <%@include file="/WEB-INF/views/common/header/header.jsp" %> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/js/dsm/file/json.js: -------------------------------------------------------------------------------- 1 | 2 | function freeTableAppear() { 3 | //alert("当鼠标移到上方时调用该函数"); 4 | $("#free-table").removeClass("icon-table"); 5 | $("#free-table").addClass("icon-table"); 6 | } 7 | 8 | function freeTableDisappear() { 9 | //alert("当鼠标移到上方时调用该函数"); 10 | $("#free-table").removeClass("icon-table"); 11 | } 12 | -------------------------------------------------------------------------------- /web/js/dsm/main.js: -------------------------------------------------------------------------------- 1 | //加载弹出框 2 | document.write(""); 3 | document.write(""); 4 | //模态框启动 5 | $(document).ready(function() { 6 | // the "href" attribute of .modal-trigger must specify the modal ID that 7 | // wants to be triggered 8 | $('.modal-trigger').leanModal({ 9 | dismissible : true, // 点击模态框外部则关闭模态框 10 | }); 11 | }); 12 | 13 | //获取到所有的参数信息,并将其传至后台测试能否连接数据源 14 | function modal_mysql_test(){ 15 | //首先获取到表单元素的所有值 16 | var driverName = $("#mysqlDriverName option:selected").text(); //获取到select选中的值 17 | //alert("驱动为:" + driverName) 18 | var dataBaseType = $("#mysqlDataBaseType").val(); 19 | //alert("数据库类型为:" + dataBaseType) 20 | var ipAddress = $("#mysqlIpAddress").val(); 21 | //alert("ip地址为:" + ipAddress) 22 | var portNumber = $("#mysqlPortNumber").val(); 23 | //alert("端口号为:" + portNumber) 24 | var connectionName = $("#mysqlConnectionName").val(); 25 | //alert("连接名为:" + connectionName) 26 | var dataBaseName = $("#mysqlDataBaseName").val(); 27 | //alert("数据库名为:" + dataBaseName) 28 | var userName = $("#mysqlUserName").val(); 29 | //alert("用户名为:" + userName) 30 | var password = $("#mysqlPassword").val(); 31 | //alert("密码为:" + password) 32 | //输出上述的所有值,判断是是否正确的得到连接信息 33 | //alert("驱动名称为:"+driverName+"数据库类型为:"+dataBaseType+"ip地址为:"+ipAddress+"端口号为:"+portNumber+"连接名为"+connectionName+"用户名为"+userName+"密码为:"+password); 34 | $.ajax({ 35 | async: false, //设置ajax交互为同步方式,默认采用的是异步方式 36 | url: "/graphanalysis/dsm/db/connection?t=" + (new Date()).getTime(), //提交数据,测试是否能够成功的连接数据源,url路径采用绝对路径 37 | type:"POST", 38 | data: { 39 | //成功的连接数据源之后要能获取到数据源的信息 40 | "driverName": driverName, 41 | "dataBaseType": dataBaseType, 42 | "ipAddress": ipAddress, 43 | "portNumber": portNumber, 44 | "connectionName": connectionName, 45 | "dataBaseName": dataBaseName, 46 | "userName": userName, 47 | "password": password, 48 | }, 49 | success: function(data) { 50 | //alert("返回值为:"+data); //判断是否成功的接收到返回值,当成功的连接数据源接收到的数据为:"数据库连接成功" 51 | //连接数据源失败时,返回值为"数据库连接失败" 52 | if("数据库连接成功" == data){ 53 | swal("Good job!", "数据库连接成功", "success"); 54 | }else if("用户名和密码无效" == data){ 55 | swal("Oops...", "用户名和密码无效", "error"); 56 | }else if("与数据库通信时出错,不能连接到数据库服务器,请检查服务器是否正在运行以及您是否有权访问请求的数据库" == data){ 57 | swal("Oops...","与数据库通信时出错,不能连接到数据库服务器,请检查服务器是否正在运行以及您是否有权访问请求的数据库","error"); 58 | }else{ 59 | swal("Oops...","数据库连接失败","error"); 60 | } //if语句结束 61 | 62 | } 63 | }) 64 | } 65 | 66 | function modal_postgresql_test(){ 67 | //首先获取到表单元素的所有值 68 | var driverName = $("#postgresqlDriverName option:selected").text(); //获取到select选中的值 69 | //alert("驱动为:" + driverName) 70 | var dataBaseType = $("#postgresqlDataBaseType").val(); 71 | //alert("数据库类型为:" + dataBaseType) 72 | var ipAddress = $("#postgresqlIpAddress").val(); 73 | //alert("ip地址为:" + ipAddress) 74 | var portNumber = $("#postgresqlPortNumber").val(); 75 | //alert("端口号为:" + portNumber) 76 | var connectionName = $("#postgresqlConnectionName").val(); 77 | //alert("连接名为:" + connectionName) 78 | var dataBaseName = $("#postgresqlDataBaseName").val(); 79 | //alert("数据库名为:" + dataBaseName) 80 | var userName = $("#postgresqlUserName").val(); 81 | //alert("用户名为:" + userName) 82 | var password = $("#postgresqlPassword").val(); 83 | //alert("密码为:" + password) 84 | //输出上述的所有值,判断是是否正确的得到连接信息 85 | //alert("驱动名称为:"+driverName+"数据库类型为:"+dataBaseType+"ip地址为:"+ipAddress+"端口号为:"+portNumber+"连接名为"+connectionName+"用户名为"+userName+"密码为:"+password); 86 | $.ajax({ 87 | async: false, //设置ajax交互为同步方式,默认采用的是异步方式 88 | url: "/graphanalysis/dsm/db/connection?t=" + (new Date()).getTime(), //提交数据,测试是否能够成功的连接数据源,url路径采用绝对路径 89 | type:"POST", 90 | data: { 91 | //成功的连接数据源之后要能获取到数据源的信息 92 | "driverName": driverName, 93 | "dataBaseType": dataBaseType, 94 | "ipAddress": ipAddress, 95 | "portNumber": portNumber, 96 | "connectionName": connectionName, 97 | "dataBaseName": dataBaseName, 98 | "userName": userName, 99 | "password": password, 100 | }, 101 | success: function(data) { 102 | //alert("返回值为:"+data); //判断是否成功的接收到返回值,当成功的连接数据源接收到的数据为:"数据库连接成功" 103 | //连接数据源失败时,返回值为"数据库连接失败" 104 | if("数据库连接成功" == data){ 105 | swal("Good job!", "数据库连接成功", "success"); 106 | }else if("您指定的PostgreSQL数据库的用户名不存在,请重新输入数据库用户名" == data){ 107 | swal("Oops...", "您指定的PostgreSQL数据库的用户名不存在,请重新输入数据库用户名", "error"); 108 | }else if("在连接PostgreSQL数据库时没有指定相应的用户名,请您检查数据库并输入正确的用户名" == data){ 109 | swal("Oops...","在连接PostgreSQL数据库时没有指定相应的用户名,请您检查数据库并输入正确的用户名","error"); 110 | }else if ("您指定的数据库不存在,请重新输入" == data){ 111 | swal("Oops...","您指定的数据库不存在,请重新输入","error"); 112 | } else{ 113 | swal("Oops...","数据库连接失败","error"); 114 | }//if语句结束 115 | 116 | } 117 | }) 118 | } 119 | 120 | function modal_greenplum_test(){ 121 | //首先获取到表单元素的所有值 122 | var driverName = $("#greenplumDriverName option:selected").text(); //获取到select选中的值 123 | //alert("驱动为:" + driverName) 124 | var dataBaseType = $("#greenplumDataBaseType").val(); 125 | //alert("数据库类型为:" + dataBaseType) 126 | var ipAddress = $("#greenplumIpAddress").val(); 127 | //alert("ip地址为:" + ipAddress) 128 | var portNumber = $("#greenplumPortNumber").val(); 129 | //alert("端口号为:" + portNumber) 130 | var connectionName = $("#greenplumConnectionName").val(); 131 | //alert("连接名为:" + connectionName) 132 | var dataBaseName = $("#greenplumDataBaseName").val(); 133 | //alert("数据库名为:" + dataBaseName) 134 | var userName = $("#greenplumUserName").val(); 135 | //alert("用户名为:" + userName) 136 | var password = $("#greenplumPassword").val(); 137 | //alert("密码为:" + password) 138 | //输出上述的所有值,判断是是否正确的得到连接信息 139 | //alert("驱动名称为:"+driverName+"数据库类型为:"+dataBaseType+"ip地址为:"+ipAddress+"端口号为:"+portNumber+"连接名为"+connectionName+"用户名为"+userName+"密码为:"+password); 140 | $.ajax({ 141 | async: false, //设置ajax交互为同步方式,默认采用的是异步方式 142 | url: "/graphanalysis/dsm/db/connection?t=" + (new Date()).getTime(), //提交数据,测试是否能够成功的连接数据源,url路径采用绝对路径 143 | type:"POST", 144 | data: { 145 | //成功的连接数据源之后要能获取到数据源的信息 146 | "driverName": driverName, 147 | "dataBaseType": dataBaseType, 148 | "ipAddress": ipAddress, 149 | "portNumber": portNumber, 150 | "connectionName": connectionName, 151 | "dataBaseName": dataBaseName, 152 | "userName": userName, 153 | "password": password, 154 | }, 155 | success: function(data) { 156 | //alert("返回值为:"+data); //判断是否成功的接收到返回值,当成功的连接数据源接收到的数据为:"数据库连接成功" 157 | //连接数据源失败时,返回值为"数据库连接失败" 158 | if("数据库连接成功" == data){ 159 | swal("Good job!", "数据库连接成功", "success"); 160 | }else if("对于您指定的ip地址,在文件pg_hba.conf中没有对象的实体存在,SSL off" == data){ 161 | swal("Oops...", "对于您指定的ip地址,在文件pg_hba.conf中没有对象的实体存在,SSL off", "error"); 162 | }else if("在连接PostgreSQL数据库时没有指定相应的用户名,请您检查数据库并输入正确的用户名" == data){ 163 | swal("Oops...","在连接PostgreSQL数据库时没有指定相应的用户名,请您检查数据库并输入正确的用户名","error"); 164 | }else if ("您指定的数据库不存在,请重新输入" == data){ 165 | swal("Oops...","您指定的数据库不存在,请重新输入","error"); 166 | } else { 167 | swal("Oops...","数据库连接失败","error"); 168 | }//if语句结束 169 | 170 | } 171 | }) 172 | } 173 | 174 | /*function modal_oracle_test(){ 175 | //首先获取到表单元素的所有值 176 | var driverName = $("#oracleDriverName option:selected").text(); //获取到select选中的值 177 | //alert("驱动为:" + driverName) 178 | var dataBaseType = $("#oracleDataBaseType").val(); 179 | //alert("数据库类型为:" + dataBaseType) 180 | var ipAddress = $("#oracleIpAddress").val(); 181 | //alert("ip地址为:" + ipAddress) 182 | var portNumber = $("#oraclePortNumber").val(); 183 | //alert("端口号为:" + portNumber) 184 | var connectionName = $("#oracleConnectionName").val(); 185 | //alert("连接名为:" + connectionName) 186 | var dataBaseName = $("#oracleDataBaseName").val(); 187 | //alert("数据库名为:" + dataBaseName) 188 | var userName = $("#oracleUserName").val(); 189 | //alert("用户名为:" + userName) 190 | var password = $("#oraclePassword").val(); 191 | //alert("密码为:" + password) 192 | //输出上述的所有值,判断是是否正确的得到连接信息 193 | //alert("驱动名称为:"+driverName+"数据库类型为:"+dataBaseType+"ip地址为:"+ipAddress+"端口号为:"+portNumber+"连接名为"+connectionName+"用户名为"+userName+"密码为:"+password); 194 | $.ajax({ 195 | async: false, //设置ajax交互为同步方式,默认采用的是异步方式 196 | url: "/graphanalysis/dsm/db/connection?t=" + (new Date()).getTime(), //提交数据,测试是否能够成功的连接数据源,url路径采用绝对路径 197 | type:"POST", 198 | data: { 199 | //成功的连接数据源之后要能获取到数据源的信息 200 | "driverName": driverName, 201 | "dataBaseType": dataBaseType, 202 | "ipAddress": ipAddress, 203 | "portNumber": portNumber, 204 | "connectionName": connectionName, 205 | "dataBaseName": dataBaseName, 206 | "userName": userName, 207 | "password": password, 208 | }, 209 | success: function(data) { 210 | //alert("返回值为:"+data); //判断是否成功的接收到返回值,当成功的连接数据源接收到的数据为:"数据库连接成功" 211 | //连接数据源失败时,返回值为"数据库连接失败" 212 | if("数据库连接成功" == data){ 213 | swal("Good job!", "数据库连接成功", "success"); 214 | }else if("用户名和密码无效" == data){ 215 | swal("Oops...", "用户名和密码无效", "error"); 216 | }else if("与数据库通信时出错,不能连接到数据库服务器,请检查服务器是否正在运行以及您是否有权访问请求的数据库" == data){ 217 | swal("Oops...","与数据库通信时出错,不能连接到数据库服务器,请检查服务器是否正在运行以及您是否有权访问请求的数据库","error"); 218 | }else{ 219 | swal("Oops...","数据库连接失败","error"); 220 | } //if语句结束 221 | 222 | } 223 | }) 224 | }*/ 225 | function readonly_mysql(){ 226 | $("#mysqlDataBaseType").removeClass("invalid"); 227 | $("#mysqlDataBaseType").addClass("valid"); 228 | } 229 | 230 | function readonly_postgresql(){ 231 | $("#postgresqlDataBaseType").removeClass("invalid"); 232 | $("#postgresqlDataBaseType").addClass("valid"); 233 | } 234 | 235 | function readonly_greenplum(){ 236 | $("#greenplumDataBaseType").removeClass("invalid"); 237 | $("#greenplumDataBaseType").addClass("valid"); 238 | } 239 | 240 | /*function readonly_oracle(){ 241 | $("#greenplumDataBaseType").removeClass("invalid"); 242 | $("#greenplumDataBaseType").addClass("valid"); 243 | }*/ -------------------------------------------------------------------------------- /web/js/ms/login.js: -------------------------------------------------------------------------------- 1 | //提交数据到登录控制器 2 | function doSubmitLogin(){ 3 | document.getElementById("loginForm").submit(); 4 | } -------------------------------------------------------------------------------- /web/js/ms/sign.js: -------------------------------------------------------------------------------- 1 | //定义验证码上存在的事件,比如当验证码输入错误时,显示的文字提示 2 | var handlerEmbed = function(captchaObj) { 3 | $("#embed-submit").click(function(e) { 4 | var validate = captchaObj.getValidate(); 5 | if (!validate) { 6 | $("#notice")[0].className = "show"; 7 | setTimeout(function() { 8 | $("#notice")[0].className = "hide"; 9 | }, 2000); 10 | e.preventDefault(); 11 | } 12 | }); 13 | // 将验证码加到id为captcha的元素里,同时会有三个input的值:geetest_challenge, geetest_validate, geetest_seccode 14 | captchaObj.appendTo("#embed-captcha"); 15 | captchaObj.onReady(function() { 16 | $("#wait")[0].className = "hide"; 17 | }); 18 | }; 19 | 20 | //使用JQuery技术异步获取验证码 21 | $.ajax({ 22 | // 获取id,challenge,success(是否启用failback) 23 | url : "graphanalysis/imageCaptcha?t=" + (new Date()).getTime(), // 加随机数防止缓存,主要是为了解决IE浏览器的行为异常 24 | type : "get", 25 | dataType : "json", 26 | success : function(data) { 27 | // 使用initGeetest接口 28 | // 参数1:配置参数 29 | // 参数2:回调,回调的第一个参数验证码对象,之后可以使用它做appendTo之类的事件 30 | initGeetest({ 31 | gt : data.gt, 32 | challenge : data.challenge, 33 | product : "float", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效 34 | offline : !data.success 35 | // 表示用户后台检测极验服务器是否宕机,一般不需要关注 36 | // 更多配置参数请参见:http://www.geetest.com/install/sections/idx-client-sdk.html#config 37 | }, handlerEmbed); 38 | } 39 | }); 40 | 41 | //检查两次输入的密码是否一致 42 | function validatePasswordEqual(){ 43 | var pwd = $("#password").val(); 44 | var pwd_confirm = $("#password_confirm").val(); 45 | if(pwd != pwd_confirm){ //两次密码不相等,不提交表单 46 | $("#password").removeClass("valid"); 47 | $("#password_confirm").removeClass("valid"); 48 | $("#password").addClass("invalid"); 49 | $("#password_confirm").addClass("invalid"); 50 | Materialize.toast('两次输入的密码不一致,请重新输入', 4000,'rounded'); 51 | return false; 52 | }else if(pwd == pwd_confirm && pwd.length == 0){ 53 | $("#password").removeClass("valid"); 54 | $("#password_confirm").removeClass("valid"); 55 | $("#password").addClass("invalid"); 56 | $("#password_confirm").addClass("invalid"); 57 | Materialize.toast('密码不能为空', 4000,'rounded'); 58 | return false; 59 | }else{ 60 | $("#password").removeClass("invalid"); 61 | $("#password_confirm").removeClass("invalid"); 62 | $("#password").addClass("valid"); 63 | $("#password_confirm").addClass("valid"); 64 | return true; 65 | } 66 | } 67 | 68 | //用户名不能为空 69 | function userNameNULL(){ 70 | var userNameSize = $("#userName").val().length; 71 | if(userNameSize == 0){ 72 | //说明用户名为空 73 | $("#userName").removeClass("valid"); 74 | $("#userName").addClass("invalid"); 75 | return false; 76 | }else{ 77 | $("#userName").removeClass("invalid"); 78 | $("#userName").addClass("valid"); 79 | return true; 80 | } 81 | } 82 | 83 | //email不能为空 84 | function emailNULL(){ 85 | var emailSize = $("#email").val().length; 86 | if(emailSize == 0){ //说明email为空 87 | $("#email").removeClass("valid"); 88 | $("#email").addClass("invalid"); 89 | Materialize.toast('邮箱不能为空,请重新输入', 4000,'rounded'); 90 | return false; 91 | }else{ //否则说明email不为空 92 | $("#email").removeClass("invalid"); 93 | $("#email").addClass("valid"); 94 | return true; 95 | } 96 | } 97 | 98 | //检查用户名是否存在 99 | function checkUserNameExisted(){ 100 | //alert("检查用户名是否存在"); 101 | //获取用户名输入框中的数据 102 | var userName = $("#userName").val(); 103 | var flag_username ; 104 | //alert("接收到的用户名为:"+userName); 105 | if(userName.length == 0){ 106 | //alert("用户名为空") 107 | $("#userName").removeClass("valid"); 108 | $("#userName").addClass("invalid"); 109 | Materialize.toast('您输入的用户名为空,请重新输入', 4000,'rounded'); 110 | return false; 111 | }else{ 112 | //使用ajax异步提交技术检查用户名是否存在,因为在登录模块中允许用户使用用户名登录,所以用户名不能重复 113 | $.ajax({ 114 | async: false, 115 | url : "ms/sign/CheckUserNameExisted?t=" + (new Date()).getTime(), // 加随机数防止缓存,主要是为了解决IE浏览器的行为异常 116 | type : "POST", 117 | data: { 118 | "userName": userName, 119 | }, 120 | success : function(data) { 121 | if(data > 0){ //data参数指定的是从服务器端接收到的返回值 122 | //说明用户名已经存在 123 | $("#userName").removeClass("valid"); 124 | $("#userName").addClass("invalid"); 125 | Materialize.toast('用户名已经存在,请重新输入', 4000,'rounded'); 126 | flag_username = "用户名已经存在"; 127 | }else{ 128 | //否则说明用户名不存在 129 | $("#userName").removeClass("invalid"); 130 | $("#userName").addClass("valid"); 131 | flag_username = "用户名不存在" 132 | } 133 | } 134 | }) 135 | if(flag_username == "用户名已经存在"){ 136 | return false; 137 | }else{ 138 | return true; 139 | } 140 | } 141 | 142 | } 143 | 144 | //检查email是否在数据库中已经存在 145 | function checkEmailExisted(){ 146 | //alert("检查邮箱是否已经被注册"); 147 | //获取输入框中的email地址 148 | var email = $("#email").val(); 149 | var flag_email; 150 | if(email.length == 0){ 151 | //说明email为空,不满足要求 152 | $("#email").removeClass("valid"); 153 | $("#email").addClass("invalid"); 154 | Materialize.toast('邮箱不能为空,请重新输入', 4000,'rounded'); 155 | return false; 156 | }else{ 157 | $.ajax({ 158 | async: false, //设置ajax交互为同步方式,默认采用的是异步方式 159 | url : "ms/sign/CheckEmailExisted?t=" + (new Date()).getTime(), // 加随机数防止缓存,主要是为了解决IE浏览器的行为异常 160 | type : "POST", 161 | data: { 162 | "email": email, 163 | }, 164 | success : function(data) { 165 | if(data > 0){ 166 | //说明email已经存在 167 | $("#email").removeClass("valid"); 168 | $("#email").addClass("invalid"); 169 | Materialize.toast('邮箱已经存在,请重新输入', 4000,'rounded'); 170 | flag_email = "邮箱已经存在"; 171 | }else{ 172 | //否则说明email不存在 173 | $("#email").removeClass("invalid"); 174 | $("#email").addClass("valid"); 175 | flag_email = "邮箱不存在"; 176 | } 177 | } 178 | }) 179 | if(flag_email == "邮箱已经存在"){ 180 | return false; 181 | }else{ 182 | return true; 183 | } 184 | } 185 | } 186 | 187 | //提交表单时进行校验 188 | function doSubmit(){ 189 | var passwordValidate = validatePasswordEqual(); 190 | var userNameState = userNameNULL(); 191 | var checkUserNameState = checkUserNameExisted(); 192 | var checkEmailState = checkEmailExisted(); 193 | var emailState = emailNULL(); 194 | if (passwordValidate && userNameState && checkUserNameState && emailState && checkEmailState) { 195 | return true; 196 | }else{ 197 | return false; 198 | } 199 | } 200 | 201 | $(".backtop").click(function() { 202 | $("html,body").animate({ 203 | "scrollTop" : 0 204 | }, 4000); 205 | }) -------------------------------------------------------------------------------- /web/utils/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /web/utils/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /web/utils/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /web/utils/bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /web/utils/easyui/css/icon.css: -------------------------------------------------------------------------------- 1 | .icon-blank{ 2 | background:url('icons/blank.gif') no-repeat center center; 3 | } 4 | .icon-add{ 5 | background:url('icons/edit_add.png') no-repeat center center; 6 | } 7 | .icon-edit{ 8 | background:url('icons/pencil.png') no-repeat center center; 9 | } 10 | .icon-clear{ 11 | background:url('icons/clear.png') no-repeat center center; 12 | } 13 | .icon-remove{ 14 | background:url('icons/edit_remove.png') no-repeat center center; 15 | } 16 | .icon-save{ 17 | background:url('icons/filesave.png') no-repeat center center; 18 | } 19 | .icon-cut{ 20 | background:url('icons/cut.png') no-repeat center center; 21 | } 22 | .icon-ok{ 23 | background:url('icons/ok.png') no-repeat center center; 24 | } 25 | .icon-no{ 26 | background:url('icons/no.png') no-repeat center center; 27 | } 28 | .icon-cancel{ 29 | background:url('icons/cancel.png') no-repeat center center; 30 | } 31 | .icon-reload{ 32 | background:url('icons/reload.png') no-repeat center center; 33 | } 34 | .icon-search{ 35 | background:url('icons/search.png') no-repeat center center; 36 | } 37 | .icon-print{ 38 | background:url('icons/print.png') no-repeat center center; 39 | } 40 | .icon-help{ 41 | background:url('icons/help.png') no-repeat center center; 42 | } 43 | .icon-undo{ 44 | background:url('icons/undo.png') no-repeat center center; 45 | } 46 | .icon-redo{ 47 | background:url('icons/redo.png') no-repeat center center; 48 | } 49 | .icon-back{ 50 | background:url('icons/back.png') no-repeat center center; 51 | } 52 | .icon-sum{ 53 | background:url('icons/sum.png') no-repeat center center; 54 | } 55 | .icon-tip{ 56 | background:url('icons/tip.png') no-repeat center center; 57 | } 58 | .icon-filter{ 59 | background:url('icons/filter.png') no-repeat center center; 60 | } 61 | .icon-man{ 62 | background:url('icons/man.png') no-repeat center center; 63 | } 64 | .icon-lock{ 65 | background:url('icons/lock.png') no-repeat center center; 66 | } 67 | .icon-more{ 68 | background:url('icons/more.png') no-repeat center center; 69 | } 70 | 71 | 72 | .icon-mini-add{ 73 | background:url('icons/mini_add.png') no-repeat center center; 74 | } 75 | .icon-mini-edit{ 76 | background:url('icons/mini_edit.png') no-repeat center center; 77 | } 78 | .icon-mini-refresh{ 79 | background:url('icons/mini_refresh.png') no-repeat center center; 80 | } 81 | 82 | .icon-large-picture{ 83 | background:url('icons/large_picture.png') no-repeat center center; 84 | } 85 | .icon-large-clipart{ 86 | background:url('icons/large_clipart.png') no-repeat center center; 87 | } 88 | .icon-large-shapes{ 89 | background:url('icons/large_shapes.png') no-repeat center center; 90 | } 91 | .icon-large-smartart{ 92 | background:url('icons/large_smartart.png') no-repeat center center; 93 | } 94 | .icon-large-chart{ 95 | background:url('icons/large_chart.png') no-repeat center center; 96 | } 97 | -------------------------------------------------------------------------------- /web/utils/easyui/js/easyui-lang-zh_CN.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = '第'; 3 | $.fn.pagination.defaults.afterPageText = '共{pages}页'; 4 | $.fn.pagination.defaults.displayMsg = '显示{from}到{to},共{total}记录'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = '正在处理,请稍待。。。'; 8 | } 9 | if ($.fn.treegrid && $.fn.datagrid){ 10 | $.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg; 11 | } 12 | if ($.messager){ 13 | $.messager.defaults.ok = '确定'; 14 | $.messager.defaults.cancel = '取消'; 15 | } 16 | $.map(['validatebox','textbox','passwordbox','filebox','searchbox', 17 | 'combo','combobox','combogrid','combotree', 18 | 'datebox','datetimebox','numberbox', 19 | 'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){ 20 | if ($.fn[plugin]){ 21 | $.fn[plugin].defaults.missingMessage = '该输入项为必输项'; 22 | } 23 | }); 24 | if ($.fn.validatebox){ 25 | $.fn.validatebox.defaults.rules.email.message = '请输入有效的电子邮件地址'; 26 | $.fn.validatebox.defaults.rules.url.message = '请输入有效的URL地址'; 27 | $.fn.validatebox.defaults.rules.length.message = '输入内容长度必须介于{0}和{1}之间'; 28 | $.fn.validatebox.defaults.rules.remote.message = '请修正该字段'; 29 | } 30 | if ($.fn.calendar){ 31 | $.fn.calendar.defaults.weeks = ['日','一','二','三','四','五','六']; 32 | $.fn.calendar.defaults.months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']; 33 | } 34 | if ($.fn.datebox){ 35 | $.fn.datebox.defaults.currentText = '今天'; 36 | $.fn.datebox.defaults.closeText = '关闭'; 37 | $.fn.datebox.defaults.okText = '确定'; 38 | $.fn.datebox.defaults.formatter = function(date){ 39 | var y = date.getFullYear(); 40 | var m = date.getMonth()+1; 41 | var d = date.getDate(); 42 | return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d); 43 | }; 44 | $.fn.datebox.defaults.parser = function(s){ 45 | if (!s) return new Date(); 46 | var ss = s.split('-'); 47 | var y = parseInt(ss[0],10); 48 | var m = parseInt(ss[1],10); 49 | var d = parseInt(ss[2],10); 50 | if (!isNaN(y) && !isNaN(m) && !isNaN(d)){ 51 | return new Date(y,m-1,d); 52 | } else { 53 | return new Date(); 54 | } 55 | }; 56 | } 57 | if ($.fn.datetimebox && $.fn.datebox){ 58 | $.extend($.fn.datetimebox.defaults,{ 59 | currentText: $.fn.datebox.defaults.currentText, 60 | closeText: $.fn.datebox.defaults.closeText, 61 | okText: $.fn.datebox.defaults.okText 62 | }); 63 | } 64 | if ($.fn.datetimespinner){ 65 | $.fn.datetimespinner.defaults.selections = [[0,4],[5,7],[8,10],[11,13],[14,16],[17,19]] 66 | } 67 | -------------------------------------------------------------------------------- /web/utils/font-awesome/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/font-awesome/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /web/utils/jRange/css/jquery.range.css: -------------------------------------------------------------------------------- 1 | .slider-container { 2 | width: 300px; 3 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 4 | } 5 | .slider-container .back-bar { 6 | height: 10px; 7 | position: relative; 8 | } 9 | .slider-container .back-bar .selected-bar { 10 | position: absolute; 11 | height: 100%; 12 | } 13 | .slider-container .back-bar .pointer { 14 | position: absolute; 15 | width: 10px; 16 | height: 10px; 17 | background-color: red; 18 | cursor: col-resize; 19 | opacity: 1; 20 | z-index: 2; 21 | } 22 | .slider-container .back-bar .pointer.last-active { 23 | z-index: 3; 24 | } 25 | .slider-container .back-bar .pointer-label { 26 | position: absolute; 27 | top: -17px; 28 | font-size: 8px; 29 | background: white; 30 | white-space: nowrap; 31 | line-height: 1; 32 | } 33 | .slider-container .back-bar .focused { 34 | z-index: 10; 35 | } 36 | .slider-container .clickable-dummy { 37 | cursor: pointer; 38 | position: absolute; 39 | width: 100%; 40 | height: 100%; 41 | z-index: 1; 42 | } 43 | .slider-container .scale { 44 | top: 2px; 45 | position: relative; 46 | } 47 | .slider-container .scale span { 48 | position: absolute; 49 | height: 5px; 50 | border-left: 1px solid #999; 51 | font-size: 0; 52 | } 53 | .slider-container .scale ins { 54 | font-size: 9px; 55 | text-decoration: none; 56 | position: absolute; 57 | left: 0; 58 | top: 5px; 59 | color: #999; 60 | line-height: 1; 61 | } 62 | .slider-container.slider-readonly .clickable-dummy, 63 | .slider-container.slider-readonly .pointer { 64 | cursor: auto; 65 | } 66 | .theme-green .back-bar { 67 | height: 5px; 68 | border-radius: 2px; 69 | background-color: #eeeeee; 70 | background-color: #e7e7e7; 71 | background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); 72 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd)); 73 | background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); 74 | background-image: -o-linear-gradient(top, #eeeeee, #dddddd); 75 | background-image: linear-gradient(to bottom, #eeeeee, #dddddd); 76 | background-repeat: repeat-x; 77 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0); 78 | } 79 | .theme-green .back-bar .selected-bar { 80 | border-radius: 2px; 81 | background-color: #a1fad0; 82 | background-image: -moz-linear-gradient(top, #bdfade, #76fabc); 83 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bdfade), to(#76fabc)); 84 | background-image: -webkit-linear-gradient(top, #bdfade, #76fabc); 85 | background-image: -o-linear-gradient(top, #bdfade, #76fabc); 86 | background-image: linear-gradient(to bottom, #bdfade, #76fabc); 87 | background-repeat: repeat-x; 88 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbdfade', endColorstr='#ff76fabc', GradientType=0); 89 | } 90 | .theme-green .back-bar .pointer { 91 | width: 14px; 92 | height: 14px; 93 | top: -5px; 94 | -webkit-box-sizing: border-box; 95 | -moz-box-sizing: border-box; 96 | box-sizing: border-box; 97 | border-radius: 10px; 98 | border: 1px solid #AAA; 99 | background-color: #e7e7e7; 100 | background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); 101 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd)); 102 | background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); 103 | background-image: -o-linear-gradient(top, #eeeeee, #dddddd); 104 | background-image: linear-gradient(to bottom, #eeeeee, #dddddd); 105 | background-repeat: repeat-x; 106 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0); 107 | } 108 | .theme-green .back-bar .pointer-label { 109 | color: #999; 110 | } 111 | .theme-green .back-bar .focused { 112 | color: #333; 113 | } 114 | .theme-green .scale span { 115 | border-left: 1px solid #e5e5e5; 116 | } 117 | .theme-green .scale ins { 118 | color: #999; 119 | } 120 | .theme-blue .back-bar { 121 | height: 5px; 122 | border-radius: 2px; 123 | background-color: #eeeeee; 124 | background-color: #e7e7e7; 125 | background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); 126 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd)); 127 | background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); 128 | background-image: -o-linear-gradient(top, #eeeeee, #dddddd); 129 | background-image: linear-gradient(to bottom, #eeeeee, #dddddd); 130 | background-repeat: repeat-x; 131 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0); 132 | } 133 | .theme-blue .back-bar .selected-bar { 134 | border-radius: 2px; 135 | background-color: #92c1f9; 136 | background-image: -moz-linear-gradient(top, #b1d1f9, #64a8f9); 137 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b1d1f9), to(#64a8f9)); 138 | background-image: -webkit-linear-gradient(top, #b1d1f9, #64a8f9); 139 | background-image: -o-linear-gradient(top, #b1d1f9, #64a8f9); 140 | background-image: linear-gradient(to bottom, #b1d1f9, #64a8f9); 141 | background-repeat: repeat-x; 142 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb1d1f9', endColorstr='#ff64a8f9', GradientType=0); 143 | } 144 | .theme-blue .back-bar .pointer { 145 | width: 14px; 146 | height: 14px; 147 | top: -5px; 148 | -webkit-box-sizing: border-box; 149 | -moz-box-sizing: border-box; 150 | box-sizing: border-box; 151 | border-radius: 10px; 152 | border: 1px solid #AAA; 153 | background-color: #e7e7e7; 154 | background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); 155 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd)); 156 | background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); 157 | background-image: -o-linear-gradient(top, #eeeeee, #dddddd); 158 | background-image: linear-gradient(to bottom, #eeeeee, #dddddd); 159 | background-repeat: repeat-x; 160 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0); 161 | } 162 | .theme-blue .back-bar .pointer-label { 163 | color: #999; 164 | } 165 | .theme-blue .back-bar .focused { 166 | color: #333; 167 | } 168 | .theme-blue .scale span { 169 | border-left: 1px solid #e5e5e5; 170 | } 171 | .theme-blue .scale ins { 172 | color: #999; 173 | } 174 | -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Bold.eot -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Bold.woff -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Light.eot -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Light.woff -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Light.woff2 -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Medium.eot -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Medium.woff -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Medium.woff2 -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Regular.eot -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Regular.woff -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Regular.woff2 -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Thin.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Thin.eot -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Thin.woff -------------------------------------------------------------------------------- /web/utils/materialize/fonts/roboto/Roboto-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingsaction/GraphAnalysis/59ffe2d41618190bf336e100619a03a661a2c638/web/utils/materialize/fonts/roboto/Roboto-Thin.woff2 -------------------------------------------------------------------------------- /web/utils/normalize/css/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /** 4 | * 1. Change the default font family in all browsers (opinionated). 5 | * 2. Correct the line height in all browsers. 6 | * 3. Prevent adjustments of font size after orientation changes in 7 | * IE on Windows Phone and in iOS. 8 | */ 9 | 10 | /* Document 11 | ========================================================================== */ 12 | 13 | html { 14 | font-family: sans-serif; /* 1 */ 15 | line-height: 1.15; /* 2 */ 16 | -ms-text-size-adjust: 100%; /* 3 */ 17 | -webkit-text-size-adjust: 100%; /* 3 */ 18 | } 19 | 20 | /* Sections 21 | ========================================================================== */ 22 | 23 | /** 24 | * Remove the margin in all browsers (opinionated). 25 | */ 26 | 27 | body { 28 | margin: 0; 29 | } 30 | 31 | /** 32 | * Add the correct display in IE 9-. 33 | */ 34 | 35 | article, 36 | aside, 37 | footer, 38 | header, 39 | nav, 40 | section { 41 | display: block; 42 | } 43 | 44 | /** 45 | * Correct the font size and margin on `h1` elements within `section` and 46 | * `article` contexts in Chrome, Firefox, and Safari. 47 | */ 48 | 49 | h1 { 50 | font-size: 2em; 51 | margin: 0.67em 0; 52 | } 53 | 54 | /* Grouping content 55 | ========================================================================== */ 56 | 57 | /** 58 | * Add the correct display in IE 9-. 59 | * 1. Add the correct display in IE. 60 | */ 61 | 62 | figcaption, 63 | figure, 64 | main { /* 1 */ 65 | display: block; 66 | } 67 | 68 | /** 69 | * Add the correct margin in IE 8. 70 | */ 71 | 72 | figure { 73 | margin: 1em 40px; 74 | } 75 | 76 | /** 77 | * 1. Add the correct box sizing in Firefox. 78 | * 2. Show the overflow in Edge and IE. 79 | */ 80 | 81 | hr { 82 | box-sizing: content-box; /* 1 */ 83 | height: 0; /* 1 */ 84 | overflow: visible; /* 2 */ 85 | } 86 | 87 | /** 88 | * 1. Correct the inheritance and scaling of font size in all browsers. 89 | * 2. Correct the odd `em` font sizing in all browsers. 90 | */ 91 | 92 | pre { 93 | font-family: monospace, monospace; /* 1 */ 94 | font-size: 1em; /* 2 */ 95 | } 96 | 97 | /* Text-level semantics 98 | ========================================================================== */ 99 | 100 | /** 101 | * 1. Remove the gray background on active links in IE 10. 102 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 103 | */ 104 | 105 | a { 106 | background-color: transparent; /* 1 */ 107 | -webkit-text-decoration-skip: objects; /* 2 */ 108 | } 109 | 110 | /** 111 | * Remove the outline on focused links when they are also active or hovered 112 | * in all browsers (opinionated). 113 | */ 114 | 115 | a:active, 116 | a:hover { 117 | outline-width: 0; 118 | } 119 | 120 | /** 121 | * 1. Remove the bottom border in Firefox 39-. 122 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 123 | */ 124 | 125 | abbr[title] { 126 | border-bottom: none; /* 1 */ 127 | text-decoration: underline; /* 2 */ 128 | text-decoration: underline dotted; /* 2 */ 129 | } 130 | 131 | /** 132 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: inherit; 138 | } 139 | 140 | /** 141 | * Add the correct font weight in Chrome, Edge, and Safari. 142 | */ 143 | 144 | b, 145 | strong { 146 | font-weight: bolder; 147 | } 148 | 149 | /** 150 | * 1. Correct the inheritance and scaling of font size in all browsers. 151 | * 2. Correct the odd `em` font sizing in all browsers. 152 | */ 153 | 154 | code, 155 | kbd, 156 | samp { 157 | font-family: monospace, monospace; /* 1 */ 158 | font-size: 1em; /* 2 */ 159 | } 160 | 161 | /** 162 | * Add the correct font style in Android 4.3-. 163 | */ 164 | 165 | dfn { 166 | font-style: italic; 167 | } 168 | 169 | /** 170 | * Add the correct background and color in IE 9-. 171 | */ 172 | 173 | mark { 174 | background-color: #ff0; 175 | color: #000; 176 | } 177 | 178 | /** 179 | * Add the correct font size in all browsers. 180 | */ 181 | 182 | small { 183 | font-size: 80%; 184 | } 185 | 186 | /** 187 | * Prevent `sub` and `sup` elements from affecting the line height in 188 | * all browsers. 189 | */ 190 | 191 | sub, 192 | sup { 193 | font-size: 75%; 194 | line-height: 0; 195 | position: relative; 196 | vertical-align: baseline; 197 | } 198 | 199 | sub { 200 | bottom: -0.25em; 201 | } 202 | 203 | sup { 204 | top: -0.5em; 205 | } 206 | 207 | /* Embedded content 208 | ========================================================================== */ 209 | 210 | /** 211 | * Add the correct display in IE 9-. 212 | */ 213 | 214 | audio, 215 | video { 216 | display: inline-block; 217 | } 218 | 219 | /** 220 | * Add the correct display in iOS 4-7. 221 | */ 222 | 223 | audio:not([controls]) { 224 | display: none; 225 | height: 0; 226 | } 227 | 228 | /** 229 | * Remove the border on images inside links in IE 10-. 230 | */ 231 | 232 | img { 233 | border-style: none; 234 | } 235 | 236 | /** 237 | * Hide the overflow in IE. 238 | */ 239 | 240 | svg:not(:root) { 241 | overflow: hidden; 242 | } 243 | 244 | /* Forms 245 | ========================================================================== */ 246 | 247 | /** 248 | * 1. Change the font styles in all browsers (opinionated). 249 | * 2. Remove the margin in Firefox and Safari. 250 | */ 251 | 252 | button, 253 | input, 254 | optgroup, 255 | select, 256 | textarea { 257 | font-family: sans-serif; /* 1 */ 258 | font-size: 100%; /* 1 */ 259 | line-height: 1.15; /* 1 */ 260 | margin: 0; /* 2 */ 261 | } 262 | 263 | /** 264 | * Show the overflow in IE. 265 | * 1. Show the overflow in Edge. 266 | */ 267 | 268 | button, 269 | input { /* 1 */ 270 | overflow: visible; 271 | } 272 | 273 | /** 274 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 275 | * 1. Remove the inheritance of text transform in Firefox. 276 | */ 277 | 278 | button, 279 | select { /* 1 */ 280 | text-transform: none; 281 | } 282 | 283 | /** 284 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 285 | * controls in Android 4. 286 | * 2. Correct the inability to style clickable types in iOS and Safari. 287 | */ 288 | 289 | button, 290 | html [type="button"], /* 1 */ 291 | [type="reset"], 292 | [type="submit"] { 293 | -webkit-appearance: button; /* 2 */ 294 | } 295 | 296 | /** 297 | * Remove the inner border and padding in Firefox. 298 | */ 299 | 300 | button::-moz-focus-inner, 301 | [type="button"]::-moz-focus-inner, 302 | [type="reset"]::-moz-focus-inner, 303 | [type="submit"]::-moz-focus-inner { 304 | border-style: none; 305 | padding: 0; 306 | } 307 | 308 | /** 309 | * Restore the focus styles unset by the previous rule. 310 | */ 311 | 312 | button:-moz-focusring, 313 | [type="button"]:-moz-focusring, 314 | [type="reset"]:-moz-focusring, 315 | [type="submit"]:-moz-focusring { 316 | outline: 1px dotted ButtonText; 317 | } 318 | 319 | /** 320 | * Change the border, margin, and padding in all browsers (opinionated). 321 | */ 322 | 323 | fieldset { 324 | border: 1px solid #c0c0c0; 325 | margin: 0 2px; 326 | padding: 0.35em 0.625em 0.75em; 327 | } 328 | 329 | /** 330 | * 1. Correct the text wrapping in Edge and IE. 331 | * 2. Correct the color inheritance from `fieldset` elements in IE. 332 | * 3. Remove the padding so developers are not caught out when they zero out 333 | * `fieldset` elements in all browsers. 334 | */ 335 | 336 | legend { 337 | box-sizing: border-box; /* 1 */ 338 | color: inherit; /* 2 */ 339 | display: table; /* 1 */ 340 | max-width: 100%; /* 1 */ 341 | padding: 0; /* 3 */ 342 | white-space: normal; /* 1 */ 343 | } 344 | 345 | /** 346 | * 1. Add the correct display in IE 9-. 347 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 348 | */ 349 | 350 | progress { 351 | display: inline-block; /* 1 */ 352 | vertical-align: baseline; /* 2 */ 353 | } 354 | 355 | /** 356 | * Remove the default vertical scrollbar in IE. 357 | */ 358 | 359 | textarea { 360 | overflow: auto; 361 | } 362 | 363 | /** 364 | * 1. Add the correct box sizing in IE 10-. 365 | * 2. Remove the padding in IE 10-. 366 | */ 367 | 368 | [type="checkbox"], 369 | [type="radio"] { 370 | box-sizing: border-box; /* 1 */ 371 | padding: 0; /* 2 */ 372 | } 373 | 374 | /** 375 | * Correct the cursor style of increment and decrement buttons in Chrome. 376 | */ 377 | 378 | [type="number"]::-webkit-inner-spin-button, 379 | [type="number"]::-webkit-outer-spin-button { 380 | height: auto; 381 | } 382 | 383 | /** 384 | * 1. Correct the odd appearance in Chrome and Safari. 385 | * 2. Correct the outline style in Safari. 386 | */ 387 | 388 | [type="search"] { 389 | -webkit-appearance: textfield; /* 1 */ 390 | outline-offset: -2px; /* 2 */ 391 | } 392 | 393 | /** 394 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 395 | */ 396 | 397 | [type="search"]::-webkit-search-cancel-button, 398 | [type="search"]::-webkit-search-decoration { 399 | -webkit-appearance: none; 400 | } 401 | 402 | /** 403 | * 1. Correct the inability to style clickable types in iOS and Safari. 404 | * 2. Change font properties to `inherit` in Safari. 405 | */ 406 | 407 | ::-webkit-file-upload-button { 408 | -webkit-appearance: button; /* 1 */ 409 | font: inherit; /* 2 */ 410 | } 411 | 412 | /* Interactive 413 | ========================================================================== */ 414 | 415 | /* 416 | * Add the correct display in IE 9-. 417 | * 1. Add the correct display in Edge, IE, and Firefox. 418 | */ 419 | 420 | details, /* 1 */ 421 | menu { 422 | display: block; 423 | } 424 | 425 | /* 426 | * Add the correct display in all browsers. 427 | */ 428 | 429 | summary { 430 | display: list-item; 431 | } 432 | 433 | /* Scripting 434 | ========================================================================== */ 435 | 436 | /** 437 | * Add the correct display in IE 9-. 438 | */ 439 | 440 | canvas { 441 | display: inline-block; 442 | } 443 | 444 | /** 445 | * Add the correct display in IE. 446 | */ 447 | 448 | template { 449 | display: none; 450 | } 451 | 452 | /* Hidden 453 | ========================================================================== */ 454 | 455 | /** 456 | * Add the correct display in IE 10-. 457 | */ 458 | 459 | [hidden] { 460 | display: none; 461 | } --------------------------------------------------------------------------------