-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implement Build breaker * adapt templates/LegalDataReport.vm * Working state * Change filenames and paths * Add tutorial for build-breaker and release note * Fix JSON * Add jq to dictionary to fix spellcheck error * Fix template * Fix documentation * Remove project name from statistics.json * Trim category string * minor improvements of formatting / whitespaces --------- Co-authored-by: Mahmoud Alkam <[email protected]> Co-authored-by: ohecker <[email protected]>
- Loading branch information
1 parent
2fb45d7
commit f935a91
Showing
5 changed files
with
99 additions
and
2 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
11 changes: 11 additions & 0 deletions
11
core/src/main/resources/com/devonfw/tools/solicitor/sql/statistics.sql
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,11 @@ | ||
-- Selects the category "legal-evaluation" and trims any whitespace | ||
SELECT TRIM('legal-evaluation') AS category, NVL(l."legalApproved", 'blank') AS value, COUNT(*) AS count | ||
FROM NormalizedLicense l | ||
GROUP BY NVL(l."legalApproved", 'blank') | ||
|
||
UNION ALL -- Combines the results of this query with the next, including duplicates | ||
|
||
-- Selects the category "data-status" and trims any whitespace | ||
SELECT TRIM('data-status') AS category, ac."dataStatus" AS value, COUNT(*) AS count | ||
FROM ApplicationComponent ac | ||
GROUP BY ac."dataStatus"; |
28 changes: 28 additions & 0 deletions
28
core/src/main/resources/com/devonfw/tools/solicitor/templates/Statistics.vm
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,28 @@ | ||
#set($previousCategory = "") | ||
#set($firstCategory = true) | ||
|
||
## Print JSON Output | ||
{ | ||
"Statistics": { | ||
#foreach($row in $STATISTICS) | ||
#set($currentCategory = $row.CATEGORY) | ||
#if($currentCategory != $previousCategory) | ||
#if(!$firstCategory) | ||
|
||
}, | ||
#end | ||
"$currentCategory": { | ||
#set($previousCategory = $currentCategory) | ||
#set($firstCategory = false) | ||
#else | ||
, | ||
#end | ||
"$row.VALUE": $row.COUNT## | ||
#if($foreach.hasNext) | ||
#else | ||
|
||
} | ||
#end | ||
#end | ||
} | ||
} |
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ fas | |
gradle | ||
http | ||
https | ||
jq | ||
jwt | ||
licenseRefUrl | ||
licenseToIgnoreN | ||
|