@ -0,0 +1,21 @@ |
|||
FROM node:10-buster-slim |
|||
|
|||
######################################## |
|||
# APT local cache |
|||
# work around because COPY failed if no source file |
|||
COPY .dummy .apt-mirror-confi[g] .proxy-confi[g] / |
|||
RUN cp /.proxy-config /etc/profile.d/proxy.sh 2> /dev/null || true |
|||
RUN if [ -f /.apt-mirror-config ] ; then . /.apt-mirror-config && sed -i \ |
|||
-e "s%s\?://deb.debian.org%://${APT_MIRROR_DEBIAN}%g" \ |
|||
-e "s%s\?://security.debian.org%://${APT_MIRROR_DEBIAN_SECURITY}%g" \ |
|||
-e "s%s\?://archive.ubuntu.com%://${APT_MIRROR_UBUNTU}%g" \ |
|||
-e "s%s\?://security.ubuntu.com%://${APT_MIRROR_UBUNTU_SECURITY}%g" \ |
|||
/etc/apt/sources.list; fi |
|||
|
|||
######################################## |
|||
WORKDIR /quota |
|||
COPY dockers/quotas/html/ . |
|||
EXPOSE 3000 |
|||
WORKDIR /quota/express_webapp |
|||
RUN npm install --no-audit |
|||
CMD ["npm","start"] |
@ -0,0 +1,12 @@ |
|||
#!/bin/bash |
|||
|
|||
KAZ_ROOT=$(cd "$(dirname $0)/../.."; pwd) |
|||
. "${KAZ_ROOT}/bin/.commonFunctions.sh" |
|||
setKazVars |
|||
|
|||
########################################################################### |
|||
printKazMsg "\n *** Création du Dockerfile quotas" |
|||
|
|||
cd "${KAZ_ROOT}" |
|||
|
|||
docker build -t quotaskaz . -f dockers/quotas/Dockerfile |
@ -0,0 +1,41 @@ |
|||
version: "3.5" |
|||
|
|||
services: |
|||
|
|||
quotas: |
|||
# ports: |
|||
# - 8084:3000 |
|||
image: quotaskaz |
|||
container_name: ${quotasServName} |
|||
# restart: ${restartPolicy} |
|||
depends_on: |
|||
- db |
|||
networks: |
|||
- quotasNet |
|||
links: |
|||
- db |
|||
env_file: |
|||
- ../../secret/env-${quotasDBName} |
|||
|
|||
db: |
|||
image: mariadb:10.5 |
|||
container_name: ${quotasDBName} |
|||
restart: ${restartPolicy} |
|||
networks: |
|||
- quotasNet |
|||
env_file: |
|||
- ../../secret/env-${quotasDBName} |
|||
volumes: |
|||
- ./initdb.d:/docker-entrypoint-initdb.d:ro |
|||
- quotasDB:/var/lib/mysql |
|||
- /home/sauve/:/svg/ |
|||
- /etc/localtime:/etc/localtime:ro |
|||
- /etc/timezone:/etc/timezone:ro |
|||
|
|||
volumes: |
|||
quotasDB: |
|||
|
|||
networks: |
|||
quotasNet: |
|||
external: |
|||
name: quotasNet |
@ -0,0 +1,2 @@ |
|||
express_webapp/node_modules |
|||
kaz.quota/node_modules |
@ -0,0 +1,51 @@ |
|||
------------------------------------------------ |
|||
|
|||
|
|||
|
|||
|
|||
KAZ : AFFICHAGE DES QUOTAS |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
------------------------------------------------ |
|||
Auteur du document : GUIQUERRO Nathaniel |
|||
Création de l'affichage de Quota : GAULTIER Lauryne, GUIQUERRO Nathaniel |
|||
Date : 7 / 01 / 2022 |
|||
------------------------------------------------ |
|||
|
|||
Installation : |
|||
|
|||
afin tout lancement 'npm' doit déjà être installé préalablement |
|||
ensuite il faut récuperer le code contenue dans kaz.quota et express_webapp du git |
|||
|
|||
Vérifiez bien que express_webapp contient un répertoire bin avec un fichier www dedans. |
|||
|
|||
ensuite ouvez un terminale et placez vous dans le répertoire express_webapp grâce à la |
|||
commande cd ./express_webapp et éxécutez al commande 'npm install' et après 'npm start' |
|||
|
|||
Si aucun message d'erreur s'affiche rendez vous sur votre navigateur préféré pour vous connecter |
|||
sur l'url : http://localhost:3000/ |
|||
|
|||
|
|||
Bonne Lecture ! |
|||
|
|||
Cordialement l'équipe Nelph |
|||
|
|||
|
|||
------------------------------------------------ |
|||
|
|||
Installation avec Docker : |
|||
|
|||
Lancement WEB seul : |
|||
docker build -t quota . |
|||
docker run -it -p 127.0.0.1:3000:3000 quotas |
|||
|
|||
Le page est accessible avec firefox à l'adresse : localhost:3000 |
|||
|
|||
Lancement WEB et DB : |
|||
docker-compose up |
|||
|
|||
La DB peut être accédé avec la commande : |
|||
mysql -h 127.0.0.1 -prougail-saucisse |
@ -0,0 +1,50 @@ |
|||
# KAZ : AFFICHAGE DES QUOTAS |
|||
|
|||
Auteur du document : GUIQUERRO Nathaniel, GAULTIER Lauryne |
|||
Création de l'affichage de Quota : GAULTIER Lauryne, GUIQUERRO Nathaniel |
|||
Date : 7 / 01 / 2022 |
|||
|
|||
# Installation : |
|||
Avant tout lancement 'npm' doit déjà être installé. |
|||
Ensuite il faut récuperer le code contenu dans kaz.quota et express_webapp du git. |
|||
Vérifiez bien que express_webapp contient un répertoire bin avec un fichier www dedans. |
|||
|
|||
Ensuite ouvez un terminal et placez vous dans le répertoire express_webapp grâce à la |
|||
commande cd ./express_webapp et exécutez les commande 'npm install' et 'npm start'. |
|||
|
|||
Si aucun message d'erreur ne s'affiche, rendez vous sur votre navigateur préféré pour vous connecter sur l'url : |
|||
|
|||
```bash |
|||
http://localhost:3000/ |
|||
``` |
|||
|
|||
Bonne lecture ! |
|||
|
|||
Cordialement l'équipe Nelph |
|||
|
|||
# Installation avec Docker : |
|||
|
|||
Lancement WEB et DB : |
|||
|
|||
```bash |
|||
cd /kaz/src |
|||
``` |
|||
|
|||
```bash |
|||
./lancementDocker.sh |
|||
``` |
|||
Initialiser la base de données: |
|||
```bash |
|||
./initDB.sh tartelette |
|||
``` |
|||
|
|||
Vous pouvez accéder à la DB avec la commande : |
|||
```bash |
|||
mysql -h 127.0.0.1 -tartelette |
|||
``` |
|||
Le page est accessible par navigateur à l'adresse : |
|||
|
|||
```bash |
|||
localhost:3000 |
|||
``` |
|||
|
@ -0,0 +1,52 @@ |
|||
var createError = require('http-errors'); |
|||
var express = require('express'); |
|||
var path = require('path'); |
|||
var cookieParser = require('cookie-parser'); |
|||
var logger = require('morgan'); |
|||
|
|||
var indexRouter = require('./routes/index'); |
|||
var usersRouter = require('./routes/users'); |
|||
var indexAdminRouter = require('./routes/indexAdmin'); |
|||
var usersAdminRouter = require('./routes/usersAdmin'); |
|||
var groupesRouter = require('./routes/groupes'); |
|||
var ServiceGRouter = require('./routes/serviceg'); |
|||
|
|||
var app = express(); |
|||
|
|||
// view engine setup
|
|||
app.set('views', path.join(__dirname, 'views')); |
|||
app.set('view engine', 'jade'); |
|||
|
|||
app.use(logger('dev')); |
|||
app.use(express.json()); |
|||
app.use(express.urlencoded({ extended: false })); |
|||
app.use(cookieParser()); |
|||
app.use(express.static(path.join(__dirname, 'public'))); |
|||
|
|||
app.use('/', indexRouter); |
|||
app.use('/users', usersRouter); |
|||
|
|||
|
|||
app.use('/admin/', indexAdminRouter); |
|||
app.use('/admin/users', usersAdminRouter); |
|||
app.use('/admin/groupes',groupesRouter); |
|||
app.use('/admin/serviceg',ServiceGRouter); |
|||
|
|||
|
|||
// catch 404 and forward to error handler
|
|||
app.use(function(req, res, next) { |
|||
next(createError(404)); |
|||
}); |
|||
|
|||
// error handler
|
|||
app.use(function(err, req, res, next) { |
|||
// set locals, only providing error in development
|
|||
res.locals.message = err.message; |
|||
res.locals.error = req.app.get('env') === 'development' ? err : {}; |
|||
|
|||
// render the error page
|
|||
res.status(err.status || 500); |
|||
res.render('error'); |
|||
}); |
|||
|
|||
module.exports = app; |
@ -0,0 +1,90 @@ |
|||
#!/usr/bin/env node |
|||
|
|||
/** |
|||
* Module dependencies. |
|||
*/ |
|||
|
|||
var app = require('../app'); |
|||
var debug = require('debug')('express-webapp:server'); |
|||
var http = require('http'); |
|||
|
|||
/** |
|||
* Get port from environment and store in Express. |
|||
*/ |
|||
|
|||
var port = normalizePort(process.env.PORT || '3000'); |
|||
app.set('port', port); |
|||
|
|||
/** |
|||
* Create HTTP server. |
|||
*/ |
|||
|
|||
var server = http.createServer(app); |
|||
|
|||
/** |
|||
* Listen on provided port, on all network interfaces. |
|||
*/ |
|||
|
|||
server.listen(port); |
|||
server.on('error', onError); |
|||
server.on('listening', onListening); |
|||
|
|||
/** |
|||
* Normalize a port into a number, string, or false. |
|||
*/ |
|||
|
|||
function normalizePort(val) { |
|||
var port = parseInt(val, 10); |
|||
|
|||
if (isNaN(port)) { |
|||
// named pipe |
|||
return val; |
|||
} |
|||
|
|||
if (port >= 0) { |
|||
// port number |
|||
return port; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* Event listener for HTTP server "error" event. |
|||
*/ |
|||
|
|||
function onError(error) { |
|||
if (error.syscall !== 'listen') { |
|||
throw error; |
|||
} |
|||
|
|||
var bind = typeof port === 'string' |
|||
? 'Pipe ' + port |
|||
: 'Port ' + port; |
|||
|
|||
// handle specific listen errors with friendly messages |
|||
switch (error.code) { |
|||
case 'EACCES': |
|||
console.error(bind + ' requires elevated privileges'); |
|||
process.exit(1); |
|||
break; |
|||
case 'EADDRINUSE': |
|||
console.error(bind + ' is already in use'); |
|||
process.exit(1); |
|||
break; |
|||
default: |
|||
throw error; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Event listener for HTTP server "listening" event. |
|||
*/ |
|||
|
|||
function onListening() { |
|||
var addr = server.address(); |
|||
var bind = typeof addr === 'string' |
|||
? 'pipe ' + addr |
|||
: 'port ' + addr.port; |
|||
debug('Listening on ' + bind); |
|||
} |
@ -0,0 +1,18 @@ |
|||
|
|||
// Creating new Object of Sequelize
|
|||
const sequelize = new Sequelize( |
|||
process.env.MYSQL_DATABASE, |
|||
process.env.MYSQL_USER, |
|||
process.env.MYSQL_PASSWORD, { |
|||
// Explicitly specifying
|
|||
// mysql database
|
|||
dialect: 'mariadb', |
|||
// By default host is 'localhost'
|
|||
host: 'db' |
|||
} |
|||
); |
|||
|
|||
// Exporting the sequelize object.
|
|||
// We can use it in another file
|
|||
// for creating models
|
|||
module.exports = sequelize |
@ -0,0 +1,24 @@ |
|||
{ |
|||
"name": "express-webapp", |
|||
"version": "0.0.0", |
|||
"private": true, |
|||
"scripts": { |
|||
"start": "node ./bin/www" |
|||
}, |
|||
"dependencies": { |
|||
"alert": "^5.0.10", |
|||
"billboard.js": "^3.3.3", |
|||
"chart.js": "^3.7.1", |
|||
"cookie-parser": "~1.4.4", |
|||
"debug": "~2.6.9", |
|||
"express": "~4.16.1", |
|||
"http-errors": "~1.6.3", |
|||
"jade": "~1.11.0", |
|||
"mariadb": "^2.5.5", |
|||
"morgan": "~1.9.1", |
|||
"mysql": "^2.18.1", |
|||
"node-localstorage": "^2.2.1", |
|||
"sequelize": "^6.15.0", |
|||
"xg-xcharts": "^0.2.2" |
|||
} |
|||
} |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 35 KiB |
@ -0,0 +1,210 @@ |
|||
/* |
|||
_____________________________________________________________________________________ |
|||
Ce fichier CSS est script permettent de modifier l'apparence de nos page web |
|||
|
|||
utiliser par : -groupes.jade |
|||
-index.jade |
|||
-indexAdmin.jade |
|||
-serviceg.jade |
|||
-users.jade |
|||
-usersError.jade |
|||
-usersfound.jade |
|||
|
|||
Auteurs : Lauryne GAULTIER, GUIQUERRO Nathaniel |
|||
_____________________________________________________________________________________ |
|||
|
|||
*/ |
|||
|
|||
html{ |
|||
overflow: hidden |
|||
} |
|||
|
|||
body { |
|||
background-color: #f2f3f1; |
|||
text-align: center; |
|||
} |
|||
|
|||
#entete, #menu, #contenu, #footer { |
|||
padding:1px 0; |
|||
font-family: "Courier New", monospace; |
|||
} |
|||
|
|||
#entete { |
|||
font-family: "Source Sans Pro", Helvetica, sans-serif; |
|||
background-color:#eeecec; |
|||
color: #585858; |
|||
} |
|||
|
|||
#entete:hover{ |
|||
border-bottom-color: transparent; |
|||
color: #3dbbf5 !important; |
|||
} |
|||
|
|||
#main { |
|||
position: relative; |
|||
} |
|||
|
|||
#menu { |
|||
background-color:#eeecec; |
|||
float:left; |
|||
position : fixed; |
|||
top:0; |
|||
bottom:0; |
|||
width: 30%; |
|||
} |
|||
|
|||
#contenu { |
|||
font-family: "Source Sans Pro", Helvetica, sans-serif; |
|||
font-size: 125%; |
|||
color: #585858; |
|||
text-align: center; |
|||
position: fixed; |
|||
top:20; |
|||
left:50%; |
|||
overflow: visible; |
|||
margin-bottom: 50px; |
|||
} |
|||
|
|||
#gauche{ |
|||
position: fixed; |
|||
left: 35%; |
|||
} |
|||
|
|||
#droite{ |
|||
position: fixed; |
|||
left: 65%; |
|||
} |
|||
|
|||
#footer { |
|||
font-family: "Source Sans Pro", Helvetica, sans-serif; |
|||
background-color:#eeecec; |
|||
margin-top :5%; |
|||
position: relative; |
|||
bottom: 0; |
|||
left: 0; |
|||
right: 0; |
|||
top: 506px; |
|||
color: #585858; |
|||
text-align:center; |
|||
clear:both; |
|||
} |
|||
|
|||
button { |
|||
display: inline-block; |
|||
background-color: #585858; |
|||
border-radius: 10px; |
|||
border: 4px double #cccccc; |
|||
color: #eeeeee; |
|||
text-align: center; |
|||
font-size: 28px; |
|||
padding: 20px; |
|||
width: 500px; |
|||
transition: all 0.5s; |
|||
cursor: pointer; |
|||
margin: 15px; |
|||
} |
|||
|
|||
button span { |
|||
cursor: pointer; |
|||
display: inline-block; |
|||
position: relative; |
|||
transition: 0.5s; |
|||
} |
|||
|
|||
button span:after { |
|||
content: '\00bb'; |
|||
position: absolute; |
|||
opacity: 0; |
|||
top: 0; |
|||
right: -20px; |
|||
transition: 0.5s; |
|||
} |
|||
|
|||
button:hover { |
|||
background-color: #3dbbf5 |
|||
} |
|||
|
|||
button:hover span { |
|||
padding-right: 25px; |
|||
} |
|||
|
|||
button:hover span:after { |
|||
opacity: 1; |
|||
right: 0; |
|||
} |
|||
|
|||
#textAR{ |
|||
margin-left:10%; |
|||
} |
|||
|
|||
#valide, |
|||
#valide::after { |
|||
-webkit-transition: all 0.3s; |
|||
-moz-transition: all 0.3s; |
|||
-o-transition: all 0.3s; |
|||
transition: all 0.3s; |
|||
} |
|||
|
|||
#valide{ |
|||
background: none; |
|||
border: 4px solid rgb(53, 53, 53); |
|||
border-radius: 10px; |
|||
color: rgb(53, 53, 53); |
|||
display: block; |
|||
font-size: 0.5em; |
|||
font-weight: bold; |
|||
margin: 10px auto; |
|||
padding: 2em 6em; |
|||
text-transform: uppercase; |
|||
} |
|||
|
|||
#valide::before, |
|||
#valide::after { |
|||
background: rgb(53, 53, 53); |
|||
content: ''; |
|||
position: absolute; |
|||
z-index: -1; |
|||
} |
|||
|
|||
#valide:hover { |
|||
color: #3dbbf5 |
|||
} |
|||
|
|||
#valide::after { |
|||
height: 0; |
|||
left: 0; |
|||
top: 0; |
|||
width: 100%; |
|||
} |
|||
|
|||
#valide::after { |
|||
height: 0; |
|||
left: 50%; |
|||
top: 50%; |
|||
width: 0; |
|||
} |
|||
|
|||
#valide:hover:after { |
|||
height: 100%; |
|||
left: 0; |
|||
top: 0; |
|||
width: 100%; |
|||
} |
|||
|
|||
#champ.textbox[type=text] { |
|||
width: 60%; |
|||
border-radius:20px; |
|||
padding: 12px 20px; |
|||
text-align: center; |
|||
font-family: Moderne Sans, sans-serif; |
|||
color: #1a1919; |
|||
font-size: 2vmin; |
|||
box-sizing: border-box; |
|||
border: 3px solid rgb(104, 103, 103); |
|||
transition: 0.5s; |
|||
outline: none; |
|||
} |
|||
|
|||
#champ.textbox[type=text]:focus { |
|||
border: 3px solid rgb(37, 37, 37); |
|||
} |
@ -0,0 +1,16 @@ |
|||
var express = require('express'); |
|||
var router = express.Router(); |
|||
|
|||
//_________________________________________________________________
|
|||
// script route pour la page groupe.jade
|
|||
//
|
|||
// Auteur : Nathaniel GUIQUERRO
|
|||
//_________________________________________________________________
|
|||
|
|||
/* GET users listing. */ |
|||
router.get('/', function(req, res, next) { |
|||
console.log("J'envoie le render de la page Groupe"); |
|||
res.render('groupes'); |
|||
}); |
|||
|
|||
module.exports = router; |
@ -0,0 +1,15 @@ |
|||
var express = require('express'); |
|||
var router = express.Router(); |
|||
|
|||
//_________________________________________________________________
|
|||
// script route pour la page index.jade
|
|||
//
|
|||
// Auteur : Nathaniel GUIQUERRO
|
|||
//_________________________________________________________________
|
|||
|
|||
/* GET home page. */ |
|||
router.get('/', function(req, res, next) { |
|||
res.render('index', { title: 'Express' }); |
|||
}); |
|||
|
|||
module.exports = router; |
@ -0,0 +1,15 @@ |
|||
var express = require('express'); |
|||
var router = express.Router(); |
|||
|
|||
//_________________________________________________________________
|
|||
// script route pour la page indexAdmin.jade
|
|||
//
|
|||
// Auteur : Nathaniel GUIQUERRO
|
|||
//_________________________________________________________________
|
|||
|
|||
/* GET home page. */ |
|||
router.get('/', function(req, res, next) { |
|||
res.render('indexAdmin', { title: 'Express' }); |
|||
}); |
|||
|
|||
module.exports = router; |
@ -0,0 +1,68 @@ |
|||
var express = require('express'); |
|||
var router = express.Router(); |
|||
const {Sequelize} = require("sequelize"); |
|||
//___________________________________________________________________________________
|
|||
// Ce petit script permet de connaitre la taille des services de kaz
|
|||
// -Nextcloud
|
|||
// -Postfix
|
|||
// -Agora
|
|||
//!
|
|||
// le script cherche dans la base mariaDB les differents données qui correspond à chaque
|
|||
// services
|
|||
//
|
|||
// Auteur : Nathaniel Guiquerro Lauryne Gaultier
|
|||
// Retourne : Une page serviceg.jade qui permet de afficher les tailles globales des
|
|||
// services kaz
|
|||
// Exemple : Taille Postfix : 50 Mio
|
|||
// Taille Nextcloud : 50 Mio
|
|||
// Taille Agora : 10 Mio
|
|||
//___________________________________________________________________________________
|
|||
function formatBytes(bytes, decimals = 2) { |
|||
if (bytes === 0) return '0 Bytes'; |
|||
|
|||
const k = 1024; |
|||
const dm = decimals < 0 ? 0 : decimals; |
|||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; |
|||
|
|||
const i = Math.floor(Math.log(bytes) / Math.log(k)); |
|||
|
|||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; |
|||
} |
|||
|
|||
router.get('/', function(req, res, next) { |
|||
console.log("Demande de tailles aux scriptes de services"); |
|||
|
|||
//__________________________________________________
|
|||
//
|
|||
// Services Global de kaz
|
|||
// concu de : Postfix, Nextcloud, Agora
|
|||
//
|
|||
//__________________________________________________
|
|||
|
|||
// XXX Felix
|
|||
// const sequelize = new Sequelize("quotas","root","tartelette",{
|
|||
// host: "quotasDB",
|
|||
// dialect:"mariadb"
|
|||
// });
|
|||
|
|||
(async ()=>{ |
|||
try{ |
|||
await sequelize.authenticate(); |
|||
//connecté
|
|||
const query = "SELECT * FROM Global Order by date desc"; |
|||
sequelize.query(query).then(([results, metadata]) => { |
|||
var R = {"Agora: ":formatBytes(results[0].agora), |
|||
"Postfix: ":formatBytes(results[0].postfix), |
|||
"NextCloud: ":formatBytes(results[0].nextcloud), |
|||
"Total: ":formatBytes(results[0].total)}; |
|||
console.log(R); |
|||
res.render('serviceg',{data:R}); |
|||
}) |
|||
} catch (error){ |
|||
//pas connecté
|
|||
console.log(error); |
|||
} |
|||
})(); |
|||
}); |
|||
|
|||
module.exports = router; |
@ -0,0 +1,209 @@ |
|||
|
|||
var express = require('express'); |
|||
var router = express.Router(); |
|||
const {Sequelize} = require("sequelize"); |
|||
|
|||
//___________________________________________________________________________________
|
|||
// Ce petit script permet de connaitre la taille memoire d'un utilisateur
|
|||
|
|||
// Auteur : Nathaniel Guiquerro Lauryne Gaultier
|
|||
//
|
|||
// GET : Quand on charge la page on tombe sur un formulaire
|
|||
// il faut alors renseigner le email et un nombre entre 1 et 30
|
|||
// ex : contact1@kaz.local et 25
|
|||
// POST: SI l'email existe ou le nombre n'est pas correcte alors on va rechercher si
|
|||
// il existe les quotas avec le script ../../quotas/UtilisateurTailleGlobal.sh
|
|||
// SINON on renvoie l'erreur du script ../../quotas/UtilisateurTailleGlobal.sh
|
|||
//___________________________________________________________________________________
|
|||
|
|||
|
|||
//fonction de convertiseur d'uniter automatique
|
|||
function formatBytes(bytes, decimals = 2) { |
|||
if (bytes === 0) return '0 Bytes'; |
|||
|
|||
const k = 1024; |
|||
const dm = decimals < 0 ? 0 : decimals; |
|||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; |
|||
|
|||
const i = Math.floor(Math.log(bytes) / Math.log(k)); |
|||
|
|||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; |
|||
} |
|||
|
|||
//fonction qui converti la donnée en paramètre
|
|||
// bytes -----> Mb
|
|||
function getMB(bytes){ |
|||
return bytes/1000000; |
|||
} |
|||
|
|||
async function getData(email , nb ){ |
|||
var tabDeDonnee = []; |
|||
|
|||
// XXX Felix
|
|||
// const sequelize = new Sequelize("quotas","root","tartelette",{
|
|||
// host: "quotasDB",
|
|||
// dialect:"mariadb"
|
|||
// });
|
|||
|
|||
try{ |
|||
await sequelize.authenticate(); |
|||
//connecté
|
|||
const query ="SELECT * FROM Utilisateur WHERE utilisateur='"+email+"' ORDER BY date desc ;"; |
|||
sequelize.query(query).then(([results, metadata]) => { |
|||
|
|||
var i=0; |
|||
while(i<nb){ |
|||
tabDeDonnee.push(getMB(results[i].total)); |
|||
var date = new Date(results[i].date); |
|||
var m =date.getMonth()+1; |
|||
tabDeDonnee.push(date.getDate()+"/"+m+"/"+date.getFullYear()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()); |
|||
i++; |
|||
} |
|||
|
|||
}) |
|||
|
|||
} catch (error){ |
|||
//pas connecté
|
|||
console.log(error); |
|||
|
|||
} |
|||
return tabDeDonnee; |
|||
} |
|||
|
|||
//fonction qui permet de recuperer la limitation de place d'un utilisateur
|
|||
async function getLimit(email, nb ){ |
|||
var tabDeDonnee = []; |
|||
|
|||
// XXX Felix
|
|||
// const sequelize = new Sequelize("quotas","root","tartelette",{
|
|||
// host: "quotasDB",
|
|||
// dialect:"mariadb"
|
|||
// });
|
|||
|
|||
try{ |
|||
await sequelize.authenticate(); |
|||
//connecté
|
|||
const query ="SELECT * FROM Utilisateur WHERE utilisateur='"+email+"' ORDER BY date desc ;"; |
|||
sequelize.query(query).then(([results, metadata]) => { |
|||
var i=0; |
|||
while(i<nb){ |
|||
tabDeDonnee.push(getMB(results[i].limite*1000000000)); |
|||
i++; |
|||
} |
|||
tabDeDonnee |
|||
|
|||
}) |
|||
|
|||
} catch (error){ |
|||
//pas connecté
|
|||
console.log(error); |
|||
|
|||
} |
|||
return tabDeDonnee; |
|||
} |
|||
|
|||
function splitDonne(array){ |
|||
var tabDonne = []; |
|||
for (let i = 0; i < array.length; i++) { |
|||
if(i%2==0){ |
|||
tabDonne.push(array[i]); |
|||
} |
|||
} |
|||
return tabDonne; |
|||
} |
|||
|
|||
|
|||
function splitTime(array){ |
|||
var tabTime = []; |
|||
for (let i = 0; i < array.length; i++) { |
|||
if(i%2!=0){ |
|||
tabTime.push(array[i]); |
|||
} |
|||
} |
|||
return tabTime; |
|||
} |
|||
|
|||
//fonction qui converti le timestamp en un objet Date
|
|||
function timeConverter(UNIX_timestamp){ |
|||
var date = new Date(UNIX_timestamp); |
|||
|
|||
return (date.getDate()+ |
|||
"/"+(date.getMonth()+1)+ |
|||
"/"+date.getFullYear()+ |
|||
" "+date.getHours()+ |
|||
":"+date.getMinutes()+ |
|||
":"+date.getSeconds()); |
|||
} |
|||
|
|||
/* |
|||
GET users listing. |
|||
Cette page affiche le formulaire avec l'email |
|||
*/ |
|||
router.get('/', function(req, res, next) { |
|||
res.render('users'); |
|||
}); |
|||
|
|||
|
|||
/* |
|||
ICI ce trouve le traitement du mail renseignée via le formulaire |
|||
*/ |
|||
router.post('/', async function(req, res, next) { |
|||
myArray = req.body.email; |
|||
var splits = myArray.split("@"); |
|||
|
|||
email=splits[0]; |
|||
|
|||
var nombreJ = req.body.nombreJ; |
|||
if(nombreJ<1 || nombreJ>30) res.render('usersError'); |
|||
|
|||
// XXX Felix
|
|||
// const sequelize = new Sequelize("quotas","root","tartelette",{
|
|||
// host: "quotasDB",
|
|||
// dialect:"mariadb"
|
|||
// });
|
|||
|
|||
(async ()=>{ |
|||
try{ |
|||
await sequelize.authenticate(); |
|||
var dat = await getData(email,nombreJ); |
|||
var lim = await getLimit(email,nombreJ); |
|||
|
|||
setTimeout(function(){ |
|||
console.log("Ready") |
|||
|
|||
var tabDonne = splitDonne(dat); |
|||
var tabTime = splitTime(dat); |
|||
|
|||
|
|||
//connecté
|
|||
const query ="SELECT * FROM Utilisateur WHERE utilisateur='"+email+"' ORDER BY date desc LIMIT 1;"; |
|||
sequelize.query(query).then(([results, metadata]) => { |
|||
|
|||
var i=0; |
|||
var trouve =false; |
|||
while(i<results.length && !trouve ){ |
|||
if(results[i].utilisateur==email){ |
|||
var R = {"nom":email,"Postfix":getMB(results[i].postfix),"NextCloud":getMB(results[i].nextcloud),"Total":getMB(results[i].total),"Dateduprélevement":timeConverter(results[i].date),"dataChart":tabDonne,"labels":tabTime,"Lim":lim}; |
|||
|
|||
res.render('usersfound',{data:R}); |
|||
trouve=true; |
|||
} |
|||
i++; |
|||
} |
|||
|
|||
if(!trouve){ |
|||
res.render('usersError'); |
|||
} |
|||
|
|||
}) |
|||
|
|||
}, 1000); |
|||
} catch (error){ |
|||
//pas connecté
|
|||
console.log(error); |
|||
} |
|||
})(); |
|||
}); |
|||
|
|||
module.exports = router; |
|||
|
@ -0,0 +1,100 @@ |
|||
|
|||
var express = require('express'); |
|||
var router = express.Router(); |
|||
const {Sequelize} = require("sequelize"); |
|||
|
|||
//___________________________________________________________________________________
|
|||
// Ce petit script permet de connaitre la taille memoire d'un utilisateur
|
|||
|
|||
// Auteur : Nathaniel Guiquerro Lauryne Gaultier
|
|||
//
|
|||
// GET : Quand on charge la page on tombe sur un formulaire
|
|||
// il faut alors renseigner le email et un nombre entre 1 et 30
|
|||
// ex : contact1@kaz.local et 25
|
|||
// POST: SI l'email existe ou le nombre n'est pas correcte alors on va rechercher si
|
|||
// il existe les quotas avec le script ../../quotas/UtilisateurTailleGlobal.sh
|
|||
// SINON on renvoie l'erreur du script ../../quotas/UtilisateurTailleGlobal.sh
|
|||
//___________________________________________________________________________________
|
|||
|
|||
//fonction de convertiseur d'uniter automatique
|
|||
function formatBytes(bytes, decimals = 2) { |
|||
if (bytes === 0) return '0 Bytes'; |
|||
|
|||
const k = 1024; |
|||
const dm = decimals < 0 ? 0 : decimals; |
|||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; |
|||
|
|||
const i = Math.floor(Math.log(bytes) / Math.log(k)); |
|||
|
|||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; |
|||
} |
|||
|
|||
//fonction qui converti le timestamp en un objet Date
|
|||
function timeConverter(UNIX_timestamp){ |
|||
var date = new Date(UNIX_timestamp); |
|||
|
|||
return (date.getDate()+ |
|||
"/"+(date.getMonth()+1)+ |
|||
"/"+date.getFullYear()+ |
|||
" "+date.getHours()+ |
|||
":"+date.getMinutes()+ |
|||
":"+date.getSeconds()); |
|||
} |
|||
|
|||
/* |
|||
GET users listing. |
|||
Cette page affiche le formulaire avec l'email |
|||
*/ |
|||
router.get('/', function(req, res, next) { |
|||
res.render('users'); |
|||
}); |
|||
|
|||
/* |
|||
ICI ce trouve le traitement du mail renseignée vvia le formulaire |
|||
*/ |
|||
router.post('/', function(req, res, next) { |
|||
myArray = req.body.email; |
|||
var splits = myArray.split("@"); |
|||
|
|||
email=splits[0]; |
|||
|
|||
// XXX Felix
|
|||
// const sequelize = new Sequelize("quotas","root","tartelette",{
|
|||
// host: "db",
|
|||
// dialect:"mariadb"
|
|||
// });
|
|||
|
|||
(async ()=>{ |
|||
try{ |
|||
await sequelize.authenticate(); |
|||
//connecté
|
|||
const query ="SELECT * FROM Utilisateur ORDER BY date desc LIMIT 1;"; |
|||
sequelize.query(query).then(([results, metadata]) => { |
|||
var i=0; |
|||
var trouve =false; |
|||
while(i<results.length && !trouve ){ |
|||
if(results[i].utilisateur==email){ |
|||
var R = {"Postfix: ":formatBytes(results[i].postfix), |
|||
"NextCloud: ":formatBytes(results[i].nextcloud), |
|||
"Total: ":formatBytes(results[i].total), |
|||
"Date du prélevement: ":timeConverter(results[i].date)}; |
|||
res.render('usersfound',{data:R}); |
|||
trouve=true; |
|||
} |
|||
i++; |
|||
} |
|||
|
|||
if(!trouve){ |
|||
res.render('usersError'); |
|||
} |
|||
|
|||
}) |
|||
|
|||
} catch (error){ |
|||
//pas connecté
|
|||
console.log(error); |
|||
} |
|||
})(); |
|||
}); |
|||
|
|||
module.exports = router; |
@ -0,0 +1,6 @@ |
|||
extends layout |
|||
|
|||
block content |
|||
h1= message |
|||
h2= error.status |
|||
pre #{error.stack} |
@ -0,0 +1,32 @@ |
|||
doctype html |
|||
//- |
|||
#_________________________________________________________________ |
|||
Page jade correspondant à l'affichage des groupes de famille et |
|||
des associations |
|||
|
|||
Auteur : Lauryne GAULTIER |
|||
_________________________________________________________________ |
|||
|
|||
html |
|||
head |
|||
link(href='/stylesheets/style.css' rel='stylesheet' type='text/css') |
|||
title KAZ Quotas Associations |
|||
meta(charset='UTF-8') |
|||
body |
|||
#entete |
|||
h1(onclick="window.location.href = 'https://kaz.bzh/'") Tableau de bord Quotas des Associations |
|||
p rechercher d'une asssociation pour savoir combien de place il utilise en total dans chaque service |
|||
#main |
|||
#menu |
|||
img(src='/images/groupe.png' width='100%') |
|||
#contenu |
|||
button Association 1 : |
|||
br |
|||
button Association 2 : |
|||
br |
|||
button Association 3 : |
|||
br |
|||
#footer |
|||
button(onclick="window.location.href = '/admin';") Retour |
|||
br |
|||
p Site réalisé par les étudiants du département informatique sous la direction de F. Merciol & N. Le Sommer et G. Kerbellec durant l'année 2021-2022 |
@ -0,0 +1,29 @@ |
|||
|
|||
//- |
|||
_________________________________________________________________ |
|||
Page jade correspondant à l'affichage à la page principale |
|||
qui regroupe plusieurs boutons pour pouvoir accéder aux différentes |
|||
pages des quotas |
|||
|
|||
# Auteur : Lauryne GAULTIER |
|||
_________________________________________________________________ |
|||
|
|||
doctype html |
|||
html |
|||
head |
|||
link(href='/stylesheets/style.css' rel='stylesheet' type='text/css') |
|||
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico"> |
|||
title KAZ Quotas |
|||
meta(charset='UTF-8') |
|||
body |
|||
#entete |
|||
h1(onclick="window.location.href = 'https://kaz.bzh/'") LE NUMERIQUE ETHIQUE ET LOCAL |
|||
h2 Bienvenue |
|||
p Ci-dessous se trouve les différente catégorie de quotas |
|||
#main |
|||
#menu |
|||
img(id="object-position-1" src='/images/quotas.png' width='100%') |
|||
#contenu |
|||
button(onclick="window.location.href = '/users';") Individuels |
|||
#footer |
|||
p Site réalisé par les étudiants du département informatique sous la direction de F. Merciol & N. Le Sommer et G. Kerbellec durant l'année 2021-2022 |
@ -0,0 +1,39 @@ |
|||
|
|||
//- |
|||
_________________________________________________________________ |
|||
Page jade correspondant à l'affichage à la page principale |
|||
qui regroupe plusieurs boutons pour pouvoir accéder aux différentes |
|||
pages des quotas |
|||
|
|||
# Auteur : Lauryne GAULTIER |
|||
_________________________________________________________________ |
|||
|
|||
doctype html |
|||
html |
|||
head |
|||
link(href='/stylesheets/style.css' rel='stylesheet' type='text/css') |
|||
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico"> |
|||
title KAZ Quotas ADMIN |
|||
meta(charset='UTF-8') |
|||
body |
|||
#entete |
|||
h1(onclick="window.location.href = 'https://kaz.bzh/'") LE NUMERIQUE ETHIQUE ET LOCAL |
|||
p Ci-dessous se trouve les différente catégorie de quotas |
|||
p Vous Vous trouvez dans la partie ADMINISTRATEUR du service |
|||
#main |
|||
#menu |
|||
img(id="object-position-1" src='/images/quotas.png' width='100%') |
|||
#contenu |
|||
br |
|||
br |
|||
button(onclick="window.location.href = '/admin/serviceg';") Service Global |
|||
br |
|||
button(onclick="window.location.href = '/admin/users';") Individuels |
|||
br |
|||
button(onclick="window.location.href = '/admin/groupes';") Groupes |
|||
br |
|||
br |
|||
button(onclick="window.location.href = '/';") Menu Kaznaute |
|||
br |
|||
#footer |
|||
p Site réalisé par les étudiants du département informatique sous la direction de F. Merciol & N. Le Sommer et G. Kerbellec durant l'année 2021-2022 |
@ -0,0 +1,7 @@ |
|||
doctype html |
|||
html |
|||
head |
|||
title= title |
|||
link(rel='stylesheet', href='/stylesheets/style.css') |
|||
body |
|||
block content |
@ -0,0 +1,34 @@ |
|||
doctype html |
|||
//- |
|||
_________________________________________________________________ |
|||
Page jade correspondant à l'affichage des quotas des differents |
|||
service qu'offre kaz comme : |
|||
-Nexcloud |
|||
-Postfix |
|||
-Agora |
|||
|
|||
Auteur : Lauryne GAULTIER |
|||
_________________________________________________________________ |
|||
|
|||
html |
|||
head |
|||
link(href='/stylesheets/style.css' rel='stylesheet' type='text/css') |
|||
title KAZ Quotas Global |
|||
meta(charset='UTF-8') |
|||
body |
|||
#entete |
|||
h1(onclick="window.location.href = 'https://kaz.bzh/'") Tableau de bord Quotas Global |
|||
p voici les différent service de KAZ avec leur poids respectif |
|||
#main |
|||
#menu |
|||
img(src='/images/serviceglobal.png' width='100%') |
|||
#contenu |
|||
each val,index in data |
|||
tr |
|||
br |
|||
td= index+ ' ' + val |
|||
|
|||
#footer |
|||
button(onclick="window.location.href = '/admin';") Retour |
|||
br |
|||
p Site réalisé par les étudiants du département informatique sous la direction de F. Merciol & N. Le Sommer et G. Kerbellec durant l'année 2021-2022 |
@ -0,0 +1,41 @@ |
|||
doctype html |
|||
//- |
|||
_________________________________________________________________ |
|||
Page jade correspondant à l'affichage des quotas d'un utilisateur |
|||
la page comporte un champ de texte où l'on peut entrer l'email |
|||
d'un utilisateur pour regarder les quotas qu'il utilise on peu |
|||
aussi entrer un nombre entre 1 et 30 pour pouvoir choisir le nombre |
|||
de jour afficher dans le graphe |
|||
|
|||
Auteurs : Lauryne GAULTIER, GUIQUERRO Nathaniel |
|||
_________________________________________________________________ |
|||
|
|||
html |
|||
head |
|||
link(href='/stylesheets/style.css' rel='stylesheet' type='text/css') |
|||
title KAZ Quotas Individuels |
|||
meta(charset='UTF-8') |
|||
body |
|||
#entete |
|||
h1(onclick="window.location.href = 'https://kaz.bzh/'") Tableau de bord Quotas Individuels |
|||
p(id="textAR") rechercher l'email d'un utilisateur pour savoir combien de place il utilise en total dans chaque service |
|||
#main |
|||
#menu |
|||
img(src='/images/individuel.png' width='100%') |
|||
#contenu |
|||
form(action='/users' method='POST') |
|||
label(for='email') Recherche : |
|||
br |
|||
input#champ.textbox(type='email' name='email' required='' placeholder="Email utilisateur") |
|||
br |
|||
label(for='nombreJ') Nombre de Jours à afficher : |
|||
br |
|||
input#champ.textbox(type='number' name='nombreJ' required='' placeholder="1") |
|||
br |
|||
p le nombre de jours doivent être entre 1 et 30 |
|||
br |
|||
input.myButton(id="valide" type='submit' value='Valider') |
|||
#footer |
|||
button(onclick="window.location.href = '/';") Retour |
|||
br |
|||
p Site réalisé par les étudiants du département informatique sous la direction de F. Merciol & N. Le Sommer et G. Kerbellec durant l'année 2021-2022 |
@ -0,0 +1,40 @@ |
|||
doctype html |
|||
//- |
|||
_________________________________________________________________ |
|||
Page jade correspondant à l'affichage des quatas d'un utilisateur |
|||
la page comporte un champs de texte ou l'on peut entrer l'email |
|||
d'un utilisateur pour regarder le quotas qu'il utilise |
|||
|
|||
Auteur : Lauryne GAULTIER |
|||
_________________________________________________________________ |
|||
|
|||
html |
|||
head |
|||
link(href='/stylesheets/style.css' rel='stylesheet' type='text/css') |
|||
title KAZ Quotas Individuels |
|||
meta(charset='UTF-8') |
|||
body |
|||
#entete |
|||
h1(onclick="window.location.href = 'https://kaz.bzh/'") Tableau de bord Quotas Individuels |
|||
p rechercher l'email d'un utilisateur pour savoir combien de place il utilise en total dans chaque service |
|||
#main |
|||
#menu |
|||
img(src='/images/individuel.png' width='100%') |
|||
#contenu |
|||
p L'utilisateur saisie précedamment n'est pas correct ou le nombre de jours n'est pas correcte |
|||
form(action='/users' method='POST') |
|||
label(for='email') Email: |
|||
br |
|||
input#email.textbox(type='email' name='email' required='') |
|||
br |
|||
label(for='nombreJ') Nombre de Jours à afficher : |
|||
br |
|||
input#champ.textbox(type='number' name='nombreJ' required='' placeholder="1") |
|||
br |
|||
p le nombre de jours doivent être entre 1 et 30 |
|||
br |
|||
input.myButton(id="valide" type='submit' value='Valider') |
|||
#footer |
|||
button(onclick="window.location.href = '/';") Retour |
|||
br |
|||
p Site réalisé par les étudiants du département informatique sous la direction de F. Merciol & N. Le Sommer et G. Kerbellec durant l'année 2021-2022 |
@ -0,0 +1,110 @@ |
|||
doctype html |
|||
//- |
|||
_________________________________________________________________ |
|||
Page jade correspondant au résultat de la recherche de |
|||
l'utilisateur, renvoie les quotas actuellement utiliser par |
|||
l'utilisateur via un graphe en forme de camembert où on peut |
|||
trouver la taille des mails, du cloud, mais aussi l'espace libre qui |
|||
reste souvent la limitation de l'utilisateur |
|||
|
|||
il y a aussi un autre graphe qui permet de voir (suit le nombre |
|||
de jour choisi a la page précédente) le total de place utiliser par |
|||
rapport a la limite des jours précédents. |
|||
|
|||
Auteurs : Lauryne GAULTIER, GUIQUERRO Nathaniel |
|||
_________________________________________________________________ |
|||
|
|||
html |
|||
head(ng-app='myApp' ng-controller='myCtrl') |
|||
link(href='/stylesheets/style.css' rel='stylesheet' type='text/css') |
|||
title KAZ Quotas Individuels |
|||
meta(charset='UTF-8') |
|||
#entete |
|||
h1(onclick="window.location.href = 'https://kaz.bzh/'") Résultat de la recherche pour |
|||
h1 #{data.nom} |
|||
#main |
|||
#menu |
|||
img(src='/images/individuel.png' width='100%') |
|||
#contenu |
|||
#gauche |
|||
p(style='display:none') #{data.dataChart} |
|||
p(style='display:none') #{data.labels} |
|||
p(style='display:none') #{data.Lim} |
|||
canvas#myChart(display= 'inline-block' width='500' height='600') |
|||
script(src='https://cdn.jsdelivr.net/npm/chart.js') |
|||
script. |
|||
var dataC = (document.getElementsByTagName('p')[0].innerHTML).split(','); |
|||
var lC = (document.getElementsByTagName('p')[1].innerHTML).split(','); |
|||
var limC = (document.getElementsByTagName('p')[2].innerHTML).split(','); |
|||
|
|||
|
|||
|
|||
var ctx = document.getElementById('myChart').getContext('2d'); |
|||
var myChart = new Chart(ctx, { |
|||
type: 'bar', |
|||
data: { |
|||
datasets: [{ |
|||
label: 'Unité de mesure :MB', |
|||
data: dataC, |
|||
backgroundColor: [ |
|||
'rgba(242, 132, 158, 0.2)' |
|||
], |
|||
borderColor: [ |
|||
'rgba(242, 132, 158, 1)' |
|||
], |
|||
borderWidth: 1 |
|||
}, { |
|||
label: 'Limite quotas', |
|||
data: limC, |
|||
type: 'line', |
|||
borderColor: 'black' |
|||
}], |
|||
labels: lC |
|||
} |
|||
}); |
|||
#droite |
|||
p(style='display:none') #{data.Postfix} |
|||
p(style='display:none') #{data.NextCloud} |
|||
p Votre Quota actuel #{data.Dateduprélevement} |
|||
canvas#myChart2(display='inline-block' height='300') |
|||
script. |
|||
var dPost = (document.getElementsByTagName('p')[3].innerHTML).split(','); |
|||
var dNext = (document.getElementsByTagName('p')[4].innerHTML).split(','); |
|||
var dDate = (document.getElementsByTagName('p')[5].innerHTML).split(','); |
|||
var dLabel = ('Votre Quota actuel' + dDate); |
|||
|
|||
pPost = ((dPost*100)/limC[limC.length - 1]); |
|||
pNetf = ((dNext*100)/limC[limC.length - 1]); |
|||
var pLibre = (100-(pPost+pNetf)); |
|||
|
|||
var tableauDonne = [pPost,pNetf,pLibre]; |
|||
|
|||
|
|||
var ctxy = document.getElementById('myChart2').getContext('2d'); |
|||
var myCharty = new Chart(ctxy, { |
|||
type: 'pie', |
|||
data: { |
|||
datasets: [{ |
|||
label: dLabel, |
|||
data: tableauDonne, |
|||
backgroundColor: [ |
|||
'rgba(255, 99, 132, 0.2)', |
|||
'rgba(54, 162, 235, 0.2)', |
|||
'rgba(255, 206, 86, 0.2)' |
|||
], |
|||
borderColor: [ |
|||
'rgba(255, 99, 132, 1)', |
|||
'rgba(54, 162, 235, 1)', |
|||
'rgba(255, 206, 86, 1)' |
|||
], |
|||
borderWidth: 1, |
|||
hoverOffset: 4 |
|||
}], |
|||
labels: ["Mail","NextCloud","Espace Libre"] |
|||
} |
|||
}); |
|||
#footer |
|||
button(onclick="window.location.href = '/users';") Retour |
|||
br |
|||
p Site réalisé par les étudiants du département informatique sous la direction de F. Merciol & N. Le Sommer et G. Kerbellec durant l'année 2021-2022 |
|||
|
@ -0,0 +1,32 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<link href="style.css" rel="stylesheet" type="text/css"> |
|||
|
|||
|
|||
<title>KAZ : Aperçu</title> |
|||
<meta charset="UTF-8"> |
|||
</head> |
|||
<body> |
|||
<div id="entete"> |
|||
<h1> Tableau de bord Quotas </h1> |
|||
<p> Ci-dessous se trouve ......... </p> |
|||
</div> |
|||
|
|||
<div id="main"> |
|||
<div id="menu"> |
|||
<img src="images/groupe.png" width=200%> |
|||
</div> |
|||
|
|||
<div id="contenu"> |
|||
<button >Association 1 : </button><br> |
|||
<button >Association 2 : </button><br> |
|||
<button >Association 3 : </button><br> |
|||
</div> |
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
<button onclick="window.location.href = 'index.html';">Retour</button><br> |
|||
</div> |
|||
</body> |
|||
</html> |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 35 KiB |
@ -0,0 +1,35 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<link href="style.css" rel="stylesheet" type="text/css"> |
|||
|
|||
|
|||
<title>KAZ : Aperçu</title> |
|||
<meta charset="UTF-8"> |
|||
</head> |
|||
<body> |
|||
<div id="entete"> |
|||
<h1> Le numérique éthique et local </h1> |
|||
<p> Ci-dessous se trouve ......... </p> |
|||
</div> |
|||
|
|||
<div id="main"> |
|||
<div id="menu"> |
|||
<img src="images/quotas.png" width=200% > |
|||
</div> |
|||
|
|||
<div id="contenu"> |
|||
<button onclick="window.location.href = 'serviceG.html';">Service Global</button><br> |
|||
|
|||
<button onclick="window.location.href = 'individuels.html';">Individuels</button><br> |
|||
|
|||
<button onclick="window.location.href = 'groupes.html';">Groupes</button><br> |
|||
</div> |
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
<p> Ci-dessous se trouve ......... </p> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,32 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<link href="style.css" rel="stylesheet" type="text/css"> |
|||
|
|||
|
|||
<title>KAZ : Aperçu</title> |
|||
<meta charset="UTF-8"> |
|||
</head> |
|||
<body> |
|||
<div id="entete"> |
|||
<h1> Tableau de bord Quotas </h1> |
|||
<p> Ci-dessous se trouve ......... </p> |
|||
</div> |
|||
|
|||
<div id="main"> |
|||
<div id="menu"> |
|||
<img src="images/individuel.png" width=200% > |
|||
</div> |
|||
|
|||
<div id="contenu"> |
|||
<button >Personne 1 : </button><br> |
|||
<button >Personne 2 : </button><br> |
|||
<button >Personne 3 : </button><br> |
|||
</div> |
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
<button onclick="window.location.href = 'index.html';">Retour</button><br> |
|||
</div> |
|||
</body> |
|||
</html> |
@ -0,0 +1,167 @@ |
|||
{ |
|||
"name": "kaz.quota", |
|||
"version": "1.0.0", |
|||
"lockfileVersion": 2, |
|||
"requires": true, |
|||
"packages": { |
|||
"": { |
|||
"version": "1.0.0", |
|||
"license": "ISC", |
|||
"dependencies": { |
|||
"express-generator": "^4.16.1" |
|||
} |
|||
}, |
|||
"node_modules/balanced-match": { |
|||
"version": "1.0.2", |
|||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", |
|||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" |
|||
}, |
|||
"node_modules/brace-expansion": { |
|||
"version": "1.1.11", |
|||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", |
|||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", |
|||
"dependencies": { |
|||
"balanced-match": "^1.0.0", |
|||
"concat-map": "0.0.1" |
|||
} |
|||
}, |
|||
"node_modules/commander": { |
|||
"version": "2.15.1", |
|||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", |
|||
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" |
|||
}, |
|||
"node_modules/concat-map": { |
|||
"version": "0.0.1", |
|||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", |
|||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" |
|||
}, |
|||
"node_modules/ejs": { |
|||
"version": "2.6.1", |
|||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", |
|||
"integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", |
|||
"engines": { |
|||
"node": ">=0.10.0" |
|||
} |
|||
}, |
|||
"node_modules/express-generator": { |
|||
"version": "4.16.1", |
|||
"resolved": "https://registry.npmjs.org/express-generator/-/express-generator-4.16.1.tgz", |
|||
"integrity": "sha512-tWYEx5Y/Llos2qC6yAETmdqEMEPqNUzJ8btGcSZ2zSr8RYOalzffhvh9zx5OQTctvOgJ9kKYxyvFGAIuUuF/wA==", |
|||
"dependencies": { |
|||
"commander": "2.15.1", |
|||
"ejs": "2.6.1", |
|||
"minimatch": "3.0.4", |
|||
"mkdirp": "0.5.1", |
|||
"sorted-object": "2.0.1" |
|||
}, |
|||
"bin": { |
|||
"express": "bin/express-cli.js" |
|||
}, |
|||
"engines": { |
|||
"node": ">= 0.10" |
|||
} |
|||
}, |
|||
"node_modules/minimatch": { |
|||
"version": "3.0.4", |
|||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", |
|||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", |
|||
"dependencies": { |
|||
"brace-expansion": "^1.1.7" |
|||
}, |
|||
"engines": { |
|||
"node": "*" |
|||
} |
|||
}, |
|||
"node_modules/minimist": { |
|||
"version": "0.0.8", |
|||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", |
|||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" |
|||
}, |
|||
"node_modules/mkdirp": { |
|||
"version": "0.5.1", |
|||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", |
|||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", |
|||
"deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", |
|||
"dependencies": { |
|||
"minimist": "0.0.8" |
|||
}, |
|||
"bin": { |
|||
"mkdirp": "bin/cmd.js" |
|||
} |
|||
}, |
|||
"node_modules/sorted-object": { |
|||
"version": "2.0.1", |
|||
"resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz", |
|||
"integrity": "sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw=" |
|||
} |
|||
}, |
|||
"dependencies": { |
|||
"balanced-match": { |
|||
"version": "1.0.2", |
|||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", |
|||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" |
|||
}, |
|||
"brace-expansion": { |
|||
"version": "1.1.11", |
|||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", |
|||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", |
|||
"requires": { |
|||
"balanced-match": "^1.0.0", |
|||
"concat-map": "0.0.1" |
|||
} |
|||
}, |
|||
"commander": { |
|||
"version": "2.15.1", |
|||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", |
|||
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" |
|||
}, |
|||
"concat-map": { |
|||
"version": "0.0.1", |
|||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", |
|||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" |
|||
}, |
|||
"ejs": { |
|||
"version": "2.6.1", |
|||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", |
|||
"integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==" |
|||
}, |
|||
"express-generator": { |
|||
"version": "4.16.1", |
|||
"resolved": "https://registry.npmjs.org/express-generator/-/express-generator-4.16.1.tgz", |
|||
"integrity": "sha512-tWYEx5Y/Llos2qC6yAETmdqEMEPqNUzJ8btGcSZ2zSr8RYOalzffhvh9zx5OQTctvOgJ9kKYxyvFGAIuUuF/wA==", |
|||
"requires": { |
|||
"commander": "2.15.1", |
|||
"ejs": "2.6.1", |
|||
"minimatch": "3.0.4", |
|||
"mkdirp": "0.5.1", |
|||
"sorted-object": "2.0.1" |
|||
} |
|||
}, |
|||
"minimatch": { |
|||
"version": "3.0.4", |
|||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", |
|||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", |
|||
"requires": { |
|||
"brace-expansion": "^1.1.7" |
|||
} |
|||
}, |
|||
"minimist": { |
|||
"version": "0.0.8", |
|||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", |
|||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" |
|||
}, |
|||
"mkdirp": { |
|||
"version": "0.5.1", |
|||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", |
|||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", |
|||
"requires": { |
|||
"minimist": "0.0.8" |
|||
} |
|||
}, |
|||
"sorted-object": { |
|||
"version": "2.0.1", |
|||
"resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz", |
|||
"integrity": "sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw=" |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
{ |
|||
"name": "kaz.quota", |
|||
"version": "1.0.0", |
|||
"description": "This is used to print quota on a HTML page", |
|||
"main": "index.js", |
|||
"scripts": { |
|||
"test": "echo \"Error: no test specified\" && exit 1" |
|||
}, |
|||
"author": "GUIQUERRO Nathaniel & GAULTIER Lauryne", |
|||
"license": "ISC", |
|||
"dependencies": { |
|||
"express-generator": "^4.16.1" |
|||
} |
|||
} |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"name": "html", |
|||
"lockfileVersion": 2, |
|||
"requires": true, |
|||
"packages": {} |
|||
} |
@ -0,0 +1 @@ |
|||
{} |
@ -0,0 +1,33 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<link href="style.css" rel="stylesheet" type="text/css"> |
|||
|
|||
|
|||
<title>KAZ : Aperçu</title> |
|||
<meta charset="UTF-8"> |
|||
</head> |
|||
<body> |
|||
<div id="entete"> |
|||
<h1> Tableau de bord Quotas </h1> |
|||
<p> Ci-dessous se trouve ......... </p> |
|||
</div> |
|||
|
|||
<div id="main"> |
|||
<div id="menu"> |
|||
<img src="images/serviceglobal.png" width=200% > |
|||
</div> |
|||
|
|||
<div id="contenu"> |
|||
<button >NextCloud : </button><br> |
|||
<button >Agora : </button><br> |
|||
<button >Postfix : </button><br> |
|||
</div> |
|||
</div> |
|||
|
|||
<div id="footer"> |
|||
<button onclick="window.location.href = 'index.html';">Retour</button><br> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,74 @@ |
|||
|
|||
|
|||
body { |
|||
background-color: #f2f3f1; |
|||
text-align: center; |
|||
} |
|||
|
|||
#entete, #menu, #contenu, #footer { |
|||
padding:1px 0; |
|||
} |
|||
#entete { |
|||
background-color:#FF9900; |
|||
text-align:center; |
|||
} |
|||
#main { |
|||
max-with:960px; |
|||
margin:auto; |
|||
} |
|||
#menu { |
|||
float:left; |
|||
width:240px; |
|||
background-color:#FF3366; |
|||
} |
|||
#contenu { |
|||
margin-left:245px; |
|||
position: absolute; |
|||
top: 50%; |
|||
left: 40%; |
|||
transform: translate(-50%, -50%); |
|||
} |
|||
#footer { |
|||
background-color:#669933; |
|||
text-align:center; |
|||
clear:both; |
|||
} |
|||
|
|||
button { |
|||
display: inline-block; |
|||
background-color: #585858; |
|||
border-radius: 10px; |
|||
border: 4px double #cccccc; |
|||
color: #eeeeee; |
|||
text-align: center; |
|||
font-size: 28px; |
|||
padding: 20px; |
|||
width: 500px; |
|||
transition: all 0.5s; |
|||
cursor: pointer; |
|||
margin: 15px; |
|||
} |
|||
button span { |
|||
cursor: pointer; |
|||
display: inline-block; |
|||
position: relative; |
|||
transition: 0.5s; |
|||
} |
|||
button span:after { |
|||
content: '\00bb'; |
|||
position: absolute; |
|||
opacity: 0; |
|||
top: 0; |
|||
right: -20px; |
|||
transition: 0.5s; |
|||
} |
|||
button:hover { |
|||
background-color: #f2849e |
|||
} |
|||
button:hover span { |
|||
padding-right: 25px; |
|||
} |
|||
button:hover span:after { |
|||
opacity: 1; |
|||
right: 0; |
|||
} |
@ -0,0 +1,28 @@ |
|||
CREATE DATABASE IF NOT EXISTS quotas; |
|||
USE quotas; |
|||
|
|||
CREATE TABLE IF NOT EXISTS Global ( |
|||
date TIMESTAMP PRIMARY KEY, |
|||
total BIGINT, |
|||
agora BIGINT, |
|||
postfix BIGINT, |
|||
nextcloud BIGINT |
|||
); |
|||
|
|||
CREATE TABLE IF NOT EXISTS Utilisateur ( |
|||
date TIMESTAMP, |
|||
utilisateur VARCHAR(50) , |
|||
limite INT, |
|||
total BIGINT, |
|||
postfix BIGINT, |
|||
nextcloud BIGINT |
|||
); |
|||
|
|||
CREATE TABLE IF NOT EXISTS Associations ( |
|||
date TIMESTAMP PRIMARY KEY, |
|||
associations VARCHAR(50), |
|||
total BIGINT, |
|||
agora BIGINT, |
|||
postfix BIGINT, |
|||
nextcloud BIGINT |
|||
); |