Initial survey
This commit is contained in:
commit
8ded814424
11
home.go
Normal file
11
home.go
Normal file
@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func Home(w http.ResponseWriter, r *http.Request) {
|
||||
log.Printf("Serve home page to %s: %s [%s]\n", r.Header.Get("X-Forwarded-For"), r.URL.Path, r.UserAgent())
|
||||
http.ServeFile(w, r, "home.html")
|
||||
}
|
199
home.html
Normal file
199
home.html
Normal file
@ -0,0 +1,199 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Sondage VIRLI</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
</head>
|
||||
<body class="container">
|
||||
<h1>Virtualisation légère — SRS 2017</h1>
|
||||
|
||||
<p>
|
||||
Aidez-moi à améliorer ce cours en donnant votre avis.
|
||||
</p>
|
||||
|
||||
<form method="post" action="/vote">
|
||||
|
||||
<div class="form-group">
|
||||
<h3>Quel est le cours/TP que vous avez préféré ?</h3>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q1" id="q1" value="r1">
|
||||
Docker, premiers pas
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q1" id="q1" value="r2">
|
||||
Docker, avancé
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q1" id="q1" value="r3">
|
||||
Linux Internal part 1 : procfs, capabilities, cgroups
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q1" id="q1" value="r4">
|
||||
Linux Internal part 2 : namespaces, mount, networking
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<h3>Quel(s) cours mériterait, selon vous, d'être complété/approfondi ?</h3>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q2" id="q2" value="r1">
|
||||
Docker, premiers pas
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q2" id="q2" value="r2">
|
||||
Docker, avancé
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q2" id="q2" value="r3">
|
||||
Linux Internal part 1 : procfs, capabilities, cgroups
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q2" id="q2" value="r4">
|
||||
Linux Internal part 2 : namespaces, mount, networking
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<h3>Diriez-vous que ce cours a :</h3>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="q3" id="q3" value="r1">
|
||||
Trop de rappels
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="q3" id="q3" value="r2">
|
||||
Trop de contenu
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="q3" id="q3" value="r3">
|
||||
Pas assez d'heures
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="q3" id="q3" value="r4">
|
||||
Arrive trop tard dans l'année
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="q3" id="q3" value="r5">
|
||||
Manque de sources, webographie/bibliographie ou de contenu pour aller plus loin
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="q3" id="q3" value="r6">
|
||||
Trop élitiste
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="q3" id="q3" value="r7">
|
||||
Pas assez élitiste
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<h3>Les TP, principalement :</h3>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q4" id="q4" value="r1">
|
||||
sont trop longs
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q4" id="q4" value="r2">
|
||||
ont trop de texte
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q4" id="q4" value="r3">
|
||||
n'ont pas assez d'exercices
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q4" id="q4" value="r4">
|
||||
ont trop d'exercices
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<h3>Quelle raison vous a principalement poussée à ne pas assister au cours ?</h3>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q5" id="q5" value="r1">
|
||||
Je suis venu moi ! (ou autres empêchements non-liés au cours)
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q5" id="q5" value="r2">
|
||||
Je connaissais déjà les notions abordées
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q5" id="q5" value="r3">
|
||||
Trop bullshit
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q5" id="q5" value="r4">
|
||||
Trop technique
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="q5" id="q5" value="r5">
|
||||
Il n'y a pas de valeur ajouté à aller à ce cours/TP
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<h3>Laissez votre avis et n'hésitez pas à compléter les réponses que vous avez donné ci-dessus</h3>
|
||||
<textarea class="form-control" name="other" rows="3"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Envoyer</button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
21
main.go
Normal file
21
main.go
Normal file
@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var bind = flag.String("bind", "0.0.0.0:8081", "Bind port/socket")
|
||||
flag.Parse()
|
||||
|
||||
log.Println("Registering handlers...")
|
||||
http.HandleFunc("/", Home)
|
||||
http.HandleFunc("/vote", Vote)
|
||||
log.Println(fmt.Sprintf("Ready, listening on %s", *bind))
|
||||
if err := http.ListenAndServe(*bind, nil); err != nil {
|
||||
log.Fatal("Unable to listen and serve: ", err)
|
||||
}
|
||||
}
|
16
thanks.html
Normal file
16
thanks.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Sondage VIRLI</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
</head>
|
||||
<body class="container">
|
||||
<h1>Virtualisation légère — SRS 2017</h1>
|
||||
|
||||
<div class="alert alert-success" role="alert">
|
||||
<strong>Merci d'avoir donné votre avis !</strong> votre contribution a bien été enregistrée.
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
20
vote.go
Normal file
20
vote.go
Normal file
@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func Vote(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == "POST" {
|
||||
r.ParseForm()
|
||||
log.Printf("Handling new vote from %s: %s [%s]\n", r.Header.Get("X-Forwarded-For"), r.URL.Path, r.UserAgent())
|
||||
for k, v := range r.PostForm {
|
||||
log.Println(k + ":", v)
|
||||
}
|
||||
|
||||
http.ServeFile(w, r, "thanks.html")
|
||||
} else {
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user