Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
Trying new spark Version. Temporarily removing abstain button. #64, #60
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Jul 26, 2018
1 parent ffd5aeb commit c029dfd
Show file tree
Hide file tree
Showing 8 changed files with 1,155 additions and 1,419 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

FROM node:9 as node-builder
FROM node:8.11 as node-builder

# Hacky workaround for installing @angular/cli
RUN chmod a+w /usr/local/lib/node_modules && chmod a+w /usr/local/bin
Expand All @@ -20,14 +20,14 @@ RUN yarn
RUN ng build --prod --aot


FROM maven:3.5-jdk-8 as java-builder
FROM maven:3.5.4-jdk-8-slim as java-builder

COPY service /opt/simple-vote/service
COPY --from=node-builder /opt/simple-vote/ui/dist /opt/simple-vote/service/src/main/resources

WORKDIR /opt/simple-vote/service
RUN mvn clean install -DskipTests -Dliquibase.skip

FROM openjdk:8-jre-slim
FROM openjdk:8-slim

COPY --from=java-builder /opt/simple-vote/service/target/simplevote.jar /opt/simplevote.jar
4 changes: 2 additions & 2 deletions service/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.tchoulihan</groupId>
<groupId>com.github.dessalines</groupId>
<artifactId>simplevote</artifactId>
<version>1.0.0</version>
<properties>
Expand Down Expand Up @@ -191,7 +191,7 @@
<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>2.5.5</version>
<version>2.7.1</version>
<exclusions>
<exclusion>
<artifactId>slf4j-simple</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import static spark.Spark.init;
import static spark.Spark.webSocket;
import static spark.Spark.staticFiles;
import static spark.Spark.externalStaticFileLocation;

/**
* Created by tyler on 4/20/17.
Expand All @@ -37,11 +38,12 @@ public void doMain(String[] args) {
parseArguments(args);

log.setLevel(Level.toLevel(loglevel));
log.getLoggerContext().getLogger("org.eclipse.jetty").setLevel(Level.OFF);
log.getLoggerContext().getLogger("spark.webserver").setLevel(Level.OFF);
// log.getLoggerContext().getLogger("org.eclipse.jetty").setLevel(Level.OFF);
// log.getLoggerContext().getLogger("spark.webserver").setLevel(Level.OFF);
log.getLoggerContext().getLogger("org.javalite.activejdbc").setLevel(Level.OFF);
log.getLoggerContext().getLogger("org.postgresql.jdbc").setLevel(Level.OFF);

staticFiles.location("/dist");

if (jks != null) {
Spark.secure(jks.getAbsolutePath(), "changeit", null,null);
Expand All @@ -51,8 +53,7 @@ public void doMain(String[] args) {
if (liquibase) {
Tools.runLiquibase();
}

staticFiles.location("/dist");

staticFiles.expireTime(600);

// Set up websocket
Expand Down
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@angular/router": "^6.0.1",
"@auth0/angular-jwt": "^2.0.0",
"angular2-toaster": "^4.0.1",
"bootswatch": "^4.0.0-beta.2",
"bootswatch": "^4.1.3",
"clipboard": "^1.7.1",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
Expand All @@ -38,7 +38,7 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.1",
"@angular/cli": "^6.0.7",
"@angular/cli": "^6.1.0",
"@angular/compiler-cli": "^6.0.1",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/components/candidate/candidate.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<button class="btn btn-outline-primary" [class.active]="vote==100" (click)="createOrUpdateVote(100)" [disabled]="expired || candidate.readOnly">
<i class="fa fa-fw fa-thumbs-up"></i>
</button>
<button class="btn btn-outline-primary" [class.active]="vote==50" (click)="createOrUpdateVote(50)" [disabled]="expired || candidate.readOnly">Abstain
<button hidden class="btn btn-outline-primary" [class.active]="vote==50" (click)="createOrUpdateVote(50)" [disabled]="expired || candidate.readOnly">Abstain
</button>
<button class="btn btn-outline-primary" [class.active]="vote==0" (click)="createOrUpdateVote(0)" [disabled]="expired || candidate.readOnly">
<i class="fa fa-fw fa-thumbs-down"></i>
Expand Down Expand Up @@ -80,7 +80,7 @@
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" autofocus [(ngModel)]="candidate.title" name="candidate_title" placeholder="Enter your option name...">
<span class="input-group-btn">
<span class="input-group-append">
<button class="btn btn-primary" type="submit" role="button">Save</button>
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/components/chat/chat.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h5 class="card-title">Chat</h5>
<div class="row">
<div class="col-lg-12 input-group">
<input type="text" [disabled]="poll.readOnly" class="form-control" [(ngModel)]="comment" placeholder="Enter a comment here..." name="comment">
<span class="input-group-btn">
<span class="input-group-append">
<button class="btn btn-outline-secondary" type="submit" (click)="createComment()"><i class="fa fa-fw fa-arrow-circle-right"></i></button>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
required maxlength="100" pattern="[a-zA-Z0-9_-]+"
[(ngModel)]="name" name="name" placeholder="Enter your name...."
#namev="ngModel" autofocus="" [class.is-invalid]="!(namev.valid || namev.pristine)">
<span class="input-group-btn">
<span class="input-group-append">
<button type="submit" class="btn btn-primary btn-block" [disabled]="!userForm.form.valid">Okay</button>
</span>
</div>
Expand Down
Loading

0 comments on commit c029dfd

Please sign in to comment.