Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Graphe des assos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timothé Bailly-Barthez
Graphe des assos
Commits
d097023d
Commit
d097023d
authored
5 years ago
by
Timothé Bailly-Barthez
Browse files
Options
Downloads
Patches
Plain Diff
proprification
parent
f22c5358
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
app.js
+0
-2
0 additions, 2 deletions
app.js
routes/users.js
+0
-9
0 additions, 9 deletions
routes/users.js
views/index.ejs
+18
-9
18 additions, 9 deletions
views/index.ejs
with
19 additions
and
21 deletions
README.md
+
1
−
1
View file @
d097023d
...
...
@@ -9,4 +9,4 @@ Ce site a pour but de visualiser les différentes assos du campus et les liens q
*
Créer le fichier
`secrets.js`
en complétant le fichier
`secrets.js.example`
avec les variables du client.
*
Installer les packages :
`npm i`
#### À chaque fois
*
Lancer le serveur en mode débogage :
`
DEBUG=linkcs-graph:*
npm start`
*
Lancer le serveur en mode débogage :
`
NODE_ENV='development'
npm start`
This diff is collapsed.
Click to expand it.
app.js
+
0
−
2
View file @
d097023d
...
...
@@ -8,7 +8,6 @@ const axios = require('axios');
var
querystring
=
require
(
'
querystring
'
);
var
indexRouter
=
require
(
'
./routes/index
'
);
var
usersRouter
=
require
(
'
./routes/users
'
);
const
[
client_id
,
client_secret
,
session_secret
]
=
require
(
'
./secrets.js
'
);
const
scope
=
"
default linkcs-user:read
"
...
...
@@ -129,7 +128,6 @@ app.get('/auth', function(req, res, next) {
})
app
.
use
(
'
/
'
,
auth
,
indexRouter
);
app
.
use
(
'
/users
'
,
usersRouter
);
// catch 404 and forward to error handler
app
.
use
(
function
(
req
,
res
,
next
)
{
...
...
This diff is collapsed.
Click to expand it.
routes/users.js
deleted
100644 → 0
+
0
−
9
View file @
f22c5358
var
express
=
require
(
'
express
'
);
var
router
=
express
.
Router
();
/* GET users listing. */
router
.
get
(
'
/
'
,
function
(
req
,
res
,
next
)
{
res
.
send
(
'
respond with a resource
'
);
});
module
.
exports
=
router
;
This diff is collapsed.
Click to expand it.
views/index.ejs
+
18
−
9
View file @
d097023d
...
...
@@ -87,22 +87,22 @@
<
div
>
<
label
htmlFor
=
"
promotion
"
>
Promotion
:
<
/label
>
<
input
type
=
"
number
"
id
=
"
promotion
"
value
=
{
promotion
}
onChange
=
{
e
=>
setPromotion
(
e
.
target
.
value
)}
/
>
{
error
?
<
p
style
=
{{
color
:
"
red
"
}}
>
Erreur
<
/p
>
:
(
ready
?
<
p
style
=
{{
color
:
"
green
"
}}
>
Prêt
<
/p
>
:
<
p
style
=
{{
color
:
"
yellow
"
}}
>
Chargement
<
/p
>
)}
<
/div
>
<
div
>
<
label
htmlFor
=
"
nodeMin
"
>
Nombre
par
asso
:
<
/label
>
<
label
htmlFor
=
"
nodeMin
"
>
Taille
minimale
:
<
/label
>
<
input
type
=
"
number
"
id
=
"
nodeMin
"
value
=
{
nodeMin
}
onChange
=
{
e
=>
setNodeMin
(
e
.
target
.
value
)}
/
>
<
/div
>
<
div
>
<
label
htmlFor
=
"
edgeMin
"
>
Nombre
par
lien
:
<
/label
>
<
label
htmlFor
=
"
edgeMin
"
>
Consanguinité
:
<
/label
>
<
input
type
=
"
number
"
id
=
"
edgeMin
"
value
=
{
edgeMin
}
onChange
=
{
e
=>
setEdgeMin
(
e
.
target
.
value
)}
/
>
<
/div
>
<
button
type
=
"
submit
"
>
Générer
<
/button
>
{
error
?
<
p
style
=
{{
color
:
"
red
"
}}
>
Erreur
<
/p
>
:
(
ready
?
<
p
style
=
{{
color
:
"
green
"
}}
>
Prêt
<
/p
>
:
<
p
style
=
{{
color
:
"
orange
"
}}
>
Chargement
<
/p
>
)}
<
/form
>
)
}
...
...
@@ -146,8 +146,17 @@
</head>
<body>
<h1><
%=
title
%
></h1>
<p>
<b>
Comment ça marche ?
</b><br>
Lorsqu'on arrive sur le site ou que l'on change la promotion, le site charge les données liées à la promotion.
<br>
Quand le champ de texte sous le menu des promotions indique prêt, vous pouvez générer le graphe en cliquant sur le bouton Générer ci-dessous.
<br>
Vous pouvez modifier la taille des assos ainsi que la consanguinité minimales, puis générer le graphe à nouveau.
</br>
Tu peux déplacer le graphe ou zoomer dessus pour voir les détails.
</p>
<div
id=
"form"
></div>
<div
id=
"mynetwork"
></div>
<p>
Crédit :
<a
href=
"https://linkcs.fr/user/2018barthezt"
>
moi
</a></br>
J'avais la flemme de faire du front, si tu te plains, c'est un paps !
</p>
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment