Skip to content

Commit

Permalink
307 implement project endpoints (#308)
Browse files Browse the repository at this point in the history
* add models

* initialize project service

* add dao

* rename and import correctly

* inject space dao

* list endpoint working

* add example; get/post endpoints working now

* add delete endpoint

* write patch endpoints

* put endpoint working

* patch endpoint is working

* add dataset endpoints work

* deleting is working

* placeholder

* write readme

* internal calc status doesn't work yet

* live calc is working

* live calculation all works

* live calculating revert back to todos

* add endpoints to manage each of the resources

* update readme

* update mock

* Add visualization (#316)

* visualization model

* add to model

* add model and endpoint for visualization

* posting visualization bug

* merge subclass to just one for union implementation

* add embedded annotation to layer class

* add logic to only add layer doesn't already exist

* add readme

* add docker build and github action

* indentation

* upload artifact use v3 since v2 deprecated

* indentation again

* download artifact needs to be v3 too

* no types

* add search endpoint

* remove the typ method from mock
  • Loading branch information
longshuicy authored Sep 25, 2024
1 parent 24af4df commit b681b6f
Show file tree
Hide file tree
Showing 32 changed files with 3,076 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
./gradlew assemble
./gradlew test
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3 # Updated to version 3
with:
name: incore-services-build-files
path: |
Expand All @@ -70,6 +70,7 @@ jobs:
- hazard
- semantics
- space
- project
include:
- name: data
dockerfile: Dockerfile.data
Expand All @@ -86,10 +87,13 @@ jobs:
- name: space
dockerfile: Dockerfile.space
hub_project: incore/space-jetty
- name: project
dockerfile: Dockerfile.project
hub_project: incore/project-jetty

steps:
- name: Download build files
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: incore-services-build-files

Expand Down
26 changes: 26 additions & 0 deletions Dockerfile.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM jetty:11.0.15-jre11

# Set user to root so logs store in previous location
USER root

# TODO we could compile the service here so this works standalone

# Working Directory
WORKDIR /home/incore

# Copy service war
COPY server/project-service/build/libs/project-service.war /home/incore/lib/

# Copy service context to jetty webapps
COPY docker/project.xml /var/lib/jetty/webapps/

# create data directory mounting point
RUN mkdir /home/incore/data && mkdir /home/incore/data/incore_data

# Reset WORKDIR so jetty runs correctly
WORKDIR /var/lib/jetty

ENV JETTY_PORT 8080

EXPOSE 8080
CMD ["java", "-Djava.io.tmpdir=/home/incore/", "-jar", "/usr/local/jetty/start.jar", "jetty.http.port=8888"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ The hazard service supports creating hazard objects such as earthquake, tornado,
## Space Service
The space service manages groups of users and control access by those groups to certain entity throughout services.

## Project Service
The project service manages projects that are collection of data, hazard, DFR3.
6 changes: 6 additions & 0 deletions docker/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/project/</Set>
<Set name="war">/home/incore/lib/project-service.war</Set>
</Configure>
3 changes: 2 additions & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ farm {
webapp ':hazard-service'
webapp ':semantics-service'
webapp ':space-service'
webapp ':project-service'
}

task farmWars(dependsOn: war, type: Copy) {
Expand Down Expand Up @@ -112,7 +113,7 @@ test {
//All of our service plugins have some common configuration.
// (war and gretty builds, some basic jersey and mongo dependencies, etc)
// Common configuration between them can be specified here like this.
["dfr3-service", "data-service", "hazard-service", "semantics-service", "space-service"].each { name ->
["dfr3-service", "data-service", "hazard-service", "semantics-service", "space-service", "project-service"].each { name ->
project(":$name") {

apply plugin: 'war'
Expand Down
Loading

0 comments on commit b681b6f

Please sign in to comment.