Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Initial commit of Grails 5.x version
Browse files Browse the repository at this point in the history
  • Loading branch information
noaaroland committed Jan 25, 2022
0 parents commit df8d88d
Show file tree
Hide file tree
Showing 1,383 changed files with 161,740 additions and 0 deletions.
14 changes: 14 additions & 0 deletions GWT-compile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
APPDIR=`pwd`
GWTDIR="/usr/local/gwt-2.8.2"
LIBS=/home/rhs/IdeaProjects/las9g5/lib/*
JAVAOPS="-Xmx1024M -Xms1024M"
CMPNTDIR="/home/rhs/IdeaProjects/las9g5/src/main/webapp/js/gwt"
CLASSPATH="${LIBS}:${GWTDIR}/*:${APPDIR}/gwtui"
#GWTOPTIONS="-strict"
GWTOPTIONS="-strict -XnoclassMetadata -optimize 9"


# remove -style DETAILED to default to OBFUSCATED to reduce the size.
echo java ${JAVAOPS} -cp "${CLASSPATH}" com.google.gwt.dev.Compiler -war "${CMPNTDIR}" "$@" ${GWTOPTIONS} pmel.sdig.las.UI
/home/rhs/.sdkman/candidates/java/8.0.302-open/bin/java ${JAVAOPS} -cp "${CLASSPATH}" com.google.gwt.dev.Compiler -war "${CMPNTDIR}" "$@" ${GWTOPTIONS} pmel.sdig.las.UI
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Live Access Serever 9 (repository: las9)

This version of LAS has the following technical features.

1. All configuration and management done using an Admin Console UI provide with LAS. Admin functions include:
1. Add, remove, temporarily disable a data set
2. Rearrange the heirarchy of how data sets are displayed in the UI
3. Automatically check data sets for new time steps on a schedule set in the UI
4. Incorporate interactive client-side plotting capability
5. Simple deployment using pre-packaged war file (including F-TDS as its own companion war file).
6. Dynamic data set configuration where appropriate (including on background thread).
3. Simplified client-server interaction using JSON messages automatically marshalled to and from Java.
4. Nicely styled, modern client UI look-and-feel.
5. Simple upgrade process (save the persistence database and drop in the new war file).
8 changes: 8 additions & 0 deletions build-admin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
echo "Building admin interface..."
cd projects/admin-console
./node_modules/.bin/ng build --configuration production --base-href .
cd ../..
rm -rf src/main/webapp/admin/*
cp -R projects/admin-console/dist/admin-console/* src/main/webapp/admin/.
mv src/main/webapp/admin/index.html grails-app/views/admin/index.gsp
187 changes: 187 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "org.grails.plugins:hibernate5:7.2.1"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.6"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.3.4"
classpath "org.grails.plugins:views-gradle:2.1.2"
}
}

version "9.7"
group "las"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.github.erdi.webdriver-binaries"
apply plugin:"com.bertramlabs.asset-pipeline"
apply plugin:"org.grails.grails-gsp"
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.plugins.views-json"

repositories {
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://artifacts.unidata.ucar.edu/repository/unidata-all" }
mavenCentral()
}

configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}

dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core:5.6.3.Final"
implementation "org.grails.plugins:gsp"
profile "org.grails.profiles:web"
runtimeOnly "org.glassfish.web:el-impl:2.2.1-b05"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "javax.xml.bind:jaxb-api:2.3.1"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:3.3.4"
testImplementation "io.micronaut:micronaut-inject-groovy"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.mockito:mockito-core"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.grails.plugins:geb"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:4.0.0"
testImplementation "org.seleniumhq.selenium:selenium-api:4.0.0"
testImplementation "org.seleniumhq.selenium:selenium-support:4.0.0"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:4.0.0"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:4.0.0"
// Should come with app created with JSON views, but I added this
// from the instructions here: http://views.grails.org/latest/
implementation "org.grails.plugins:views-json:2.1.2"
// Mine
ext {
unidata_version = '5.4.2'
}

implementation "edu.ucar:cdm-core:${unidata_version}"
implementation "edu.ucar:cdm-radial:${unidata_version}"
implementation "edu.ucar:cdm-misc:${unidata_version}"
implementation "edu.ucar:cdm-image:${unidata_version}"
implementation "edu.ucar:bufr:${unidata_version}"
implementation "edu.ucar:netcdf4:${unidata_version}"
implementation "edu.ucar:opendap:${unidata_version}"
implementation "edu.ucar:cdm-vis5d:${unidata_version}"
implementation "edu.ucar:cdm-mcidas:${unidata_version}"

implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
// https://mvnrepository.com/artifact/jdom/jdom
implementation group: 'jdom', name: 'jdom', version: '1.1'
implementation 'joda-time:joda-time:2.10.13'
implementation 'com.agileorbit:schwartz:2.0.0.RC1'
// force version 2.2.3 of quartz
String quartzVersion = '2.2.3'
implementation 'org.quartz-scheduler:quartz:' + quartzVersion, {
exclude module: 'c3p0'
}
compileOnly 'org.quartz-scheduler:quartz-jobs:' + quartzVersion

// https://github.com/nerdErg/grails-shiro
// for access control
implementation "org.grails.plugins:grails-shiro:4.4"

// https://mvnrepository.com/artifact/mysql/mysql-connector-java
implementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.27'

// https://mvnrepository.com/artifact/org.owasp.encoder/encoder
// Needed for the IOSP Code which we are compiling here for creating the las#thredds.war
implementation group: 'org.owasp.encoder', name: 'encoder', version: '1.2.3'
implementation "edu.ucar:thredds:4.6.19"
implementation 'edu.ucar:tds:4.6.19:classes@jar'

}

bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}

tasks.withType(Test) {
useJUnitPlatform()
}

webdriverBinaries {
chromedriver '2.45.0'
geckodriver '0.30.0'
}

tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
}


assets {
minifyJs = true
minifyCss = true
}

// A task to compile the GWT code using a scripts, 'cause that's what I find easiest
task compileGWT (type:Exec) {
commandLine 'sh','./GWT-compile'
}

// Clean out the output directory
task cleanout (type:Exec) {
commandLine 'sh','./cleanout'
}

task compileAngular (type:Exec) {
commandLine 'sh','./build-admin.sh'
}

// Make the assembly of the war file depend on compiling the GWT
war.dependsOn cleanout, compileGWT, compileAngular
war {
exclude "src/main/java"
exclude "src/main/resources/iosp"
}


7 changes: 7 additions & 0 deletions cleanout
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
echo "Making sure the output directory exists and is empty..."
# Make sure the output directory exists
mkdir -p src/main/webapp/output

# Make sure it's empty
rm -rf src/main/webapp/output/*
7 changes: 7 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
grailsVersion=5.1.2-SNAPSHOT
grailsGradlePluginVersion=5.1.1
groovyVersion=3.0.7
gorm.version=7.1.2
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit df8d88d

Please sign in to comment.