summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-02 21:21:37 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-02 21:21:37 (GMT)
commit1d79406f4dc196dfd1649640cd29dbabb5042954 (patch)
treefa6f44c72289009141d03c1f411985d2b370c4b7
parent33d25040c355c24637656bd360613d0a9673be23 (diff)
added websocket testclient to static files, some cleanups
-rw-r--r--src/rhimportd/uploadWeb.go2
-rw-r--r--web-static/jquery.min.js (renamed from test/jquery.min.js)0
-rw-r--r--web-static/socket.html (renamed from test/socket.html)20
-rw-r--r--web-static/upload-form.html29
4 files changed, 27 insertions, 24 deletions
diff --git a/src/rhimportd/uploadWeb.go b/src/rhimportd/uploadWeb.go
index 6d6e56e..1c53fbc 100644
--- a/src/rhimportd/uploadWeb.go
+++ b/src/rhimportd/uploadWeb.go
@@ -94,7 +94,7 @@ func webUploadHandler(conf *rhimport.Config, db *rddb.DBChan, sessions *rhimport
return
}
if password == "" {
- webUploadErrorResponse(w, http.StatusBadRequest, "missing field LOGIN_NAME")
+ webUploadErrorResponse(w, http.StatusBadRequest, "missing field PASSWORD")
return
}
diff --git a/test/jquery.min.js b/web-static/jquery.min.js
index f2e82ed..f2e82ed 100644
--- a/test/jquery.min.js
+++ b/web-static/jquery.min.js
diff --git a/test/socket.html b/web-static/socket.html
index c179456..fda00e9 100644
--- a/test/socket.html
+++ b/web-static/socket.html
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
- <title>rhimportd - Testclient</title>
+ <title>rhimportd Websocket Testclient</title>
<meta charset="utf-8">
<style type="text/css">
body {
@@ -131,21 +131,21 @@
</head>
<body onload="init()">
- <h1>Radio Helsinki Rivendell Importer:</h1>
+ <h1>rhimportd Websocket Testclient</h1>
- <p>
+ <div>
<table>
- <tr><td>Username</td><td><input id="username" type="text" size="20" value="heslinki"></td></tr>
- <tr><td>Token</td><td><input id="token" type="text" size="20"></td></tr>
+ <tr><td>Username</td><td><input id="username" type="text" size="20" value="heslinki" /></td></tr>
+ <tr><td>Token</td><td><input id="token" type="text" size="20" /></td></tr>
</table>
- </p>
+ </div>
- <p>
+ <div>
<button id="buttonlist" onclick="list()">list</button>
<div id="listmsg" class="data"></div>
- </p>
+ </div>
- <p>
+ <div>
<input id="source" type="text" size="30" value="fake://10000">
<input id="refid" type="text" size="15" value="test-reference-id">
<button id="buttonrun" onclick="run()">start</button>
@@ -154,6 +154,6 @@
<button id="buttonreconnect" onclick="reconnect()">reconnect</button>
<button id="buttoncancel" onclick="cancel()">cancel</button>
<div id="rawmsg" class="data"></div>
- </p>
+ </div>
</body>
</html>
diff --git a/web-static/upload-form.html b/web-static/upload-form.html
index 8d41a6e..8910a37 100644
--- a/web-static/upload-form.html
+++ b/web-static/upload-form.html
@@ -3,23 +3,26 @@
<head>
<meta charset="utf-8">
<title>rhimportd File Upload</title>
+ <style type="text/css">
+ body {
+ background-color: #555;
+ }
+
+ td.label {
+ text-align: right;
+ }
+ </style>
</head>
<body>
<div class="container">
<h1>rhimportd File Upload</h1>
- <form class="form-upload" method="post" action="https://import.helsinki.at/upload" enctype="multipart/form-data">
- <fieldset>
- <label for="LOGIN_NAME">Username:</label>
- <input type="text" name="LOGIN_NAME">
- </br>
- <label for="LOGIN_NAME">Password:</label>
- <input type="password" name="PASSWORD">
- </br>
- <label for="FILENAME">File:</label>
- <input type="file" name="FILENAME">
- </br>
- <input type="submit" name="submit" value="Submit">
- </fieldset>
+ <form class="form-upload" method="post" action="/public/upload" enctype="multipart/form-data">
+ <table>
+ <tr><td class="label">Username</td><td><input type="text" name="LOGIN_NAME" size="20" value="heslinki" /></td></tr>
+ <tr><td class="label">Token</td><td><input type="password" name="PASSWORD" size="20" /></td></tr>
+ <tr><td class="label">File</td><td><input type="file" name="FILENAME" /></td></tr>
+ <tr><td>&nbsp;</td><td><input type="submit" name="submit" value="Submit"></td></tr>
+ </table>
</form>
</div>
</body>