T201 updated gitignore
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,3 +1,7 @@
|
||||
target/
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
.idea/workspace.xml
|
||||
*.ipr
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
target/classes/com/release11/klaus/utilis/ObjectConfig.class
Normal file
BIN
target/classes/com/release11/klaus/utilis/ObjectConfig.class
Normal file
Binary file not shown.
21
target/classes/static/Dependency/fontello-plus/LICENSE.txt
Normal file
21
target/classes/static/Dependency/fontello-plus/LICENSE.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
Font license info
|
||||
|
||||
|
||||
## Entypo
|
||||
|
||||
Copyright (C) 2012 by Daniel Bruce
|
||||
|
||||
Author: Daniel Bruce
|
||||
License: SIL (http://scripts.sil.org/OFL)
|
||||
Homepage: http://www.entypo.com
|
||||
|
||||
|
||||
## Font Awesome
|
||||
|
||||
Copyright (C) 2016 by Dave Gandy
|
||||
|
||||
Author: Dave Gandy
|
||||
License: SIL ()
|
||||
Homepage: http://fortawesome.github.com/Font-Awesome/
|
||||
|
||||
|
||||
75
target/classes/static/Dependency/fontello-plus/README.txt
Normal file
75
target/classes/static/Dependency/fontello-plus/README.txt
Normal file
@@ -0,0 +1,75 @@
|
||||
This webfont is generated by https://fontello.com open source project.
|
||||
|
||||
|
||||
================================================================================
|
||||
Please, note, that you should obey original font licenses, used to make this
|
||||
webfont pack. Details available in LICENSE.txt file.
|
||||
|
||||
- Usually, it's enough to publish content of LICENSE.txt file somewhere on your
|
||||
site in "About" section.
|
||||
|
||||
- If your project is open-source, usually, it will be ok to make LICENSE.txt
|
||||
file publicly available in your repository.
|
||||
|
||||
- Fonts, used in Fontello, don't require a clickable link on your site.
|
||||
But any kind of additional authors crediting is welcome.
|
||||
================================================================================
|
||||
|
||||
|
||||
Comments on archive content
|
||||
---------------------------
|
||||
|
||||
- /font/* - fonts in different formats
|
||||
|
||||
- /css/* - different kinds of css, for all situations. Should be ok with
|
||||
twitter bootstrap. Also, you can skip <i> style and assign icon classes
|
||||
directly to text elements, if you don't mind about IE7.
|
||||
|
||||
- demo.html - demo file, to show your webfont content
|
||||
|
||||
- LICENSE.txt - license info about source fonts, used to build your one.
|
||||
|
||||
- config.json - keeps your settings. You can import it back into fontello
|
||||
anytime, to continue your work
|
||||
|
||||
|
||||
Why so many CSS files ?
|
||||
-----------------------
|
||||
|
||||
Because we like to fit all your needs :)
|
||||
|
||||
- basic file, <your_font_name>.css - is usually enough, it contains @font-face
|
||||
and character code definitions
|
||||
|
||||
- *-ie7.css - if you need IE7 support, but still don't wish to put char codes
|
||||
directly into html
|
||||
|
||||
- *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
|
||||
rules, but still wish to benefit from css generation. That can be very
|
||||
convenient for automated asset build systems. When you need to update font -
|
||||
no need to manually edit files, just override old version with archive
|
||||
content. See fontello source code for examples.
|
||||
|
||||
- *-embedded.css - basic css file, but with embedded WOFF font, to avoid
|
||||
CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
|
||||
We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
|
||||
server headers. But if you ok with dirty hack - this file is for you. Note,
|
||||
that data url moved to separate @font-face to avoid problems with <IE9, when
|
||||
string is too long.
|
||||
|
||||
- animate.css - use it to get ideas about spinner rotation animation.
|
||||
|
||||
|
||||
Attention for server setup
|
||||
--------------------------
|
||||
|
||||
You MUST setup server to reply with proper `mime-types` for font files -
|
||||
otherwise some browsers will fail to show fonts.
|
||||
|
||||
Usually, `apache` already has necessary settings, but `nginx` and other
|
||||
webservers should be tuned. Here is list of mime types for our file extensions:
|
||||
|
||||
- `application/vnd.ms-fontobject` - eot
|
||||
- `application/x-font-woff` - woff
|
||||
- `application/x-font-ttf` - ttf
|
||||
- `image/svg+xml` - svg
|
||||
28
target/classes/static/Dependency/fontello-plus/config.json
Normal file
28
target/classes/static/Dependency/fontello-plus/config.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "",
|
||||
"css_prefix_text": "icon-",
|
||||
"css_use_suffix": false,
|
||||
"hinting": true,
|
||||
"units_per_em": 1000,
|
||||
"ascent": 850,
|
||||
"glyphs": [
|
||||
{
|
||||
"uid": "14017aae737730faeda4a6fd8fb3a5f0",
|
||||
"css": "check",
|
||||
"code": 59392,
|
||||
"src": "entypo"
|
||||
},
|
||||
{
|
||||
"uid": "2d3be3e856fc1e4ac067590d2ded1b07",
|
||||
"css": "plus-squared-alt",
|
||||
"code": 61846,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "44e04715aecbca7f266a17d5a7863c68",
|
||||
"css": "plus",
|
||||
"code": 59393,
|
||||
"src": "fontawesome"
|
||||
}
|
||||
]
|
||||
}
|
||||
85
target/classes/static/Dependency/fontello-plus/css/animation.css
vendored
Normal file
85
target/classes/static/Dependency/fontello-plus/css/animation.css
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Animation example, for spinners
|
||||
*/
|
||||
.animate-spin {
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
display: inline-block;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
-o-transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
4
target/classes/static/Dependency/fontello-plus/css/fontello-codes.css
vendored
Normal file
4
target/classes/static/Dependency/fontello-plus/css/fontello-codes.css
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
.icon-check:before { content: '\e800'; } /* '' */
|
||||
.icon-plus:before { content: '\e801'; } /* '' */
|
||||
.icon-plus-squared-alt:before { content: '\f196'; } /* '' */
|
||||
61
target/classes/static/Dependency/fontello-plus/css/fontello-embedded.css
vendored
Normal file
61
target/classes/static/Dependency/fontello-plus/css/fontello-embedded.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
target/classes/static/Dependency/fontello-plus/css/fontello-ie7-codes.css
vendored
Normal file
4
target/classes/static/Dependency/fontello-plus/css/fontello-ie7-codes.css
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
.icon-check { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus-squared-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
15
target/classes/static/Dependency/fontello-plus/css/fontello-ie7.css
vendored
Normal file
15
target/classes/static/Dependency/fontello-plus/css/fontello-ie7.css
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
font-family: 'fontello';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
|
||||
/* fix buttons height */
|
||||
line-height: 1em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
}
|
||||
|
||||
.icon-check { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-plus-squared-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
60
target/classes/static/Dependency/fontello-plus/css/fontello.css
vendored
Normal file
60
target/classes/static/Dependency/fontello-plus/css/fontello.css
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.eot?59161810');
|
||||
src: url('../font/fontello.eot?59161810#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?59161810') format('woff2'),
|
||||
url('../font/fontello.woff?59161810') format('woff'),
|
||||
url('../font/fontello.ttf?59161810') format('truetype'),
|
||||
url('../font/fontello.svg?59161810#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||
/*
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.svg?59161810#fontello') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: never;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
|
||||
.icon-check:before { content: '\e800'; } /* '' */
|
||||
.icon-plus:before { content: '\e801'; } /* '' */
|
||||
.icon-plus-squared-alt:before { content: '\f196'; } /* '' */
|
||||
308
target/classes/static/Dependency/fontello-plus/demo.html
Normal file
308
target/classes/static/Dependency/fontello-plus/demo.html
Normal file
@@ -0,0 +1,308 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><!--[if lt IE 9]><script language="javascript" type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
<meta charset="UTF-8"><style>/*
|
||||
* Bootstrap v2.2.1
|
||||
*
|
||||
* Copyright 2012 Twitter, Inc
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
||||
*/
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
html {
|
||||
font-size: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
a:focus {
|
||||
outline: thin dotted #333;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
a:hover,
|
||||
a:active {
|
||||
outline: 0;
|
||||
}
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
button,
|
||||
input {
|
||||
*overflow: visible;
|
||||
line-height: normal;
|
||||
}
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
a {
|
||||
color: #08c;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #005580;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.row {
|
||||
margin-left: -20px;
|
||||
*zoom: 1;
|
||||
}
|
||||
.row:before,
|
||||
.row:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.row:after {
|
||||
clear: both;
|
||||
}
|
||||
[class*="span"] {
|
||||
float: left;
|
||||
min-height: 1px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.container,
|
||||
.navbar-static-top .container,
|
||||
.navbar-fixed-top .container,
|
||||
.navbar-fixed-bottom .container {
|
||||
width: 940px;
|
||||
}
|
||||
.span12 {
|
||||
width: 940px;
|
||||
}
|
||||
.span11 {
|
||||
width: 860px;
|
||||
}
|
||||
.span10 {
|
||||
width: 780px;
|
||||
}
|
||||
.span9 {
|
||||
width: 700px;
|
||||
}
|
||||
.span8 {
|
||||
width: 620px;
|
||||
}
|
||||
.span7 {
|
||||
width: 540px;
|
||||
}
|
||||
.span6 {
|
||||
width: 460px;
|
||||
}
|
||||
.span5 {
|
||||
width: 380px;
|
||||
}
|
||||
.span4 {
|
||||
width: 300px;
|
||||
}
|
||||
.span3 {
|
||||
width: 220px;
|
||||
}
|
||||
.span2 {
|
||||
width: 140px;
|
||||
}
|
||||
.span1 {
|
||||
width: 60px;
|
||||
}
|
||||
[class*="span"].pull-right,
|
||||
.row-fluid [class*="span"].pull-right {
|
||||
float: right;
|
||||
}
|
||||
.container {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
*zoom: 1;
|
||||
}
|
||||
.container:before,
|
||||
.container:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.container:after {
|
||||
clear: both;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
.lead {
|
||||
margin-bottom: 20px;
|
||||
font-size: 21px;
|
||||
font-weight: 200;
|
||||
line-height: 30px;
|
||||
}
|
||||
small {
|
||||
font-size: 85%;
|
||||
}
|
||||
h1 {
|
||||
margin: 10px 0;
|
||||
font-family: inherit;
|
||||
font-weight: bold;
|
||||
line-height: 20px;
|
||||
color: inherit;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
h1 small {
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
color: #999;
|
||||
}
|
||||
h1 {
|
||||
line-height: 40px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 38.5px;
|
||||
}
|
||||
h1 small {
|
||||
font-size: 24.5px;
|
||||
}
|
||||
body {
|
||||
margin-top: 90px;
|
||||
}
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -480px;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding-top: 10px;
|
||||
z-index: 10;
|
||||
}
|
||||
.footer {
|
||||
color: #ddd;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.footer a {
|
||||
color: #ccc;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.the-icons {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
.switch {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 10px;
|
||||
color: #666;
|
||||
}
|
||||
.switch input {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
.codesOn .i-name {
|
||||
display: none;
|
||||
}
|
||||
.codesOn .i-code {
|
||||
display: inline;
|
||||
}
|
||||
.i-code {
|
||||
display: none;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('./font/fontello.eot?74414188');
|
||||
src: url('./font/fontello.eot?74414188#iefix') format('embedded-opentype'),
|
||||
url('./font/fontello.woff?74414188') format('woff'),
|
||||
url('./font/fontello.ttf?74414188') format('truetype'),
|
||||
url('./font/fontello.svg?74414188#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
||||
.demo-icon
|
||||
{
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: never;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* You can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/" + font.fontname + "-ie7.css"><![endif]-->
|
||||
<script>
|
||||
function toggleCodes(on) {
|
||||
var obj = document.getElementById('icons');
|
||||
|
||||
if (on) {
|
||||
obj.className += ' codesOn';
|
||||
} else {
|
||||
obj.className = obj.className.replace(' codesOn', '');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container header">
|
||||
<h1>fontello <small>font demo</small></h1>
|
||||
<label class="switch">
|
||||
<input type="checkbox" onclick="toggleCodes(this.checked)">show codes
|
||||
</label>
|
||||
</div>
|
||||
<div class="container" id="icons">
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xe800"><i class="demo-icon icon-check"></i> <span class="i-name">icon-check</span><span class="i-code">0xe800</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe801"><i class="demo-icon icon-plus"></i> <span class="i-name">icon-plus</span><span class="i-code">0xe801</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf196"><i class="demo-icon icon-plus-squared-alt"></i> <span class="i-name">icon-plus-squared-alt</span><span class="i-code">0xf196</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container footer">Generated by <a href="https://fontello.com">fontello.com</a></div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
target/classes/static/Dependency/fontello-plus/font/fontello.eot
Normal file
BIN
target/classes/static/Dependency/fontello-plus/font/fontello.eot
Normal file
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2021 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="fontello" horiz-adv-x="1000" >
|
||||
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="check" unicode="" d="M249 0q-34 0-56 28l-180 236q-16 24-12 52t26 46 51 14 47-28l118-154 296 474q16 24 43 30t53-8q24-16 30-43t-8-53l-350-560q-20-32-56-32z" horiz-adv-x="667" />
|
||||
|
||||
<glyph glyph-name="plus" unicode="" d="M786 439v-107q0-22-16-38t-38-15h-232v-233q0-22-16-37t-38-16h-107q-22 0-38 16t-15 37v233h-232q-23 0-38 15t-16 38v107q0 23 16 38t38 16h232v232q0 22 15 38t38 16h107q23 0 38-16t16-38v-232h232q23 0 38-16t16-38z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="plus-squared-alt" unicode="" d="M643 404v-36q0-8-5-13t-13-5h-196v-196q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v196h-196q-8 0-13 5t-5 13v36q0 7 5 12t13 5h196v197q0 8 5 13t13 5h36q8 0 13-5t5-13v-197h196q8 0 13-5t5-12z m71-250v464q0 37-26 63t-63 26h-464q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63z m72 464v-464q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h464q66 0 114-48t47-113z" horiz-adv-x="785.7" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
BIN
target/classes/static/Dependency/fontello-plus/font/fontello.ttf
Normal file
BIN
target/classes/static/Dependency/fontello-plus/font/fontello.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
277
target/classes/static/css/main.css
Normal file
277
target/classes/static/css/main.css
Normal file
@@ -0,0 +1,277 @@
|
||||
#container {
|
||||
width: 1400px;
|
||||
margin-left: 15px;
|
||||
margin-top: 30px;
|
||||
min-height: 700px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#toolName {
|
||||
width: 850px;
|
||||
font-weight: 700;
|
||||
font-size: 42px;
|
||||
margin-bottom: 40px;
|
||||
/*text-align: center;*/
|
||||
/*padding: 50px;*/
|
||||
}
|
||||
|
||||
.articleHead {
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
height: 70px;
|
||||
/*padding: 10px;*/
|
||||
}
|
||||
|
||||
#itemData {
|
||||
min-height: 1736px;
|
||||
float: left;
|
||||
width: 720px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#optional {
|
||||
width: 100%;
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#optional:hover {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#advanced {
|
||||
width: 100%;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
/*TODO create tab menu style in common.css*/
|
||||
|
||||
#advancedMenu {
|
||||
margin-top: 30px;
|
||||
width: 720px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.advancedMenuTab {
|
||||
width: 340px;
|
||||
height: 30px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
border-bottom: #f0f0f0 1px solid;
|
||||
}
|
||||
|
||||
.advancedMenuTab:hover {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.advancedMenuTabSelected {
|
||||
width: 340px;
|
||||
height: 30px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
font-size: 24px;
|
||||
background: gray;
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
border-bottom: gray 1px solid;
|
||||
}
|
||||
|
||||
#messageFields {
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.fieldFloater {
|
||||
float: left;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#functionBar {
|
||||
}
|
||||
|
||||
/*TODO add inactive state of the button*/
|
||||
|
||||
.buttonSpacer {
|
||||
height: 30%;
|
||||
}
|
||||
|
||||
.functionBarButton {
|
||||
clear: both;
|
||||
width: 263px;
|
||||
height: 40%;
|
||||
margin-left: 80px;
|
||||
right: 0;
|
||||
/*margin: auto;*/
|
||||
font-size: 24px;
|
||||
padding: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.
|
||||
|
||||
#link {
|
||||
width: 750px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
/*TODO add style to common*/
|
||||
#messageLink {
|
||||
width: 630px;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
#messageLink a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
#messageLink a:hover {
|
||||
color: #d6860d !important;
|
||||
}
|
||||
|
||||
.fieldDefault {
|
||||
width: 300px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.fieldText {
|
||||
width: 630px;
|
||||
padding: 10px;
|
||||
height: 296px;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
#httpStatus {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
#selectMenu {
|
||||
min-height: 1736px;
|
||||
float: left;
|
||||
width: 200px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.menuItem {
|
||||
float: left;
|
||||
width: 150px;
|
||||
padding: 10px;
|
||||
height: 42px;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
margin-bottom: 5px;
|
||||
border: 1px solid lightgray;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#iconPlus {
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
color: lightgray;
|
||||
}
|
||||
|
||||
.menuItem:hover {
|
||||
background: lightgray;
|
||||
color: white;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.menuItemSelected {
|
||||
float: left;
|
||||
width: 150px;
|
||||
padding: 10px;
|
||||
height: 42px;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
margin-bottom: 5px;
|
||||
border: 1px solid lightgray;
|
||||
background: gray;
|
||||
color: white;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/*TODO add style to general stylesheet. Gray if inactive red if hover*/
|
||||
.btn-del-MenuItem {
|
||||
float: left;
|
||||
font-size: 24px;
|
||||
color: lightgray;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-del-MenuItem:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#headerTable {
|
||||
margin-top: 40px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.tableHead {
|
||||
width: 240px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/*TODO gray out key value in table*/
|
||||
.tableField {
|
||||
height: 20px;
|
||||
padding: 5px;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
#mockIntroTip {
|
||||
margin-top: 10px;
|
||||
text-align: justify;
|
||||
padding: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.btn-function-table {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/*TODO add to general styles. Gray if inactive green if hover*/
|
||||
.btn-table-add {
|
||||
color: lightgray;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-table-add:hover {
|
||||
color: green;
|
||||
}
|
||||
|
||||
|
||||
.btn-table-remove {
|
||||
color: lightgray;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-table-remove:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/*TODO add to commons*/
|
||||
input:focus {
|
||||
box-shadow: 0 0 5px rgba(81, 203, 238);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
/*TODO add to commons*/
|
||||
.btn-inactive {
|
||||
color: #f1f1f1 !important;
|
||||
background: #999999 !important;
|
||||
cursor: default !important;
|
||||
}
|
||||
53
target/classes/static/css/tooltip.css
Normal file
53
target/classes/static/css/tooltip.css
Normal file
@@ -0,0 +1,53 @@
|
||||
p#tooltipText {
|
||||
/* /* padding: 20px; */
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
label, input, select, textarea {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div#tooltip {
|
||||
border-radius: 15px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-bottom: 20px;
|
||||
margin-top: 20px;
|
||||
border: 2px solid rgba(155, 165, 160, 0.507);
|
||||
width: 350px;
|
||||
/* width: 70%; */
|
||||
/* background-color: rgb(68, 158, 116); */
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.collapsible {
|
||||
/*background-color: rgba(155, 165, 160, 0.507);*/
|
||||
color: rgb(44, 44, 44);
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
/*border: none;*/
|
||||
/*outline: none;*/
|
||||
/*max-height: 0;*/
|
||||
/*overflow: hidden;*/
|
||||
/*transition: max-height 0.2s ease-out;*/
|
||||
}
|
||||
|
||||
/*.active, .collapsibleActive:hover {*/
|
||||
/* background-color: rgb(85, 85, 85);*/
|
||||
/*}*/
|
||||
|
||||
.collapsibleData {
|
||||
padding: 0 18px;
|
||||
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.fixed {
|
||||
position: fixed;
|
||||
/*top: 50%;*/
|
||||
/*left: 50%;*/
|
||||
margin-top: 100px;
|
||||
margin-left: 950px;
|
||||
}
|
||||
43
target/classes/static/css/wojtas.css
Normal file
43
target/classes/static/css/wojtas.css
Normal file
@@ -0,0 +1,43 @@
|
||||
p#tooltipText {
|
||||
/* /* padding: 20px; */
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
div#tooltip {
|
||||
border-radius: 15px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-bottom: 20px;
|
||||
margin-top: 160px;
|
||||
border: 2px solid rgba(155, 165, 160, 0.507);
|
||||
float: right;
|
||||
width: 40%;
|
||||
/* width: 70%; */
|
||||
/* background-color: rgb(68, 158, 116); */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.collapsible {
|
||||
background-color: rgba(155, 165, 160, 0.507);
|
||||
color: rgb(44, 44, 44);
|
||||
cursor: pointer;
|
||||
padding: 18px;
|
||||
width: 100%;
|
||||
border: none;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.active, .collapsibleActive:hover {
|
||||
background-color: rgb(85, 85, 85);
|
||||
}
|
||||
|
||||
.collapsibleData {
|
||||
padding: 0 18px;
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.2s ease-out;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
165
target/classes/static/html/mock.html
Normal file
165
target/classes/static/html/mock.html
Normal file
@@ -0,0 +1,165 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>R11 MockedServices</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/css/main.css" type="text/css">
|
||||
<link rel="stylesheet" href="/css/tooltip.css" type="text/css">
|
||||
<link rel="stylesheet" href="http://gordon.zipper.release11.com:8085/common.css" type="text/css">
|
||||
<link rel="stylesheet" href="/Dependency/fontello-plus/css/fontello.css" type="text/css"/>
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Acme&family=Josefin+Slab:wght@500&display=swap" rel="stylesheet">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="toolName">Mocked Service</div>
|
||||
<div id="itemData">
|
||||
<div id="basicItemData" class="articleHead">Your message</div>
|
||||
<div id="advancedItemData" class="articleHead" style="display: none;">Message id: <span id="mockedMessageId"></span></div>
|
||||
<div id="link">
|
||||
<label for="messageLink">Link</label>
|
||||
<div id="messageLink" class="field"></div>
|
||||
</div>
|
||||
<div id="msgBody">
|
||||
<div id="messageFields">
|
||||
<div class="fieldFloater">
|
||||
<div>
|
||||
<label for="httpStatus">Http Status</label>
|
||||
<input type="text" id="httpStatus" class="field fieldDefault" value="200" list="httpStatusSuggestion">
|
||||
<datalist id="httpStatusSuggestion">
|
||||
<option value="200">
|
||||
<option value="300">
|
||||
<option value="400">
|
||||
<option value="403">
|
||||
<option value="404">
|
||||
<option value="500">
|
||||
</datalist>
|
||||
</div>
|
||||
<div id="typeSelection">
|
||||
<label for="typeSelector">Content Type</label>
|
||||
<input id="typeSelector" class="field fieldDefault" list="contentTypes" value="application/xml"/>
|
||||
<datalist id="contentTypes">
|
||||
<option value="application/xml">
|
||||
<option value="application/json">
|
||||
<option value="text/xml">
|
||||
</datalist>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldFloater" id="functionBar">
|
||||
<div class="buttonSpacer"></div>
|
||||
<div><button id="btn-save" type="submit" class="functionBarButton btn-action">Save</button></div>
|
||||
<div class="buttonSpacer"></div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
|
||||
<div id="bodyEdition">
|
||||
<label for="bodyEditor">Body:</label>
|
||||
<textarea type="text" id="bodyEditor" class="field resizeNone fieldText"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="optional">> show/hide advanced settings</div>
|
||||
<div id="advanced" style="display: none;">
|
||||
<div id="advancedMenu">
|
||||
<div id="headersTab" class="advancedMenuTabSelected">Headers</div>
|
||||
<div id="historyTab" class="advancedMenuTab">History</div>
|
||||
</div>
|
||||
<div id="headers">
|
||||
<table id="headerTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Header</td>
|
||||
<td>Value</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="httpStatusValues">
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td><input type="text" name="headerKey" id="headerKeyInput" placeholder="key" class="tableField"/></td>
|
||||
<td><input type="text" name="headerValue" id="headerValueInput" placeholder="value" class="tableField"/></td>
|
||||
<td id="btn-addRow" class="btn-function-table btn-table-add">+</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div id="history" style="display:none;">
|
||||
<div id="historyDisplay">
|
||||
<div>
|
||||
<div><input type="text" name="dateFrom" id="historyFrom" placeholder="rrrr-mm-dd"/></div>
|
||||
<div><input type="text" name="dateTo" id="historyTo" placeholder="rrrr-mm-dd"/></div>
|
||||
</div>
|
||||
<div>
|
||||
<table id="historyTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="selectMenu">
|
||||
<div id="selectMenuContent" style="display: none;">
|
||||
<div id="selectMenuHead" class="articleHead">List</div>
|
||||
<div id="listItems"></div>
|
||||
<div id="iconPlus" class="menuItem"><i class="icon-plus"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tooltip" class="fixed tooltip">
|
||||
<div id="mockIntroTip">
|
||||
<h2>What's mock service?</h2>
|
||||
<p>It's super simple! Need data as response from the server? Mock your api in just a few clicks.</p>
|
||||
<p>Hover over an item to see description!</p>
|
||||
<br>
|
||||
<h2>Help:</h2>
|
||||
</div>
|
||||
|
||||
<div id="messageLinkTip" class="collapsible" style="display: none;">
|
||||
<!--style="display: none;"-->
|
||||
<h4>The link</h4>
|
||||
<p>It's url where you need send your request</p>
|
||||
</div>
|
||||
<div id="httpStatusTip" class="collapsible" style="display: none;">
|
||||
<h4>Http status</h4>
|
||||
<p>Set http status for server response. 200 OK is default.</p>
|
||||
</div>
|
||||
<div id="typeSelectorTip" class="collapsible" style="display: none;">
|
||||
<h4>Content type</h4>
|
||||
<p>Select content type of body. Set plain text if data has no format.</p>
|
||||
</div>
|
||||
<div id="bodyEditorTip" class="collapsible" style="display: none;">
|
||||
<h4>Body</h4>
|
||||
<p>Text placed in this field will be displayed as response body</p>
|
||||
</div>
|
||||
<div id="headersTabTip" class="collapsible" style="display: none;">
|
||||
<h4>Headers</h4>
|
||||
<p>Set headers for your messages.</p>
|
||||
</div>
|
||||
<div id="historyTabTip" class="collapsible" style="display: none;">
|
||||
<h4>History</h4>
|
||||
<p>Check history of this message</p>
|
||||
</div>
|
||||
<div id="newHeaderTip" class="collapsible" style="display: none;">
|
||||
<h4>Next header value</h4>
|
||||
<p>Type values and press enter to add new header.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<script type="text/javascript" src="/js/uianimation.js"></script>
|
||||
<script type="text/javascript" src="/js/datatransfer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
339
target/classes/static/js/datatransfer.js
Normal file
339
target/classes/static/js/datatransfer.js
Normal file
@@ -0,0 +1,339 @@
|
||||
//TODO: Add delete buttons for messages
|
||||
//TODO: Save button deactivation after swap, post or delete
|
||||
//TODO: It sends request, gets responds but doesnt run a function!!
|
||||
//TODO: Warning is displayed twice
|
||||
var clientUUID = '';
|
||||
var json = {};
|
||||
var jsonIndex = 0;
|
||||
var htable_row = 0;
|
||||
var host = getDomain();
|
||||
var dataModified = false;
|
||||
const C_UUID = 'mock-uuid';
|
||||
const setModified = function(){
|
||||
setDataModified();
|
||||
}
|
||||
const setOrigin = function(){
|
||||
setDataOrigin();
|
||||
}
|
||||
|
||||
const getUpdate = function(){
|
||||
updateData();
|
||||
}
|
||||
$('#iconPlus').click(function(){addMessage()});
|
||||
$('#btn-addRow').click(function(){addRow()});
|
||||
//TODO remove later save onclick init
|
||||
$('#btn-save').click(getUpdate);
|
||||
|
||||
function getData(){
|
||||
loadCookies();
|
||||
$.getJSON(host + '/mock/json/'+clientUUID, function(data) {
|
||||
json = data;
|
||||
clientUUID = json[jsonIndex].clientUUID;
|
||||
setCookies();
|
||||
console.log(JSON.stringify(json));
|
||||
console.log("Json received");
|
||||
refreshData();
|
||||
});
|
||||
}
|
||||
|
||||
function getDomain(){
|
||||
var url = window.location.href;
|
||||
var arr = url.split("/");
|
||||
var result = arr[0] + "//" + arr[2];
|
||||
return result;
|
||||
}
|
||||
|
||||
function setDataModified(){
|
||||
if(dataModified) return;
|
||||
dataModified = true;
|
||||
$('#btn-save').removeClass('btn-inactive');
|
||||
$('#btn-save').addClass('btn-action');
|
||||
$('#btn-save').click(getUpdate);
|
||||
}
|
||||
|
||||
//Adding change listener to fields
|
||||
$('.field').change(setModified);
|
||||
|
||||
function setDataOrigin(){
|
||||
dataModified = false;
|
||||
$('#btn-save').addClass('btn-inactive');
|
||||
$('#btn-save').removeClass('btn-action');
|
||||
$('#btn-save').off();
|
||||
}
|
||||
|
||||
function displayDataLossWarn(){
|
||||
if(dataModified) alert('Data modification lost');
|
||||
}
|
||||
|
||||
function refreshData(){
|
||||
fillMessageList();
|
||||
console.log("List initiated");
|
||||
loadMessage(json[jsonIndex].mockedResponseId);
|
||||
console.log("Message loaded");
|
||||
}
|
||||
|
||||
function setCookies(){
|
||||
document.cookie = C_UUID + '=' +clientUUID+';';
|
||||
}
|
||||
|
||||
function loadCookies(){
|
||||
clientUUID = getCookie(C_UUID);
|
||||
}
|
||||
|
||||
function getCookie(cname) {
|
||||
var name = cname + '=';
|
||||
var decodedCookie = decodeURIComponent(document.cookie);
|
||||
var ca = decodedCookie.split(';');
|
||||
for(var i = 0; i <ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) == 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function displaySaveConfirmation(){
|
||||
alert('message has been saved');
|
||||
}
|
||||
|
||||
function updateData(){
|
||||
var updatedJson = generateJson();
|
||||
const dataSaved = function () {
|
||||
displaySaveConfirmation();
|
||||
setDataOrigin();
|
||||
getData();
|
||||
}
|
||||
var request = $.ajax({
|
||||
url: host + '/mock/json',
|
||||
type: 'PUT',
|
||||
data: JSON.stringify(updatedJson, null, 2),
|
||||
contentType: "application/json",
|
||||
});
|
||||
request.done(dataSaved);
|
||||
}
|
||||
|
||||
function addMessage(){
|
||||
displayDataLossWarn();
|
||||
var request = $.ajax({
|
||||
url: host + '/mock/json/'+clientUUID,
|
||||
type: 'POST',
|
||||
});
|
||||
request.done(function () {
|
||||
getData();
|
||||
});
|
||||
}
|
||||
|
||||
function removeTile(id){
|
||||
displayDataLossWarn();
|
||||
var jsonObject = findJsonById(id);
|
||||
var request = $.ajax({
|
||||
url: host + '/mock/json/'+clientUUID + '/' + id,
|
||||
type: 'DELETE',
|
||||
});
|
||||
request.done(function () {
|
||||
getData();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function clearMock(){
|
||||
fillStaticFields('','','','');
|
||||
htable_row = 0;
|
||||
$('#httpStatusValues').html('');
|
||||
}
|
||||
|
||||
function initializeMock(index){
|
||||
clearMock();
|
||||
fillStaticFields(json[index].clientUUID
|
||||
, json[index].mockedResponseId
|
||||
, json[index].mediaType
|
||||
, json[index].messageBody
|
||||
, json[index].httpStatus);
|
||||
fillHeaderTable(json[index].httpHeaders);
|
||||
}
|
||||
|
||||
function fillStaticFields(uuid, id, mediaType, body, httpStatus){
|
||||
let link = createLink(uuid,id);
|
||||
$('#messageLink').html('<a href="' + link + '" target="_blank">' + link + '</a>');
|
||||
$('#httpStatus').val(httpStatus);
|
||||
$('#typeSelector').val(mediaType);
|
||||
$('#bodyEditor').val(body);
|
||||
$('#mockedMessageId').html(id);
|
||||
|
||||
}
|
||||
|
||||
function createLink(uuid, id){
|
||||
var link = host + '/klaus/v1/get/'+uuid+'/'+id;
|
||||
return link;
|
||||
}
|
||||
|
||||
function fillHeaderTable(headers){
|
||||
var innerHTML = $('#httpStatusValues').html();
|
||||
innerHTML += generateHeaderTable(headers);
|
||||
$('#httpStatusValues').html(innerHTML);
|
||||
$('.tableField').change(function(){setDataModified()});
|
||||
}
|
||||
//TODO: Add addRow() to generate new rows and populate them with data
|
||||
function generateHeaderTable(headers){
|
||||
let count = 0;
|
||||
let innerHTML = '';
|
||||
for(var item in headers){
|
||||
if( headers.hasOwnProperty(item) ) count++;
|
||||
}
|
||||
var keys = new Array(count);
|
||||
var values = new Array(count);
|
||||
let index = 0;
|
||||
for(var key in Object.keys(headers)){
|
||||
keys[index++]=Object.keys(headers)[key];
|
||||
}
|
||||
index = 0;
|
||||
for(var val in headers){
|
||||
values[index++]=headers[val];
|
||||
}
|
||||
|
||||
for(let i=0; i<count; i++){
|
||||
innerHTML+=
|
||||
'<tr id="hrow' + htable_row + '" class="httpStatusValue">' +
|
||||
'<td>' +
|
||||
'<input type="text" name="headerKey" placeholder="key" class="tableField textField-key" value="' + keys[i] + '"/></td>' +
|
||||
'<td>' +
|
||||
'<input type="text" name="headerValue" placeholder="value" class="tableField" value="' + values[i] + '"/></td>' +
|
||||
'<td class="btn-function-table btn-table-remove" onclick="removeRow(' + htable_row + ')">X</td>' +
|
||||
'</tr>';
|
||||
htable_row++;
|
||||
}
|
||||
return innerHTML;
|
||||
}
|
||||
|
||||
function removeRow(row){
|
||||
$('#hrow' + row).remove();
|
||||
setDataModified();
|
||||
}
|
||||
|
||||
function addRow(){
|
||||
var table = $('#httpStatusValues');
|
||||
var hkey = $('#headerKeyInput');
|
||||
var hval = $('#headerValueInput');
|
||||
if(hkey.val() == 'key' || hkey.val() == '' || hval.val() == 'value' || hval.val() == '') return;
|
||||
var innerHtml =
|
||||
'<tr id="hrow' + htable_row + '" class="httpStatusValue">' +
|
||||
'<td>' +
|
||||
'<input " type="text" name="headerKey" placeholder="key" class="tableField textField-key" value="' + hkey.val() +
|
||||
'"/></td>' +
|
||||
'<td>' +
|
||||
'<input " type="text" name="headerKey" placeholder="key" class="tableField" value="' + hval.val() + '"/></td>' +
|
||||
'<td class="btn-function-table btn-table-remove" onclick="removeRow(' + htable_row + ')">X</td>' +
|
||||
'</tr>';
|
||||
htable_row++;
|
||||
table.append(innerHtml);
|
||||
hkey.val('');
|
||||
hval.val('');
|
||||
setDataModified();
|
||||
}
|
||||
|
||||
function fillMessageList(){
|
||||
$("#listItems").html('');
|
||||
var innerHTML = '';
|
||||
for(let i=0; i<json.length; i++){
|
||||
innerHTML += generateMessageTileHtml(json[i].mockedResponseId, json[i].httpStatus, json[i].mediaType);
|
||||
}
|
||||
$("#listItems").append(innerHTML);
|
||||
}
|
||||
|
||||
|
||||
//TODO: Implement methods where its possible
|
||||
function findJsonById(id){
|
||||
return json[findJsonIndexById(id)];
|
||||
}
|
||||
|
||||
function findJsonIndexById(id){
|
||||
for(let i=0; i<json.length; i++)
|
||||
if(id == json[i].mockedResponseId) return i;
|
||||
}
|
||||
|
||||
function loadMessage(id){
|
||||
displayDataLossWarn();
|
||||
setDataOrigin();
|
||||
for(let i=0; i<json.length; i++){
|
||||
if(id == json[i].mockedResponseId){
|
||||
jsonIndex = i;
|
||||
console.log("Message found");
|
||||
initializeMock(jsonIndex);
|
||||
console.log("Fields initialized");
|
||||
selectMessage(id);
|
||||
console.log("Selection complete");
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log("Message not found");
|
||||
}
|
||||
|
||||
function selectMessage(id){
|
||||
console.log("Selecting message...");
|
||||
$(".menuItemSelected").on("click");
|
||||
$(".menuItemSelected").addClass("menuItem");
|
||||
$(".menuItemSelected").removeClass("menuItemSelected");
|
||||
console.log("Selected message deselected");
|
||||
let itemId = '#item_'+id;
|
||||
$(itemId).off("click");
|
||||
$(itemId).addClass("menuItemSelected");
|
||||
$(itemId).removeClass("menuItem");
|
||||
console.log("Selected message selected");
|
||||
}
|
||||
|
||||
function generateMessageTileHtml(id, httpStatus, mediaType){
|
||||
var innerHTML = '<div class="menuItem" id="item_' + id + '" onclick="loadMessage('+ id +')">' +
|
||||
'<table><tr><td>Id: '+ id +'</td></tr>' +
|
||||
'<tr><td>Http-status: '+ httpStatus +'</td></tr>' +
|
||||
'</table></div><div class="btn-del-MenuItem" onclick="removeTile(' + id + ')">X</div>' +
|
||||
'<div style="clear: both;"></div>';
|
||||
return innerHTML;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onbuild(){
|
||||
getData();
|
||||
sleep(1000);
|
||||
}
|
||||
|
||||
$(document).ready(onbuild());
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateJson(){
|
||||
var newJson =
|
||||
{
|
||||
clientUUID: json[jsonIndex].clientUUID,
|
||||
mockedResponseId: json[jsonIndex].mockedResponseId,
|
||||
mediaType: $('#typeSelector').val(),
|
||||
messageBody: $('#bodyEditor').val(),
|
||||
httpStatus: $('#httpStatus').val(),
|
||||
httpHeaders: {},
|
||||
};
|
||||
newJson['httpHeaders'] = convertTableToJson();
|
||||
console.log(JSON.stringify(newJson, null, 2));
|
||||
json[jsonIndex] = newJson;
|
||||
return newJson;
|
||||
}
|
||||
|
||||
|
||||
function convertTableToJson(){
|
||||
var rows = $('.httpStatusValue');
|
||||
console.log("Rows: "+rows.length);
|
||||
var obj = {};
|
||||
var key;
|
||||
for(let i=0; i<rows.length; i++){
|
||||
key = rows.eq(i).children().eq(0).children().eq(0).val();
|
||||
obj[key] = rows.eq(i).children().eq(1).children().eq(0).val();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
0
target/classes/static/js/historyloader.js
Normal file
0
target/classes/static/js/historyloader.js
Normal file
108
target/classes/static/js/uianimation.js
Normal file
108
target/classes/static/js/uianimation.js
Normal file
@@ -0,0 +1,108 @@
|
||||
var advancedVisibility = false;
|
||||
var selectMenu = $("#selectMenuContent");
|
||||
var advancedTab = $("#advanced");
|
||||
var basicID = $("#basicItemData")
|
||||
var advancedID = $("#advancedItemData");
|
||||
var focusedField = false;
|
||||
function changeAdvancedVisibility(){
|
||||
if(advancedVisibility){
|
||||
selectMenu.css('display', 'none');
|
||||
advancedTab.css('display', 'none');
|
||||
advancedID.css('display', 'none');
|
||||
basicID.css('display', 'block')
|
||||
advancedVisibility = false;
|
||||
}
|
||||
else {
|
||||
selectMenu.css('display', 'block');
|
||||
advancedTab.css('display', 'block');
|
||||
advancedID.css('display', 'block');
|
||||
basicID.css('display', 'none');
|
||||
advancedVisibility = true;
|
||||
}
|
||||
}
|
||||
|
||||
function createMessageTab() {
|
||||
var items = document.getElementById("listItems");
|
||||
items.innerHTML += '<div class="menuItem">Item</div>';
|
||||
}
|
||||
|
||||
$("#optional").click(changeAdvancedVisibility);
|
||||
$(".menuFactory").click(createMessageTab);
|
||||
$('#historyTab').click(showHistory);
|
||||
|
||||
function showHistory(){
|
||||
$('#headers').css('display', 'none');
|
||||
$('.advancedMenuTabSelected').addClass('advancedMenuTab');
|
||||
$('.advancedMenuTabSelected').click(showHeaders);
|
||||
$('.advancedMenuTabSelected').removeClass('advancedMenuTabSelected');
|
||||
$('#history').css('display', 'block');
|
||||
$('#historyTab').addClass('advancedMenuTabSelected');
|
||||
$('#historyTab').removeClass('advancedMenuTab');
|
||||
$('#historyTab').off('click');
|
||||
}
|
||||
|
||||
function showHeaders(){
|
||||
$('#history').css('display', 'none');
|
||||
$('.advancedMenuTabSelected').addClass('advancedMenuTab');
|
||||
$('.advancedMenuTabSelected').click(showHistory);
|
||||
$('.advancedMenuTabSelected').removeClass('advancedMenuTabSelected');
|
||||
$('#headers').css('display', 'block');
|
||||
$('#headersTab').addClass('advancedMenuTabSelected');
|
||||
$('#headersTab').removeClass('advancedMenuTab');
|
||||
$('#headersTab').off('click');
|
||||
}
|
||||
|
||||
function focusInTip(element){
|
||||
showTip(element);
|
||||
focusedField = true;
|
||||
}
|
||||
|
||||
function focusOutTip(element){
|
||||
focusedField = false;
|
||||
hidTip(element);
|
||||
}
|
||||
|
||||
function hidTip(element){
|
||||
if(focusedField) return;
|
||||
$('#'+element).fadeOut(100);
|
||||
}
|
||||
|
||||
function showTip(element){
|
||||
if(focusedField) return;
|
||||
$('.collapsible').fadeOut(0);
|
||||
$('#'+element).fadeIn(100);
|
||||
}
|
||||
|
||||
$('#messageLink').mouseover(function(){showTip('messageLinkTip')});
|
||||
$('#messageLink').mouseleave(function(){hidTip('messageLinkTip')});
|
||||
|
||||
$('#httpStatus').mouseover(function(){showTip('httpStatusTip')});
|
||||
$('#httpStatus').focusin(function(){focusInTip('httpStatusTip')});
|
||||
$('#httpStatus').mouseleave(function(){hidTip('httpStatusTip')});
|
||||
$('#httpStatus').focusout(function(){focusOutTip('httpStatusTip')});
|
||||
|
||||
$('#typeSelector').mouseover(function(){showTip('typeSelectorTip')});
|
||||
$('#typeSelector').focusin(function(){focusInTip('typeSelectorTip')});
|
||||
$('#typeSelector').mouseleave(function(){hidTip('typeSelectorTip')});
|
||||
$('#typeSelector').focusout(function(){focusOutTip('typeSelectorTip')});
|
||||
|
||||
$('#bodyEditor').mouseover(function(){showTip('bodyEditorTip')});
|
||||
$('#bodyEditor').focusin(function(){focusInTip('bodyEditorTip')});
|
||||
$('#bodyEditor').mouseleave(function(){hidTip('bodyEditorTip')});
|
||||
$('#bodyEditor').focusout(function(){focusOutTip('bodyEditorTip')});
|
||||
|
||||
$('#headersTab').mouseover(function(){showTip('headersTabTip')});
|
||||
$('#headersTab').mouseleave(function(){hidTip('headersTabTip')});
|
||||
|
||||
$('#historyTab').mouseover(function(){showTip('historyTabTip')});
|
||||
$('#historyTab').mouseleave(function(){hidTip('historyTabTip')});
|
||||
|
||||
$('#headerKeyInput').mouseover(function(){showTip('newHeaderTip')});
|
||||
$('#headerKeyInput').focusin(function(){focusInTip('newHeaderTip')});
|
||||
$('#headerKeyInput').mouseleave(function(){hidTip('newHeaderTip')});
|
||||
$('#headerKeyInput').focusout(function(){focusOutTip('newHeaderTip')});
|
||||
|
||||
$('#headerValueInput').mouseover(function(){showTip('newHeaderTip')});
|
||||
$('#headerValueInput').focusin(function(){focusInTip('newHeaderTip')});
|
||||
$('#headerValueInput').mouseleave(function(){hidTip('newHeaderTip')});
|
||||
$('#headerValueInput').focusout(function(){focusOutTip('newHeaderTip')});
|
||||
12
target/classes/static/json/generated.json
Normal file
12
target/classes/static/json/generated.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"clientUUID": "9bfddcc1-ef89-4c53-84e8-c88f13ecc7ec",
|
||||
"mockedResponseId": 1,
|
||||
"mediaType": "application/xml",
|
||||
"messageBody": "\n\n Tove\n Jani\n Reminder\n Don't forget me this weekend!\n",
|
||||
"httpStatus": "200",
|
||||
"httpHeaders": {
|
||||
"Keep-Alive": "timeout=60",
|
||||
"Connection": "keep-alive",
|
||||
"Date": "2021-02-02T12:15:22.164035"
|
||||
}
|
||||
}
|
||||
12
target/classes/static/json/mockedmessagedto.json
Normal file
12
target/classes/static/json/mockedmessagedto.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"clientUUID": "acc39106-f351-46bb-b81b-31b860af3e56",
|
||||
"mockedResponseId": 1,
|
||||
"mediaType": "text/xml",
|
||||
"messageBody": "Hello world",
|
||||
"httpHeaders": {
|
||||
"Keep-Alive": "timeout=60",
|
||||
"Connection": "keep-alive",
|
||||
"Date": "2021-01-27T15:45:05.892356"
|
||||
},
|
||||
"httpStatus": 200
|
||||
}
|
||||
Reference in New Issue
Block a user