Skip to content

Commit 8cb38b9

Browse files
CyberSecDefclaude
andcommitted
CCI page: split Assessment Procedure into labeled 800-53A / DoD AP lines
The Assessment Procedure column rendered the 800-53A reference inline and hid the DoD AP acronym in a hover-only title tooltip (unreachable on touch, and easy to miss on desktop). Surface both as stacked, labeled lines: 800-53A: AC-1.1 (i and ii) DoD AP: AC-1.3 - apCell now emits an "800-53A:" line for a true version-1 reference (or the control-ref fallback + "from Rev N" badge when there's no 800-53A ref), and a second "DoD AP:" line whenever the CCI carries a DoD assessment procedure (1,116 rows show both; 1,796 fallback rows still get the DoD AP line). - Removed the now-redundant whole-cell DoD-AP title tooltip. - Exports keep up: Excel ('export' orthogonal) emits clean labeled text, and sort/filter now also match the DoD AP value so the column is searchable by either identifier. - Muted .ap-label styling keeps the identifiers themselves prominent. No controller/JSON change (ap_acronym was already in the row data); CciControllerTest stays green (3 tests). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5b8ac5d commit 8cb38b9

1 file changed

Lines changed: 32 additions & 10 deletions

File tree

cyber.trackr.live/templates/cci/index.html.twig

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
padding: .5rem .625rem; border-radius: 6px;
2828
font-size: .8rem; line-height: 1.35; box-shadow: 0 4px 14px rgba(0,0,0,.28);
2929
}
30+
/* Assessment Procedure cell: one labeled line per source — the 800-53A
31+
reference and (when present) the DoD AP acronym, stacked. */
32+
#ccis .ap-line { display: block; }
33+
#ccis .ap-line + .ap-line { margin-top: .3rem; }
34+
#ccis .ap-label { color: #8a8f98; font-size: .78rem; font-weight: 600; margin-right: .2rem; }
3035
</style>
3136
<section class="lib-page" aria-labelledby="cci-page-title">
3237
<div class="rule-text">&sect; Library &middot; CCIs</div>
@@ -102,18 +107,35 @@
102107
if (type !== 'display') return data || '';
103108
return (data && String(data).trim() !== '') ? esc(data) : na(NOTE_DOD);
104109
}
105-
// Assessment Procedure: full 800-53A ref(s) when present, else the control-ref
106-
// fallback (Rev 5 -> 4 -> 3) flagged with a "from Rev N" badge. The DoD AP acronym
107-
// (when known) rides along as a tooltip for cross-reference.
110+
// Assessment Procedure: a labeled line for the 800-53A reference(s) — or the
111+
// control-ref fallback (Rev 5 -> 4 -> 3) flagged with a "from Rev N" badge — and,
112+
// when the CCI carries a DoD assessment procedure, a second "DoD AP:" line below it.
108113
function apCell(data, type, row){
109114
const a = row.assessment || [];
110-
if (type !== 'display') return a.join(', ');
111-
if (!a.length) return na(NOTE_AP);
112-
let h = a.map(pill).join(' ');
113-
const label = { '5': 'from Rev 5', '4': 'from Rev 4', '3': 'from Rev 3' }[row.assessment_src];
114-
if (label) h += ' ' + pill(label);
115-
if (row.ap_acronym) h = '<span title="DoD AP acronym: ' + esc(row.ap_acronym) + '">' + h + '</span>';
116-
return h;
115+
// Excel export (orthogonal 'export'): clean labeled text, one item per line.
116+
if (type === 'export') {
117+
const parts = [];
118+
if (a.length) parts.push((row.assessment_src === '1' ? '800-53A: ' : '') + a.join(', '));
119+
if (row.ap_acronym) parts.push('DoD AP: ' + row.ap_acronym);
120+
return parts.join('\n');
121+
}
122+
// Sort/filter/type: refs plus the DoD AP so the column stays searchable by both.
123+
if (type !== 'display') return a.join(', ') + (row.ap_acronym ? ' ' + row.ap_acronym : '');
124+
const lines = [];
125+
if (a.length) {
126+
const refs = a.map(pill).join(' ');
127+
if (row.assessment_src === '1') {
128+
lines.push('<span class="ap-label">800-53A:</span>' + refs);
129+
} else {
130+
const label = { '5': 'from Rev 5', '4': 'from Rev 4', '3': 'from Rev 3' }[row.assessment_src];
131+
lines.push(refs + (label ? ' ' + pill(label) : ''));
132+
}
133+
}
134+
if (row.ap_acronym) {
135+
lines.push('<span class="ap-label">DoD AP:</span>' + pill(row.ap_acronym));
136+
}
137+
if (!lines.length) return na(NOTE_AP);
138+
return lines.map(l => '<span class="ap-line">' + l + '</span>').join('');
117139
}
118140
119141
const cci_app = {

0 commit comments

Comments
 (0)