create web application
This commit is contained in:
1
pdb-ui/src/main/resources/config.system.properties
Normal file
1
pdb-ui/src/main/resources/config.system.properties
Normal file
@@ -0,0 +1 @@
|
||||
db.base=/tmp/db
|
||||
1
pdb-ui/src/main/resources/config.user.properties
Normal file
1
pdb-ui/src/main/resources/config.user.properties
Normal file
@@ -0,0 +1 @@
|
||||
db.base=/home/andi/ws/performanceDb/db
|
||||
55
pdb-ui/src/main/resources/resources/css/design.css
Normal file
55
pdb-ui/src/main/resources/resources/css/design.css
Normal file
@@ -0,0 +1,55 @@
|
||||
body {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'FontAwesome';
|
||||
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
|
||||
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
||||
#top-menu-bar {
|
||||
background-color: black;
|
||||
color: white;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#logo {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#search-bar {
|
||||
background-color: #aaa;
|
||||
text-align: right;
|
||||
padding-bottom:3px;
|
||||
}
|
||||
|
||||
#search-bar #search-query {
|
||||
width:100%;
|
||||
padding:2;
|
||||
border:0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#search-bar #search-submit {
|
||||
margin-right:3px;
|
||||
}
|
||||
|
||||
#result-view {
|
||||
background: red;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
#result-view i {
|
||||
background: white;
|
||||
display:inline;
|
||||
font-style:normal;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
|
||||
34
pdb-ui/src/main/resources/resources/css/icons.css
Normal file
34
pdb-ui/src/main/resources/resources/css/icons.css
Normal file
@@ -0,0 +1,34 @@
|
||||
.fa {
|
||||
display: inline-block;
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
/* makes the font 33% larger relative to the icon container */
|
||||
.fa-lg {
|
||||
font-size: 1.33333333em;
|
||||
line-height: 0.75em;
|
||||
vertical-align: -15%;
|
||||
}
|
||||
.fa-2x {
|
||||
font-size: 2em;
|
||||
}
|
||||
.fa-3x {
|
||||
font-size: 3em;
|
||||
}
|
||||
.fa-4x {
|
||||
font-size: 4em;
|
||||
}
|
||||
.fa-5x {
|
||||
font-size: 5em;
|
||||
}
|
||||
|
||||
.fa-search:before {
|
||||
content: "\f002";
|
||||
}
|
||||
|
||||
.fa-icons:before {
|
||||
content: "\f002";
|
||||
}
|
||||
8
pdb-ui/src/main/resources/resources/css/typography.css
Normal file
8
pdb-ui/src/main/resources/resources/css/typography.css
Normal file
@@ -0,0 +1,8 @@
|
||||
body, p, td, th, textarea
|
||||
{
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
textarea {
|
||||
font-size:1.2em;
|
||||
}
|
||||
2
pdb-ui/src/main/resources/resources/fonts/.gitignore
vendored
Normal file
2
pdb-ui/src/main/resources/resources/fonts/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/font-awesome-4.7.0/
|
||||
/font-awesome-4.7.0.zip
|
||||
Binary file not shown.
21
pdb-ui/src/main/resources/resources/index.html
Normal file
21
pdb-ui/src/main/resources/resources/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/search.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/typography.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/design.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/icons.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="top-menu-bar">
|
||||
<div id="logo">LOGO</div>
|
||||
</div>
|
||||
<div id="search-bar">
|
||||
<textarea id="search-query"></textarea>
|
||||
<button id="search-submit"><i class="fa fa-search"> Search</i></button>
|
||||
</div>
|
||||
<div id="result-view">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
pdb-ui/src/main/resources/resources/js/jquery-3.1.1.min.js
vendored
Normal file
4
pdb-ui/src/main/resources/resources/js/jquery-3.1.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
39
pdb-ui/src/main/resources/resources/js/search.js
Normal file
39
pdb-ui/src/main/resources/resources/js/search.js
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#search-submit').click(function(event){
|
||||
event.preventDefault(); // prevent submit of form which would reload the page
|
||||
|
||||
var request = {};
|
||||
request['query'] = $('#search-query').val();
|
||||
|
||||
var success = function(response){
|
||||
|
||||
$('#result-view').text("SUCCESS: "+response.imageUrls);
|
||||
};
|
||||
var error = function(e) {
|
||||
//var response = JSON.parse(e.responseText);
|
||||
$('#result-view').text("FAILED: " + JSON.stringify(e));
|
||||
};
|
||||
|
||||
|
||||
postJson("plots", request, success, error);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function postJson(url, requestData, successCallback, errorCallback) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: JSON.stringify(requestData),
|
||||
contentType: 'application/json'
|
||||
})
|
||||
.done(successCallback)
|
||||
.fail(errorCallback);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user