Skip to content
Snippets Groups Projects
Commit a9eb4450 authored by Marco Malavolti's avatar Marco Malavolti
Browse files

Aligned repo for eduGAIN Technical site

parent 6348605a
Branches
Tags
No related merge requests found
......@@ -5,6 +5,7 @@ eccs2.pid
chromedriver
python*
eccs2.ini
eccs2.conf
eccs2.service
eccs2properties.py
clean7daysOldFiles.sh
......
......@@ -272,6 +272,15 @@ After the initial download, it is recommended that you occasionally go through t
* `sudo chgrp apache $HOME ; sudo apache g+rx $HOME` (Apache needs permission to access the $HOME dir)
* `sudo systemctl restart httpd.service`
3. Restart API WSGI server each day to update the datetime:
* `crontab -e`
```bash
SHELL=/bin/bash
0 3 * * * /usr/bin/touch $HOME/eccs2/eccs2.ini
```
## Utility
To perform a restart after an API change use the following command:
......@@ -303,7 +312,7 @@ To clean the ECCS2 results from files older than last 7 days use (modify it on y
```bash
SHELL=/bin/bash
0 5 * * * /bin/bash $HOME/eccs2/clean7daysOldFiles.sh > $HOME/eccs2/logs/clean7daysOldFiles.log 2>&1
0 10 * * * /bin/bash $HOME/eccs2/clean7daysOldFiles.sh > $HOME/eccs2/logs/clean7daysOldFiles.log 2>&1
```
# Utility for developers
......
#!/bin/bash
BASEDIR=/var/www/html/eccs2
BASEDIR=$HOME/eccs2
# Remove ECCS2 result older than 7 days
find $BASEDIR/output/* -mtime +6 -type f -delete
......
......@@ -26,7 +26,7 @@ logto = logs/%(project)uwsgi.log
log-maxsize = 100000000
log-backupname = logs/%(project)uwsgi.old.log
# Ogni 1000 request riavvia i workers
# Each 1000 request restart workers
max-requests = 1000
# respawn processes taking more than takes more then ... seconds
......
......@@ -13,7 +13,6 @@ RuntimeDirectory=/home/<USER>/eccs2
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
StandardError=inherit
NotifyAccess=all
#Environment="PATH=/home/<USER>/eccs2/eccs2venv/bin"
ExecStart=/home/<USER>/eccs2/eccs2venv/bin/uwsgi --ini /home/<USER>/eccs2/eccs2.ini
import os
from datetime import date
DAY = date.today().isoformat()
ECCS2DIR = "/var/www/html/eccs2"
PATHCHROMEDRIVER = "/var/www/html/eccs2/chromedriver"
ECCS2PYTHON = "/var/www/html/eccs2/python/bin/python3"
ECCS2DIR = "%s/eccs2" % os.environ['HOME']
PATHCHROMEDRIVER = "%s/chromedriver" % ECCS2DIR
ECCS2PYTHON = "%s/python/bin/python3" % ECCS2DIR
# Input
ECCS2INPUTDIR = "%s/input" % ECCS2DIR
......
web/details_close_blue.png

9.31 KiB

web/details_close_transparent.png

570 B

File added
web/details_open_blue.png

1.07 KiB

web/details_open_transparent.png

600 B

td.details-control {
background: url('../images/details_open.png') no-repeat center center;
cursor: pointer;
}
tr.shown td.details-control {
background: url('../images/details_close.png') no-repeat center center;
}
#inner-table {
padding-left:40px;
background-color:white;
}
#inner-table tr td{
border: 0;
}
table {
color: black;
}
.eccs-central {
padding-left: 10px;
padding-right: 10px;
}
.strong {
font-weight: bold;
}
button#goButton {
float:right;
padding-right: 10px;
padding-left: 10px;
padding-bottom: 2px;
padding-top: 2px;
margin-left: 5px;
position: relative;
top: -3px;
}
input#myDate {
float:right;
position: relative;
top: -3px;
}
......@@ -65,13 +65,31 @@ function getPastResults() {
}
$(document).ready(function() {
// Setup - add a text input to each footer cell
$('#eccstable thead tr').clone(true).appendTo( '#eccstable thead' );
$('#eccstable thead tr:not(:eq(1)) th').each( function (i) {
var title = $('#eccstable thead th').eq( $(this).index() ).text();
if($(this).index() !=0 && $(this).index() !=5) $(this).html( '<input type="text" placeholder="Search '+title+'" style="text-align:center;width: 100%;" />' );
$( 'input', this ).on( 'keyup change', function () {
if ( table.column(i).search() !== this.value ) {
table
.column(i)
.search( this.value )
.draw();
}
} );
} );
table = $('#eccstable').DataTable( {
"responsive": "true",
"ajax": {
"url": url,
"dataSrc": ""
},
"lengthMenu": [[10, 20, 30, 40, 50, 100, -1], [10, 20, 30, 40, 50, 100, "All"]],
"autoWidth": false,
"dom": '<"top"lip>rt<"bottom"><"clear">',
"columns": [
{
"className": 'details-control',
......@@ -92,18 +110,24 @@ $(document).ready(function() {
},
{
"data": "status",
"className": "dt-body-center"
"className": "dt-body-center",
"visible": false
}
],
"rowCallback": function( row, data, index ) {
if (data.status == "ERROR") {
$('td', row).css('background-color', '#EA4335');
//$('td', row).css('background-color', '#EA4335'); // NEW ECCS2
$('td', row).css('background-color', '#EA3D3F'); // OLD ECCS
//$('td', row).css('background-color', '#FF0000');
//$('td', row).css('background-color', '#F22422');
}
if (data.status == "DISABLED") {
$('td', row).css('background-color', '#FFFFFF');
}
if (data.status == "OK") {
$('td', row).css('background-color', '#34A853');
//$('td', row).css('background-color', '#34A853');
//$('td', row).css('background-color', '#00CE00'); // NEW ECCS2
$('td', row).css('background-color', '#72F81B'); // OLD ECCS
}
},
"order": [[1, 'asc']]
......
td.details-control {
background: url('./details_open.png') no-repeat center center;
cursor: pointer;
}
tr.shown td.details-control {
background: url('./details_close.png') no-repeat center center;
}
#inner-table {
padding-left:40px;
background-color:white;
}
#inner-table tr td{
border: 0;
}
.strong {
font-weight: bold;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment