generated from dhmmasson/template-webapp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [FIX] Panel size There are too many criteria, so the panel was no longer visible. * [ADD] sortingorder Added ascending and descending types in the sql and in the updateDominance function of technology.mjs * [ADD] sortingorder capacities Allows you to sort the criteria in ascending and descending order (the lower the best and the higher the best) * [FIX] Importance and granularity area the area of choice of importance and granularity is too small for the number of criteria (17) * [FIX] Speed of the platform The speed of execution of the platform between two actions is too slow. * Fix dominance/maxdominance over 1 Fix probleme * [FEATURE] Download button The download button in the mustach menu now allows you to download the sorted data * Bump lodash from 4.17.15 to 4.17.19 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.19) Signed-off-by: dependabot[bot] <[email protected]> * [DOC] Update readme and template env file Give more information to start start working on the project, by fleshing up the readme file, and adding an exemple env file so that someone can start from there * [BUMP] bump to version 1.5 Co-authored-by: Charlotte16 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
bf1d83d
commit 0d27ce0
Showing
16 changed files
with
173 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
NODE_ENV=development | ||
PORT=3005 | ||
mysqlHost=localhost | ||
mysqlUser=user | ||
mysqlPassword=password | ||
mysqlDatabase=databasename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
# Capuchin | ||
|
||
Follow up to the famous Rezbuild-baboon project with an all new UI. | ||
|
||
## install | ||
|
||
1. Clone the project from : https://github.com/dhmmasson/rezbuild-emperor-tamarin.git | ||
1. Create the database and populate the database | ||
1. Create an empty database on mysql | ||
2. Import db/structure_*.sql ( you may have to reorder the elements ) | ||
3. import dataset db/*dataset*.sql | ||
1. rename .env.exemple .env and modify .env file with database information (host, name, user, password) | ||
1. install libraries : npm install | ||
1. test by launching the app : npm start | ||
|
||
## development | ||
|
||
1. install nodemon : npm install nodemon | ||
1. launch the app : | ||
* nodemon ./bin/www.mjs | ||
* Or a better version : | ||
* nodemon -i public/javascripts -e js,pug,mjs,cjs bin/www.mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
const formater = new Intl.DateTimeFormat( "en", | ||
{ year : "2-digit" | ||
, month : "2-digit" | ||
, day : "2-digit" | ||
, hour : "2-digit" | ||
, minute : "2-digit" | ||
, second : "2-digit" | ||
} ) ; | ||
const formatedDate = () => { | ||
const date = formater.formatToParts( new Date() ).reduce( | ||
( acc, e ) => { | ||
acc[ e.type ] = e.value ; | ||
return acc ; | ||
}, {} ) ; | ||
return `${ date.year }${ date.month }${ date.day }_${ date.hour }${ date.minute }${ date.second }` ; | ||
} ; | ||
const paramExportCSV = { | ||
quotes : true // or array of booleans | ||
, quoteChar : "\"" | ||
, escapeChar : "\"" | ||
, delimiter : "," | ||
, header : true | ||
, newline : "\r\n" | ||
, skipEmptyLines : true // or 'greedy', | ||
, columns : null // or array of strings | ||
} ; | ||
|
||
/** | ||
* @class | ||
*/ | ||
export class Downloader { | ||
|
||
|
||
/** | ||
* constructor - description | ||
* | ||
* @param {type} htmlElement htlmRoot element of the button, must contain an anchor element (<a>) | ||
* @return {type} description | ||
*/ | ||
constructor( htmlElement ) { | ||
[ this.anchor ] = $( htmlElement ).find( "a" ) ; | ||
$( htmlElement ).click( event => { | ||
console.log( "click" ) ; | ||
this.saveData() ; | ||
} ) ; | ||
console.log( htmlElement, this.anchor ) ; | ||
} | ||
|
||
// Update the csv to be downloaded | ||
updateCSV( data ) { | ||
if( this.anchor.href ) window.URL.revokeObjectURL( this.anchor.href ) ; | ||
this.csv = Papa.unparse( { fields : [ "name", "description", "score" ] | ||
, data : data.sorted }, paramExportCSV ) ; | ||
const blob = new Blob( [ this.csv ] | ||
, { type: "text/csv" } ) | ||
, url = window.URL.createObjectURL( blob ) ; | ||
this.anchor.href = url ; | ||
} | ||
|
||
saveData() { | ||
this.anchor.download = `data_${ formatedDate() }.csv` ; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,4 @@ ellipse { | |
.dropshadow tspan{ | ||
text-shadow: 1px 1px 0 rgba(255,255,255, 0.3); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
SELECT criteria.name | ||
, min( data.value ) AS min | ||
, max( data.value ) AS max | ||
, description | ||
, criteria.description | ||
, sortingorder_name AS sortingorder | ||
FROM criteria | ||
LEFT JOIN data ON data.criteria_name = criteria.name | ||
WHERE type_name = 'numeric' | ||
GROUP BY criteria.name | ||
JOIN criteria_has_sortingorder ON criteria.name = criteria_has_sortingorder.criteria_name | ||
LEFT JOIN data ON data.criteria_name = criteria.name | ||
WHERE type_name LIKE 'numeric' | ||
GROUP BY criteria.name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.