Skip to content

Commit

Permalink
Connect logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Dec 26, 2021
1 parent 3cab637 commit c6031fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/system/footer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { addFooterTitles } from '../../report/normalize/titles_add.js'
import { omitFooterProps } from '../omit.js'

import { serializeFooter } from './serialize.js'
import { addSharedSystem } from './shared.js'
import { addSharedSystems } from './shared/main.js'

// Add each `reporter.footer`
// TODO:
Expand Down Expand Up @@ -32,7 +32,7 @@ export const addFooter = function ({
const footer = { id, timestamp, systems }
const footerA = addFooterTitles(footer, titles, showTitles)
const footerB = omitFooterProps(footerA, showMetadata, showSystem)
const footerC = addSharedSystem(footerB)
const footerC = addSharedSystems(footerB)
const footerD = serializeFooter(footerC)
const { footerParams, footerString } = applyFooterFormat(footerD, format)
return { ...reporter, footerParams, footerString }
Expand Down
10 changes: 5 additions & 5 deletions src/system/footer/shared/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { addTopSystem } from './top.js'
// Split `systems` into several so that:
// - Shared properties are shown under the same system titles
// - As few systems as possible are shown
export const addSharedSystems = function (systems) {
const propEntries = listPropEntries(systems)
export const addSharedSystems = function (footer) {
const propEntries = listPropEntries(footer.systems)
const propGroups = getPropGroups(propEntries)
const propGroupsA = simplifyPropGroups(propGroups, systems)
const propGroupsA = simplifyPropGroups(propGroups, footer.systems)
const propGroupsB = addTopSystem(propGroupsA)
const systemsA = finalizeSystems(propGroupsB)
return systemsA
const systems = finalizeSystems(propGroupsB)
return { ...footer, systems }
}

// Transform `propGroups` back to `systems`
Expand Down

0 comments on commit c6031fa

Please sign in to comment.