-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Landing page for the Series REST-API #382
Merged
Merged
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8902b38
Issue #134 Add about page for the root path
antego 18de11a
Add landing page controller with redirection
antego 85e1bd6
Fix resolving of views
antego fdbda9a
Rename landing page, fix maven build
antego e2a759c
Rename landing page in web.xml
antego 2aa930d
Bootstrap template as landing page skeleton
antego d95175b
More meaningful captions
antego c0713a9
Add "learn more" section
antego 51f2ec7
Merge remote-tracking branch 'upstream/develop' into feature/landing_…
antego 7d1dcd4
resources moved under non root path
antego ed58f54
Jekyll integration in maven build
antego 31bf062
Move Jekyll build to the non-Windows profile
antego cd0faa2
Add GitHub repo ribbon and version label
antego 05ac325
Packaging resources in jar, link to jekyll docs
antego d3e1483
Change packaging of module to war, fix urls
antego File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
rest/src/main/java/org/n52/web/ctrl/LandingPageController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (C) 2013-2017 52°North Initiative for Geospatial Open Source | ||
* Software GmbH | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 as published | ||
* by the Free Software Foundation. | ||
* | ||
* If the program is linked with libraries which are licensed under one of | ||
* the following licenses, the combination of the program with the linked | ||
* library is not considered a "derivative work" of the program: | ||
* | ||
* - Apache License, version 2.0 | ||
* - Apache Software License, version 1.0 | ||
* - GNU Lesser General Public License, version 3 | ||
* - Mozilla Public License, versions 1.0, 1.1 and 2.0 | ||
* - Common Development and Distribution License (CDDL), version 1.0 | ||
* | ||
* Therefore the distribution of the program linked with libraries licensed | ||
* under the aforementioned licenses, is permitted by the copyright holders | ||
* if the distribution is compliant with both the GNU General Public License | ||
* version 2 and the aforementioned licenses. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
*/ | ||
package org.n52.web.ctrl; | ||
|
||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
|
||
@Controller | ||
public class LandingPageController { | ||
@RequestMapping | ||
public String redirectToLandingPage() { | ||
return "redirect:/api/"; | ||
} | ||
|
||
@RequestMapping("/") | ||
public String showLandingPage() { | ||
return "landing"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,11 +48,11 @@ | |
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"> | ||
<property name="viewResolvers"> | ||
<list> | ||
<!-- <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" /> --> | ||
<!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> --> | ||
<!-- <property name="prefix" value="/WEB-INF/jsp/" /> --> | ||
<!-- <property name="suffix" value=".jsp" /> --> | ||
<!-- </bean> --> | ||
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" /> | ||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | ||
<property name="prefix" value="/" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use a prefix different from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved to the |
||
<property name="suffix" value=".html" /> | ||
</bean> | ||
</list> | ||
</property> | ||
<property name="defaultViews"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions
47
spi-impl/series/series-dao-webapp/src/main/webapp/landing.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Series REST-API</title> | ||
|
||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | ||
</head> | ||
<body> | ||
<div class="jumbotron"> | ||
<div class="container"> | ||
<h1>Series REST-API</h1> | ||
<p>The 52°North Series API provides a thin access layer to series datasets via RESTful Web binding. It provides different output formats like json, pdf or png.</p> | ||
<p><a class="btn btn-primary btn-lg" href="http://52north.github.io/series-rest-api/" role="button">Learn more »</a></p> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<h2>JSON</h2> | ||
<p>Query the sensor status and get all the metadata you want with a simple REST interface. It is lightweight and can be utilized in many workflows. For example you can get a list of platforms. </p> | ||
<p><a class="btn btn-default" href="/api/v1/platforms/" role="button">Run example query »</a></p> | ||
</div> | ||
<div class="col-md-4"> | ||
<h2>Graphs</h2> | ||
<p>Plot the highly customizable graphs and use it within your apps.</p> | ||
<img style="max-width: 100%; max-height: 100%" src="chart.png"> | ||
</div> | ||
<div class="col-md-4"> | ||
<h2>And more</h2> | ||
<p>The all sorts of sensor data can be queried with a Sensor REST-API. See the docs for a complete reference.</p> | ||
<p><a class="btn btn-default" href="http://52north.github.io/series-rest-api/" role="button">Explore the docs »</a></p> | ||
</div> | ||
</div> | ||
|
||
<hr> | ||
|
||
<footer> | ||
<p>© 2017 52°North.</p> | ||
</footer> | ||
</div> | ||
</body> | ||
</html> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will break, if implementations choose different servlet contexts thant
/api/*
(seeweb.xml
). You could configure the context, though, within theapplication.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed