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

Commit

Permalink
add wps-js test client
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Nüst committed May 14, 2014
1 parent f44dad7 commit 587cc8c
Show file tree
Hide file tree
Showing 20 changed files with 5,164 additions and 198 deletions.
173 changes: 173 additions & 0 deletions 52n-wps-webapp/src/main/webapp/client.html
@@ -0,0 +1,173 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<link href="http://52north.org/templates/52n-2012/favicon.ico"
rel="shortcut icon" type="image/vnd.microsoft.icon" />

<title>52&deg;North wps-js client</title>

<script src="js/jquery/jquery.1.8.3.min.js"></script>
<script src="js/jquery/jquery-ui.1.8.3.min.js"></script>
<script src="js/openlayers/OpenLayers-closure.js"></script>
<script src="js/wps-js/wps-js.1.0.0-SNAPSHOT.js"></script>
<link type="text/css" rel="stylesheet" href="css/wps-js.css">
<link rel="shortcut icon" href="favicon.ico" />

<!-- for the ribbon -->
<style type="text/css">
/* Left will inherit from right (so we don't need to duplicate code) */
.github-fork-ribbon {
/* The right and left classes determine the side we attach our banner to */
position: absolute;
/* Add a bit of padding to give some substance outside the "stitching" */
padding: 2px 0;
/* Set the base colour */
background-color: #66C5E4;
/* Set a gradient: transparent black at the top to almost-transparent black at the bottom */
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)),
to(rgba(0, 0, 0, 0.15)));
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.15));
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.15));
background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.15));
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.15));
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.15));
/* Add a drop shadow */
-webkit-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.5);
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.5);
z-index: 9999;
pointer-events: auto;
}

.github-fork-ribbon a,.github-fork-ribbon a:hover {
/* Set the font */
font: 700 13px "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #fff;
/* Set the text properties */
text-decoration: none;
text-shadow: 0 -1px rgba(0, 0, 0, 0.5);
text-align: center;
/* Set the geometry. If you fiddle with these you'll also need
to tweak the top and right values in .github-fork-ribbon. */
width: 200px;
line-height: 20px;
/* Set the layout properties */
display: inline-block;
padding: 2px 0;
/* Add "stitching" effect */
border-width: 1px 0;
border-style: dotted;
border-color: #fff;
border-color: rgba(255, 255, 255, 0.7);
}

.github-fork-ribbon-wrapper {
width: 150px;
height: 150px;
position: absolute;
overflow: hidden;
top: 0;
z-index: 9999;
pointer-events: none;
}

.github-fork-ribbon-wrapper.fixed {
position: fixed;
}

.github-fork-ribbon-wrapper.right {
right: 0;
}

.github-fork-ribbon-wrapper.right .github-fork-ribbon {
top: 42px;
right: -43px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
</style>
</head>
<body>
<div class="github-fork-ribbon-wrapper right">
<div class="github-fork-ribbon">
<a href="https://github.com/52North/wps-js">Fork me on GitHub</a>
</div>
</div>

<div id="main">

<h1>52&deg;North wps-js client for WPS</h1>

<div id="wrapper">
<div>
<select id="wps">
<option>Select WPS</option>
<option>http://localhost:8080/wps/WebProcessingService</option>
</select>
</div>
<div>
<h3>
Capabilities <a href="#" id="wpscaller">Show Capabilities</a>
</h3>
<div class="wps-container">
<div id="capabilitiesByClick"></div>
</div>
</div>
<div>
<h3>Execute Process</h3>
<div class="wps-container">
<select id="processes"><option>Select a process</option></select> <span
id="processDescriptionLink"></span>
<div class="wps-execute-container" id="wps-execute-container"></div>
</div>
<p></p>
<div class="wps-container">
<div id="executeProcess"></div>
</div>
</div>
</div>
<script type="text/javascript">
var capabilities, // the capabilities, read by Format.WPSCapabilities::read
process; // the process description from Format.WPSDescribeProcess::read

$('#wpscaller').click(function() {
var sel = document.getElementById("wps");

$('#capabilitiesByClick').wpsCall({
url : sel.options[sel.selectedIndex].text,
requestType : GET_CAPABILITIES_TYPE
});
});
$(document).ready(function() {
$.wpsSetup({
proxy : {
url : "/wps_proxy/wps_proxy?url=",
type : "parameter"
}
});
});

// add behavior to html elements
document.getElementById("processes").onchange = function() {
var sel = document.getElementById("processes");

describeProcess(sel.options[sel.selectedIndex].text);
};
document.getElementById("wps").onchange = function() {
var sel = document.getElementById("wps");

getCapabilities(sel.options[sel.selectedIndex].text);
};
</script>
</div>
</body>
</html>
120 changes: 120 additions & 0 deletions 52n-wps-webapp/src/main/webapp/css/wps-js.css
@@ -0,0 +1,120 @@
div.wps-container {
font-family: "Trebuchet MS", Helvetica, sans-serif;
border: 2px solid #66C5E4;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
display: inline-block;
padding: 0.2em;
}

div.wps-generic-success {
background-image:url('../images/Success-64.png');
width:64px;
height:64px;
}

div.wps-generic-error {
background-image:url('../images/Error-64.png');
width:64px;
height:64px;
}

div.wps-waiting {
background-image:url('../images/ajax-loader.gif');
width:32px;
height:32px;
}

ul.wps-execute-response-list, ul.wps-capabilities-list {
list-style-type: none;
padding: 0;
margin-top: 0;
}

ul.wps-execute-response-list li, ul.wps-capabilities-list li {
margin: 0.2em 0;
}

label.wps-item-label {
font-variant:small-caps;
margin-right: 0.5em;
padding: 0.1em;
background-color: #66C5E4;
width: 100px;
display: inline-block;
border: 1px solid #66C5E4;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}

label.wps-input-item-label {
font-variant:small-caps;
margin-right: 0.5em;
padding: 0.1em;
background-color: #66C5E4;
display: inline-block;
border: 1px solid #66C5E4;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}

label.wps-extension-item-label {
font-variant:small-caps;
margin-right: 0.5em;
padding: 0.1em;
background-color: #66C5E4;
display: inline-block;
border: 1px solid #66C5E4;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}

span.wps-item-value {

}

span.wps-item-error-value {
color: red;
}

span.wps-item-error-message-value {
color: red;
display: block;
unicode-bidi: embed;
font-family: monospace;
white-space: pre;
}

textarea.wps-complex-input-textarea {
width: 377px;
height: 17px;
}

button.add-input-copy {
background-image:url('../images/Plus-16.png');
width: 20px;
height: 20px;
}

div.wps-execute-autoUpdate {
background-image:url('../images/Update-16.png');
width: 16px;
height: 16px;
}

div.wps-execute-response-result {
margin: 0.2em 0;
padding: 0;
}

p.infotext {
color: #afafaf;
}

span.wps-metadata-link {
margin: 0 0.2em 0 0.2em;
}
Binary file added 52n-wps-webapp/src/main/webapp/favicon.ico
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 52n-wps-webapp/src/main/webapp/images/Plus-16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 52n-wps-webapp/src/main/webapp/images/Plus-48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 52n-wps-webapp/src/main/webapp/images/Update-16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 587cc8c

Please sign in to comment.