Only exclude themes if they are not the only theme
This commit is contained in:
parent
e8c9b26e08
commit
adbef2e90a
1 changed files with 4 additions and 1 deletions
|
@ -119,16 +119,19 @@ class StatisticsForOverviewFile extends Combine {
|
||||||
"link-image",
|
"link-image",
|
||||||
"soft-delete"]
|
"soft-delete"]
|
||||||
|
|
||||||
|
const allThemes = Utils.Dedup(overview._meta.map(f => f.properties.theme))
|
||||||
|
|
||||||
const excludedThemes = new Set<string>()
|
const excludedThemes = new Set<string>()
|
||||||
|
if(allThemes.length > 1){
|
||||||
excludedThemes.add("grb")
|
excludedThemes.add("grb")
|
||||||
excludedThemes.add("etymology")
|
excludedThemes.add("etymology")
|
||||||
|
}
|
||||||
const summedValues = valuesToSum
|
const summedValues = valuesToSum
|
||||||
.map(key => [key, overview.sum(key, excludedThemes)])
|
.map(key => [key, overview.sum(key, excludedThemes)])
|
||||||
.filter(kv => kv[1] != 0)
|
.filter(kv => kv[1] != 0)
|
||||||
.map(kv => kv.join(": "))
|
.map(kv => kv.join(": "))
|
||||||
const elements: BaseUIElement[] = [
|
const elements: BaseUIElement[] = [
|
||||||
new Title("General statistics (excluding etymology- and GRB-theme changes)"),
|
new Title(allThemes .length === 1 ? "General statistics for "+allThemes[0] :"General statistics (excluding etymology- and GRB-theme changes)"),
|
||||||
new Combine([
|
new Combine([
|
||||||
overview._meta.length + " changesets match the filters",
|
overview._meta.length + " changesets match the filters",
|
||||||
new List(summedValues)
|
new List(summedValues)
|
||||||
|
|
Loading…
Reference in a new issue