Skip to content

Commit

Permalink
readme, build file, view minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun Varghese committed Apr 25, 2018
1 parent a4c92dd commit 62b67c3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
![Bugs Status](https://sonarcloud.io/api/project_badges/measure?project=MarsRoverPhotoDownloader&metric=bugs)
[![Build Status](https://travis-ci.org/varararun/MarsRoverPhotoDownloader.svg?branch=master)](https://travis-ci.org/varararun/MarsRoverPhotoDownloader)
![Maintainability Status](https://sonarcloud.io/api/project_badges/measure?project=MarsRoverPhotoDownloader&metric=sqale_rating)
![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=MarsRoverPhotoDownloader&metric=coverage)
![Bugs Status](https://sonarcloud.io/api/project_badges/measure?project=MarsRoverPhotoDownloader&metric=bugs)
![Vulnerabilities Status](https://sonarcloud.io/api/project_badges/measure?project=MarsRoverPhotoDownloader&metric=vulnerabilities)
[![Build Status](https://travis-ci.org/varararun/MarsRoverPhotoDownloader.svg?branch=master)](https://travis-ci.org/varararun/MarsRoverPhotoDownloader)

## Notes
<!--
0. to run sonar report:
./gradlew sonarqube -Dsonar.organization=vararun-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=b508158c5f2ad698df6785b9608b2906dc37628d -Dsonar.sources=src -Dsonar.java.binaries=build/classes -Dsonar.java.libraries=gradle/**/*.jar -Dsonar.test.inclusions=src/test/** -Dsonar.exclusions=src/test/**
https://sonarcloud.io/dashboard?id=MarsRoverPhotoDownloader
-->
1. All photos are saved to relative `./downloads` directory
2. Photos are in a nested directory, divided by `earth_date` param, using the following format: `yyyy-mm-dd`
3. Built with java 1.8
Expand All @@ -14,12 +20,13 @@
#### To Run UI
1. Configure properties in `~/src/main/resources/application.yml`
2. Run `$ ./gradlew bootRun` in terminal/cmd
2. Navigate to `localhost:8080` or check terminal/cmd for tomcat port info
3. Specify camera type, select ALL to download all images captured on that day
4. Specify date, currently String input
5. Specify number of images to download for that day, if number is larger than available images, it will be ignored
6. Submit and wait for results
7. Check download directory for images
3. Navigate to `localhost:8080` or check terminal/cmd for tomcat port info
4. Specify camera type, select ALL to download all images captured on that day
5. Specify date, currently String input
6. Specify number of images to download for that day, if number is larger than available images, it will be ignored
7. Specify if this is a dry run, if checked, no actual images will be downloaded
8. Submit and wait for results
9. Check download directory for images

#### To Run Tests
1. Run `$ ./gradlew test` in terminal/cmd
Expand Down
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE")
classpath("net.saliman:gradle-cobertura-plugin:2.2.8")
classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6")
}
}

plugins {
id "org.sonarqube" version "2.6"
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: "cobertura"
apply plugin: 'cobertura'
apply plugin: 'org.sonarqube'
apply plugin: 'jacoco'

jar {
baseName = 'mars-rover-photo-downloader'
Expand Down
15 changes: 9 additions & 6 deletions src/main/resources/templates/result.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
<h1>Result</h1>

<h3>Parameters:</h3>
<li th:text="'camera type: ' + ${model.camera ?: 'all'}"/>
<li th:text="'date: ' + ${model.date}"/>
<li th:text="'limit: ' + ${model.limit}"/>
<li th:text="'dry run: ' + ${model.dryRun}"/>

<ul>
<li th:text="'camera type: ' + ${model.camera ?: 'all'}"/>
<li th:text="'date: ' + ${model.date}"/>
<li th:text="'limit: ' + ${model.limit}"/>
<li th:text="'dry run: ' + ${model.dryRun}"/>
</ul>
<h3 th:text="'Output for ' + ${#lists.size(model.images)} + ' image(s):'"/>
<li th:each="image : ${model.images}" th:text="${image}"/>
<ul>
<li th:each="image : ${model.images}" th:text="${image}"/>
</ul>
</body>
</html>

0 comments on commit 62b67c3

Please sign in to comment.