mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
introduce docsify; refactor the daemon
This commit is contained in:
parent
7dc62012a6
commit
91e4d79953
12 changed files with 1038 additions and 26 deletions
53
src/main/resources/gui/index.html
Normal file
53
src/main/resources/gui/index.html
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Validator</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="lib/vue.css">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
var validate = function(){
|
||||
const input = document.getElementById('file');
|
||||
const data = input.files[0];
|
||||
const output = document.getElementById('result')
|
||||
|
||||
var myHeaders = new Headers();
|
||||
myHeaders.append("Content-Type", "application/xml");
|
||||
|
||||
var requestOptions = {
|
||||
method: 'POST',
|
||||
headers: myHeaders,
|
||||
body: data,
|
||||
redirect: 'follow'
|
||||
};
|
||||
|
||||
fetch("http://localhost:8080", requestOptions)
|
||||
.then(response => response.text())
|
||||
.then(result => output.innerText = result)
|
||||
.catch(error => output.innerText = result);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div data-app id="app">Loading validator... </div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
repo: "itplr-kosit/validator",
|
||||
loadSidebar: false,
|
||||
hideSidebar: true,
|
||||
autoHeader: true,
|
||||
}
|
||||
</script>
|
||||
<script src="lib/docsify.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue