Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.3.0 #31

Merged
merged 61 commits into from
Nov 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9ebc001
Changed version to 1.3.0.
kvb2univpitt Oct 3, 2016
f723358
Updated web libraries.
kvb2univpitt Oct 3, 2016
9f866dd
Refactoring login and user registration via Shiro.
kvb2univpitt Oct 4, 2016
cb8e369
Updated user registration and login.
kvb2univpitt Oct 5, 2016
4dfdb6b
Uncommented code.
kvb2univpitt Oct 5, 2016
75f1fad
Fixed login bugs.
kvb2univpitt Oct 5, 2016
f92d6cf
Refactoring user profile.
kvb2univpitt Oct 5, 2016
9ecffd3
Refactoring user feedback.
kvb2univpitt Oct 5, 2016
fc551ba
Refactoring password reset.
kvb2univpitt Oct 6, 2016
709940f
Fixed collapsing panels.
kvb2univpitt Oct 6, 2016
6dff86b
Added Auth0 authentication.
kvb2univpitt Oct 6, 2016
6c90269
Set default values for algorithms.
kvb2univpitt Oct 6, 2016
74de46a
Updated algorithm parameter values.
kvb2univpitt Oct 7, 2016
4721dd4
Fixed term page and password reset page.
kvb2univpitt Oct 7, 2016
1262307
Added missing category.
kvb2univpitt Oct 7, 2016
8df940d
Updated Auth0 to version 1.1.1.
kvb2univpitt Oct 21, 2016
fa392b1
Set the multipart max request size to max.
kvb2univpitt Oct 21, 2016
f59b1ba
Fixed Google Font CDN to use https.
kvb2univpitt Oct 21, 2016
eb1a1ac
Added logging.file configuration.
kvb2univpitt Oct 21, 2016
cc29fe5
ports all annotations files from v1.2.0-annotations
marksilvis Oct 25, 2016
00d7376
Merge pull request #26 from bd2kccd/v1.3.0-annotations
marksilvis Oct 25, 2016
3afb5b8
Refactoring algorithms.
kvb2univpitt Oct 26, 2016
3f086d4
Updated algorithm html views.
kvb2univpitt Oct 27, 2016
a59ef7b
Minor update to html views.
kvb2univpitt Oct 27, 2016
83b94ab
Merge pull request #27 from bd2kccd/v1.3.0-casual-cmd
kvb2univpitt Oct 27, 2016
0645106
Excluded ccd-db submodule from ccd-job-queue module.
kvb2univpitt Oct 28, 2016
0e26b4d
Ignore files that do not have extension '.txt' in result view.
kvb2univpitt Oct 28, 2016
e65c96f
fixes annotations support
marksilvis Oct 28, 2016
f4bffc3
Merge pull request #28 from bd2kccd/v1.3.0-annotations
marksilvis Oct 28, 2016
d34ae74
requests annotations tokens on login
marksilvis Nov 1, 2016
6ddce62
updates url of annotations
marksilvis Nov 1, 2016
fd42aff
updates annotations login
marksilvis Nov 1, 2016
47e8230
Merge pull request #29 from bd2kccd/v1.3.0-anno-login
marksilvis Nov 1, 2016
e97aae2
updates login
marksilvis Nov 2, 2016
0e5f7dc
updates annotations url
marksilvis Nov 2, 2016
a7a6b74
Refactored activation to use activationKey column from database.
kvb2univpitt Nov 3, 2016
37ccbc3
Can now set the Annotations service URL, clientId, and clientSecret i…
marksilvis Nov 3, 2016
d6dce2f
fixes date parsing error in safari
marksilvis Nov 3, 2016
5bafe19
server fetches annotations on account creation
marksilvis Nov 4, 2016
b2fa38d
server fetches annotations tokens on account creation
marksilvis Nov 4, 2016
2aacade
Merge branch 'v1.3.0' of https://github.com/bd2kccd/causal-web into v…
marksilvis Nov 4, 2016
04fd03d
updates annotations service properties
marksilvis Nov 4, 2016
c8e2845
includes references to annotations properties
marksilvis Nov 4, 2016
35fd9c3
working on token refresh
marksilvis Nov 4, 2016
4ce9b79
working on improving refresh token request
marksilvis Nov 4, 2016
4c4ab0a
Added additional properties.
kvb2univpitt Nov 7, 2016
c984f3e
Refreshing data files now creates annotation targets
marksilvis Nov 7, 2016
b90c068
fixes call to lazily loaded resource
marksilvis Nov 7, 2016
21c6b93
Fixed the missing annotation target issue.
kvb2univpitt Nov 7, 2016
ff4cb25
includes json dependency in gradle build file
marksilvis Nov 8, 2016
c10ea4a
updates annotation media margin
marksilvis Nov 8, 2016
eceecf4
updates annotations media css
marksilvis Nov 8, 2016
a428606
last css fix
marksilvis Nov 8, 2016
fc6392d
Show password reset only if it's not using auth0.
kvb2univpitt Nov 8, 2016
b5607e2
Encode URI with dataset name.
kvb2univpitt Nov 9, 2016
ed65f5d
Fixed filename that has HTML character code.
kvb2univpitt Nov 10, 2016
478938d
Removed Gradle.
kvb2univpitt Nov 10, 2016
e244279
Use hsqldb as a default db to prevent test errors during compilation.
kvb2univpitt Nov 10, 2016
9ca8fb1
Clean up properties file.
kvb2univpitt Nov 10, 2016
f563141
Reorganized Javascript imports.
kvb2univpitt Nov 11, 2016
725fe03
Updated the README file.
kvb2univpitt Nov 14, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# causal-web
Causal web is a Java web-based application that allows users to run causal modeling algorithms on their dataset. The Center for Causal Discovery is hosting this application at the Pittsburgh Supercomputing Center and you can access it at https://ccd2.vm.bridges.psc.edu/ccd

Documentation for using the web application can be found at [http://www.ccd.pitt.edu/wiki/index.php?title=Causal_Web_Application_Quick_Start_and_User_Guide](http://www.ccd.pitt.edu/wiki/index.php?title=Causal_Web_Application_Quick_Start_and_User_Guide)
Documentation for using the web application can be found at [https://bd2kccd.github.io/docs/causal-web/](https://bd2kccd.github.io/docs/causal-web/)

If you want to host the application with your own hardware, follow the instructions below for configuring, building and installing the application.

Expand All @@ -17,18 +17,17 @@ If you want to host the application with your own hardware, follow the instructi
#### Dependencies
Download and uncompress the source code for each of following dependencies:

* [ccd-job-queue-0.1.4](https://github.com/bd2kccd/ccd-job-queue/releases/tag/v0.1.4)
* [ccd-mail-0.2.0](https://github.com/bd2kccd/ccd-mail/releases/tag/v0.2.0)
* [ccd-db-0.6.1](https://github.com/bd2kccd/ccd-db/releases/tag/v0.6.1)
* [ccd-job-queue-0.1.5](https://github.com/bd2kccd/ccd-job-queue/releases/tag/v0.1.5)
* [ccd-mail-0.2.1](https://github.com/bd2kccd/ccd-mail/releases/tag/v0.2.1)
* [ccd-db-0.6.2](https://github.com/bd2kccd/ccd-db/releases/tag/v0.6.2)
* [ccd-commons-0.3.1](https://github.com/bd2kccd/ccd-commons/releases/tag/v0.3.1)

To install the dependencies, go to the top directory of each project and do a maven install by typing **mvn install**.

#### Application
Download and uncompress the application source code [causal-web-1.2.2](https://github.com/bd2kccd/causal-web/releases/tag/v1.2.2). To compile and build the application, go to the directory **causal-web-1.2.2** and type **mvn package**.
Download and uncompress the application source code [causal-web-1.3.0](https://github.com/bd2kccd/causal-web/releases/tag/v1.3.0). To compile and build the application, go to the directory **causal-web-1.3.0** and type **mvn package**.

#### External Dependencies
* [causal-cmd-5.3.0.jar](https://github.com/cmu-phil/tetrad/releases/tag/v5.3.0-20160624)
* [causal-cmd-6.0.0.jar](https://github.com/cmu-phil/tetrad/releases/tag/6.0.0-20161031)

## Configure the software

Expand All @@ -39,7 +38,7 @@ Inside the workspace directory, create another folder called **lib**, for exampl
Copy the **causal-cmd-5.3.0.jar** to the **workspace/lib** folder.

### Configure
There are 4 configuration files to configure located in causal-web-1.2.2/src/main/resources folder:
There are 4 configuration files to configure located in causal-web-1.3.0/src/main/resources folder:
1. **application-hsqldb.properties**: HSQLDB database configurations (for testing only).
2. **application-mysql.properties**: MySQL database configurations
3. **application.properties**: Spring Boot configurations
Expand All @@ -59,11 +58,6 @@ Set the following properties in the **application.properties** file:
spring.mail.username=<gmail username>
spring.mail.password=<gmail username>
```
Set the following properties in the **ccd.properties** file:
```java
// add gmail account
ccd.mail.feedback.to=<gmail username>
```

#### Testing Configuration
Set the following properties in the **application.properties** file:
Expand All @@ -80,18 +74,18 @@ spring.profiles.active=scheduler,mysql
Make sure you set **ccd.server.workspace=/home/tuser/workspace** and **ccd.folder.lib=lib** in the **ccd.properties** file.

## Compile the Program
Go to the **ccd-web** directory and run the command **mvn clean package**. This will create a jar file called **causal-web-1.2.2.jar** in the **/target** folder.
Go to the **causal-web** directory and run the command **mvn clean package**. This will create a jar file called **causal-web-1.3.0.jar** in the **/target** folder.

### Launch the Program
```java
java -jar causal-web-1.2.2.jar
java -jar causal-web-1.3.0.jar
```
To give the program 4GB of memory to run on, type the follow, using the jvm options:
```java
java -Xmx4G -jar causal-web-1.2.2.jar
java -Xmx4G -jar causal-web-1.3.0.jar
```

To launch app in the browser
```
http://localhost:[port]/ccd // default port is 8080, otherwise change to specified port
```
```
30 changes: 23 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>edu.pitt.dbmi</groupId>
<artifactId>causal-web</artifactId>
<version>1.2.2</version>
<version>1.3.0</version>
<packaging>jar</packaging>

<name>causal-web</name>
Expand All @@ -14,14 +14,14 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.5.RELEASE</version>
<version>1.4.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<shiro.version>1.2.4</shiro.version>
<shiro.version>1.3.2</shiro.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
Expand Down Expand Up @@ -53,7 +53,7 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -77,26 +77,42 @@
<version>${shiro.version}</version>
</dependency>

<dependency>
<groupId>com.auth0</groupId>
<artifactId>auth0-spring-mvc</artifactId>
<version>1.1.1</version>
</dependency>

<dependency>
<groupId>edu.pitt.dbmi</groupId>
<artifactId>ccd-job-queue</artifactId>
<version>0.1.4</version>
<version>0.1.5</version>
<exclusions>
<exclusion>
<groupId>edu.pitt.dbmi</groupId>
<artifactId>ccd-db</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>edu.pitt.dbmi</groupId>
<artifactId>ccd-mail</artifactId>
<version>0.2.0</version>
<version>0.2.1</version>
</dependency>
<dependency>
<groupId>edu.pitt.dbmi</groupId>
<artifactId>ccd-db</artifactId>
<version>0.6.1</version>
<version>0.6.2</version>
</dependency>
<dependency>
<groupId>edu.pitt.dbmi</groupId>
<artifactId>ccd-commons</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/edu/pitt/dbmi/ccd/web/CcdWebApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@
*/
package edu.pitt.dbmi.ccd.web;

import edu.pitt.dbmi.ccd.db.CCDDatabaseApplication;
import edu.pitt.dbmi.ccd.mail.CCDMailApplication;
import edu.pitt.dbmi.ccd.queue.CCDJobQueueApplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.EnableAsync;

import edu.pitt.dbmi.ccd.db.CCDDatabaseApplication;
import edu.pitt.dbmi.ccd.mail.CcdMailApplication;
import edu.pitt.dbmi.ccd.queue.CCDJobQueueApplication;

/**
*
* Aug 5, 2015 1:27:02 PM
Expand All @@ -35,7 +36,7 @@
*/
@SpringBootApplication
@EnableAsync
@Import({CCDDatabaseApplication.class, CCDJobQueueApplication.class, CCDMailApplication.class})
@Import({CCDDatabaseApplication.class, CCDJobQueueApplication.class, CcdMailApplication.class})
@PropertySource("classpath:ccd.properties")
public class CcdWebApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
*/
package edu.pitt.dbmi.ccd.web.conf;

import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.ErrorPage;
import org.springframework.boot.web.servlet.ErrorPageRegistrar;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
Expand All @@ -37,14 +35,14 @@
public class ApplicationConfigurer extends WebMvcConfigurerAdapter {

@Bean
public EmbeddedServletContainerCustomizer webappEmbeddedServletContainerCustomizer() {
return (ConfigurableEmbeddedServletContainer container) -> {
ErrorPage[] errorPages = {
new ErrorPage(HttpStatus.NOT_FOUND, "/404"),
new ErrorPage(HttpStatus.UNAUTHORIZED, "/401"),
new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/500")
};
container.addErrorPages(errorPages);
public ErrorPageRegistrar errorPageRegistrar() {
return registry -> {
registry.addErrorPages(
new org.springframework.boot.web.servlet.ErrorPage(HttpStatus.BAD_REQUEST, "/400"),
new org.springframework.boot.web.servlet.ErrorPage(HttpStatus.NOT_FOUND, "/404"),
new org.springframework.boot.web.servlet.ErrorPage(HttpStatus.UNAUTHORIZED, "/401"),
new org.springframework.boot.web.servlet.ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/500")
);
};
}

Expand Down
53 changes: 53 additions & 0 deletions src/main/java/edu/pitt/dbmi/ccd/web/conf/Auth0Configurer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (C) 2016 University of Pittsburgh.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package edu.pitt.dbmi.ccd.web.conf;

import com.auth0.web.Auth0Config;
import com.auth0.web.Auth0Filter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
*
* Oct 6, 2016 3:47:55 PM
*
* @author Kevin V. Bui ([email protected])
*/
@Profile("auth0")
@Configuration
@ComponentScan(basePackages = {"com.auth0.web"})
@EnableAutoConfiguration
public class Auth0Configurer {

@Bean
public FilterRegistrationBean filterRegistration(Auth0Config auth0Config) {
final FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new Auth0Filter(auth0Config));
registration.addUrlPatterns(auth0Config.getSecuredRoute());
registration.addInitParameter("redirectOnAuthError", auth0Config.getLoginRedirectOnFail());
registration.setName("Auth0Filter");

return registration;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
public class ShiroConfigurer {

private static final String AUTHC = "authc";
private static final String ANON = "anon";

@Bean(name = "passwordService")
public DefaultPasswordService passwordService() {
Expand Down
Loading