Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 0aacda76 authored by Antoine Blanquet's avatar Antoine Blanquet
Browse files

Bug Fixing url link when taking picture with sparkline (with Paul)

parent fd381509
const webshot = require('webshot');
webshot('file:./data/generated_files/.gateways.html',
var link = "file://" + process.cwd() + "/data/generated_files/.gateways.html"
webshot(link,
'data/images/sparkline_report.png', function(err) {
if (!err) {
console.log("Screenshot taken!")
......@@ -8,3 +10,4 @@ webshot('file:./data/generated_files/.gateways.html',
console.log("Bug when generating screeenshot with Sparkline")
}
});
......@@ -94,18 +94,12 @@ if ! [ -x "$(command -v phantomjs)" ]; then
sudo apt-get install -y phantomjs
fi
package='graceful-js'
package='graceful-fs'
if [ `npm list -g | grep -c $package` -eq 0 ]; then
echo 'graceful-js is not installed. Installing graceful-js ...'
echo 'graceful-fs is not installed. Installing graceful-fs ...'
npm install "webshot"
npm install $package
fi
package='graceful-js'
if [ `npm list -g | grep -c $package` -eq 0 ]; then
echo 'graceful-js is not installed. Installing graceful-js ...'
npm install $package
fi
# Generate an image of the page html with sparkline
node generate_sparkline_image.js
......@@ -11,8 +11,6 @@
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# crontab entry
# TODO /bin/bash
......
......@@ -6,9 +6,7 @@
# Usage: runned by get_devices.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# Milestone: Version 2021
# -------------------------------------------------
DATA_HTML_FOLDER="data/generated_files/"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment