Fix bug related to showing all participants
This commit is contained in:
parent
25135cc7d9
commit
fac3fe1b34
@ -26,7 +26,9 @@ def main():
|
||||
port=cli.getPort()
|
||||
)
|
||||
else:
|
||||
combinedData = batchWorker.run()
|
||||
combinedData = batchWorker.run(
|
||||
removeFilteredParicipants=not cli.showAllParticipants()
|
||||
)
|
||||
|
||||
consoleOutputtter = solo_turnier.output.ConsoleOutputter()
|
||||
consoleOutputtter.output(combinedData)
|
||||
|
@ -29,7 +29,6 @@ class BatchWorker:
|
||||
importedData = worker.collectAllData(htmlCandidatesPreview, htmlResultFiles)
|
||||
combinedData = worker.combineData(importedData)
|
||||
|
||||
if not self.config.showAllParticipants():
|
||||
worker.filterOutFinalists(combinedData, removeFilteredParicipants)
|
||||
|
||||
return combinedData
|
||||
|
@ -4,7 +4,8 @@ import solo_turnier
|
||||
def startFlask(
|
||||
batchWorker: solo_turnier.batch.BatchWorker,
|
||||
debug: bool = False,
|
||||
port: int = 8082
|
||||
port: int = 8082,
|
||||
showOnlyFinalists: bool = True
|
||||
):
|
||||
app = flask.Flask(__name__)
|
||||
|
||||
@ -14,4 +15,12 @@ def startFlask(
|
||||
|
||||
return flask.render_template('index.html', data=combinedData)
|
||||
|
||||
@app.get('/custom.css')
|
||||
def css():
|
||||
ret = flask.render_template(
|
||||
'custom.css',
|
||||
onlyFinalists=showOnlyFinalists
|
||||
)
|
||||
return flask.Response(ret, mimetype='text/css')
|
||||
|
||||
app.run(host='0.0.0.0', port=port, debug=debug)
|
||||
|
5
src/solo_turnier/templates/custom.css
Normal file
5
src/solo_turnier/templates/custom.css
Normal file
@ -0,0 +1,5 @@
|
||||
{% if onlyFinalists %}
|
||||
.no-finalist {
|
||||
display: none;
|
||||
}
|
||||
{% endif %}
|
@ -6,6 +6,7 @@
|
||||
{# <meta name="description" content="Webpage for xxxx"> #}
|
||||
<!-- http://meyerweb.com/eric/tools/css/reset/ -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
<link rel="stylesheet" href="/custom.css">
|
||||
</head>
|
||||
<body>
|
||||
{# <h1>Finalauswertung Solo-Turniere</h1> #}
|
||||
|
Loading…
Reference in New Issue
Block a user