Skip to content

Commit f9c59db

Browse files
author
Jeffrey Buchbinder
committed
UI: migrate framework from old 0.5.x tree
1 parent 6cfc75f commit f9c59db

7 files changed

Lines changed: 117 additions & 6 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
remitt-server
22
test/*.pdf
33
test/*.x12
4+
test/*.txt
45
vendor
56
go.sum
7+
go.work.sum
8+
ui/node_modules
9+
ui/yarn.lock

ui/configurationDisplay.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<head>
44
<title>REMITT Server</title>
55
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
6+
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
7+
<script type="text/javascript" src="node_modules/popper.js/dist/umd/popper.min.js"></script>
68
</head>
79

810
<body>
@@ -77,6 +79,21 @@ <h2>Configuration Display</h2>
7779

7880
<div align="center"><i>&copy; 1999- by the FreeMED Software Foundation</i></div>
7981

82+
<script>
83+
$(document).ready(function () {
84+
$.ajaxSetup({
85+
// Set a reasonable timeout for all queries to deal with failures
86+
timeout: 10000,
87+
// Disable request caching
88+
cache: false
89+
});
90+
91+
//
92+
//$.getJSON("../api/", function (response, status, xhr) {
93+
//});
94+
});
95+
</script>
96+
8097
</body>
8198

8299
</html>

ui/index.html

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<head>
44
<title>REMITT Server</title>
55
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
6+
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
7+
<script type="text/javascript" src="node_modules/popper.js/dist/umd/popper.min.js"></script>
68
</head>
79

810
<body>
@@ -25,16 +27,15 @@ <h1>
2527
<tbody>
2628
<tr>
2729
<th>REMITT Version</th>
28-
<td>##FIXME##</td>
30+
<td><span id="version"></span></td>
2931
</tr>
3032
<tr>
3133
<th>Username</th>
32-
<td>##FIXME##</td>
34+
<td><span id="user"></span></td>
3335
</tr>
3436
<tr>
3537
<th>Server</th>
36-
<td>##FIXME##:##FIXME##
37-
connecting from ##FIXME##</td>
38+
<td>connecting from <span id="remote_address"></span></td>
3839
</tr>
3940
</tbody>
4041
</table>
@@ -52,6 +53,27 @@ <h1>
5253

5354
<div align="center"><i>&copy; 1999- by the FreeMED Software Foundation</i></div>
5455

56+
<script>
57+
$(document).ready(function () {
58+
$.ajaxSetup({
59+
// Set a reasonable timeout for all queries to deal with failures
60+
timeout: 10000,
61+
// Disable request caching
62+
cache: false
63+
});
64+
65+
// Load server info
66+
$.getJSON("../api/version/info", function (response, status, xhr) {
67+
if (status == 'error') {
68+
return;
69+
}
70+
$('SPAN#version').html("<b>" + response.version + "</b>");
71+
$('SPAN#user').html("<b>" + response.user + "</b>");
72+
$('SPAN#remote_address').html("<b>" + response.remote_address + "</b>");
73+
});
74+
});
75+
</script>
76+
5577
</body>
5678

5779
</html>

ui/keyring.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<head>
44
<title>REMITT Server</title>
55
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
6+
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
7+
<script type="text/javascript" src="node_modules/popper.js/dist/umd/popper.min.js"></script>
68
</head>
79

810
<body>
@@ -60,6 +62,21 @@ <h2>Keyring Maintenance</h2>
6062

6163
<div align="center"><i>&copy; 1999- by the FreeMED Software Foundation</i></div>
6264

65+
<script>
66+
$(document).ready(function () {
67+
$.ajaxSetup({
68+
// Set a reasonable timeout for all queries to deal with failures
69+
timeout: 10000,
70+
// Disable request caching
71+
cache: false
72+
});
73+
74+
//
75+
//$.getJSON("../api/", function (response, status, xhr) {
76+
//});
77+
});
78+
</script>
79+
6380
</body>
6481

6582
</html>

ui/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"dependencies": {
3+
"bootstrap": "twbs/bootstrap#^4.5.0",
4+
"fontawesome": "FortAwesome/Font-Awesome#^5.15.2",
5+
"jquery": "jquery/jquery-dist#^3.6.0",
6+
"jquery.toaster": "scottoffen/jquery.toaster#^1.2.0",
7+
"popper.js": "FezVrasta/popper.js#^1.16.0",
8+
"requirejs": "^2.3.6",
9+
"tablesorter": "^2.31.3",
10+
"toastr": "CodeSeven/toastr#2.1.4"
11+
},
12+
"engines": {
13+
"yarn": ">= 1.0.0"
14+
},
15+
"scripts": {},
16+
"version": "0.6"
17+
}

ui/testHarness.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
<head>
44
<title>REMITT Server</title>
55
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
6+
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
7+
<script type="text/javascript" src="node_modules/popper.js/dist/umd/popper.min.js"></script>
68
</head>
79

810
<body>
911
<h1>
10-
<a href="http://remitt.org/"><img src="img/remitt.jpg" border="0" /></a> REMITT Electronic Medical Information Translation and Transmission
12+
<a href="http://remitt.org/"><img src="img/remitt.jpg" border="0" /></a> REMITT Electronic Medical Information
13+
Translation and Transmission
1114
</h1>
1215
<ul id="menubar">
1316
<li><a href="index.jsp">Home</a></li>
@@ -34,7 +37,6 @@ <h1>
3437
<tr>
3538
<td>
3639

37-
3840
<h1>Render</h1>
3941

4042
<form action="TestHarness" method="POST" target="_targetFrame">
@@ -266,6 +268,21 @@ <h1>Validator</h1>
266268

267269
<div align="center"><i>&copy; 1999- by the FreeMED Software Foundation</i></div>
268270

271+
<script>
272+
$(document).ready(function () {
273+
$.ajaxSetup({
274+
// Set a reasonable timeout for all queries to deal with failures
275+
timeout: 10000,
276+
// Disable request caching
277+
cache: false
278+
});
279+
280+
//
281+
//$.getJSON("../api/", function (response, status, xhr) {
282+
//});
283+
});
284+
</script>
285+
269286
</body>
270287

271288
</html>

ui/threadStatus.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<head>
44
<title>REMITT Server</title>
55
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
6+
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
7+
<script type="text/javascript" src="node_modules/popper.js/dist/umd/popper.min.js"></script>
68
</head>
79

810
<body>
@@ -42,6 +44,21 @@ <h2>Thread Pool</h2>
4244

4345
<div align="center"><i>&copy; 1999- by the FreeMED Software Foundation</i></div>
4446

47+
<script>
48+
$(document).ready(function () {
49+
$.ajaxSetup({
50+
// Set a reasonable timeout for all queries to deal with failures
51+
timeout: 10000,
52+
// Disable request caching
53+
cache: false
54+
});
55+
56+
//
57+
//$.getJSON("../api/", function (response, status, xhr) {
58+
//});
59+
});
60+
</script>
61+
4562
</body>
4663

4764
</html>

0 commit comments

Comments
 (0)