├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── ServerDockerfile ├── UIDockerfile ├── acceptance ├── .gitignore ├── acceptance-run.sh ├── acceptance-start.sh ├── acceptance-tail-logs.sh ├── chromedriver-linux-2.37 ├── chromedriver-linux-2.40 ├── chromedriver-linux-2.41 ├── geckodriver-linux-0.20.1 ├── geckodriver-linux-0.21.0 ├── mongo-start.sh ├── pom.xml ├── rebuildAndStart.sh └── src │ ├── main │ └── resources │ │ ├── log4j.xml │ │ └── tomcat7x │ │ ├── context.xml │ │ ├── server.xml │ │ └── tomcat-users.xml │ └── test │ ├── java │ └── com │ │ └── redhat │ │ └── acceptance │ │ ├── BasicTest.java │ │ ├── RunCucumberTests.java │ │ ├── steps │ │ ├── AssessmentsSteps.java │ │ ├── CustomerSteps.java │ │ └── Helper.java │ │ └── utils │ │ ├── Json.java │ │ ├── MapBuilder.java │ │ ├── SafeWait.java │ │ ├── ToHappen.java │ │ ├── Utils.java │ │ └── Wait.java │ └── resources │ ├── acceptance.properties │ └── com │ └── redhat │ └── acceptance │ └── steps │ ├── Applications.feature │ ├── Assessments.feature │ └── Customer.feature ├── dataload ├── mongo-applications.json ├── mongo-assessments.json ├── mongo-customer.json ├── mongo-export.sh ├── mongo-import.sh ├── mongo-member.json └── mongo-reviews.json ├── deploy.sh ├── developer.md ├── legacy ├── LICENSE ├── Pathfinder.postman_collection.json ├── PathfinderLocalTest.postman_environment.json ├── README.md ├── SSO-Pathfinder-setup.json ├── deploy.sh ├── google-script.js ├── jhipster-jdl.jh ├── mvnw ├── mvnw.cmd ├── package.json ├── pathfinder-server-build.yaml ├── pathfinder-server-deployment.yaml ├── pathfinder-server-port-forward.sh ├── pathfinder-template.yaml ├── pathfinder-ui-build.yaml ├── pathfinder-ui-deployment.yaml ├── pathfinder-vision.rst ├── pom.xml ├── print-mongo-creds.sh ├── run-local.sh ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── gps │ │ │ └── pathfinder │ │ │ ├── ApplicationWebXml.java │ │ │ ├── PathfinderApp.java │ │ │ ├── aop │ │ │ └── logging │ │ │ │ └── LoggingAspect.java │ │ │ ├── config │ │ │ ├── ApplicationProperties.java │ │ │ ├── Constants.java │ │ │ ├── DateTimeFormatConfiguration.java │ │ │ ├── DefaultProfileUtil.java │ │ │ ├── JacksonConfiguration.java │ │ │ ├── LoggingAspectConfiguration.java │ │ │ ├── LoggingConfiguration.java │ │ │ ├── MetricsConfiguration.java │ │ │ ├── OSEMongoDBConfig.java │ │ │ ├── PathfinderQuestionConfig.java │ │ │ ├── RequestLoggingFilterConfig.java │ │ │ ├── SecurityConfiguration.java.old │ │ │ ├── SecurityKeycloakConfig.java │ │ │ ├── WebConfigurer.java │ │ │ ├── audit │ │ │ │ └── package-info.java │ │ │ ├── dbmigrations │ │ │ │ ├── InitialSetupMigration.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── domain │ │ │ ├── ApplicationAssessmentReview.java │ │ │ ├── Applications.java │ │ │ ├── Assessments.java │ │ │ ├── Customer.java │ │ │ ├── Member.java │ │ │ ├── QuestionMetaData.java │ │ │ ├── QuestionWeights.java │ │ │ └── package-info.java │ │ │ ├── repository │ │ │ ├── ApplicationsRepository.java │ │ │ ├── AssessmentsRepository.java │ │ │ ├── CustomerRepository.java │ │ │ ├── MembersRepository.java │ │ │ ├── QuestionMetaDataRepository.java │ │ │ ├── ReviewsRepository.java │ │ │ └── package-info.java │ │ │ ├── security │ │ │ ├── AuthoritiesConstants.java │ │ │ ├── SecurityUtils.java │ │ │ ├── SpringSecurityAuditorAware.java │ │ │ ├── UserNotActivatedException.java │ │ │ └── package-info.java │ │ │ ├── service │ │ │ ├── dto │ │ │ │ └── package-info.java │ │ │ ├── mapper │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── util │ │ │ │ ├── Json.java │ │ │ │ ├── MapBuilder.java │ │ │ │ ├── RandomUtil.java │ │ │ │ ├── RequestUtils.java │ │ │ │ └── Tuple.java │ │ │ └── web │ │ │ ├── api │ │ │ ├── ApplicationStartup.java │ │ │ ├── CustomerAPIImpl.java │ │ │ ├── MemberController.java │ │ │ ├── QuestionsMetaDataAPI.java │ │ │ ├── SecureAPIImpl.java │ │ │ └── security │ │ │ │ ├── AuthenticationRestController.java │ │ │ │ ├── CredentialsException.java │ │ │ │ ├── CustomAuthenticationProvider.java │ │ │ │ ├── JwtAuthenticationEntryPoint.java │ │ │ │ ├── JwtAuthorizationTokenFilter.java │ │ │ │ ├── JwtTokenUtil.java │ │ │ │ ├── JwtUserDetailsService.java │ │ │ │ └── SecurityConfig.java │ │ │ └── rest │ │ │ ├── LogsResource.java │ │ │ ├── package-info.java │ │ │ └── vm │ │ │ ├── LoggerVM.java │ │ │ └── package-info.java │ │ ├── resources │ │ ├── application-survey.js │ │ ├── banner.txt │ │ ├── config │ │ │ ├── application-dev.yml │ │ │ ├── application-devose.yml │ │ │ ├── application-prod.yml │ │ │ ├── application-prodose.yml │ │ │ ├── application.yml │ │ │ └── bootstrap.properties │ │ ├── i18n │ │ │ └── messages.properties │ │ ├── keycloak.json │ │ ├── logback-spring.xml │ │ ├── mails │ │ │ ├── activationEmail.html │ │ │ ├── creationEmail.html │ │ │ └── passwordResetEmail.html │ │ ├── swagger │ │ │ └── api.yml │ │ └── templates │ │ │ └── error.html │ │ └── webapp │ │ ├── content │ │ ├── index.css │ │ ├── keycloak.js │ │ ├── survey.js │ │ └── test-vars.js │ │ ├── index.html │ │ └── keycloak.json └── user-stories.txt ├── pathfinder-full-custom-questions-template.yaml ├── pathfinder-full-template.yaml ├── pathfinder-server-war ├── .gitignore ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── redhat │ │ └── gps │ │ ├── VersionServlet.java │ │ └── WarApplication.java │ └── webapp │ └── WEB-INF │ └── web.xml ├── pathfinder-server ├── .gitignore ├── LICENSE ├── pom.xml ├── print-mongo-creds.sh ├── run-local.sh └── src │ ├── main │ ├── java │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ └── com │ │ │ └── redhat │ │ │ └── gps │ │ │ └── pathfinder │ │ │ ├── ApplicationWebXml.java │ │ │ ├── PathfinderApp.java │ │ │ ├── PathfinderInitializerServlet.java │ │ │ ├── QuestionProcessor.java │ │ │ ├── config │ │ │ ├── ApplicationProperties.java │ │ │ ├── Constants.java │ │ │ ├── DateTimeFormatConfiguration.java │ │ │ ├── DefaultProfileUtil.java │ │ │ ├── JacksonConfiguration.java │ │ │ ├── MetricsConfiguration.java │ │ │ ├── OSEMongoDBConfig.java │ │ │ ├── RequestLoggingFilterConfig.java │ │ │ ├── SecurityKeycloakConfig.java │ │ │ ├── WebConfigurer.java │ │ │ └── package-info.java │ │ │ ├── domain │ │ │ ├── ApplicationAssessmentReview.java │ │ │ ├── Applications.java │ │ │ ├── Assessments.java │ │ │ ├── Customer.java │ │ │ ├── Member.java │ │ │ ├── QuestionMetaData.java │ │ │ ├── QuestionWeights.java │ │ │ └── package-info.java │ │ │ ├── repository │ │ │ ├── ApplicationsRepository.java │ │ │ ├── AssessmentsRepository.java │ │ │ ├── CustomerRepository.java │ │ │ ├── MembersRepository.java │ │ │ ├── QuestionMetaDataRepository.java │ │ │ ├── ReviewsRepository.java │ │ │ └── package-info.java │ │ │ ├── security │ │ │ ├── AuthoritiesConstants.java │ │ │ ├── SecurityUtils.java │ │ │ ├── SpringSecurityAuditorAware.java │ │ │ ├── UserNotActivatedException.java │ │ │ └── package-info.java │ │ │ ├── service │ │ │ └── util │ │ │ │ ├── Json.java │ │ │ │ ├── MapBuilder.java │ │ │ │ ├── RandomUtil.java │ │ │ │ ├── RequestUtils.java │ │ │ │ ├── Tuple.java │ │ │ │ └── package-info.java │ │ │ └── web │ │ │ └── api │ │ │ ├── ApplicationStartup.java │ │ │ ├── CustomerAPIImpl.java │ │ │ ├── ImportExportController.java │ │ │ ├── MemberController.java │ │ │ ├── Predicates.java │ │ │ ├── QuestionReader.java │ │ │ ├── QuestionsMetaDataAPI.java │ │ │ ├── SecureAPIImpl.java │ │ │ ├── SurveyEngine.java │ │ │ ├── SurveyPayload.java │ │ │ └── security │ │ │ ├── AuthenticationRestController.java │ │ │ ├── CredentialsException.java │ │ │ ├── CustomAuthenticationProvider.java │ │ │ ├── JwtAuthenticationEntryPoint.java │ │ │ ├── JwtAuthorizationTokenFilter.java │ │ │ ├── JwtTokenUtil.java │ │ │ ├── JwtUserDetailsService.java │ │ │ └── SecurityConfig.java │ ├── resources │ │ ├── banner.txt │ │ ├── config │ │ │ ├── application-dev.yml │ │ │ ├── application-devose.yml │ │ │ ├── application-integrationtest.yml │ │ │ ├── application-prod.yml │ │ │ ├── application-prodose.yml │ │ │ ├── application.yml │ │ │ └── bootstrap.properties │ │ ├── i18n │ │ │ └── messages.properties │ │ ├── keycloak.json │ │ ├── logback-spring.xml │ │ ├── questions │ │ │ ├── application-survey.js │ │ │ ├── base-questions-data-default.json │ │ │ ├── custom-questions-example.json │ │ │ ├── default-survey-materialised.json │ │ │ └── question-schema.json │ │ ├── static │ │ │ ├── index.html │ │ │ ├── swagger-ui-bundle.js │ │ │ ├── swagger-ui-standalone-preset.js │ │ │ ├── swagger-ui.css │ │ │ └── swagger-ui.js │ │ ├── swagger │ │ │ └── api.yml │ │ └── templates │ │ │ └── error.html │ └── webapp │ │ ├── content │ │ ├── index.css │ │ ├── keycloak.js │ │ ├── survey.js │ │ └── test-vars.js │ │ └── keycloak.json │ └── test │ ├── java │ └── com │ │ └── redhat │ │ └── gps │ │ └── pathfinder │ │ └── questions │ │ └── QuestionValidationTest.java │ └── resources │ └── test-data │ ├── custom-question-data-1page-2-valid.json │ ├── custom-question-data-1page-8duplicate-names.json │ ├── custom-question-data-2page-2-valid.json │ ├── custom-question-data-corrupt.json │ ├── custom-question-data-invalid-values.json │ ├── custom-question-data-no-questions.json │ ├── question-data-corrupt.json │ ├── question-data-invalid-questions.json │ └── question-data.json ├── pathfinder-ui ├── .gitignore ├── CONTRIBUTING.md ├── pom.xml ├── run-local.sh ├── run-prod.sh └── src │ └── main │ ├── java │ └── com │ │ └── redhat │ │ └── pathfinder │ │ ├── Controller.java │ │ ├── InitServlet.java │ │ ├── Json.java │ │ ├── MapBuilder.java │ │ └── charts │ │ ├── Chart2Json.java │ │ ├── DataSet2.java │ │ ├── PieChartJson.java │ │ └── PieData.java │ └── webapp │ ├── WEB-INF │ ├── jboss-web.xml │ ├── jetty-web.xml │ ├── local-test-web.xml │ ├── override-web.xml │ └── web.xml │ ├── assessments.jsp │ ├── assets │ ├── css │ │ ├── bootstrap-3.3.7.min.css │ │ ├── breadcrumbs.css │ │ ├── font-awesome.min.css │ │ ├── jquery.dataTables-1.10.16.css │ │ ├── jquery.dataTables.min.css │ │ ├── main.css │ │ ├── overpass.css │ │ └── vis-network.min.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── images │ │ ├── Pattern_0C_RH_Services_RGB_Fill_Gray.png │ │ ├── RH_Pathfinder_Icon_Color-56.png │ │ ├── pathfinder.png │ │ ├── patterns-041.png │ │ ├── rh_color_swatch_corporate_004153_150x1201.png │ │ ├── rh_color_swatch_corporate_0088ce_150x1201.png │ │ ├── rh_color_swatch_corporate_3f9c35_150x1201.png │ │ ├── rh_color_swatch_corporate_820000_150x1201.png │ │ ├── rh_color_swatch_corporate_a30000_150x1201.png │ │ ├── rh_color_swatch_corporate_a3dbe8_150x1201.png │ │ ├── rh_color_swatch_corporate_cc0000_150x1201.png │ │ ├── sort_asc.png │ │ ├── sort_both.png │ │ ├── sort_desc.png │ │ ├── twisty-off.png │ │ └── twisty-on.png │ ├── js │ │ ├── Chart-2.6.0.min.js │ │ ├── MOVED_TO_BACKEND-application-survey.js │ │ ├── bootstrap-3.3.7.min.js │ │ ├── breakpoints.min.js │ │ ├── browser.min.js │ │ ├── central-click.js │ │ ├── chartjs-plugin-datalabels-0.4.0.js │ │ ├── datatables-functions.js │ │ ├── datatables-plugins.js │ │ ├── dateFormat.min.js │ │ ├── dependencyMap.js │ │ ├── dragcheck.js │ │ ├── jqmeter.min.js │ │ ├── jquery-1.11.3.min.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery.dataTables-1.10.16.js │ │ ├── jquery.dataTables.min.js │ │ ├── jquery.min.js │ │ ├── jquery.tablesorter.js │ │ ├── jquery.tablesorter.pager.js │ │ ├── main.js │ │ ├── progressbar-functions.js │ │ ├── progressbar-kimmobrunfeldt-1.0.0.js │ │ ├── util.js │ │ └── vis.js │ └── sass │ │ ├── base │ │ ├── _page.scss │ │ ├── _reset.scss │ │ └── _typography.scss │ │ ├── components │ │ ├── _actions.scss │ │ ├── _box.scss │ │ ├── _button.scss │ │ ├── _form.scss │ │ ├── _grid.scss │ │ ├── _highlights.scss │ │ ├── _icon.scss │ │ ├── _icons.scss │ │ ├── _image.scss │ │ ├── _inner.scss │ │ ├── _list.scss │ │ ├── _table.scss │ │ ├── _testimonials.scss │ │ └── _wrapper.scss │ │ ├── layout │ │ ├── _banner.scss │ │ ├── _cta.scss │ │ ├── _footer.scss │ │ ├── _header.scss │ │ ├── _heading.scss │ │ ├── _main.scss │ │ └── _menu.scss │ │ ├── libs │ │ ├── _breakpoints.scss │ │ ├── _flexgrid.scss │ │ ├── _functions.scss │ │ ├── _grid.scss │ │ ├── _mixins.scss │ │ ├── _vars.scss │ │ └── _vendor.scss │ │ └── main.scss │ ├── breadcrumbs.jsp │ ├── datatables-dependencies.jsp │ ├── favicon.ico │ ├── forms │ ├── newApplicationForm.jsp │ ├── newCustomerForm.jsp │ └── newMemberForm.jsp │ ├── head.jsp │ ├── images │ ├── automation.png │ ├── banner.jpg │ ├── banner.mp4 │ ├── bg.jpg │ ├── cta01.jpg │ ├── details.png │ ├── edit.png │ ├── first.png │ ├── last.png │ ├── next.png │ ├── ok-48.png │ ├── path-photo-clip-blue.png │ ├── path-photo-clip.png │ ├── pic01.jpg │ ├── pic02.jpg │ ├── pic03.jpg │ ├── prev.png │ ├── reboot.jpg │ ├── review.png │ ├── trash.png │ └── workflow.png │ ├── index.jsp │ ├── manageCustomers.jsp │ ├── manageCustomersApplications.jsp │ ├── manageCustomersMembers.jsp │ ├── nav.jsp │ ├── report-adoption.jsp │ ├── report-summary.jsp │ ├── report.jsp │ ├── survey.jsp │ ├── usage-tracking.jsp │ ├── utils.jsp │ └── viewAssessment.jsp ├── pom.xml └── utils ├── mongo-applications.json ├── mongo-assessments.json ├── mongo-customer.json ├── mongo-dump.sh ├── mongo-export.sh ├── mongo-import.sh ├── mongo-member.json ├── mongo-restore.sh ├── mongo-reviews.json ├── pathfinder-server-build.yaml ├── pathfinder-server-deployment.yaml ├── pathfinder-ui-build.yaml └── pathfinder-ui-deployment.yaml /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: openjdk8 3 | 4 | services: 5 | - docker 6 | 7 | script: 8 | - export PATHFINDER_UI_IMAGE=quay.io/pathfinder/pathfinder-ui 9 | - export PATHFINDER_UI_IMAGE_FULL=$PATHFINDER_UI_IMAGE:$TRAVIS_BRANCH 10 | - export PATHFINDER_SERVER_IMAGE=quay.io/pathfinder/pathfinder-server 11 | - export PATHFINDER_SERVER_IMAGE_FULL=$PATHFINDER_SERVER_IMAGE:$TRAVIS_BRANCH 12 | 13 | after_success: 14 | - docker login -u=$QUAY_USER -p=$QUAY_TOKEN quay.io 15 | - docker build -t $PATHFINDER_SERVER_IMAGE_FULL -f ServerDockerfile --build-arg BRANCH=$TRAVIS_BRANCH --build-arg COMMITHASH=$TRAVIS_COMMIT --build-arg COMMITMESSAGE="$TRAVIS_COMMIT_MESSAGE" . 16 | - docker push $PATHFINDER_SERVER_IMAGE_FULL 17 | - docker build -t ${PATHFINDER_UI_IMAGE_FULL} -f UIDockerfile --build-arg BRANCH=$TRAVIS_BRANCH --build-arg COMMITHASH=$TRAVIS_COMMIT --build-arg COMMITMESSAGE="$TRAVIS_COMMIT_MESSAGE" . 18 | - docker push $PATHFINDER_UI_IMAGE_FULL 19 | -------------------------------------------------------------------------------- /ServerDockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift:latest 2 | MAINTAINER noconnor@redhat.com 3 | ARG BRANCH=master 4 | ARG COMMITHASH=0 5 | ARG COMMITMESSAGE=NA 6 | LABEL PATHFINDER_BRANCH=${BRANCH} 7 | LABEL PATHFINDER_COMMITHASH=${COMMITHASH} 8 | LABEL PATHFINDER_COMMITMSG=${COMMITMESSAGE} 9 | ADD pathfinder-server/target/pathfinder-server*-exec.jar /deployments/app.jar 10 | -------------------------------------------------------------------------------- /UIDockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/jboss-webserver-3/webserver31-tomcat8-openshift 2 | MAINTAINER noconnor@redhat.com 3 | ARG BRANCH=master 4 | ARG COMMITHASH=0 5 | ARG COMMITMESSAGE=NA 6 | LABEL PATHFINDER_BRANCH=${BRANCH} 7 | LABEL PATHFINDER_COMMITHASH=${COMMITHASH} 8 | LABEL PATHFINDER_COMMITMSG=${COMMITMESSAGE} 9 | ADD pathfinder-ui/target/root.war /opt/webserver/webapps/ROOT.war -------------------------------------------------------------------------------- /acceptance/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .classpath 3 | .project 4 | .settings 5 | *~ 6 | -------------------------------------------------------------------------------- /acceptance/acceptance-run.sh: -------------------------------------------------------------------------------- 1 | mvn clean install -Dspring.profiles.active=dev,swagger -Pmongo,acceptance,pathfinder 2 | -------------------------------------------------------------------------------- /acceptance/acceptance-start.sh: -------------------------------------------------------------------------------- 1 | mvn clean package cargo:run -Pmongo,pathfinder -Dspring.profiles.active=dev,swagger 2 | -------------------------------------------------------------------------------- /acceptance/acceptance-tail-logs.sh: -------------------------------------------------------------------------------- 1 | find target -name *.log | xargs tail -f 2 | -------------------------------------------------------------------------------- /acceptance/chromedriver-linux-2.37: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/acceptance/chromedriver-linux-2.37 -------------------------------------------------------------------------------- /acceptance/chromedriver-linux-2.40: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/acceptance/chromedriver-linux-2.40 -------------------------------------------------------------------------------- /acceptance/chromedriver-linux-2.41: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/acceptance/chromedriver-linux-2.41 -------------------------------------------------------------------------------- /acceptance/geckodriver-linux-0.20.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/acceptance/geckodriver-linux-0.20.1 -------------------------------------------------------------------------------- /acceptance/geckodriver-linux-0.21.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/acceptance/geckodriver-linux-0.21.0 -------------------------------------------------------------------------------- /acceptance/mongo-start.sh: -------------------------------------------------------------------------------- 1 | mvn clean package -Dembedmongo.wait -Pmongo 2 | -------------------------------------------------------------------------------- /acceptance/rebuildAndStart.sh: -------------------------------------------------------------------------------- 1 | cd ..; mvn clean install -Dspring.profiles.active=dev,swagger -Pwar; cd -; mvn clean package cargo:run -Pmongo,pathfinder -Dspring.profiles.active=dev,swagger 2 | -------------------------------------------------------------------------------- /acceptance/src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 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 | -------------------------------------------------------------------------------- /acceptance/src/main/resources/tomcat7x/context.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | WEB-INF/web.xml 4 | 10 | 11 | -------------------------------------------------------------------------------- /acceptance/src/main/resources/tomcat7x/tomcat-users.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 37 | 38 | -------------------------------------------------------------------------------- /acceptance/src/test/java/com/redhat/acceptance/BasicTest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.acceptance; 2 | 3 | import org.junit.Test; 4 | import org.openqa.selenium.By; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.chrome.ChromeDriver; 8 | import org.openqa.selenium.chrome.ChromeOptions; 9 | 10 | import static org.junit.Assert.assertTrue; 11 | 12 | public class BasicTest{ 13 | // public static final String FIREFOX_DRIVER="/home/mallen/Work/pathfinder-ng/acceptance/geckodriver-linux-0.20.1"; 14 | // public static final String CHROME_DRIVER="/home/mallen/Work/pathfinder-ng/acceptance/chromedriver-linux-2.41"; 15 | 16 | @Test 17 | public void site_header_is_on_home_page(){ 18 | WebDriver browser; 19 | 20 | System.setProperty("webdriver.chrome.driver", "chromedriver-linux-2.41"); 21 | ChromeOptions o=new ChromeOptions(); 22 | o.setBinary("/usr/bin/google-chrome-stable"); 23 | o.addArguments("--headless"); 24 | o.addArguments("--disable-extensions"); // disabling extensions 25 | o.addArguments("--disable-gpu"); // applicable to windows os only 26 | o.addArguments("--disable-dev-shm-usage"); // overcome limited resource problems 27 | o.addArguments("--no-sandbox"); 28 | browser=new ChromeDriver(); 29 | 30 | //Firefox's proxy driver executable is in a folder already 31 | // on the host system's PATH environment variable. 32 | browser.get("http://saucelabs.com"); 33 | WebElement header=browser.findElement(By.id("page-header")); 34 | assertTrue((header.isDisplayed())); 35 | 36 | browser.close(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /acceptance/src/test/java/com/redhat/acceptance/RunCucumberTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.redhat.acceptance; 19 | 20 | import org.junit.Test; 21 | import org.junit.runner.RunWith; 22 | 23 | import cucumber.api.CucumberOptions; 24 | import cucumber.api.junit.Cucumber; 25 | 26 | @RunWith(Cucumber.class) 27 | //@Cucumber.Options(format = {/*"html:target/cucumber-html-report", */"json-pretty:target/cucumber-json-report.json"}) 28 | //@Cucumber.Options(features={"src/test/resources/cucumber"}, glue={"cucumber.com.zzz.yyy.steps"}, format={"html:target/test-reports"}, ) 29 | //format = {"pretty", /*"html:target/cucumber",*/ "json:target/cucumber.json"}//, "rerun:target/rerun.txt"} 30 | 31 | @CucumberOptions( 32 | monochrome = false, 33 | format = {"pretty", "html:target/cucumber", "json:target/cucumber.json"}//, "rerun:target/rerun.txt"} 34 | ) 35 | public class RunCucumberTests { 36 | 37 | @Test 38 | public void runAcceptanceTests() { 39 | } 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /acceptance/src/test/java/com/redhat/acceptance/utils/Json.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.redhat.acceptance.utils; 19 | 20 | import java.io.ByteArrayInputStream; 21 | import java.io.ByteArrayOutputStream; 22 | import java.io.IOException; 23 | 24 | import org.codehaus.jackson.JsonGenerationException; 25 | import org.codehaus.jackson.JsonParseException; 26 | import org.codehaus.jackson.map.JsonMappingException; 27 | import org.codehaus.jackson.map.ObjectMapper; 28 | 29 | public class Json { 30 | public static String toJson(Object o) throws JsonGenerationException, JsonMappingException, IOException{ 31 | if (o==null) return ""; 32 | ObjectMapper mapper = new ObjectMapper(); 33 | // mapper.configure(SerializationFeature.INDENT_OUTPUT,true); 34 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 35 | mapper.writeValue(baos, o); 36 | return new String(baos.toByteArray()); 37 | } 38 | @SuppressWarnings({ "unchecked", "rawtypes" }) 39 | public static T toObject(String payload, Class clazz) throws JsonParseException, JsonMappingException, IOException { 40 | return (T)new ObjectMapper().readValue(new ByteArrayInputStream(payload.getBytes()), clazz); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /acceptance/src/test/java/com/redhat/acceptance/utils/MapBuilder.java: -------------------------------------------------------------------------------- 1 | package com.redhat.acceptance.utils; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class MapBuilder { 7 | private Map s=new HashMap(); 8 | 9 | public MapBuilder put(K key, V value){ 10 | s.put(key, value); 11 | return this; 12 | } 13 | 14 | public Map build(){ 15 | return s; 16 | } 17 | 18 | public MapBuilder putAll(Map values) { 19 | s.putAll(values); 20 | return this; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /acceptance/src/test/java/com/redhat/acceptance/utils/ToHappen.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.redhat.acceptance.utils; 19 | 20 | public interface ToHappen { 21 | public boolean hasHappened(); 22 | } -------------------------------------------------------------------------------- /acceptance/src/test/resources/acceptance.properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | chrome.location.linux=/usr/bin/google-chrome-stable 4 | chrome.location.macos="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" 5 | 6 | #selenium.webdriver.chrome.macos.location=https://chromedriver.storage.googleapis.com/76.0.3809.68/chromedriver_mac64.zip 7 | selenium.webdriver.chrome.macos.location=https://chromedriver.storage.googleapis.com/79.0.3945.36/chromedriver_mac64.zip 8 | selenium.webdriver.chrome.linux.location=https://chromedriver.storage.googleapis.com/76.0.3809.68/chromedriver_linux64.zip 9 | selenium.webdriver.chrome.url={selenium.webdriver.chrome.url} 10 | selenium.webdriver.firefox.url={selenium.webdriver.firefox.url} 11 | 12 | pathfinder.ui.url=http://localhost:8083 -------------------------------------------------------------------------------- /acceptance/src/test/resources/com/redhat/acceptance/steps/Applications.feature: -------------------------------------------------------------------------------- 1 | Feature: Applications 2 | 3 | -------------------------------------------------------------------------------- /acceptance/src/test/resources/com/redhat/acceptance/steps/Assessments.feature: -------------------------------------------------------------------------------- 1 | Feature: Assessments 2 | 3 | Scenario: 01 - Create an application in the assessments page 4 | Given we login with "admin/admin": 5 | And create and open customer: 6 | |Name |Description |Vertical |Assessor | 7 | |Customer 1 | | | | 8 | When click the "Add Application" button 9 | And enter the following into the "New Application" dialog: 10 | |Name |Stereotype |Description |Owner | 11 | |App 1 |TARGETAPP | | | 12 | And click the "Create" button 13 | Then the following application assessments exist: 14 | |Name |Assessed |Reviewed |Criticality |Decision |Effort |Review Date | 15 | |App 1 |No | | | | | | 16 | And delete the applications: 17 | |Name |Assessed |Reviewed |Criticality |Decision |Effort |Review Date | 18 | |App 1 |No | | | | | | 19 | 20 | 21 | Scenario: 02 - Create multiple applications in the assessments page 22 | Given we login with "admin/admin": 23 | And create and open customer: 24 | |Name |Description |Vertical |Assessor | 25 | |Customer 1 | | | | 26 | When create the following applications: 27 | |Name |Stereotype |Description |Owner | 28 | |App 1 |TARGETAPP | | | 29 | |App 2 |TARGETAPP | | | 30 | |App 3 |TARGETAPP | | | 31 | |App 4 |TARGETAPP | | | 32 | Then the following application assessments exist: 33 | |Name |Assessed |Reviewed |Criticality |Decision |Effort |Review Date | 34 | |App 1 |No | | | | | | 35 | |App 2 |No | | | | | | 36 | |App 3 |No | | | | | | 37 | |App 4 |No | | | | | | 38 | And delete all applications 39 | 40 | 41 | #Scenario: 99 - Delete all customers 42 | #Given we delete all customers -------------------------------------------------------------------------------- /acceptance/src/test/resources/com/redhat/acceptance/steps/Customer.feature: -------------------------------------------------------------------------------- 1 | Feature: Customer 2 | 3 | Scenario: 01 - Create new customer and delete that customer 4 | Given we login: 5 | |Username |Password | 6 | |admin |admin | 7 | And navigate to the "Customers" page 8 | When click the "Add Customer" button 9 | And enter the following into the "New Customer" dialog: 10 | |Name |Description |Vertical |Assessor | 11 | |Test 1 | | | | 12 | And click the "Create" button 13 | Then customers exist with the following details: 14 | |Name |Description |Vertical |Assessor | 15 | |Test 1 | | | | 16 | #And delete the customer: 17 | #|Name |Description |Vertical |Assessor | 18 | #|Test 1 | | | | 19 | #And customers exist with the following details: 20 | #|Name |Description |Vertical |Assessor | 21 | 22 | 23 | Scenario: 02 - Create several new customers 24 | Given we login: 25 | |Username |Password | 26 | |admin |admin | 27 | And create the following customers: 28 | |Name |Description |Vertical |Assessor | 29 | |Customer S2C1 | | | | 30 | |Customer S2C2 | | | | 31 | |Customer S2C3 | | | | 32 | Then customers exist with the following details: 33 | |Name |Description |Vertical |Assessor | 34 | |Customer S2C1 | | | | 35 | |Customer S2C2 | | | | 36 | |Customer S2C3 | | | | 37 | 38 | 39 | Scenario: 03 - Edit an existing customer 40 | # TODO 41 | 42 | 43 | # this scenario could do with some enhancing - select a subset, delete and check the remaining customers, then drop the remainder to cleanup the feature set 44 | Scenario: 04 - Delete all customers 45 | Given we delete all customers 46 | 47 | -------------------------------------------------------------------------------- /dataload/mongo-export.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | dbh="localhost:27017" 4 | 5 | if [ "$1" != "" ]; then 6 | dbh=$1 7 | else 8 | dbh="localhost:27017" 9 | fi 10 | 11 | echo "Connecting to MongoDb @ " ${dbh} 12 | 13 | oc get secret mongodb --template='{{range $k,$v := .data}}{{$z := base64decode $v}}{{printf "export %s=%s\n" $k $z}}{{end}}'|sed 's/-//g' > /tmp/mongocreds.sh 14 | source /tmp/mongocreds.sh 15 | mongoexport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection applications --out mongo-applications.json 16 | mongoexport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection assessments --out mongo-assessments.json 17 | mongoexport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection customer --out mongo-customer.json 18 | mongoexport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection member --out mongo-member.json 19 | mongoexport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection reviews --out mongo-reviews.json 20 | 21 | -------------------------------------------------------------------------------- /dataload/mongo-import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | dbh="localhost:27017" 4 | 5 | if [ "$1" != "" ]; then 6 | dbh=$1 7 | else 8 | dbh="localhost:27017" 9 | fi 10 | 11 | echo "Connecting to MongoDb @ " ${dbh} 12 | while true; do 13 | read -p "Do you wish to import data into PathFinder (all existing data will be lost) ?" yn 14 | case $yn in 15 | [Yy]* ) break;; 16 | [Nn]* ) exit;; 17 | * ) echo "Please answer yes or no.";; 18 | esac 19 | done 20 | 21 | oc get secret mongodb --template='{{range $k,$v := .data}}{{$z := base64decode $v}}{{printf "export %s=%s\n" $k $z}}{{end}}'|sed 's/-//g' > /tmp/mongocreds.sh 22 | source /tmp/mongocreds.sh 23 | 24 | mongoimport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection applications --drop --file mongo-applications.json 25 | mongoimport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection assessments --drop --file mongo-assessments.json 26 | mongoimport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection customer --drop --file mongo-customer.json 27 | mongoimport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection member --drop --file mongo-member.json 28 | mongoimport --host ${dbh} --db ${databasename} --username=${databaseuser} --password=${databasepassword} --collection reviews --drop --file mongo-reviews.json 29 | 30 | rm -f /tmp/mongocreds.sh 31 | 32 | -------------------------------------------------------------------------------- /dataload/mongo-member.json: -------------------------------------------------------------------------------- 1 | {"_id":"admin","_class":"com.redhat.gps.pathfinder.domain.Member","displayname":"Admin","password":"admin","roles":["SUPER"]} 2 | -------------------------------------------------------------------------------- /developer.md: -------------------------------------------------------------------------------- 1 | # Setup LOCAL/Laptop environment (but with Mongo on OpenShift) 2 | 3 | Deploy a MongoDB on OpenShift (incl. minishift) 4 | ``` 5 | oc new-project 6 | oc new-app --template=mongodb-persistent --param=MONGODB_DATABASE=pathfinder 7 | ``` 8 | 9 | Configure local pathfinder to be able to login to MongoDB (since the new-app mongo will create random user/password in an OpenShift secret) 10 | ``` 11 | ./print-mongo-creds.sh 12 | ``` 13 | 14 | Update the file "pathfinder/src/main/resources/config/application-dev.yml" with the mongo database user credentials. 15 | 16 | 17 | Then port forward to 9191 so that the local pathfinder can find the remote mongo (this script keeps dropping out so you many need to restart it from time to time). 18 | ``` 19 | ./pathfinder-server-port-forward.sh 20 | ``` 21 | 22 | 23 | Startup Pathfinder backend 24 | ``` 25 | cd / 26 | ./run-local.sh 27 | ``` 28 | 29 | Startup Pathfinder-UI locally 30 | ``` 31 | cd / 32 | ./run-local.sh 33 | ``` 34 | 35 | Validate pathfinder is running by hitting http:localhost:8083/. -------------------------------------------------------------------------------- /legacy/PathfinderLocalTest.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "b2f6551f-b3e4-2ce7-d066-53151a86b71a", 3 | "name": "PathfinderLocalTest", 4 | "values": [ 5 | { 6 | "key": "url", 7 | "value": "localhost:8080", 8 | "enabled": true, 9 | "type": "text" 10 | }, 11 | { 12 | "key": "customerID", 13 | "value": "d8a419ff-2081-4fbb-ac8b-e29663e22863", 14 | "enabled": true, 15 | "type": "text" 16 | }, 17 | { 18 | "key": "applicationID", 19 | "value": "3327fdd8-57d1-45c1-8f2e-7ba3b65107e6", 20 | "enabled": true, 21 | "type": "text" 22 | }, 23 | { 24 | "key": "reviewID", 25 | "value": "5ab0454a-0932-482b-9d79-6065ff10517c", 26 | "enabled": true, 27 | "type": "text" 28 | }, 29 | { 30 | "key": "assessmentID", 31 | "value": "9fc16c58-5acc-4062-91ca-81384ffe8f6d", 32 | "enabled": true, 33 | "type": "text" 34 | }, 35 | { 36 | "key": "AssessmentID", 37 | "value": "5af988cef55c4c6681170be9", 38 | "enabled": true, 39 | "type": "text" 40 | }, 41 | { 42 | "key": "profileID", 43 | "value": "2f1134f2-4161-4bc1-aea4-847abe404e71", 44 | "enabled": true, 45 | "type": "text" 46 | }, 47 | { 48 | "key": "loadAppID", 49 | "value": "c8b8639c-dd1b-47c0-9ac7-3997b5fc8ab8", 50 | "enabled": true, 51 | "type": "text" 52 | }, 53 | { 54 | "key": "customerIDLT", 55 | "value": "6114d3db-79fa-4535-b1bf-a9380ccafdaf", 56 | "enabled": true, 57 | "type": "text" 58 | }, 59 | { 60 | "key": "latestAssessment", 61 | "value": "e48406e8-494e-413a-b842-cdfc420c827b", 62 | "enabled": true, 63 | "type": "text" 64 | } 65 | ], 66 | "_postman_variable_scope": "environment", 67 | "_postman_exported_at": "2018-05-23T13:14:15.494Z", 68 | "_postman_exported_using": "Postman/6.0.10" 69 | } -------------------------------------------------------------------------------- /legacy/jhipster-jdl.jh: -------------------------------------------------------------------------------- 1 | entity Customer{ 2 | name String required 3 | } 4 | 5 | entity Applications{ 6 | name String required 7 | } 8 | 9 | entity Assessments{ 10 | results String required 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /legacy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pathfinder", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "server.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/noelo/pathfinder.git" 12 | }, 13 | "keywords": [], 14 | "author": "", 15 | "license": "ISC", 16 | "bugs": { 17 | "url": "https://github.com/noelo/pathfinder/issues" 18 | }, 19 | "homepage": "https://github.com/noelo/pathfinder#readme", 20 | "dependencies": { 21 | "http-server": "^0.10.0" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /legacy/pathfinder-server-build.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | annotations: 5 | description: Build the pathfinder-server Application 6 | iconClass: icon-java 7 | tags: java 8 | name: pathfinder-server-build 9 | objects: 10 | - apiVersion: v1 11 | kind: ImageStream 12 | metadata: 13 | labels: 14 | app: ${APPLICATION_NAME} 15 | name: ${APPLICATION_NAME} 16 | - apiVersion: v1 17 | kind: BuildConfig 18 | metadata: 19 | creationTimestamp: null 20 | labels: 21 | app: ${APPLICATION_NAME} 22 | template: openjdk18-web-basic-s2i 23 | xpaas: 1.4.12 24 | name: ${APPLICATION_NAME}-build 25 | spec: 26 | nodeSelector: null 27 | output: 28 | to: 29 | kind: ImageStreamTag 30 | name: ${APPLICATION_NAME}:latest 31 | postCommit: {} 32 | resources: {} 33 | runPolicy: Serial 34 | source: 35 | git: 36 | ref: master 37 | uri: https://github.com/redhat-cop/pathfinder 38 | type: Git 39 | strategy: 40 | sourceStrategy: 41 | forcePull: true 42 | from: 43 | kind: ImageStreamTag 44 | name: redhat-openjdk18-openshift:1.3 45 | namespace: openshift 46 | type: Source 47 | triggers: 48 | - imageChange: {} 49 | type: ImageChange 50 | - type: ConfigChange 51 | status: 52 | lastVersion: 0 53 | parameters: 54 | - description: The name for the application. 55 | displayName: Application name 56 | name: APPLICATION_NAME 57 | required: true 58 | value: pathfinder-server 59 | 60 | -------------------------------------------------------------------------------- /legacy/pathfinder-server-port-forward.sh: -------------------------------------------------------------------------------- 1 | POD=`oc get pods | grep Running | grep mongodb | awk '{print $1}'` 2 | oc port-forward $POD 9191:27017 3 | -------------------------------------------------------------------------------- /legacy/pathfinder-ui-build.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | annotations: 5 | description: Build the pathfinder-ui Application 6 | iconClass: icon-java 7 | tags: java 8 | name: pathfinder-ui-build 9 | objects: 10 | - apiVersion: v1 11 | kind: ImageStream 12 | metadata: 13 | labels: 14 | app: ${APPLICATION_NAME} 15 | name: ${APPLICATION_NAME} 16 | - apiVersion: v1 17 | kind: BuildConfig 18 | metadata: 19 | creationTimestamp: null 20 | labels: 21 | app: ${APPLICATION_NAME} 22 | application: ${APPLICATION_NAME} 23 | template: jws31-tomcat8-basic-s2i 24 | xpaas: 1.4.12 25 | name: ${APPLICATION_NAME}-build 26 | spec: 27 | nodeSelector: null 28 | output: 29 | to: 30 | kind: ImageStreamTag 31 | name: ${APPLICATION_NAME}:latest 32 | postCommit: {} 33 | resources: {} 34 | runPolicy: Serial 35 | source: 36 | git: 37 | ref: master 38 | uri: https://github.com/redhat-cop/pathfinder-ui 39 | type: Git 40 | strategy: 41 | sourceStrategy: 42 | env: 43 | - name: MAVEN_MIRROR_URL 44 | - name: ARTIFACT_DIR 45 | forcePull: true 46 | from: 47 | kind: ImageStreamTag 48 | name: jboss-webserver31-tomcat8-openshift:1.2 49 | namespace: openshift 50 | type: Source 51 | triggers: 52 | - imageChange: {} 53 | type: ImageChange 54 | - type: ConfigChange 55 | status: 56 | lastVersion: 0 57 | parameters: 58 | - description: The name for the application. 59 | displayName: Application name 60 | name: APPLICATION_NAME 61 | required: true 62 | value: pathfinder-ui -------------------------------------------------------------------------------- /legacy/print-mongo-creds.sh: -------------------------------------------------------------------------------- 1 | PROJECT=`oc project -q` 2 | USER=`oc get secret mongodb -o yaml | grep " database-user" | awk '{print $2}' | base64 -d` 3 | PASS=`oc get secret mongodb -o yaml | grep " database-password" | awk '{print $2}' | base64 -d` 4 | 5 | echo "Project : $PROJECT" 6 | echo "Mongo - Database User: $USER" 7 | echo "Mongo - Database User: $PASS" 8 | -------------------------------------------------------------------------------- /legacy/run-local.sh: -------------------------------------------------------------------------------- 1 | mvn spring-boot:run -Dspring.profiles.active=dev,swagger 2 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/ApplicationWebXml.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.config.DefaultProfileUtil; 26 | import org.springframework.boot.builder.SpringApplicationBuilder; 27 | import org.springframework.boot.web.support.SpringBootServletInitializer; 28 | 29 | /** 30 | * This is a helper Java class that provides an alternative to creating a web.xml. 31 | * This will be invoked only when the application is deployed to a servlet container like Tomcat, JBoss etc. 32 | */ 33 | public class ApplicationWebXml extends SpringBootServletInitializer { 34 | 35 | @Override 36 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 37 | /** 38 | * set a default to use when no profile is configured. 39 | */ 40 | DefaultProfileUtil.addDefaultProfile(application.application()); 41 | return application.sources(PathfinderApp.class); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/ApplicationProperties.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.boot.context.properties.ConfigurationProperties; 26 | 27 | /** 28 | * Properties specific to Pathfinder. 29 | *

30 | * Properties are configured in the application.yml file. 31 | * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. 32 | */ 33 | @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) 34 | public class ApplicationProperties { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/Constants.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | /** 26 | * Application constants. 27 | */ 28 | public final class Constants { 29 | 30 | // Regex for acceptable logins 31 | public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$"; 32 | 33 | public static final String SYSTEM_ACCOUNT = "system"; 34 | public static final String ANONYMOUS_USER = "anonymoususer"; 35 | public static final String DEFAULT_LANGUAGE = "en"; 36 | 37 | private Constants() { 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/DateTimeFormatConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.context.annotation.Configuration; 26 | import org.springframework.format.FormatterRegistry; 27 | import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; 28 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 29 | 30 | @Configuration 31 | public class DateTimeFormatConfiguration extends WebMvcConfigurerAdapter { 32 | 33 | @Override 34 | public void addFormatters(FormatterRegistry registry) { 35 | DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); 36 | registrar.setUseIsoFormat(true); 37 | registrar.registerFormatters(registry); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/JacksonConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.fasterxml.jackson.module.afterburner.AfterburnerModule; 26 | 27 | import org.springframework.context.annotation.Bean; 28 | import org.springframework.context.annotation.Configuration; 29 | import org.zalando.problem.ProblemModule; 30 | import org.zalando.problem.validation.ConstraintViolationProblemModule; 31 | 32 | @Configuration 33 | public class JacksonConfiguration { 34 | 35 | /* 36 | * Jackson Afterburner module to speed up serialization/deserialization. 37 | */ 38 | @Bean 39 | public AfterburnerModule afterburnerModule() { 40 | return new AfterburnerModule(); 41 | } 42 | 43 | /* 44 | * Module for serialization/deserialization of RFC7807 Problem. 45 | */ 46 | @Bean 47 | ProblemModule problemModule() { 48 | return new ProblemModule(); 49 | } 50 | 51 | /* 52 | * Module for serialization/deserialization of ConstraintViolationProblem. 53 | */ 54 | @Bean 55 | ConstraintViolationProblemModule constraintViolationProblemModule() { 56 | return new ConstraintViolationProblemModule(); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/LoggingAspectConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.aop.logging.LoggingAspect; 26 | 27 | import io.github.jhipster.config.JHipsterConstants; 28 | 29 | import org.springframework.context.annotation.*; 30 | import org.springframework.core.env.Environment; 31 | 32 | @Configuration 33 | @EnableAspectJAutoProxy 34 | public class LoggingAspectConfiguration { 35 | 36 | @Bean 37 | @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) 38 | public LoggingAspect loggingAspect(Environment env) { 39 | return new LoggingAspect(env); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/RequestLoggingFilterConfig.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.context.annotation.Bean; 26 | import org.springframework.context.annotation.Configuration; 27 | import org.springframework.web.filter.CommonsRequestLoggingFilter; 28 | 29 | @Configuration 30 | public class RequestLoggingFilterConfig { 31 | 32 | @Bean 33 | public CommonsRequestLoggingFilter logFilter() { 34 | CommonsRequestLoggingFilter filter 35 | = new CommonsRequestLoggingFilter(); 36 | filter.setIncludeQueryString(true); 37 | filter.setIncludePayload(true); 38 | filter.setMaxPayloadLength(10000); 39 | filter.setIncludeHeaders(false); 40 | filter.setAfterMessagePrefix("REQUEST DATA : "); 41 | return filter; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/audit/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Audit specific code. 3 | */ 4 | package com.redhat.gps.pathfinder.config.audit; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/dbmigrations/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * MongoDB database migrations using MongoBee. 3 | */ 4 | package com.redhat.gps.pathfinder.config.dbmigrations; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/config/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Framework configuration files. 3 | */ 4 | package com.redhat.gps.pathfinder.config; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/domain/QuestionWeights.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.domain; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | 26 | import lombok.Data; 27 | 28 | @Data 29 | public class QuestionWeights { 30 | public enum QuestionRank { 31 | UNKNOWN(0), RED(1), AMBER(2), GREEN(3); 32 | 33 | private final int levelCode; 34 | 35 | private QuestionRank(int levelCode) { 36 | this.levelCode = levelCode; 37 | } 38 | } 39 | 40 | private int weight; 41 | 42 | private QuestionRank rank; 43 | 44 | @Override 45 | public String toString() { 46 | return "QuestionWeights{" + 47 | "weight=" + weight + 48 | ", rank=" + rank + 49 | '}'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/domain/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * JPA domain objects. 3 | */ 4 | package com.redhat.gps.pathfinder.domain; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/repository/ApplicationsRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.Applications; 26 | import org.springframework.stereotype.Repository; 27 | 28 | import org.springframework.data.mongodb.repository.MongoRepository; 29 | 30 | import java.util.List; 31 | 32 | /** 33 | * Spring Data MongoDB repository for the Applications entity. 34 | */ 35 | @SuppressWarnings("unused") 36 | @Repository 37 | public interface ApplicationsRepository extends MongoRepository { 38 | 39 | @Override 40 | List findAll(); 41 | 42 | @Override 43 | Applications insert(Applications entity); 44 | 45 | @Override 46 | Applications save(Applications entity); 47 | 48 | @Override 49 | boolean exists(String s); 50 | 51 | @Override 52 | long count(); 53 | } 54 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/repository/AssessmentsRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.Assessments; 26 | import org.springframework.stereotype.Repository; 27 | 28 | import org.springframework.data.mongodb.repository.MongoRepository; 29 | 30 | /** 31 | * Spring Data MongoDB repository for the Assessments entity. 32 | */ 33 | @SuppressWarnings("unused") 34 | @Repository 35 | public interface AssessmentsRepository extends MongoRepository { 36 | 37 | @Override 38 | Assessments insert(Assessments Assessments); 39 | 40 | @Override 41 | Assessments save(Assessments entity); 42 | 43 | @Override 44 | Assessments findOne(String s); 45 | 46 | @Override 47 | boolean exists(String s); 48 | 49 | @Override 50 | long count(); 51 | } 52 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/repository/CustomerRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.Customer; 26 | import org.springframework.data.mongodb.repository.MongoRepository; 27 | import org.springframework.stereotype.Repository; 28 | 29 | import java.util.List; 30 | 31 | /** 32 | * Spring Data MongoDB repository for the Customer entity. 33 | */ 34 | @SuppressWarnings("unused") 35 | @Repository 36 | public interface CustomerRepository extends MongoRepository { 37 | 38 | @Override 39 | Customer save(Customer entity); 40 | 41 | @Override 42 | Customer insert(Customer entity); 43 | 44 | @Override 45 | List findAll(); 46 | 47 | @Override 48 | Customer findOne(String s); 49 | 50 | @Override 51 | boolean exists(String s); 52 | } 53 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/repository/MembersRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import java.util.List; 26 | 27 | import org.springframework.data.mongodb.repository.MongoRepository; 28 | import org.springframework.stereotype.Repository; 29 | 30 | import com.redhat.gps.pathfinder.domain.Member; 31 | 32 | 33 | /** 34 | * Spring Data MongoDB repository for the Member entity. 35 | */ 36 | @SuppressWarnings("unused") 37 | @Repository 38 | public interface MembersRepository extends MongoRepository { 39 | 40 | @Override 41 | List findAll(); 42 | 43 | @Override 44 | Member insert(Member entity); 45 | 46 | @Override 47 | Member save(Member entity); 48 | 49 | @Override 50 | boolean exists(String s); 51 | 52 | @Override 53 | long count(); 54 | } 55 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/repository/QuestionMetaDataRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.QuestionMetaData; 26 | import org.springframework.data.mongodb.repository.MongoRepository; 27 | import org.springframework.stereotype.Repository; 28 | 29 | import java.util.List; 30 | 31 | @SuppressWarnings("unused") 32 | @Repository 33 | public interface QuestionMetaDataRepository extends MongoRepository { 34 | @Override 35 | List findAll(); 36 | 37 | @Override 38 | QuestionMetaData insert(QuestionMetaData entity); 39 | 40 | @Override 41 | QuestionMetaData save(QuestionMetaData entity); 42 | 43 | @Override 44 | boolean exists(String s); 45 | 46 | @Override 47 | long count(); 48 | } 49 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/repository/ReviewsRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.ApplicationAssessmentReview; 26 | import org.springframework.data.mongodb.repository.MongoRepository; 27 | import org.springframework.stereotype.Repository; 28 | 29 | import java.util.List; 30 | 31 | /** 32 | * Spring Data MongoDB repository for the Applications Assessment Review entity. 33 | */ 34 | @SuppressWarnings("unused") 35 | @Repository 36 | public interface ReviewsRepository extends MongoRepository { 37 | 38 | @Override 39 | List findAll(); 40 | 41 | @Override 42 | ApplicationAssessmentReview insert(ApplicationAssessmentReview entity); 43 | 44 | @Override 45 | ApplicationAssessmentReview save(ApplicationAssessmentReview entity); 46 | 47 | @Override 48 | boolean exists(String s); 49 | 50 | @Override 51 | long count(); 52 | } 53 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/repository/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Data JPA repositories. 3 | */ 4 | package com.redhat.gps.pathfinder.repository; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/security/AuthoritiesConstants.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | /** 26 | * Constants for Spring Security authorities. 27 | */ 28 | public final class AuthoritiesConstants { 29 | 30 | public static final String ADMIN = "pathfinderAdmin"; 31 | 32 | public static final String USER = "pathfinderUser"; 33 | 34 | public static final String ANONYMOUS = "ROLE_ANONYMOUS"; 35 | 36 | private AuthoritiesConstants() { 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/security/SpringSecurityAuditorAware.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.config.Constants; 26 | 27 | import org.springframework.data.domain.AuditorAware; 28 | import org.springframework.stereotype.Component; 29 | 30 | /** 31 | * Implementation of AuditorAware based on Spring Security. 32 | */ 33 | @Component 34 | public class SpringSecurityAuditorAware implements AuditorAware { 35 | 36 | @Override 37 | public String getCurrentAuditor() { 38 | return SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/security/UserNotActivatedException.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.security.core.AuthenticationException; 26 | 27 | /** 28 | * This exception is thrown in case of a not activated user trying to authenticate. 29 | */ 30 | public class UserNotActivatedException extends AuthenticationException { 31 | 32 | private static final long serialVersionUID = 1L; 33 | 34 | public UserNotActivatedException(String message) { 35 | super(message); 36 | } 37 | 38 | public UserNotActivatedException(String message, Throwable t) { 39 | super(message, t); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/security/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Security configuration. 3 | */ 4 | package com.redhat.gps.pathfinder.security; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/service/dto/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Data Transfer Objects. 3 | */ 4 | package com.redhat.gps.pathfinder.service.dto; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/service/mapper/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * MapStruct mappers for mapping domain objects and Data Transfer Objects. 3 | */ 4 | package com.redhat.gps.pathfinder.service.mapper; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/service/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Service layer beans. 3 | */ 4 | package com.redhat.gps.pathfinder.service; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/service/util/Json.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.service.util; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.codehaus.jackson.map.ObjectMapper; 26 | import org.codehaus.jackson.map.SerializationConfig; 27 | 28 | public class Json { 29 | 30 | public static ObjectMapper newObjectMapper(boolean pretty){ 31 | ObjectMapper mapper = new ObjectMapper(); 32 | mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT,pretty); 33 | return mapper; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/service/util/MapBuilder.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.service.util; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import java.util.HashMap; 26 | import java.util.Map; 27 | 28 | public class MapBuilder { 29 | private Map s=new HashMap(); 30 | 31 | public MapBuilder put(K key, V value){ 32 | s.put(key, value); 33 | return this; 34 | } 35 | 36 | public Map build(){ 37 | return s; 38 | } 39 | 40 | public MapBuilder putAll(Map values) { 41 | s.putAll(values); 42 | return this; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/service/util/RequestUtils.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.service.util; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import java.util.Enumeration; 26 | 27 | import javax.servlet.http.HttpServletRequest; 28 | 29 | import org.slf4j.Logger; 30 | import org.slf4j.LoggerFactory; 31 | 32 | import com.redhat.gps.pathfinder.web.api.CustomerAPIImpl; 33 | 34 | public class RequestUtils{ 35 | private static final Logger log = LoggerFactory.getLogger(RequestUtils.class); 36 | 37 | public static void printRequestHeaders(HttpServletRequest request){ 38 | Enumeration headerNames=request.getHeaderNames(); 39 | while(headerNames.hasMoreElements()){ 40 | String name=headerNames.nextElement(); 41 | String value=request.getHeader(name); 42 | log.debug("HttpServletRequest::Header name={}, value={}", name, value); 43 | } 44 | } 45 | 46 | public static String getAuthToken(HttpServletRequest request){ 47 | String token=request.getHeader("Authorization"); 48 | if (token!=null) 49 | token=token.replaceAll("Bearer ", ""); 50 | return token; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/service/util/Tuple.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.service.util; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | public class Tuple { 26 | private Object[] values; 27 | public Tuple(X first, Y second) { 28 | values=new Object[]{first, second}; 29 | } 30 | @SuppressWarnings("unchecked") 31 | public X getFirst() { 32 | return (X)values[0]; 33 | } 34 | @SuppressWarnings("unchecked") 35 | public Y getSecond() { 36 | return (Y)values[1]; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/web/api/MemberController.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.web.api; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.Member; 26 | import com.redhat.gps.pathfinder.web.api.model.MemberType; 27 | 28 | public class MemberController{ 29 | 30 | 31 | // TOOD: Later on I will add all member REST api operations here 32 | 33 | public static MemberType populate(Member member, MemberType result){ 34 | result.setUsername(member.getUsername()); 35 | result.setDisplayName(member.getDisplayName()); 36 | result.setEmail(member.getEmail()); 37 | // result.setPassword(member.getPassword()); 38 | // result.setCustomerId(member.getCustomer().getId()); 39 | return result; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/web/api/security/CredentialsException.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.web.api.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | public class CredentialsException extends Exception{ 26 | private static final long serialVersionUID=1L; 27 | 28 | public CredentialsException(String mes){ 29 | super(mes); 30 | } 31 | 32 | public CredentialsException(String mes, Throwable t){ 33 | super(mes, t); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/web/api/security/JwtAuthenticationEntryPoint.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.web.api.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.security.core.AuthenticationException; 26 | import org.springframework.security.web.AuthenticationEntryPoint; 27 | import org.springframework.stereotype.Component; 28 | 29 | import javax.servlet.http.HttpServletRequest; 30 | import javax.servlet.http.HttpServletResponse; 31 | import java.io.IOException; 32 | import java.io.Serializable; 33 | 34 | @Component 35 | public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable { 36 | 37 | private static final long serialVersionUID = -8970718410437077606L; 38 | 39 | @Override 40 | public void commence(HttpServletRequest request, 41 | HttpServletResponse response, 42 | AuthenticationException authException) throws IOException { 43 | // This is invoked when user tries to access a secured REST resource without supplying any credentials 44 | // We should just send a 401 Unauthorized response because there is no 'login page' to redirect to 45 | response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/web/rest/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring MVC REST controllers. 3 | */ 4 | package com.redhat.gps.pathfinder.web.rest; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/web/rest/vm/LoggerVM.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.web.rest.vm; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import ch.qos.logback.classic.Logger; 26 | 27 | /** 28 | * View Model object for storing a Logback logger. 29 | */ 30 | public class LoggerVM { 31 | 32 | private String name; 33 | 34 | private String level; 35 | 36 | public LoggerVM(Logger logger) { 37 | this.name = logger.getName(); 38 | this.level = logger.getEffectiveLevel().toString(); 39 | } 40 | 41 | public LoggerVM() { 42 | // Empty public constructor used by Jackson. 43 | } 44 | 45 | public String getName() { 46 | return name; 47 | } 48 | 49 | public void setName(String name) { 50 | this.name = name; 51 | } 52 | 53 | public String getLevel() { 54 | return level; 55 | } 56 | 57 | public void setLevel(String level) { 58 | this.level = level; 59 | } 60 | 61 | @Override 62 | public String toString() { 63 | return "LoggerVM{" + 64 | "name='" + name + '\'' + 65 | ", level='" + level + '\'' + 66 | '}'; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /legacy/src/main/java/com/redhat/gps/pathfinder/web/rest/vm/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * View Models used by Spring MVC REST controllers. 3 | */ 4 | package com.redhat.gps.pathfinder.web.rest.vm; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /legacy/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | ${AnsiColor.RED} ###### ####### ###### # # # ####### 3 | ${AnsiColor.RED} # # # # # # # # # # 4 | ${AnsiColor.RED} # # # # # # # # # # 5 | ${AnsiColor.RED} ###### ##### # # ####### # # # 6 | ${AnsiColor.RED} # # # # # # # ####### # 7 | ${AnsiColor.RED} # # # # # # # # # # 8 | ${AnsiColor.RED} # # ####### ###### # # # # # 9 | 10 | ${AnsiColor.GREEN} ###### # ####### # # ####### ### # # ###### ####### ###### 11 | ${AnsiColor.GREEN} # # # # # # # # # ## # # # # # # 12 | ${AnsiColor.GREEN} # # # # # # # # # # # # # # # # # 13 | ${AnsiColor.GREEN} ###### # # # ####### ##### # # # # # # ##### ###### 14 | ${AnsiColor.GREEN} # ####### # # # # # # # # # # # # # 15 | ${AnsiColor.GREEN} # # # # # # # # # ## # # # # # 16 | ${AnsiColor.GREEN} # # # # # # # ### # # ###### ####### # # 17 | 18 | 19 | -------------------------------------------------------------------------------- /legacy/src/main/resources/config/bootstrap.properties: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: dev 3 | cloud.kubernetes: 4 | configmap.enabled = false 5 | secrets.enabled = false 6 | secrets.paths= /tmp/secrets, /tmp/noc 7 | secrets.name = mongodb 8 | secrets.enableApi = false 9 | 10 | profiles: prodose 11 | cloud.kubernetes: 12 | configmap.enabled = true 13 | secrets.enabled = true 14 | secrets.paths= /tmp/secrets, /tmp/noc 15 | secrets.name = mongodb 16 | secrets.enableApi = true 17 | -------------------------------------------------------------------------------- /legacy/src/main/resources/i18n/messages.properties: -------------------------------------------------------------------------------- 1 | # Error page 2 | error.title=Your request cannot be processed 3 | error.subtitle=Sorry, an error has occurred. 4 | error.status=Status: 5 | error.message=Message: 6 | 7 | # Activation email 8 | email.activation.title=pathfinder account activation 9 | email.activation.greeting=Dear {0} 10 | email.activation.text1=Your pathfinder account has been created, please click on the URL below to activate it: 11 | email.activation.text2=Regards, 12 | email.signature=pathfinder Team. 13 | 14 | # Creation email 15 | email.creation.text1=Your pathfinder account has been created, please click on the URL below to access it: 16 | 17 | # Reset email 18 | email.reset.title=pathfinder password reset 19 | email.reset.greeting=Dear {0} 20 | email.reset.text1=For your pathfinder account a password reset was requested, please click on the URL below to reset it: 21 | email.reset.text2=Regards, 22 | 23 | -------------------------------------------------------------------------------- /legacy/src/main/resources/keycloak.json: -------------------------------------------------------------------------------- 1 | { 2 | "realm": "pathfinder", 3 | "bearer-only": true, 4 | "auth-server-url": "http://sso-pathfinder.192.168.99.100.nip.io/auth", 5 | "ssl-required": "external", 6 | "resource": "PathfinderServer", 7 | "confidential-port": 0 8 | } 9 | -------------------------------------------------------------------------------- /legacy/src/main/resources/mails/activationEmail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JHipster activation 5 | 6 | 7 | 8 | 9 |

10 | Dear 11 |

12 |

13 | Your JHipster account has been created, please click on the URL below to activate it: 14 |

15 |

16 | Activation Link 18 |

19 |

20 | Regards, 21 |
22 | JHipster. 23 |

24 | 25 | 26 | -------------------------------------------------------------------------------- /legacy/src/main/resources/mails/creationEmail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JHipster creation 5 | 6 | 7 | 8 | 9 |

10 | Dear 11 |

12 |

13 | Your JHipster account has been created, please click on the URL below to access it: 14 |

15 |

16 | Login link 18 |

19 |

20 | Regards, 21 |
22 | JHipster. 23 |

24 | 25 | 26 | -------------------------------------------------------------------------------- /legacy/src/main/resources/mails/passwordResetEmail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JHipster password reset 5 | 6 | 7 | 8 | 9 |

10 | Dear 11 |

12 |

13 | For your JHipster account a password reset was requested, please click on the URL below to reset it: 14 |

15 |

16 | Reset Link 18 |

19 |

20 | Regards, 21 |
22 | JHipster. 23 |

24 | 25 | 26 | -------------------------------------------------------------------------------- /legacy/src/main/webapp/content/index.css: -------------------------------------------------------------------------------- 1 | .btn-green { 2 | background-color: #1ab394; 3 | color: #fff; 4 | border-radius: 3px; 5 | } 6 | .btn-green:focus, 7 | .btn-green:hover { 8 | background-color: #18a689; 9 | color: #fff; 10 | } 11 | .panel-footer { 12 | padding: 0 15px; 13 | border: none; 14 | text-align: right; 15 | background-color: #fff; 16 | } -------------------------------------------------------------------------------- /legacy/src/main/webapp/content/test-vars.js: -------------------------------------------------------------------------------- 1 | Utils = { 2 | SERVER: "http://localhost:8080", 3 | 4 | chartColors: { 5 | "UNKNOWN": "#808080", 6 | "RED": "#cc0000", 7 | "AMBER": "#ec7a08", 8 | "GREEN": "#92d400" 9 | }, 10 | getParameterByName: function(name, url) { 11 | if (!url) url = window.location.href; 12 | name = name.replace(/[\[\]]/g, "\\$&"); 13 | var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 14 | results = regex.exec(url); 15 | if (!results) return null; 16 | if (!results[2]) return ''; 17 | return decodeURIComponent(results[2].replace(/\+/g, " ")); 18 | } 19 | } 20 | var jwtToken=""; 21 | -------------------------------------------------------------------------------- /legacy/src/main/webapp/keycloak.json: -------------------------------------------------------------------------------- 1 | { 2 | "realm": "pathfinder", 3 | "auth-server-url": "http://sso-pathfinder.192.168.99.100.nip.io/auth", 4 | "ssl-required": "external", 5 | "resource": "PathfinderWebUI", 6 | "public-client": true, 7 | "confidential-port": 0 8 | } 9 | -------------------------------------------------------------------------------- /pathfinder-server-war/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .classpath 3 | .project 4 | .settings 5 | *~ 6 | -------------------------------------------------------------------------------- /pathfinder-server-war/src/main/java/com/redhat/gps/VersionServlet.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.ServletException; 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import org.apache.commons.io.IOUtils; 11 | 12 | public class VersionServlet extends HttpServlet { 13 | private static final long serialVersionUID = -1L; 14 | 15 | @Override 16 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 17 | resp.setContentType("text/plain"); 18 | try { 19 | resp.getWriter().println(IOUtils.toString(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF"))); 20 | } catch (Exception e) { 21 | resp.getWriter().append("Version information unknown"); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /pathfinder-server-war/src/main/java/com/redhat/gps/WarApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | import com.redhat.gps.pathfinder.PathfinderApp; 7 | 8 | @SpringBootApplication 9 | public class WarApplication{ 10 | public static void main(String[] args) { 11 | SpringApplication.run(PathfinderApp.class, args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /pathfinder-server-war/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | version 11 | com.redhat.gps.VersionServlet 12 | 13 | 14 | 20 | 21 | version 22 | /version 23 | 24 | 25 | 26 | 60 27 | 28 | 29 | -------------------------------------------------------------------------------- /pathfinder-server/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .classpath 3 | .project 4 | .settings 5 | *~ 6 | -------------------------------------------------------------------------------- /pathfinder-server/print-mongo-creds.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | PROJECT=`oc project -q` 3 | USER=`oc get secret mongodb -o yaml | grep " database-user" | awk '{print $2}' | base64 --decode` 4 | PASS=`oc get secret mongodb -o yaml | grep " database-password" | awk '{print $2}' | base64 --decode` 5 | 6 | echo "Project : $PROJECT" 7 | echo "Mongo - Database User: $USER" 8 | echo "Mongo - Database User: $PASS" 9 | -------------------------------------------------------------------------------- /pathfinder-server/run-local.sh: -------------------------------------------------------------------------------- 1 | mvn spring-boot:run -Dspring.profiles.active=dev,swagger 2 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/ApplicationWebXml.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.config.DefaultProfileUtil; 26 | import org.springframework.boot.builder.SpringApplicationBuilder; 27 | import org.springframework.boot.web.support.SpringBootServletInitializer; 28 | 29 | /** 30 | * This is a helper Java class that provides an alternative to creating a web.xml. 31 | * This will be invoked only when the application is deployed to a servlet container like Tomcat, JBoss etc. 32 | */ 33 | public class ApplicationWebXml extends SpringBootServletInitializer { 34 | 35 | @Override 36 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 37 | /** 38 | * set a default to use when no profile is configured. 39 | */ 40 | DefaultProfileUtil.addDefaultProfile(application.application()); 41 | return application.sources(PathfinderApp.class); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/PathfinderInitializerServlet.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder; 2 | 3 | /*- 4 | * #%L 5 | * com.redhat.gps.pathfinder.pathfinder-server 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat Inc 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.boot.SpringApplication; 26 | import org.springframework.boot.autoconfigure.SpringBootApplication; 27 | import org.springframework.boot.builder.SpringApplicationBuilder; 28 | import org.springframework.boot.web.support.SpringBootServletInitializer; 29 | 30 | import com.redhat.gps.pathfinder.PathfinderApp; 31 | 32 | @SpringBootApplication 33 | public class PathfinderInitializerServlet extends SpringBootServletInitializer { 34 | 35 | @Override 36 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 37 | return application.sources(PathfinderApp.class); 38 | } 39 | 40 | public static void main(String[] args) throws Exception { 41 | SpringApplication.run(PathfinderApp.class, args); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/config/ApplicationProperties.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.boot.context.properties.ConfigurationProperties; 26 | 27 | /** 28 | * Properties specific to Pathfinder. 29 | *

30 | * Properties are configured in the application.yml file. 31 | * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. 32 | */ 33 | @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) 34 | public class ApplicationProperties { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/config/Constants.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | /** 26 | * Application constants. 27 | */ 28 | public final class Constants { 29 | 30 | // Regex for acceptable logins 31 | public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$"; 32 | 33 | public static final String SYSTEM_ACCOUNT = "system"; 34 | public static final String ANONYMOUS_USER = "anonymoususer"; 35 | public static final String DEFAULT_LANGUAGE = "en"; 36 | 37 | private Constants() { 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/config/DateTimeFormatConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.context.annotation.Configuration; 26 | import org.springframework.format.FormatterRegistry; 27 | import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; 28 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 29 | 30 | @Configuration 31 | public class DateTimeFormatConfiguration extends WebMvcConfigurerAdapter { 32 | 33 | @Override 34 | public void addFormatters(FormatterRegistry registry) { 35 | DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); 36 | registrar.setUseIsoFormat(true); 37 | registrar.registerFormatters(registry); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/config/JacksonConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.fasterxml.jackson.module.afterburner.AfterburnerModule; 26 | 27 | import org.springframework.context.annotation.Bean; 28 | import org.springframework.context.annotation.Configuration; 29 | import org.zalando.problem.ProblemModule; 30 | import org.zalando.problem.validation.ConstraintViolationProblemModule; 31 | 32 | @Configuration 33 | public class JacksonConfiguration { 34 | 35 | /* 36 | * Jackson Afterburner module to speed up serialization/deserialization. 37 | */ 38 | @Bean 39 | public AfterburnerModule afterburnerModule() { 40 | return new AfterburnerModule(); 41 | } 42 | 43 | /* 44 | * Module for serialization/deserialization of RFC7807 Problem. 45 | */ 46 | @Bean 47 | ProblemModule problemModule() { 48 | return new ProblemModule(); 49 | } 50 | 51 | /* 52 | * Module for serialization/deserialization of ConstraintViolationProblem. 53 | */ 54 | @Bean 55 | ConstraintViolationProblemModule constraintViolationProblemModule() { 56 | return new ConstraintViolationProblemModule(); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/config/RequestLoggingFilterConfig.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.config; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.context.annotation.Bean; 26 | import org.springframework.context.annotation.Configuration; 27 | import org.springframework.web.filter.CommonsRequestLoggingFilter; 28 | 29 | @Configuration 30 | public class RequestLoggingFilterConfig { 31 | 32 | @Bean 33 | public CommonsRequestLoggingFilter logFilter() { 34 | CommonsRequestLoggingFilter filter 35 | = new CommonsRequestLoggingFilter(); 36 | filter.setIncludeQueryString(true); 37 | filter.setIncludePayload(true); 38 | filter.setMaxPayloadLength(10000); 39 | filter.setIncludeHeaders(false); 40 | filter.setAfterMessagePrefix("REQUEST DATA : "); 41 | return filter; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/config/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Framework configuration files. 3 | */ 4 | package com.redhat.gps.pathfinder.config; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/domain/QuestionWeights.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.domain; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | 26 | import lombok.Data; 27 | 28 | @Data 29 | public class QuestionWeights { 30 | public enum QuestionRank { 31 | UNKNOWN(0), RED(1), AMBER(2), GREEN(3); 32 | 33 | private final int levelCode; 34 | 35 | private QuestionRank(int levelCode) { 36 | this.levelCode = levelCode; 37 | } 38 | } 39 | 40 | private int weight; 41 | 42 | private QuestionRank rank; 43 | 44 | @Override 45 | public String toString() { 46 | return "QuestionWeights{" + 47 | "weight=" + weight + 48 | ", rank=" + rank + 49 | '}'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/domain/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * JPA domain objects. 3 | */ 4 | package com.redhat.gps.pathfinder.domain; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/repository/ApplicationsRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.Applications; 26 | import org.springframework.stereotype.Repository; 27 | 28 | import org.springframework.data.mongodb.repository.MongoRepository; 29 | 30 | import java.util.List; 31 | 32 | /** 33 | * Spring Data MongoDB repository for the Applications entity. 34 | */ 35 | @SuppressWarnings("unused") 36 | @Repository 37 | public interface ApplicationsRepository extends MongoRepository { 38 | 39 | @Override 40 | List findAll(); 41 | 42 | @Override 43 | Applications insert(Applications entity); 44 | 45 | @Override 46 | Applications save(Applications entity); 47 | 48 | @Override 49 | boolean exists(String s); 50 | 51 | @Override 52 | long count(); 53 | } 54 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/repository/AssessmentsRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.Assessments; 26 | import org.springframework.stereotype.Repository; 27 | 28 | import org.springframework.data.mongodb.repository.MongoRepository; 29 | 30 | /** 31 | * Spring Data MongoDB repository for the Assessments entity. 32 | */ 33 | @SuppressWarnings("unused") 34 | @Repository 35 | public interface AssessmentsRepository extends MongoRepository { 36 | 37 | @Override 38 | Assessments insert(Assessments Assessments); 39 | 40 | @Override 41 | Assessments save(Assessments entity); 42 | 43 | @Override 44 | Assessments findOne(String s); 45 | 46 | @Override 47 | boolean exists(String s); 48 | 49 | @Override 50 | long count(); 51 | } 52 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/repository/CustomerRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.Customer; 26 | import org.springframework.data.mongodb.repository.MongoRepository; 27 | import org.springframework.stereotype.Repository; 28 | 29 | import java.util.List; 30 | 31 | /** 32 | * Spring Data MongoDB repository for the Customer entity. 33 | */ 34 | @SuppressWarnings("unused") 35 | @Repository 36 | public interface CustomerRepository extends MongoRepository { 37 | 38 | @Override 39 | Customer save(Customer entity); 40 | 41 | @Override 42 | Customer insert(Customer entity); 43 | 44 | @Override 45 | List findAll(); 46 | 47 | @Override 48 | Customer findOne(String s); 49 | 50 | @Override 51 | boolean exists(String s); 52 | } 53 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/repository/MembersRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import java.util.List; 26 | 27 | import org.springframework.data.mongodb.repository.MongoRepository; 28 | import org.springframework.stereotype.Repository; 29 | 30 | import com.redhat.gps.pathfinder.domain.Member; 31 | 32 | 33 | /** 34 | * Spring Data MongoDB repository for the Member entity. 35 | */ 36 | @SuppressWarnings("unused") 37 | @Repository 38 | public interface MembersRepository extends MongoRepository { 39 | 40 | @Override 41 | List findAll(); 42 | 43 | @Override 44 | Member insert(Member entity); 45 | 46 | @Override 47 | Member save(Member entity); 48 | 49 | @Override 50 | boolean exists(String s); 51 | 52 | @Override 53 | long count(); 54 | } 55 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/repository/QuestionMetaDataRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.QuestionMetaData; 26 | import org.springframework.data.mongodb.repository.MongoRepository; 27 | import org.springframework.stereotype.Repository; 28 | 29 | import java.util.List; 30 | 31 | @SuppressWarnings("unused") 32 | @Repository 33 | public interface QuestionMetaDataRepository extends MongoRepository { 34 | @Override 35 | List findAll(); 36 | 37 | @Override 38 | QuestionMetaData insert(QuestionMetaData entity); 39 | 40 | @Override 41 | QuestionMetaData save(QuestionMetaData entity); 42 | 43 | @Override 44 | boolean exists(String s); 45 | 46 | @Override 47 | long count(); 48 | } 49 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/repository/ReviewsRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.repository; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.domain.ApplicationAssessmentReview; 26 | import org.springframework.data.mongodb.repository.MongoRepository; 27 | import org.springframework.stereotype.Repository; 28 | 29 | import java.util.List; 30 | 31 | /** 32 | * Spring Data MongoDB repository for the Applications Assessment Review entity. 33 | */ 34 | @SuppressWarnings("unused") 35 | @Repository 36 | public interface ReviewsRepository extends MongoRepository { 37 | 38 | @Override 39 | List findAll(); 40 | 41 | @Override 42 | ApplicationAssessmentReview insert(ApplicationAssessmentReview entity); 43 | 44 | @Override 45 | ApplicationAssessmentReview save(ApplicationAssessmentReview entity); 46 | 47 | @Override 48 | boolean exists(String s); 49 | 50 | @Override 51 | long count(); 52 | } 53 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/repository/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Data JPA repositories. 3 | */ 4 | package com.redhat.gps.pathfinder.repository; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/security/AuthoritiesConstants.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | /** 26 | * Constants for Spring Security authorities. 27 | */ 28 | public final class AuthoritiesConstants { 29 | 30 | public static final String ADMIN = "pathfinderAdmin"; 31 | 32 | public static final String USER = "pathfinderUser"; 33 | 34 | public static final String ANONYMOUS = "ROLE_ANONYMOUS"; 35 | 36 | private AuthoritiesConstants() { 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/security/SpringSecurityAuditorAware.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.redhat.gps.pathfinder.config.Constants; 26 | 27 | import org.springframework.data.domain.AuditorAware; 28 | import org.springframework.stereotype.Component; 29 | 30 | /** 31 | * Implementation of AuditorAware based on Spring Security. 32 | */ 33 | @Component 34 | public class SpringSecurityAuditorAware implements AuditorAware { 35 | 36 | @Override 37 | public String getCurrentAuditor() { 38 | return SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/security/UserNotActivatedException.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.security.core.AuthenticationException; 26 | 27 | /** 28 | * This exception is thrown in case of a not activated user trying to authenticate. 29 | */ 30 | public class UserNotActivatedException extends AuthenticationException { 31 | 32 | private static final long serialVersionUID = 1L; 33 | 34 | public UserNotActivatedException(String message) { 35 | super(message); 36 | } 37 | 38 | public UserNotActivatedException(String message, Throwable t) { 39 | super(message, t); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/security/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Security configuration. 3 | */ 4 | package com.redhat.gps.pathfinder.security; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/service/util/Json.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.service.util; 2 | 3 | import java.io.IOException; 4 | 5 | /*- 6 | * #%L 7 | * Pathfinder 8 | * $Id:$ 9 | * $HeadURL:$ 10 | * %% 11 | * Copyright (C) 2018 RedHat 12 | * %% 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | * #L% 25 | */ 26 | 27 | import org.codehaus.jackson.map.ObjectMapper; 28 | import org.codehaus.jackson.map.SerializationConfig; 29 | 30 | import com.fasterxml.jackson.core.JsonParseException; 31 | import com.fasterxml.jackson.databind.JsonMappingException; 32 | import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; 33 | 34 | public class Json { 35 | 36 | public static ObjectMapper newObjectMapper(boolean pretty){ 37 | ObjectMapper mapper = new ObjectMapper(); 38 | mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT,pretty); 39 | return mapper; 40 | } 41 | 42 | public static String yamlToJson(String yaml) throws JsonParseException, JsonMappingException, IOException { 43 | com.fasterxml.jackson.databind.ObjectMapper yamlReader = new com.fasterxml.jackson.databind.ObjectMapper(new com.fasterxml.jackson.dataformat.yaml.YAMLFactory()); 44 | Object obj = yamlReader.readValue(yaml, Object.class); 45 | 46 | ObjectMapper jsonWriter = new ObjectMapper(); 47 | return jsonWriter.writeValueAsString(obj); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/service/util/MapBuilder.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.service.util; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import java.util.HashMap; 26 | import java.util.Map; 27 | 28 | public class MapBuilder { 29 | private Map s=new HashMap(); 30 | 31 | public MapBuilder put(K key, V value){ 32 | s.put(key, value); 33 | return this; 34 | } 35 | 36 | public Map build(){ 37 | return s; 38 | } 39 | 40 | public MapBuilder putAll(Map values) { 41 | s.putAll(values); 42 | return this; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/service/util/RequestUtils.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.service.util; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import java.util.Enumeration; 26 | 27 | import javax.servlet.http.HttpServletRequest; 28 | 29 | import org.slf4j.Logger; 30 | import org.slf4j.LoggerFactory; 31 | 32 | import com.redhat.gps.pathfinder.web.api.CustomerAPIImpl; 33 | 34 | public class RequestUtils{ 35 | private static final Logger log = LoggerFactory.getLogger(RequestUtils.class); 36 | 37 | public static void printRequestHeaders(HttpServletRequest request){ 38 | Enumeration headerNames=request.getHeaderNames(); 39 | while(headerNames.hasMoreElements()){ 40 | String name=headerNames.nextElement(); 41 | String value=request.getHeader(name); 42 | log.debug("HttpServletRequest::Header name={}, value={}", name, value); 43 | } 44 | } 45 | 46 | public static String getAuthToken(HttpServletRequest request){ 47 | String token=request.getHeader("Authorization"); 48 | if (token!=null) 49 | token=token.replaceAll("Bearer ", ""); 50 | return token; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/service/util/Tuple.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.service.util; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | public class Tuple { 26 | private Object[] values; 27 | public Tuple(X first, Y second) { 28 | values=new Object[]{first, second}; 29 | } 30 | @SuppressWarnings("unchecked") 31 | public X getFirst() { 32 | return (X)values[0]; 33 | } 34 | @SuppressWarnings("unchecked") 35 | public Y getSecond() { 36 | return (Y)values[1]; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/service/util/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Service layer beans. 3 | */ 4 | package com.redhat.gps.pathfinder.service.util; 5 | 6 | /*- 7 | * #%L 8 | * Pathfinder 9 | * $Id:$ 10 | * $HeadURL:$ 11 | * %% 12 | * Copyright (C) 2018 RedHat 13 | * %% 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * #L% 26 | */ 27 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/web/api/Predicates.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.web.api; 2 | 3 | /*- 4 | * #%L 5 | * com.redhat.gps.pathfinder.pathfinder-server 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat Inc 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import com.google.common.base.Predicate; 26 | import com.redhat.gps.pathfinder.domain.Applications; 27 | import com.redhat.gps.pathfinder.web.api.model.ApplicationType.StereotypeEnum; 28 | 29 | public class Predicates{ 30 | 31 | public static final Predicate assessableApplications = new Predicate() { 32 | @Override public boolean apply(Applications app) { 33 | return app.getStereotype().equals(StereotypeEnum.TARGETAPP.toString()); 34 | }}; 35 | } 36 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/web/api/security/CredentialsException.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.web.api.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | public class CredentialsException extends Exception{ 26 | private static final long serialVersionUID=1L; 27 | 28 | public CredentialsException(String mes){ 29 | super(mes); 30 | } 31 | 32 | public CredentialsException(String mes, Throwable t){ 33 | super(mes, t); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/java/com/redhat/gps/pathfinder/web/api/security/JwtAuthenticationEntryPoint.java: -------------------------------------------------------------------------------- 1 | package com.redhat.gps.pathfinder.web.api.security; 2 | 3 | /*- 4 | * #%L 5 | * Pathfinder 6 | * $Id:$ 7 | * $HeadURL:$ 8 | * %% 9 | * Copyright (C) 2018 RedHat 10 | * %% 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * #L% 23 | */ 24 | 25 | import org.springframework.security.core.AuthenticationException; 26 | import org.springframework.security.web.AuthenticationEntryPoint; 27 | import org.springframework.stereotype.Component; 28 | 29 | import javax.servlet.http.HttpServletRequest; 30 | import javax.servlet.http.HttpServletResponse; 31 | import java.io.IOException; 32 | import java.io.Serializable; 33 | 34 | @Component 35 | public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable { 36 | 37 | private static final long serialVersionUID = -8970718410437077606L; 38 | 39 | @Override 40 | public void commence(HttpServletRequest request, 41 | HttpServletResponse response, 42 | AuthenticationException authException) throws IOException { 43 | // This is invoked when user tries to access a secured REST resource without supplying any credentials 44 | // We should just send a 401 Unauthorized response because there is no 'login page' to redirect to 45 | response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | ${AnsiColor.RED} ###### ####### ###### # # # ####### 3 | ${AnsiColor.RED} # # # # # # # # # # 4 | ${AnsiColor.RED} # # # # # # # # # # 5 | ${AnsiColor.RED} ###### ##### # # ####### # # # 6 | ${AnsiColor.RED} # # # # # # # ####### # 7 | ${AnsiColor.RED} # # # # # # # # # # 8 | ${AnsiColor.RED} # # ####### ###### # # # # # 9 | 10 | ${AnsiColor.GREEN} ###### # ####### # # ####### ### # # ###### ####### ###### 11 | ${AnsiColor.GREEN} # # # # # # # # # ## # # # # # # 12 | ${AnsiColor.GREEN} # # # # # # # # # # # # # # # # # 13 | ${AnsiColor.GREEN} ###### # # # ####### ##### # # # # # # ##### ###### 14 | ${AnsiColor.GREEN} # ####### # # # # # # # # # # # # # 15 | ${AnsiColor.GREEN} # # # # # # # # # ## # # # # # 16 | ${AnsiColor.GREEN} # # # # # # # ### # # ###### ####### # # 17 | 18 | 19 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/resources/config/application-integrationtest.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | data: 3 | mongodb: 4 | database: pathfinder 5 | 6 | server: 7 | port: 8080 8 | compression: 9 | enabled: true 10 | mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json 11 | min-response-size: 1024 12 | 13 | database-user: 14 | database-password: 15 | database-name: pathfinder 16 | database-admin-password: 17 | dbhostname: 127.0.0.1 18 | dbhostport: 27017 19 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/resources/config/bootstrap.properties: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: dev 3 | cloud.kubernetes: 4 | configmap.enabled = false 5 | secrets.enabled = false 6 | secrets.paths= /tmp/secrets, /tmp/noc 7 | secrets.name = mongodb 8 | secrets.enableApi = false 9 | 10 | profiles: prodose 11 | cloud.kubernetes: 12 | configmap.enabled = true 13 | secrets.enabled = true 14 | secrets.paths= /tmp/secrets, /tmp/noc 15 | secrets.name = mongodb 16 | secrets.enableApi = true 17 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/resources/i18n/messages.properties: -------------------------------------------------------------------------------- 1 | # Error page 2 | error.title=Your request cannot be processed 3 | error.subtitle=Sorry, an error has occurred. 4 | error.status=Status: 5 | error.message=Message: 6 | 7 | # Activation email 8 | email.activation.title=pathfinder account activation 9 | email.activation.greeting=Dear {0} 10 | email.activation.text1=Your pathfinder account has been created, please click on the URL below to activate it: 11 | email.activation.text2=Regards, 12 | email.signature=pathfinder Team. 13 | 14 | # Creation email 15 | email.creation.text1=Your pathfinder account has been created, please click on the URL below to access it: 16 | 17 | # Reset email 18 | email.reset.title=pathfinder password reset 19 | email.reset.greeting=Dear {0} 20 | email.reset.text1=For your pathfinder account a password reset was requested, please click on the URL below to reset it: 21 | email.reset.text2=Regards, 22 | 23 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/resources/keycloak.json: -------------------------------------------------------------------------------- 1 | { 2 | "realm": "pathfinder", 3 | "bearer-only": true, 4 | "auth-server-url": "http://sso-pathfinder.192.168.99.100.nip.io/auth", 5 | "ssl-required": "external", 6 | "resource": "PathfinderServer", 7 | "confidential-port": 0 8 | } 9 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 8 | 9 | 10 | 24 | 25 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/webapp/content/index.css: -------------------------------------------------------------------------------- 1 | .btn-green { 2 | background-color: #1ab394; 3 | color: #fff; 4 | border-radius: 3px; 5 | } 6 | .btn-green:focus, 7 | .btn-green:hover { 8 | background-color: #18a689; 9 | color: #fff; 10 | } 11 | .panel-footer { 12 | padding: 0 15px; 13 | border: none; 14 | text-align: right; 15 | background-color: #fff; 16 | } -------------------------------------------------------------------------------- /pathfinder-server/src/main/webapp/content/test-vars.js: -------------------------------------------------------------------------------- 1 | Utils = { 2 | SERVER: "http://localhost:8080", 3 | 4 | chartColors: { 5 | "UNKNOWN": "#808080", 6 | "RED": "#cc0000", 7 | "AMBER": "#ec7a08", 8 | "GREEN": "#92d400" 9 | }, 10 | getParameterByName: function(name, url) { 11 | if (!url) url = window.location.href; 12 | name = name.replace(/[\[\]]/g, "\\$&"); 13 | var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 14 | results = regex.exec(url); 15 | if (!results) return null; 16 | if (!results[2]) return ''; 17 | return decodeURIComponent(results[2].replace(/\+/g, " ")); 18 | } 19 | } 20 | var jwtToken=""; 21 | -------------------------------------------------------------------------------- /pathfinder-server/src/main/webapp/keycloak.json: -------------------------------------------------------------------------------- 1 | { 2 | "realm": "pathfinder", 3 | "auth-server-url": "http://sso-pathfinder.192.168.99.100.nip.io/auth", 4 | "ssl-required": "external", 5 | "resource": "PathfinderWebUI", 6 | "public-client": true, 7 | "confidential-port": 0 8 | } 9 | -------------------------------------------------------------------------------- /pathfinder-server/src/test/resources/test-data/custom-question-data-1page-2-valid.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | { 4 | "title": "Application Details", 5 | "questions": [ 6 | { 7 | "name": "FLUXCAP", 8 | "title": "Is the flux capacitor used in the container?", 9 | "tooltip": "OCP doesn't support hardware flux capacitor", 10 | "choices": [ 11 | "0-UNKNOWN|Unknown", 12 | "1-RED| Yes 50%+ in production", 13 | "2-RED| Yes 50%+ in Test ", 14 | "3-AMBER| Yes only in dev", 15 | "4-GREEN| No only in the movies", 16 | "5-GREEN| This is a made up question" 17 | ] 18 | }, 19 | { 20 | "name": "GEOLOCN", 21 | "title": "Does the application ingress require a local network POP ?", 22 | "tooltip": "Ingress question 1", 23 | "choices": [ 24 | "0-UNKNOWN|Unknown", 25 | "1-RED|Yes and country specific", 26 | "2-RED|Yes and region specific", 27 | "3-AMBER| Supported but not recommended", 28 | "4-GREEN| No", 29 | "5-GREEN| This is a made up question" 30 | ] 31 | } 32 | ] 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /pathfinder-server/src/test/resources/test-data/custom-question-data-corrupt.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | { 4 | "title": "Application Details", 5 | "questions": [ 6 | { 7 | "name": "DEVOWNER", 8 | "title": "Does the application development team understand and actively develop the application?", 9 | "tooltip": "sample tooltip", 10 | "choices": [ 11 | "0-UNKNOWN|Unknown", 12 | "1-RED|External 3rd party or COTS application ", 13 | "2-RED|In maintenance mode, no app SME knowledge, poor documentation", 14 | "3-AMBER|Maintenance mode, SME knowledge available", 15 | "4-GREEN|Actively developed, SME knowledge available", 16 | "5-GREEN|New Greenfield application" 17 | ] 18 | }, -------------------------------------------------------------------------------- /pathfinder-server/src/test/resources/test-data/custom-question-data-invalid-values.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | { 4 | "title": "Application Details", 5 | "questions": [ 6 | { 7 | "name": "DEVOWNER", 8 | "title": "Does the application development team understand and actively develop the application?", 9 | "tooltip": "sample tooltip", 10 | "choices": [ 11 | "0-UOWN|Unknown", 12 | "1-BLUE|External 3rd party or COTS application ", 13 | "In maintenance mode, no app SME knowledge, poor documentation", 14 | "3-AMBER|Maintenance mode, SME knowledge available", 15 | "GREEN|", 16 | "5-GREEN,New Greenfield application" 17 | ] 18 | } 19 | ] 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /pathfinder-server/src/test/resources/test-data/custom-question-data-no-questions.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | { 4 | "title": "Application Details", 5 | "questions": [] 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /pathfinder-ui/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .classpath 3 | .project 4 | .settings 5 | nb-configuration.xml 6 | *~ 7 | -------------------------------------------------------------------------------- /pathfinder-ui/run-local.sh: -------------------------------------------------------------------------------- 1 | # the endpoint that Jetty calls through to is defined in the file src/main/webapp/WEB-INF/override-web.xml 2 | # 3 | # org.mitre.dsmiley.httpproxy.ProxyServlet 4 | # 5 | # targetUri 6 | # http://localhost:8080/api 7 | # 8 | export PATHFINDER_SERVER=http://localhost:8080 9 | export PATHFINDER_SELF=http://localhost:8083 10 | mvn clean package -DdisableTracking=true -DskipTests -Djetty.port=8083 -DPATHFINDER_SERVER=http://localhost:8080 jetty:run 11 | -------------------------------------------------------------------------------- /pathfinder-ui/run-prod.sh: -------------------------------------------------------------------------------- 1 | export PATHFINDER_SERVER=http://pathtest-pathfinder.6923.rh-us-east-1.openshiftapps.com 2 | mvn clean package -DskipTests jetty:run -Djetty.port=8083 3 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/java/com/redhat/pathfinder/InitServlet.java: -------------------------------------------------------------------------------- 1 | package com.redhat.pathfinder; 2 | 3 | import java.io.IOException; 4 | import java.text.ParseException; 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | import java.util.Map.Entry; 8 | 9 | import javax.servlet.ServletConfig; 10 | import javax.servlet.ServletException; 11 | import javax.servlet.http.HttpServlet; 12 | 13 | import org.apache.commons.lang3.StringUtils; 14 | 15 | public class InitServlet extends HttpServlet { 16 | 17 | public static void main(String[] args) throws ServletException, ParseException, IOException{ 18 | 19 | } 20 | 21 | @Override 22 | public void init(ServletConfig config) throws ServletException { 23 | super.init(config); 24 | Map settings=new HashMap<>(); 25 | 26 | try{ 27 | settings.put("PATHFINDER_SERVER", StringUtils.isNotEmpty(Controller.getProperty("PATHFINDER_SERVER"))?Controller.getProperty("PATHFINDER_SERVER"):"NOT SET"); 28 | settings.put("PATHFINDER_SELF", StringUtils.isNotEmpty(Controller.getProperty("PATHFINDER_SELF"))?Controller.getProperty("PATHFINDER_SELF"):"NOT SET"); 29 | int len=0; 30 | for(Entry e:settings.entrySet()) 31 | len=Math.max(len, e.getKey().length()+e.getValue().length()+5); 32 | 33 | System.out.println(String.format("%"+len+"s", " ").replaceAll(" ", "*")); 34 | System.out.println("ENV Variables Configured:"); 35 | for(Entry e:settings.entrySet()) 36 | System.out.println(" "+e.getKey()+": "+e.getValue()); 37 | System.out.println(String.format("%"+len+"s", " ").replaceAll(" ", "*")); 38 | 39 | }catch(Exception e){ 40 | } 41 | 42 | } 43 | 44 | @Override 45 | public void destroy() { 46 | super.destroy(); 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/java/com/redhat/pathfinder/Json.java: -------------------------------------------------------------------------------- 1 | package com.redhat.pathfinder; 2 | 3 | import org.codehaus.jackson.map.ObjectMapper; 4 | import org.codehaus.jackson.map.SerializationConfig; 5 | 6 | public class Json { 7 | 8 | public static ObjectMapper newObjectMapper(boolean pretty){ 9 | ObjectMapper mapper = new ObjectMapper(); 10 | mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT,pretty); 11 | return mapper; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/java/com/redhat/pathfinder/MapBuilder.java: -------------------------------------------------------------------------------- 1 | package com.redhat.pathfinder; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class MapBuilder{ 7 | Map values=new HashMap(); 8 | public MapBuilder put(K key, V value){ 9 | values.put(key, value); return this; 10 | } 11 | public Map build(){ 12 | return values; 13 | } 14 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/java/com/redhat/pathfinder/charts/Chart2Json.java: -------------------------------------------------------------------------------- 1 | package com.redhat.pathfinder.charts; 2 | 3 | import java.util.ArrayList; 4 | import java.util.LinkedHashSet; 5 | import java.util.List; 6 | import java.util.Set; 7 | 8 | public class Chart2Json { 9 | private Set labels=new LinkedHashSet(); 10 | private List datasets=new ArrayList(); 11 | 12 | public Set getLabels() { 13 | return labels; 14 | } 15 | public void setLabels(Set labels) { 16 | this.labels=labels; 17 | } 18 | public List getDatasets() { 19 | return datasets; 20 | } 21 | public void setDatasets(List datasets) { 22 | this.datasets=datasets; 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/java/com/redhat/pathfinder/charts/PieChartJson.java: -------------------------------------------------------------------------------- 1 | package com.redhat.pathfinder.charts; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class PieChartJson extends ArrayList{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/java/com/redhat/pathfinder/charts/PieData.java: -------------------------------------------------------------------------------- 1 | package com.redhat.pathfinder.charts; 2 | 3 | public class PieData { 4 | private String value; 5 | private String color; 6 | private String highlight; 7 | private String label; 8 | public String getValue() { 9 | return value; 10 | } 11 | public void setValue(String value) { 12 | this.value = value; 13 | } 14 | public String getColor() { 15 | return color; 16 | } 17 | public void setColor(String color) { 18 | this.color = color; 19 | } 20 | public String getHighlight() { 21 | return highlight; 22 | } 23 | public void setHighlight(String highlight) { 24 | this.highlight = highlight; 25 | } 26 | public String getLabel() { 27 | return label; 28 | } 29 | public void setLabel(String label) { 30 | this.label = label; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | / 3 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/WEB-INF/jetty-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | / 5 | 6 | 7 | java. 8 | javax.servlet. 9 | javax.xml. 10 | org.eclipse. 11 | org.xml. 12 | org.w3c. 13 | org.commons.apache.logging. 14 | org.apache.log4j. 15 | org.slf4j. 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/WEB-INF/local-test-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | pathfinder-proxy 11 | org.mitre.dsmiley.httpproxy.ProxyServlet 12 | 13 | targetUri 14 | http://localhost:8080/api 15 | 16 | 17 | log 18 | true 19 | 20 | 1 21 | 22 | 23 | pathfinder-proxy 24 | /api/* 25 | 26 | 27 | 28 | 29 | 30 | resteasy.resources 31 | com.redhat.pathfinder.Controller 32 | 33 | 34 | 35 | resteasy.servlet.mapping.prefix 36 | /local 37 | 38 | 39 | 40 | org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap 41 | 42 | 43 | resteasy 44 | org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher 45 | 2 46 | 47 | 48 | 49 | resteasy 50 | /local/* 51 | 52 | 53 | 60 54 | 55 | 56 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | resteasy 12 | org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher 13 | 2 14 | 15 | 16 | proxy 17 | org.mitre.dsmiley.httpproxy.ProxyServlet 18 | 19 | targetUri 20 | http://pathfinder-server:8080/api 21 | 22 | 23 | log 24 | true 25 | 26 | 1 27 | 28 | 29 | 30 | resteasy.resources 31 | com.redhat.pathfinder.Controller 32 | 33 | 34 | 35 | resteasy.servlet.mapping.prefix 36 | /pathfinder 37 | 38 | 39 | 40 | org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap 41 | 42 | 43 | 44 | resteasy 45 | /pathfinder/* 46 | 47 | 48 | proxy 49 | /api/* 50 | 51 | 52 | 53 | 60 54 | 55 | 56 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/css/breadcrumbs.css: -------------------------------------------------------------------------------- 1 | ul.breadcrumb { 2 | padding: 10px 16px; 3 | list-style: none; 4 | background-color: #eee; 5 | } 6 | 7 | /* Display list items side by side */ 8 | ul.breadcrumb li { 9 | display: inline; 10 | font-size: 18px; 11 | } 12 | 13 | /* Add a slash symbol (/) before/behind each list item */ 14 | ul.breadcrumb li+li:before { 15 | padding: 8px; 16 | color: black; 17 | content: "/\00a0"; 18 | } 19 | 20 | /* Add a color to all links inside the list */ 21 | ul.breadcrumb li a { 22 | color: #0275d8; 23 | text-decoration: none; 24 | } 25 | 26 | /* Add a color on mouse-over */ 27 | ul.breadcrumb li a:hover { 28 | color: #01447e; 29 | text-decoration: underline; 30 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/Pattern_0C_RH_Services_RGB_Fill_Gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/Pattern_0C_RH_Services_RGB_Fill_Gray.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/RH_Pathfinder_Icon_Color-56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/RH_Pathfinder_Icon_Color-56.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/pathfinder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/pathfinder.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/patterns-041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/patterns-041.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_004153_150x1201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_004153_150x1201.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_0088ce_150x1201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_0088ce_150x1201.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_3f9c35_150x1201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_3f9c35_150x1201.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_820000_150x1201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_820000_150x1201.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_a30000_150x1201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_a30000_150x1201.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_a3dbe8_150x1201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_a3dbe8_150x1201.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_cc0000_150x1201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/rh_color_swatch_corporate_cc0000_150x1201.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/sort_asc.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/sort_both.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/sort_desc.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/twisty-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/twisty-off.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/images/twisty-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/assets/images/twisty-on.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/js/central-click.js: -------------------------------------------------------------------------------- 1 | /** 2 | * central-click.js 3 | */ 4 | d3.svg.BubbleChart.define("central-click", function (options) { 5 | var self = this; 6 | 7 | self.setup = (function (node) { 8 | var original = self.setup; 9 | return function (node) { 10 | var fn = original.apply(this, arguments); 11 | self.event.on("click", function(node) { 12 | if (node.selectAll("text.central-click")[0].length === 1) { 13 | alert("List of Questions."); 14 | } 15 | }); 16 | return fn; 17 | }; 18 | })(); 19 | 20 | self.reset = (function (node) { 21 | var original = self.reset; 22 | return function (node) { 23 | var fn = original.apply(this, arguments); 24 | node.select("text.central-click").remove(); 25 | return fn; 26 | }; 27 | })(); 28 | 29 | self.moveToCentral = (function (node) { 30 | var original = self.moveToCentral; 31 | return function (node) { 32 | var fn = original.apply(this, arguments); 33 | var transition = self.getTransition().centralNode; 34 | transition.each("end", function() { 35 | node.append("text").classed({"central-click": true}) 36 | .attr(options.attr) 37 | .style(options.style) 38 | .attr("x", function (d) {return d.cx;}) 39 | .attr("y", function (d) {return d.cy;}) 40 | .text(options.text) 41 | .style("opacity", 0).transition().duration(self.getOptions().transitDuration / 2).style("opacity", "0.8"); 42 | }); 43 | return fn; 44 | }; 45 | })(); 46 | }); 47 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/js/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | Industrious by TEMPLATED 3 | templated.co @templatedco 4 | Released for free under the Creative Commons Attribution 3.0 license (templated.co/license) 5 | */ 6 | (function($) { 7 | 8 | var $window = $(window), 9 | $banner = $('#banner'), 10 | $body = $('body'); 11 | 12 | // Breakpoints. 13 | breakpoints({ 14 | default: ['1681px', null ], 15 | xlarge: ['1281px', '1680px' ], 16 | large: ['981px', '1280px' ], 17 | medium: ['737px', '980px' ], 18 | small: ['481px', '736px' ], 19 | xsmall: ['361px', '480px' ], 20 | xxsmall: [null, '360px' ] 21 | }); 22 | 23 | // Play initial animations on page load. 24 | $window.on('load', function() { 25 | window.setTimeout(function() { 26 | $body.removeClass('is-preload'); 27 | }, 100); 28 | }); 29 | 30 | // Menu. 31 | $('#menu') 32 | .append('') 33 | .appendTo($body) 34 | .panel({ 35 | target: $body, 36 | visibleClass: 'is-menu-visible', 37 | delay: 500, 38 | hideOnClick: true, 39 | hideOnSwipe: true, 40 | resetScroll: true, 41 | resetForms: true, 42 | side: 'right' 43 | }); 44 | 45 | })(jQuery); -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/js/progressbar-functions.js: -------------------------------------------------------------------------------- 1 | function setProgress(progressBar, percentage, text){ 2 | console.log("updating progress bar '"+text+"' to "+percentage+"%"); 3 | document.getElementById(progressBar).innerHTML=""; 4 | var bar = new ProgressBar.Line(document.getElementById(progressBar), { 5 | strokeWidth: 100, 6 | easing: 'easeInOut', 7 | duration: 1400, 8 | color: '#FFEA82', 9 | trailColor: '#ccc', 10 | trailWidth: 300, 11 | svgStyle: {width: '100%', height: '100%'}, 12 | text: { 13 | style: { 14 | // Text color. 15 | // Default: same as stroke color (options.color) 16 | color: '#333', 17 | position: 'relative', 18 | right: '0px', 19 | top: '-28px', 20 | padding: 0, 21 | margin: 0, 22 | transform: null 23 | }, 24 | autoStyleContainer: false 25 | }, 26 | from: {color: '#cc0000'}, 27 | to: {color: '#4CAF50'}, 28 | step: (state, bar) => { 29 | bar.path.setAttribute('stroke', state.color); 30 | bar.setText(Math.round(bar.value() * 100) + '% '+text); 31 | } 32 | }); 33 | bar.animate(percentage/100); // Number from 0.0 to 1.0 34 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/base/_page.scss: -------------------------------------------------------------------------------- 1 | /* Basic */ 2 | 3 | // MSIE: Required for IEMobile. 4 | @-ms-viewport { 5 | width: device-width; 6 | } 7 | 8 | // MSIE: Prevents scrollbar from overlapping content. 9 | body { 10 | -ms-overflow-style: scrollbar; 11 | } 12 | 13 | // Ensures page width is always >=320px. 14 | @include breakpoint('<=xsmall') { 15 | html, body { 16 | min-width: 320px; 17 | } 18 | } 19 | 20 | // Set box model to border-box. 21 | // Based on css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice 22 | html { 23 | box-sizing: border-box; 24 | } 25 | 26 | *, *:before, *:after { 27 | box-sizing: inherit; 28 | } 29 | 30 | body { 31 | background: _palette(bg); 32 | 33 | // Stops initial animations until page loads. 34 | &.is-preload { 35 | *, *:before, *:after { 36 | @include vendor('animation', 'none !important'); 37 | @include vendor('transition', 'none !important'); 38 | } 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/base/_reset.scss: -------------------------------------------------------------------------------- 1 | // Reset. 2 | // Based on meyerweb.com/eric/tools/css/reset (v2.0 | 20110126 | License: public domain) 3 | 4 | html, body, div, span, applet, object, 5 | iframe, h1, h2, h3, h4, h5, h6, p, blockquote, 6 | pre, a, abbr, acronym, address, big, cite, 7 | code, del, dfn, em, img, ins, kbd, q, s, samp, 8 | small, strike, strong, sub, sup, tt, var, b, 9 | u, i, center, dl, dt, dd, ol, ul, li, fieldset, 10 | form, label, legend, table, caption, tbody, 11 | tfoot, thead, tr, th, td, article, aside, 12 | canvas, details, embed, figure, figcaption, 13 | footer, header, hgroup, menu, nav, output, ruby, 14 | section, summary, time, mark, audio, video { 15 | margin: 0; 16 | padding: 0; 17 | border: 0; 18 | font-size: 100%; 19 | font: inherit; 20 | vertical-align: baseline; 21 | } 22 | 23 | article, aside, details, figcaption, figure, 24 | footer, header, hgroup, menu, nav, section { 25 | display: block; 26 | } 27 | 28 | body { 29 | line-height: 1; 30 | } 31 | 32 | ol, ul { 33 | list-style:none; 34 | } 35 | 36 | blockquote, q { 37 | quotes: none; 38 | 39 | &:before, 40 | &:after { 41 | content: ''; 42 | content: none; 43 | } 44 | } 45 | 46 | table { 47 | border-collapse: collapse; 48 | border-spacing: 0; 49 | } 50 | 51 | body { 52 | -webkit-text-size-adjust: none; 53 | } 54 | 55 | mark { 56 | background-color: transparent; 57 | color: inherit; 58 | } 59 | 60 | input::-moz-focus-inner { 61 | border: 0; 62 | padding: 0; 63 | } 64 | 65 | input, select, textarea { 66 | -moz-appearance: none; 67 | -webkit-appearance: none; 68 | -ms-appearance: none; 69 | appearance: none; 70 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_actions.scss: -------------------------------------------------------------------------------- 1 | /* Actions */ 2 | 3 | ul.actions { 4 | @include vendor('display', 'flex'); 5 | cursor: default; 6 | list-style: none; 7 | margin-left: (_size(element-margin) * -0.5); 8 | padding-left: 0; 9 | 10 | li { 11 | padding: 0 0 0 (_size(element-margin) * 0.5); 12 | vertical-align: middle; 13 | } 14 | 15 | &.special { 16 | @include vendor('justify-content', 'center'); 17 | width: calc(100% + #{_size(element-margin) * 0.5}); 18 | } 19 | 20 | &.stacked { 21 | @include vendor('flex-direction', 'column'); 22 | margin-left: 0; 23 | 24 | li { 25 | padding: (_size(element-margin) * 0.65) 0 0 0; 26 | 27 | &:first-child { 28 | padding-top: 0; 29 | } 30 | } 31 | } 32 | 33 | &.fit { 34 | width: calc(100% + #{_size(element-margin) * 0.5}); 35 | 36 | li { 37 | @include vendor('flex-grow', '1'); 38 | @include vendor('flex-shrink', '1'); 39 | width: 100%; 40 | 41 | > * { 42 | width: 100%; 43 | } 44 | } 45 | 46 | &.stacked { 47 | width: 100%; 48 | } 49 | } 50 | 51 | @include breakpoint('<=xsmall') { 52 | &:not(.fixed) { 53 | @include vendor('flex-direction', 'column'); 54 | margin-left: 0; 55 | width: 100% !important; 56 | 57 | li { 58 | @include vendor('flex-grow', '1'); 59 | @include vendor('flex-shrink', '1'); 60 | padding: (_size(element-margin) * 0.5) 0 0 0; 61 | text-align: center; 62 | width: 100%; 63 | 64 | > * { 65 | width: 100%; 66 | } 67 | 68 | &:first-child { 69 | padding-top: 0; 70 | } 71 | 72 | input[type="submit"], 73 | input[type="reset"], 74 | input[type="button"], 75 | button, 76 | .button { 77 | width: 100%; 78 | 79 | &.icon { 80 | &:before { 81 | margin-left: -0.5rem; 82 | } 83 | } 84 | } 85 | } 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_box.scss: -------------------------------------------------------------------------------- 1 | /* Box */ 2 | 3 | .box { 4 | border-radius: _size(border-radius); 5 | box-shadow: 0px 0px 4px 1px _palette(border-lt); 6 | padding: 3rem; 7 | 8 | > :last-child { 9 | margin-bottom: 0; 10 | } 11 | 12 | &.alt { 13 | border: 0; 14 | border-radius: 0; 15 | padding: 0; 16 | } 17 | 18 | @include breakpoint('<=medium') { 19 | padding: 2rem; 20 | } 21 | } 22 | 23 | @mixin color-box($p: null) { 24 | .box { 25 | border-color: _palette($p, border); 26 | } 27 | } 28 | 29 | @include color-box; -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_grid.scss: -------------------------------------------------------------------------------- 1 | /* Grid */ 2 | 3 | @include grid(3rem); 4 | 5 | @include breakpoint('<=xlarge') { 6 | @include grid(3rem, 'xlarge'); 7 | } 8 | 9 | @include breakpoint('<=large') { 10 | @include grid(1.5rem, 'large'); 11 | } 12 | 13 | @include breakpoint('<=medium') { 14 | @include grid(1.5rem, 'medium'); 15 | } 16 | 17 | @include breakpoint('<=small') { 18 | @include grid(1.25rem, 'small'); 19 | } 20 | 21 | @include breakpoint('<=xsmall') { 22 | @include grid(1.25rem, 'xsmall'); 23 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_highlights.scss: -------------------------------------------------------------------------------- 1 | /* Highlights */ 2 | 3 | .highlights { 4 | width: 100%; 5 | margin: (_size(element-margin) * 1.25) 0; 6 | 7 | @include flexgrid(( 8 | columns: 3, 9 | gutters: 3rem, 10 | vertical-align: stretch 11 | )); 12 | 13 | .content { 14 | border-radius: _size(border-radius); 15 | height: 100%; 16 | padding: 3rem; 17 | text-align: center; 18 | 19 | .icon { 20 | font-size: 5rem; 21 | } 22 | } 23 | 24 | > div { 25 | 26 | > :last-child { 27 | margin-bottom: 0; 28 | } 29 | 30 | } 31 | 32 | @include breakpoint('<=medium') { 33 | @include flexgrid-resize(( 34 | columns: 2, 35 | gutters: 2rem, 36 | prev-columns: 3 37 | )); 38 | 39 | .content { 40 | padding: 2rem; 41 | } 42 | } 43 | 44 | @include breakpoint('<=small') { 45 | @include flexgrid-resize(( 46 | columns: 1, 47 | gutters: 2rem, 48 | prev-columns: (3, 2) 49 | )); 50 | 51 | } 52 | } 53 | 54 | @mixin color-highlights($p: null) { 55 | $highlight: _palette($p, highlight); 56 | 57 | .highlights { 58 | .content { 59 | background: _palette($p, bg); 60 | box-shadow: 0px 0px 4px 1px _palette($p, border-lt); 61 | } 62 | } 63 | } 64 | 65 | @include color-highlights; -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_icon.scss: -------------------------------------------------------------------------------- 1 | /* Icon */ 2 | 3 | .icon { 4 | @include icon; 5 | border-bottom: none; 6 | position: relative; 7 | 8 | > .label { 9 | display: none; 10 | } 11 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_icons.scss: -------------------------------------------------------------------------------- 1 | /* Icons */ 2 | 3 | ul.icons { 4 | cursor: default; 5 | list-style: none; 6 | padding-left: 0; 7 | 8 | li { 9 | display: inline-block; 10 | padding: 0 1rem 0 0; 11 | 12 | &:last-child { 13 | padding-right: 0; 14 | } 15 | 16 | .icon { 17 | &:before { 18 | font-size: 2rem; 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_image.scss: -------------------------------------------------------------------------------- 1 | /* Image */ 2 | 3 | .image { 4 | border-radius: _size(border-radius); 5 | border: 0; 6 | display: inline-block; 7 | position: relative; 8 | 9 | img { 10 | border-radius: _size(border-radius); 11 | display: block; 12 | } 13 | 14 | &.left, 15 | &.right { 16 | max-width: 40%; 17 | 18 | img { 19 | width: 100%; 20 | } 21 | } 22 | 23 | &.left { 24 | float: left; 25 | margin: 0 2rem 2rem 0; 26 | top: 0.25rem; 27 | } 28 | 29 | &.right { 30 | float: right; 31 | margin: 0 0 2rem 2rem; 32 | top: 0.25rem; 33 | } 34 | 35 | &.fit { 36 | display: block; 37 | margin: 0 0 _size(element-margin) 0; 38 | width: 100%; 39 | 40 | img { 41 | width: 100%; 42 | } 43 | } 44 | 45 | &.main { 46 | display: block; 47 | margin: 0 0 (_size(element-margin) * 1.5) 0; 48 | width: 100%; 49 | 50 | img { 51 | width: 100%; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_inner.scss: -------------------------------------------------------------------------------- 1 | /* Inner */ 2 | 3 | .inner { 4 | margin: 0 auto; 5 | width: _size(inner-width); 6 | max-width: calc(100% - 6rem); 7 | 8 | @include breakpoint('<=xsmall') { 9 | max-width: calc(100% - 3rem); 10 | } 11 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_list.scss: -------------------------------------------------------------------------------- 1 | /* List */ 2 | 3 | ol { 4 | list-style: decimal; 5 | margin: 0 0 _size(element-margin) 0; 6 | padding-left: 1.25rem; 7 | 8 | li { 9 | padding-left: 0.25rem; 10 | } 11 | } 12 | 13 | ul { 14 | list-style: disc; 15 | margin: 0 0 _size(element-margin) 0; 16 | padding-left: 1rem; 17 | 18 | li { 19 | padding-left: 0.325rem; 20 | } 21 | 22 | &.plain { 23 | list-style: none; 24 | padding-left: 0; 25 | 26 | li { 27 | margin-bottom: 1rem; 28 | 29 | .icon { 30 | border-radius: _size(border-radius); 31 | color: _palette(accent1,fg-bold); 32 | display: inline-block; 33 | margin-right: 1rem; 34 | text-align:center; 35 | width: 2rem; 36 | height: 2rem; 37 | line-height: 2rem; 38 | background: rgba(0,0,0,0.5); 39 | } 40 | 41 | } 42 | } 43 | 44 | &.alt { 45 | list-style: none; 46 | padding-left: 0; 47 | 48 | li { 49 | border-top: solid 1px; 50 | padding: 0.75rem 0; 51 | 52 | &:first-child { 53 | border-top: 0; 54 | padding-top: 0; 55 | } 56 | 57 | &:last-child { 58 | padding-bottom: 0; 59 | } 60 | } 61 | } 62 | } 63 | 64 | dl { 65 | margin: 0 0 _size(element-margin) 0; 66 | 67 | dt { 68 | display: block; 69 | font-weight: _font(weight-bold); 70 | margin: 0 0 (_size(element-margin) * 0.5) 0; 71 | } 72 | 73 | dd { 74 | margin-left: (_size(element-margin) * 0.75); 75 | } 76 | } 77 | 78 | @mixin color-list($p: null) { 79 | ul { 80 | &.alt { 81 | li { 82 | border-top-color: _palette($p, border); 83 | } 84 | } 85 | } 86 | } 87 | 88 | @include color-list; -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_table.scss: -------------------------------------------------------------------------------- 1 | /* Table */ 2 | 3 | .table-wrapper { 4 | -webkit-overflow-scrolling: touch; 5 | overflow-x: auto; 6 | } 7 | 8 | table { 9 | margin: 0 0 _size(element-margin) 0; 10 | width: 100%; 11 | 12 | tbody { 13 | tr { 14 | border: solid 1px; 15 | border-left: 0; 16 | border-right: 0; 17 | } 18 | } 19 | 20 | td { 21 | padding: 0.75rem 0.75rem; 22 | } 23 | 24 | th { 25 | font-size: 0.9rem; 26 | font-weight: _font(weight-bold); 27 | padding: 0 0.75rem 0.75rem 0.75rem; 28 | text-align: left; 29 | } 30 | 31 | thead { 32 | border-bottom: solid 2px; 33 | } 34 | 35 | tfoot { 36 | border-top: solid 2px; 37 | } 38 | 39 | &.alt { 40 | border-collapse: separate; 41 | 42 | tbody { 43 | tr { 44 | td { 45 | border: solid 1px; 46 | border-left-width: 0; 47 | border-top-width: 0; 48 | 49 | &:first-child { 50 | border-left-width: 1px; 51 | } 52 | } 53 | 54 | &:first-child { 55 | td { 56 | border-top-width: 1px; 57 | } 58 | } 59 | } 60 | } 61 | 62 | thead { 63 | border-bottom: 0; 64 | } 65 | 66 | tfoot { 67 | border-top: 0; 68 | } 69 | } 70 | } 71 | 72 | @mixin color-table($p: null) { 73 | table { 74 | tbody { 75 | tr { 76 | border-color: _palette($p, border); 77 | 78 | &:nth-child(2n + 1) { 79 | background-color: _palette($p, border-bg); 80 | } 81 | } 82 | } 83 | 84 | th { 85 | color: _palette($p, fg-bold); 86 | } 87 | 88 | thead { 89 | border-bottom-color: _palette($p, border); 90 | } 91 | 92 | tfoot { 93 | border-top-color: _palette($p, border); 94 | } 95 | 96 | &.alt { 97 | tbody { 98 | tr { 99 | td { 100 | border-color: _palette($p, border); 101 | } 102 | } 103 | } 104 | } 105 | } 106 | } 107 | 108 | @include color-table; -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_testimonials.scss: -------------------------------------------------------------------------------- 1 | /* Testimonials */ 2 | 3 | .testimonials { 4 | margin: (_size(element-margin) * 1.25) 0; 5 | width: 100%; 6 | 7 | @include flexgrid(( 8 | columns: 3, 9 | gutters: 3rem, 10 | vertical-align: stretch, 11 | )); 12 | 13 | .content { 14 | border-radius: _size(border-radius); 15 | height: 100%; 16 | padding: 3rem; 17 | 18 | .author { 19 | @include vendor('display','flex'); 20 | @include vendor('align-items','center'); 21 | 22 | blockquote { 23 | margin: 0; 24 | } 25 | 26 | .image { 27 | margin-right: 2rem; 28 | width: 20%; 29 | 30 | img { 31 | border-radius: 100%; 32 | max-width: 100%; 33 | } 34 | } 35 | } 36 | 37 | .credit { 38 | font-size: 0.75rem; 39 | } 40 | 41 | p { 42 | &:last-child { 43 | margin: 0; 44 | } 45 | } 46 | } 47 | 48 | > div { 49 | > :last-child { 50 | margin-bottom: 0; 51 | } 52 | } 53 | 54 | @include breakpoint('<=medium') { 55 | @include flexgrid-resize(( 56 | columns: 2, 57 | gutters: 2rem, 58 | prev-columns: 3 59 | )); 60 | 61 | .content { 62 | padding: 2rem; 63 | } 64 | } 65 | 66 | @include breakpoint('<=small') { 67 | @include flexgrid-resize(( 68 | columns: 1, 69 | gutters: 2rem, 70 | prev-columns: (3, 2) 71 | )); 72 | } 73 | } 74 | 75 | @mixin color-testimonials($p: null) { 76 | $highlight: _palette($p, highlight); 77 | 78 | .testimonials { 79 | .content { 80 | background: _palette($p, bg); 81 | box-shadow: 0px 0px 4px 1px _palette($p, border-lt); 82 | 83 | .credit { 84 | strong { 85 | color: _palette($highlight,bg); 86 | } 87 | } 88 | } 89 | } 90 | } 91 | 92 | @include color-testimonials; -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/components/_wrapper.scss: -------------------------------------------------------------------------------- 1 | /* Wrapper */ 2 | 3 | .wrapper { 4 | @include padding(8rem, 0); 5 | position: relative; 6 | z-index: 1; 7 | 8 | @include breakpoint('<=large') { 9 | @include padding(4rem, 0); 10 | } 11 | 12 | @include breakpoint('<=small') { 13 | @include padding(3rem, 0); 14 | } 15 | 16 | @include breakpoint('<=xsmall') { 17 | @include padding(2rem, 0); 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/layout/_cta.scss: -------------------------------------------------------------------------------- 1 | /* CTA */ 2 | 3 | #cta { 4 | @include color(accent1); 5 | background-attachment: fixed; 6 | background-image: linear-gradient(transparentize(_palette(accent1,bg), 0.75), transparentize(_palette(accent1,bg), 0.75)), url(../../images/cta01.jpg); 7 | background-position: bottom; 8 | background-repeat: no-repeat; 9 | background-size: cover; 10 | position: relative; 11 | text-align: center; 12 | z-index: 1; 13 | 14 | .inner { 15 | position: relative; 16 | z-index: 3; 17 | } 18 | 19 | @include breakpoint('<=medium') { 20 | background-attachment: scroll; 21 | } 22 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/layout/_footer.scss: -------------------------------------------------------------------------------- 1 | /* Footer */ 2 | 3 | #footer { 4 | @include color(accent2); 5 | @include padding(8rem, 0); 6 | 7 | a { 8 | color: _palette(accent2, fg); 9 | text-decoration: none; 10 | 11 | &:hover { 12 | color: _palette(accent1, bg); 13 | } 14 | } 15 | 16 | .content { 17 | @include vendor('display', 'flex'); 18 | 19 | section { 20 | width: 25%; 21 | 22 | &:first-child { 23 | width: 50%; 24 | padding-right: _size(element-margin) * 2; 25 | } 26 | 27 | &:last-child { 28 | padding-left: _size(element-margin) * 2; 29 | } 30 | } 31 | } 32 | 33 | .copyright { 34 | border-top: 1px solid; 35 | font-size: 0.8rem; 36 | opacity: 0.5; 37 | padding: _size(element-margin) 0; 38 | text-align: center; 39 | } 40 | 41 | @include breakpoint('<=large') { 42 | @include padding(4rem, 0); 43 | } 44 | 45 | @include breakpoint('<=medium') { 46 | .content { 47 | @include vendor('flex-wrap', 'wrap'); 48 | 49 | section { 50 | width: 50%; 51 | 52 | &:first-child { 53 | width: 100%; 54 | padding-right: 0; 55 | } 56 | } 57 | } 58 | } 59 | 60 | @include breakpoint('<=small') { 61 | @include padding(3rem, 0); 62 | 63 | .content { 64 | section { 65 | width: 100%; 66 | 67 | &:last-child { 68 | padding-left: 0; 69 | } 70 | } 71 | } 72 | } 73 | 74 | @include breakpoint('<=xsmall') { 75 | @include padding(2rem, 0); 76 | } 77 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/layout/_heading.scss: -------------------------------------------------------------------------------- 1 | /* Heading */ 2 | 3 | #heading { 4 | -ms-flex-align: center; 5 | -ms-flex-pack: center; 6 | @include color(accent2); 7 | @include vendor('align-items', 'center'); 8 | @include vendor('display', 'flex'); 9 | @include vendor('justify-content', 'center'); 10 | background-image: linear-gradient(transparentize(_palette(accent2,bg), 0.75), transparentize(_palette(accent2,bg), 0.75)), url('../../images/banner.jpg'); 11 | background-position: center; 12 | background-repeat: no-repeat; 13 | background-size: cover; 14 | border-top: 0; 15 | display: -ms-flexbox; 16 | height: 15rem !important; 17 | min-height: 15rem; 18 | overflow: hidden; 19 | position: relative; 20 | text-align: center; 21 | width: 100%; 22 | 23 | &:before { 24 | background: linear-gradient(135deg, _palette(accent1,bg) 0%,_palette(accent2,bg) 74%); 25 | content: ' '; 26 | display: block; 27 | height: 100%; 28 | left: 0; 29 | opacity: 0.6; 30 | position: absolute; 31 | top: 0; 32 | width: 100%; 33 | z-index: 1; 34 | } 35 | 36 | h1 { 37 | margin-bottom: 0; 38 | position: relative; 39 | z-index: 2; 40 | } 41 | 42 | @include breakpoint('<=medium') { 43 | padding: 2rem; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/layout/_main.scss: -------------------------------------------------------------------------------- 1 | /* Main */ 2 | 3 | #main { 4 | .content { 5 | background: _palette(bg); 6 | border-radius: _size(border-radius); 7 | box-shadow: 0px 0px 4px 1px _palette(border-lt); 8 | margin-bottom: _size(element-margin); 9 | padding: 3rem; 10 | 11 | @include breakpoint('<=medium') { 12 | padding: 2rem; 13 | } 14 | 15 | @include breakpoint('<=xsmall') { 16 | padding: 1.5rem; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/libs/_mixins.scss: -------------------------------------------------------------------------------- 1 | /// Makes an element's :before pseudoelement a FontAwesome icon. 2 | /// @param {string} $content Optional content value to use. 3 | /// @param {string} $where Optional pseudoelement to target (before or after). 4 | @mixin icon($content: false, $where: before) { 5 | 6 | text-decoration: none; 7 | 8 | &:#{$where} { 9 | 10 | @if $content { 11 | content: $content; 12 | } 13 | 14 | -moz-osx-font-smoothing: grayscale; 15 | -webkit-font-smoothing: antialiased; 16 | font-family: FontAwesome; 17 | font-style: normal; 18 | font-weight: normal; 19 | text-transform: none !important; 20 | 21 | } 22 | 23 | } 24 | 25 | /// Applies padding to an element, taking the current element-margin value into account. 26 | /// @param {mixed} $tb Top/bottom padding. 27 | /// @param {mixed} $lr Left/right padding. 28 | /// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left) 29 | /// @param {bool} $important If true, adds !important. 30 | @mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) { 31 | 32 | @if $important { 33 | $important: '!important'; 34 | } 35 | 36 | $x: 0.1em; 37 | 38 | @if unit(_size(element-margin)) == 'rem' { 39 | $x: 0.1rem; 40 | } 41 | 42 | padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important}; 43 | 44 | } 45 | 46 | /// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp). 47 | /// @param {string} $svg SVG data URL. 48 | /// @return {string} Encoded SVG data URL. 49 | @function svg-url($svg) { 50 | 51 | $svg: str-replace($svg, '"', '\''); 52 | $svg: str-replace($svg, '%', '%25'); 53 | $svg: str-replace($svg, '<', '%3C'); 54 | $svg: str-replace($svg, '>', '%3E'); 55 | $svg: str-replace($svg, '&', '%26'); 56 | $svg: str-replace($svg, '#', '%23'); 57 | $svg: str-replace($svg, '{', '%7B'); 58 | $svg: str-replace($svg, '}', '%7D'); 59 | $svg: str-replace($svg, ';', '%3B'); 60 | 61 | @return url("data:image/svg+xml;charset=utf8,#{$svg}"); 62 | 63 | } -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/libs/_vars.scss: -------------------------------------------------------------------------------- 1 | // Misc. 2 | $misc: ( 3 | z-index-base: 10000 4 | ); 5 | 6 | // Duration. 7 | $duration: ( 8 | menu: 0.5s, 9 | banner: 1s, 10 | transition: 0.2s 11 | ); 12 | 13 | // Size. 14 | $size: ( 15 | border-radius: 4px, 16 | element-height: 3.25rem, 17 | element-margin: 2rem, 18 | container-width: 80rem, 19 | header-height: 3.25rem, 20 | inner-width: 75rem, 21 | menu-width: 20rem 22 | ); 23 | 24 | // Font. 25 | $font: ( 26 | family: ('Raleway', Arial, Helvetica, sans-serif), 27 | family-fixed: ('Courier New', monospace), 28 | weight: 400, 29 | weight-light: 300, 30 | weight-xlite: 200, 31 | weight-bold: 600 32 | ); 33 | 34 | // Palette. 35 | $palette: ( 36 | bg: #ffffff, 37 | fg: #444444, 38 | fg-bold: #555555, 39 | fg-light: #bbbbbb, 40 | border: rgba(0,0,0,0.25), 41 | border-bg: rgba(0,0,0,0.075), 42 | border-lt: rgba(0,0,0,0.025), 43 | highlight: accent1, 44 | 45 | accent1: ( 46 | bg: #ce1b28, 47 | fg: rgba(255,255,255,0.75), 48 | fg-bold: #ffffff, 49 | fg-light: rgba(255,255,255,0.4), 50 | border: rgba(255,255,255,0.25), 51 | border-bg: rgba(255,255,255,0.075), 52 | border-lt: rgba(255,255,255,0.025), 53 | highlight: accent1 54 | ), 55 | 56 | accent2: ( 57 | bg: #111111, 58 | fg: rgba(255,255,255,0.5), 59 | fg-bold: #ffffff, 60 | fg-light: rgba(255,255,255,0.4), 61 | border: rgba(255,255,255,0.25), 62 | border-bg: rgba(255,255,255,0.075), 63 | border-lt: rgba(255,255,255,0.025), 64 | highlight: accent1 65 | ) 66 | ); -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/assets/sass/main.scss: -------------------------------------------------------------------------------- 1 | @import 'libs/vars'; 2 | @import 'libs/functions'; 3 | @import 'libs/mixins'; 4 | @import 'libs/vendor'; 5 | @import 'libs/breakpoints'; 6 | @import 'libs/grid'; 7 | @import 'libs/flexgrid'; 8 | @import 'font-awesome.min.css'; 9 | @import url('https://fonts.googleapis.com/css?family=Raleway:200,300,400,500,600'); 10 | 11 | /* 12 | Industrious by TEMPLATED 13 | templated.co @templatedco 14 | Released for free under the Creative Commons Attribution 3.0 license (templated.co/license) 15 | */ 16 | 17 | // Breakpoints. 18 | @include breakpoints(( 19 | default: (1681px, null ), 20 | xlarge: (1281px, 1680px ), 21 | large: (981px, 1280px ), 22 | medium: (737px, 980px ), 23 | small: (481px, 736px ), 24 | xsmall: (361px, 480px ), 25 | xxsmall: (null, 360px ) 26 | )); 27 | 28 | // Color. 29 | @mixin color($p) { 30 | @include color-typography($p); 31 | @include color-button($p); 32 | @include color-form($p); 33 | @include color-list($p); 34 | @include color-table($p); 35 | @include color-highlights($p); 36 | @include color-testimonials($p); 37 | } 38 | 39 | // Base. 40 | @import 'base/page'; 41 | @import 'base/reset'; 42 | @import 'base/typography'; 43 | 44 | // Component. 45 | @import 'components/inner'; 46 | @import 'components/button'; 47 | @import 'components/form'; 48 | @import 'components/list'; 49 | @import 'components/table'; 50 | @import 'components/highlights'; 51 | @import 'components/testimonials'; 52 | @import 'components/actions'; 53 | @import 'components/grid'; 54 | @import 'components/icon'; 55 | @import 'components/icons'; 56 | @import 'components/image'; 57 | @import 'components/wrapper'; 58 | 59 | // Layout. 60 | @import 'layout/banner'; 61 | @import 'layout/cta'; 62 | @import 'layout/footer'; 63 | @import 'layout/header'; 64 | @import 'layout/heading'; 65 | @import 'layout/main'; 66 | @import 'layout/menu'; -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/datatables-dependencies.jsp: -------------------------------------------------------------------------------- 1 | <%-- --%> 2 | <%-- --%> 3 | 4 | 5 | <%-- --%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 44 | 45 | 49 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/head.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | Pathfinder 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/automation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/automation.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/banner.jpg -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/banner.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/banner.mp4 -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/bg.jpg -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/cta01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/cta01.jpg -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/details.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/edit.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/first.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/last.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/next.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/ok-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/ok-48.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/path-photo-clip-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/path-photo-clip-blue.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/path-photo-clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/path-photo-clip.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/pic01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/pic01.jpg -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/pic02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/pic02.jpg -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/pic03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/pic03.jpg -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/prev.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/reboot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/reboot.jpg -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/review.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/trash.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/images/workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redhat-cop/pathfinder/168c2a7a8e02314e4eadb9777b51a8c2f1b019b1/pathfinder-ui/src/main/webapp/images/workflow.png -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/nav.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 3 | 36 | 37 | 38 | 58 | 59 | 62 | 63 | 64 | 76 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/usage-tracking.jsp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pathfinder-ui/src/main/webapp/utils.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="com.redhat.pathfinder.Controller" %> 2 | 3 | function addAuthToken(url){ 4 | var separator; 5 | if (!url.includes("_t=") && (jwtToken!="" || jwtToken!=undefined || jwtToken!=null)){ 6 | if (null!=jwtToken && ""!=jwtToken){ 7 | if (url.includes("?")){ 8 | separator="&"; 9 | }else{ 10 | separator="?"; 11 | } 12 | return url+separator+"_t="+jwtToken; 13 | } 14 | } 15 | return url; 16 | } 17 | 18 | Utils = { 19 | // SERVER: "http://localhost:8080", 20 | // SERVER: "http://pathtest-pathfinder.6923.rh-us-east-1.openshiftapps.com", 21 | // SERVER: "${pathfinderUrl}", 22 | SERVER: "<%=null!=Controller.getProperty("PATHFINDER_SELF")?Controller.getProperty("PATHFINDER_SELF"):Controller.getProperty("PATHFINDER_SERVER")%>", 23 | 24 | chartColors: { 25 | "UNKNOWN": "#808080", 26 | "RED": "#cc0000", 27 | "AMBER": "#ec7a08", 28 | "GREEN": "#92d400" 29 | }, 30 | getParameterByName: function(name, url) { 31 | if (!url) url = window.location.href; 32 | name = name.replace(/[\[\]]/g, "\\$&"); 33 | var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 34 | results = regex.exec(url); 35 | if (!results) return null; 36 | if (!results[2]) return ''; 37 | return decodeURIComponent(results[2].replace(/\+/g, " ")); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /utils/mongo-customer.json: -------------------------------------------------------------------------------- 1 | { "_id" : "830294f0-85f9-4b2f-b96c-4fa291beace4", "_class" : "com.redhat.gps.pathfinder.domain.Customer", "name" : "Monteriggioni Bank", "vertical" : "Finance", "description" : "FSI/Investment Banking", "assessor" : "Uncle Noel", "members" : [ { "$ref" : "member", "$id" : "mat" }, { "$ref" : "member", "$id" : "bob" } ], "Applications" : [ { "$ref" : "applications", "$id" : "453f11b1-222f-461d-8fa8-19bb5ee9851d" }, { "$ref" : "applications", "$id" : "9fac98d0-0e81-40eb-8c44-f87b23d57802" }, { "$ref" : "applications", "$id" : "f59d3155-f6b2-45b6-be03-be2342c532f6" }, { "$ref" : "applications", "$id" : "8ad18166-8843-4f99-a187-1f47cba2304a" }, { "$ref" : "applications", "$id" : "023fc84d-d747-4334-990e-751cd5755e26" }, { "$ref" : "applications", "$id" : "53b060f8-281f-49c1-b6ee-768435a73133" }, { "$ref" : "applications", "$id" : "f8091300-e419-4f9e-856e-7b232adbd549" }, { "$ref" : "applications", "$id" : "f13b4215-be49-4571-baa2-e663886077be" }, { "$ref" : "applications", "$id" : "6d979782-660a-4606-851f-afb1af516f94" } ] } 2 | { "_id" : "b4b6057b-0013-4db6-9793-cb7328ddd8e0", "_class" : "com.redhat.gps.pathfinder.domain.Customer", "name" : "Test Customer 1", "vertical" : "", "description" : "", "assessor" : "Mat", "members" : [ { "$ref" : "member", "$id" : "test" } ], "Applications" : [ { "$ref" : "applications", "$id" : "b95dfaf7-fc24-4423-bc9c-f1656b877687" }, { "$ref" : "applications", "$id" : "1315739d-9029-4a6e-bbc3-907f730c61f7" }, { "$ref" : "applications", "$id" : "6d58737b-1a70-45b5-9543-9b281cbf955f" }, { "$ref" : "applications", "$id" : "35658c21-16e2-4ec1-9d91-dc6ba167f2e1" }, { "$ref" : "applications", "$id" : "2a5fad5f-8b78-4bfc-8f6e-de9d7729c171" }, { "$ref" : "applications", "$id" : "d5f38adb-5d52-4fba-86c5-824b9c3a4c33" }, { "$ref" : "applications", "$id" : "3a0496ac-6cf0-4740-984c-37d1d7060422" } ] } 3 | -------------------------------------------------------------------------------- /utils/mongo-dump.sh: -------------------------------------------------------------------------------- 1 | mongodump --host localhost --port 27017 --db pathfinder 2 | -------------------------------------------------------------------------------- /utils/mongo-export.sh: -------------------------------------------------------------------------------- 1 | mongoexport --db pathfinder --collection applications --out mongo-applications.json 2 | mongoexport --db pathfinder --collection assessments --out mongo-assessments.json 3 | mongoexport --db pathfinder --collection customer --out mongo-customer.json 4 | mongoexport --db pathfinder --collection member --out mongo-member.json 5 | mongoexport --db pathfinder --collection reviews --out mongo-reviews.json 6 | 7 | -------------------------------------------------------------------------------- /utils/mongo-import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mongo localhost:27017/pathfinder --eval 'db.createCollection("customer")' 4 | mongoimport --db pathfinder --collection 'customer' --file mongo-customer.json 5 | mongo localhost:27017/pathfinder --eval 'db.createCollection("applications")' 6 | mongoimport --db pathfinder --collection 'applications' --file mongo-applications.json 7 | mongo localhost:27017/pathfinder --eval 'db.createCollection("assessments")' 8 | mongoimport --db pathfinder --collection 'assessments' --file mongo-assessments.json 9 | mongo localhost:27017/pathfinder --eval 'db.createCollection("member")' 10 | mongoimport --db pathfinder --collection 'member' --file mongo-member.json 11 | mongo localhost:27017/pathfinder --eval 'db.createCollection("reviews")' 12 | mongoimport --db pathfinder --collection 'reviews' --file mongo-reviews.json 13 | 14 | 15 | #for file in mongo-*.json; do 16 | # c=${file#*mongo-}; 17 | # c=${c%.json}; 18 | # echo "mongo localhost:27017/pathfinder --eval 'db.createCollection(\"${c}\")'"; 19 | # echo "mongoimport --db pathfinder --collection '${c}' --file ${file}"; 20 | ## mongo localhost:27017/pathfinder --eval 'db.createCollection(\"${c}\")'; 21 | ## mongoimport --db pathfinder --collection '${c}' --file ${file}; 22 | #done 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /utils/mongo-member.json: -------------------------------------------------------------------------------- 1 | { "_id" : "123", "_class" : "com.redhat.gps.pathfinder.domain.Member", "displayname" : "", "email" : "", "privileges" : [ "ALL" ], "roles" : [ "ADMIN" ], "customer" : { "$ref" : "customer", "$id" : "830294f0-85f9-4b2f-b96c-4fa291beace4" } } 2 | { "_id" : "admin", "_class" : "com.redhat.gps.pathfinder.domain.Member", "displayname" : "Admin", "password" : "admin", "roles" : [ "SUPER" ] } 3 | { "_id" : "bob", "_class" : "com.redhat.gps.pathfinder.domain.Member", "displayname" : "Bob Smith", "email" : "bob@redhat.com", "password" : "password", "privileges" : [ "ALL" ], "roles" : [ "ADMIN" ], "customer" : { "$ref" : "customer", "$id" : "830294f0-85f9-4b2f-b96c-4fa291beace4" } } 4 | { "_id" : "mat", "_class" : "com.redhat.gps.pathfinder.domain.Member", "displayname" : "Mat Allen", "email" : "mat@redhat.com", "password" : "password", "privileges" : [ "ALL" ], "roles" : [ "ADMIN" ], "customer" : { "$ref" : "customer", "$id" : "830294f0-85f9-4b2f-b96c-4fa291beace4" } } 5 | { "_id" : "mav", "_class" : "com.redhat.gps.pathfinder.domain.Member", "displayname" : "Mav", "email" : "mat@redhat.com", "password" : "123", "privileges" : [ "ALL" ], "roles" : [ "ADMIN" ], "customer" : { "$ref" : "customer", "$id" : "830294f0-85f9-4b2f-b96c-4fa291beace4" } } 6 | { "_id" : "test", "_class" : "com.redhat.gps.pathfinder.domain.Member", "displayname" : "test", "email" : "", "password" : "test", "privileges" : [ "ALL" ], "roles" : [ "ADMIN" ], "customer" : { "$ref" : "customer", "$id" : "b4b6057b-0013-4db6-9793-cb7328ddd8e0" } } 7 | -------------------------------------------------------------------------------- /utils/mongo-restore.sh: -------------------------------------------------------------------------------- 1 | --port 2 | -------------------------------------------------------------------------------- /utils/pathfinder-server-build.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | annotations: 5 | description: Build the pathfinder-server Application 6 | iconClass: icon-java 7 | tags: java 8 | name: pathfinder-server-build 9 | objects: 10 | - apiVersion: v1 11 | kind: ImageStream 12 | metadata: 13 | labels: 14 | app: ${APPLICATION_NAME} 15 | name: ${APPLICATION_NAME} 16 | - apiVersion: v1 17 | kind: BuildConfig 18 | metadata: 19 | creationTimestamp: null 20 | labels: 21 | app: ${APPLICATION_NAME} 22 | template: openjdk18-web-basic-s2i 23 | xpaas: 1.4.12 24 | name: ${APPLICATION_NAME}-build 25 | spec: 26 | nodeSelector: null 27 | output: 28 | to: 29 | kind: ImageStreamTag 30 | name: ${APPLICATION_NAME}:latest 31 | postCommit: {} 32 | resources: {} 33 | runPolicy: Serial 34 | source: 35 | contextDir: pathfinder-server 36 | git: 37 | ref: master 38 | uri: https://github.com/redhat-cop/pathfinder 39 | type: Git 40 | strategy: 41 | sourceStrategy: 42 | forcePull: true 43 | from: 44 | kind: ImageStreamTag 45 | name: redhat-openjdk18-openshift:1.3 46 | namespace: openshift 47 | type: Source 48 | triggers: 49 | - imageChange: {} 50 | type: ImageChange 51 | - type: ConfigChange 52 | status: 53 | lastVersion: 0 54 | parameters: 55 | - description: The name for the application. 56 | displayName: Application name 57 | name: APPLICATION_NAME 58 | required: true 59 | value: pathfinder-server 60 | 61 | -------------------------------------------------------------------------------- /utils/pathfinder-ui-build.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | metadata: 4 | annotations: 5 | description: Build the pathfinder-ui Application 6 | iconClass: icon-java 7 | tags: java 8 | name: pathfinder-ui-build 9 | objects: 10 | - apiVersion: v1 11 | kind: ImageStream 12 | metadata: 13 | labels: 14 | app: ${APPLICATION_NAME} 15 | name: ${APPLICATION_NAME} 16 | - apiVersion: v1 17 | kind: BuildConfig 18 | metadata: 19 | creationTimestamp: null 20 | labels: 21 | app: ${APPLICATION_NAME} 22 | application: ${APPLICATION_NAME} 23 | template: jws31-tomcat8-basic-s2i 24 | xpaas: 1.4.12 25 | name: ${APPLICATION_NAME}-build 26 | spec: 27 | nodeSelector: null 28 | output: 29 | to: 30 | kind: ImageStreamTag 31 | name: ${APPLICATION_NAME}:latest 32 | postCommit: {} 33 | resources: {} 34 | runPolicy: Serial 35 | source: 36 | contextDir: pathfinder-ui 37 | git: 38 | ref: master 39 | uri: https://github.com/redhat-cop/pathfinder 40 | type: Git 41 | strategy: 42 | sourceStrategy: 43 | env: 44 | - name: MAVEN_MIRROR_URL 45 | - name: ARTIFACT_DIR 46 | forcePull: true 47 | from: 48 | kind: ImageStreamTag 49 | name: jboss-webserver31-tomcat8-openshift:1.2 50 | namespace: openshift 51 | type: Source 52 | triggers: 53 | - imageChange: {} 54 | type: ImageChange 55 | - type: ConfigChange 56 | status: 57 | lastVersion: 0 58 | parameters: 59 | - description: The name for the application. 60 | displayName: Application name 61 | name: APPLICATION_NAME 62 | required: true 63 | value: pathfinder-ui 64 | --------------------------------------------------------------------------------