Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCAT Catalog Check
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
DCAT Catalog Check
Compare revisions
b072c06654ae08e77853d3e6a0291cd2a5f9412f to 72c583686ef1166c5dc2214bc9d200761318752b
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
opendata/dcat-catalog-check
Select target project
No results found
72c583686ef1166c5dc2214bc9d200761318752b
Select Git revision
Swap
Target
opendata/dcat-catalog-check
Select target project
opendata/dcat-catalog-check
1 result
b072c06654ae08e77853d3e6a0291cd2a5f9412f
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/generate_report.py
+45
-6
45 additions, 6 deletions
tools/generate_report.py
with
45 additions
and
6 deletions
tools/generate_report.py
View file @
72c58368
...
...
@@ -11,14 +11,14 @@ def write_diagram(id, title, counter, counter_publisher):
print
(
f
"
<h2>
{
title
}
</h2>
"
)
print
(
f
"
<div id=
'
vis
{
id
}
'
style=
'
max-width: 400px;
'
></div>
"
)
print
(
'
<script type=
"
text/javascript
"
>
'
)
print
(
f
"
new ApexCharts(document.querySelector(
'
#vis
{
id
}
'
),
"
)
print
(
"
{ chart: { type:
'
donut
'
},
"
)
print
(
f
"
series: [
{
counter
[
True
]
}
,
{
counter
[
False
]
}
,
{
counter
[
None
]
}
],
"
)
print
(
"
labels: [
'
korrekt
'
,
'
fehlerhaft
'
,
'
nicht geprüft
'
],
"
)
print
(
'
colors: [
"
#1eae9c
"
,
"
#d4004b
"
,
"
#a4adb6
"
]
'
)
print
(
"
}).render();
"
)
print
(
"
</script>
"
)
print
(
"
<h3>Publishers affected</h3>
"
)
...
...
@@ -88,7 +88,9 @@ print("<html>")
print
(
"
<head>
"
)
print
(
"
<title>DCAT Catalog Check</title>
"
)
print
(
'
<script src=
"
https://cdn.jsdelivr.net/npm/apexcharts
"
></script>
'
)
print
(
'
<link rel=
"
stylesheet
"
href=
"
https://cdn.datatables.net/2.1.8/css/dataTables.dataTables.css
"
/>
'
)
print
(
'
<link rel=
"
stylesheet
"
href=
"
https://cdn.datatables.net/2.1.8/css/dataTables.dataTables.css
"
/>
'
)
print
(
'
<script src=
"
https://code.jquery.com/jquery-3.7.1.min.js
"
></script>
'
)
print
(
'
<script src=
"
https://cdn.datatables.net/2.1.8/js/dataTables.js
"
></script>
'
)
print
(
"
</head>
"
)
...
...
@@ -113,17 +115,54 @@ print("<div>")
print
(
"
<h2>Distributionen with errors</h2>
"
)
print
(
'
<table class=
"
table
"
id=
"
distributions
"
>
'
)
print
(
"
<thead><tr><th>Publisher</th><th>Format</th><th>available</th><th>content correct</th><th>MIME type wrong</th><th>MIME type</th><th>checksum correct</th><th>schema valid</th><th>URL</th></tr></thead>
"
)
print
(
"
<thead><tr><th>Publisher</th><th>Format</th><th>accessible</th><th>HTTP status</th><th>content correct</th><th>MIME type wrong</th><th>MIME type</th><th>checksum correct</th><th>schema valid</th><th>URL</th><th>Error message</th></tr>
"
)
print
(
"
<tr>
"
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by publisher
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by format
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by accessibility
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by HTTP status
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by correct content
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by MIME type error
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by MIME type
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by checksum
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by schema valid
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by url
"
/></th>
'
)
print
(
'
<th><input type=
"
text
"
placeholder=
"
Filter by error message
"
/></th>
'
)
print
(
"
</tr>
"
)
print
(
"
</thead>
"
)
print
(
"
<tbody>
"
)
for
dist
in
distributions_with_problems
:
entry
=
distributions_with_problems
[
dist
]
print
(
f
"
<tr><td>
{
entry
.
get
(
'
publisher
'
)
}
</td><td>
{
entry
.
get
(
'
format
'
)
}
</td><td>
{
entry
.
get
(
'
http_status
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
valid
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
mimetype_mismatch
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
mimetype
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
checksum_ok
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
schema_valid
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
url
'
)
}
</td></tr>
"
)
print
(
f
"
<tr><td>
{
entry
.
get
(
'
publisher
'
)
}
</td><td>
{
entry
.
get
(
'
format
'
)
}
</td><td>
{
entry
.
get
(
'
accessible
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
http_status
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
valid
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
mimetype_mismatch
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
mimetype
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
checksum_ok
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
schema_valid
'
,
''
)
}
</td><td>
{
entry
.
get
(
'
url
'
)
}
</td><td>
{
entry
.
get
(
'
error
'
)
}
</td></tr>
"
)
print
(
"
</tbody></table>
"
)
print
(
"
</div>
"
)
print
(
"
<script>let table = new DataTable(
'
#distributions
'
);</script>
"
)
print
(
"""
<script>
$(document).ready(function() {
var table = $(
'
#distributions
'
).DataTable();
table.columns().every(function() {
var that = this;
$(
'
input
'
, this.header()).on(
'
keyup change
'
, function() {
if (that.search() !== this.value) {
that
.search(this.value)
.draw();
}
});
});
});
</script>
"""
)
print
(
"
</body></html>
"
)
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
Next