Skip to content
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

Change main doc links to API Docs & Tutorial. #6

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# RW API Landing page

Dependencies on other Microservices:

- [Control Tower](https://github.com/resource-watch/control-tower)
48 changes: 8 additions & 40 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
<meta property="og:type" content="website" />
<meta property="og:title" content="Planet's signals together | Resource Watch API" />
<meta property="og:description" content="Planet's signals together | Resource Watch API" />
<meta property="og:image" content="http://staging-api.globalforestwatch.org/rw-lp/images/earth.jpg" />
<meta property="og:image" content="https://api.resourcewatch.org/rw-lp/images/earth.jpg" />

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="https://api.resourcewatch.org">
<meta name="twitter:creator" content="Vizzuality">
<meta name="twitter:title" content="Planet's signals together | Resource Watch API" />
<meta name="twitter:description" content="Planet's signals together | Resource Watch API" />
<meta name="twitter:image" content="http://staging-api.globalforestwatch.org/rw-lp/images/earth.jpg" />
<meta name="twitter:image" content="https://api.resourcewatch.org/rw-lp/images/earth.jpg" />

<!-- build:css rw-lp/styles/vendor.css -->
<!-- bower:css -->
Expand Down Expand Up @@ -117,9 +117,9 @@ <h2 id="header-subtitle" class="subtitle">
<div class="col-sm-5">
<div class="content">
<h3 class="title">Several sources_ Same interface_</h3>
<p class="body">It doesn’t matter if the data is in CARTO, CSV, ArcGIS, JSON, or GEE format because we’ve used SQL and feature service, both standard languages, to query the data and reveal the information that is sought. Whatever system you use, you’ll be able to use it, avoiding any lengthy and difficult discussions about standards and compatibility. We’ve done the hard work so you don’t have to.</p>
<a class="btn btn-lg btn-raised bg-pink color-white" href="https://api.resourcewatch.org/documentation/">Swagger Docs</a>
<p class="body">It doesn’t matter if the data is in CARTO, CSV, ArcGIS, JSON, or GEE. We use SQL to query the data and reveal the information that is sought, no matter where it's stored. Whatever system you use, you’ll be able to use it, avoiding any lengthy and difficult discussions about standards and compatibility. We’ve done the hard work so you don’t have to.</p>
<a class="btn btn-lg btn-raised bg-pink color-white" href="https://resource-watch.github.io/doc-api/">API Docs</a>
<a class="btn btn-lg btn-raised bg-pink color-white" href="https://resource-watch.github.io/doc-api/tutorials.html">Tutorials</a>
</div>
</div>
<div class="col-sm-6 col-sm-offset-1">
Expand All @@ -138,8 +138,8 @@ <h3 class="title">Several sources_ Same interface_</h3>
<div class="col-sm-5 col-sm-offset-1">
<div class="content">
<h3 class="title">Production_ Ready_</h3>
<p class="body">In case you want to upload your own data to the platform you can request us to create your own user. However all data is actually available to use in any application or research project.</p>
<a class="btn btn-lg btn-raised bg-pink color-white" href="http://api.resourcewatch.org:82/">Go to the console</a>
<p class="body">Want to host your own data on the RW API? No problem! Simply sign up for a free account, and you can upload your own data, to power your own application and share it with the world.</p>
<a class="btn btn-lg btn-raised bg-pink color-white" href="https://api.resourcewatch.org/auth/login">Login or Register</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -199,38 +199,6 @@ <h3 ng-hide="StatusVM.status">Loading ...</h3>
</section>
<!-- status -->

<!-- time -->
<section id="status" class="section bg-white" ng-controller="PerformanceController as PerformanceVM">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="content">
<h3 class="title">Most requested Endpoints Performance</h3>
<h3 ng-hide="PerformanceVM.statistics">Loading ...</h3>
<table class="table table-striped table-hover" ng-show="PerformanceVM.statistics">
<thead>
<tr>
<th>#</th>
<th>Endpoint</th>
<th>Avg Response Time</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in PerformanceVM.statistics | orderBy: '-count' | limitTo: 10 track by $index">
<td>{{1+$index}}</td>
<td>{{item._id.sourceMethod}}: {{item._id.endpointPath}}</td>
<td>{{item.sum.toFixed(2)}} ms</td>
<td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<!-- time -->

<!-- hero -->
<section id="docs" class="section hero color-white">
<div class="container">
Expand All @@ -256,7 +224,7 @@ <h2 class="subtitle">

<footer>
<div class="container">
<p>Resource Watch 2017</p>
<p>Resource Watch 2020</p>
<!--<p class="small">All trademarks, service marks, trade names, trade dress, product names and logos appearing on the site are the property of their respective owners.</p>-->
</div>
</footer>
Expand All @@ -282,4 +250,4 @@ <h2 class="subtitle">
<!-- endbuild -->

</body>
</html>
</html>
21 changes: 0 additions & 21 deletions app/rw-lp/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

angular.module('app', []);
angular.module('app').controller('StatusController', ['$http', StatusController]);
angular.module('app').controller('PerformanceController', ['$http', PerformanceController]);

function StatusController($http) {
var vm = this;
Expand All @@ -24,24 +23,4 @@

}

function PerformanceController($http) {
var vm = this;

vm.statistics = null;

$http({
method: 'GET',
url: '//production-api.globalforestwatch.org/api/v1/stadistic/avgByRequest?'+Date.now()
}).then(function successCallback(response) {
vm.statistics = response.data;
// this callback will be called asynchronously
// when the response is available
}, function errorCallback(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});

}


})();
16 changes: 8 additions & 8 deletions microservice/register.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
]
},
{
"url": "/v1/*.js",
"url": "/v1/rw-lp/*.js",
"authenticated": false,
"method": "GET",
"endpoints": [
Expand All @@ -30,7 +30,7 @@
]
},
{
"url": "/v1/*.css",
"url": "/v1/rw-lp/*.css",
"authenticated": false,
"method": "GET",
"endpoints": [
Expand All @@ -42,7 +42,7 @@
]
},
{
"url": "/v1/*.png",
"url": "/v1/rw-lp/*.png",
"authenticated": false,
"method": "GET",
"endpoints": [
Expand All @@ -54,7 +54,7 @@
]
},
{
"url": "/v1/*.jpg",
"url": "/v1/rw-lp/*.jpg",
"authenticated": false,
"method": "GET",
"endpoints": [
Expand All @@ -66,7 +66,7 @@
]
},
{
"url": "/v1/*.svg",
"url": "/v1/rw-lp/*.svg",
"authenticated": false,
"method": "GET",
"endpoints": [
Expand All @@ -78,7 +78,7 @@
]
},
{
"url": "/v1/*.ico",
"url": "/v1/rw-lp/*.ico",
"authenticated": false,
"method": "GET",
"endpoints": [
Expand All @@ -90,7 +90,7 @@
]
},
{
"url": "/v1/*.txt",
"url": "/v1/rw-lp/*.txt",
"authenticated": false,
"method": "GET",
"endpoints": [
Expand All @@ -102,7 +102,7 @@
]
},
{
"url": "/v1/*.json",
"url": "/v1/rw-lp/*.json",
"authenticated": false,
"method": "GET",
"endpoints": [
Expand Down