Start with a simple GUI
This commit is contained in:
parent
21ca97bb75
commit
edbc2d432d
4 changed files with 21 additions and 2 deletions
|
@ -4,6 +4,11 @@ body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
height: 350px !important;
|
||||||
|
}
|
||||||
|
|
||||||
{% if cljs %}
|
{% if cljs %}
|
||||||
@-moz-keyframes three-quarters-loader {
|
@-moz-keyframes three-quarters-loader {
|
||||||
0% {
|
0% {
|
||||||
|
|
|
@ -2,7 +2,14 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<img src="http://tclhost.com/eCel6N8.gif">
|
<p>Use this form to analyze a e-mail header. Just paste the whole e-mail in <strong>raw mode</strong> here and hit the analyze button. The e-mail will be analyzed and an visual representation will be generated. Use this tool o analyze e-mail problems or to see which servers, locations and companies the e-mail passed.</p>
|
||||||
|
<form action="/analyze" method="post">
|
||||||
|
{% csrf-field %}
|
||||||
|
<textarea class="form-control" name="mailheader">
|
||||||
|
Paste here your E-Mail in source format (with headers)
|
||||||
|
</textarea><br>
|
||||||
|
<input class="btn btn-success form-control" type="submit" name="send" value="Analyze the header">
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
3
resources/templates/result.html
Normal file
3
resources/templates/result.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
This is the result ....
|
||||||
|
|
||||||
|
{{ mailheader }}
|
|
@ -1,6 +1,6 @@
|
||||||
(ns mailhead.routes.home
|
(ns mailhead.routes.home
|
||||||
(:require [mailhead.layout :as layout]
|
(:require [mailhead.layout :as layout]
|
||||||
[compojure.core :refer [defroutes GET]]
|
[compojure.core :refer [defroutes GET POST]]
|
||||||
[ring.util.http-response :refer [ok]]
|
[ring.util.http-response :refer [ok]]
|
||||||
[clojure.java.io :as io]))
|
[clojure.java.io :as io]))
|
||||||
|
|
||||||
|
@ -10,7 +10,11 @@
|
||||||
(defn about-page []
|
(defn about-page []
|
||||||
(layout/render "about.html"))
|
(layout/render "about.html"))
|
||||||
|
|
||||||
|
(defn analyze-mailheader [mailheader]
|
||||||
|
(layout/render "result.html" {:mailheader mailheader}))
|
||||||
|
|
||||||
(defroutes home-routes
|
(defroutes home-routes
|
||||||
(GET "/" [] (home-page))
|
(GET "/" [] (home-page))
|
||||||
|
(POST "/analyze" [mailheader] (analyze-mailheader mailheader))
|
||||||
(GET "/about" [] (about-page)))
|
(GET "/about" [] (about-page)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue