Skip to content

Commit

Permalink
Added CCIs column to STIG Library (#1072)
Browse files Browse the repository at this point in the history
* Added CCIs column to STIG Library

* set cci column sortable=false
  • Loading branch information
cd-rite authored Aug 23, 2023
1 parent 197aa8e commit 1cbd538
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion client/src/js/SM/Library.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ SM.Library.ChecklistGrid = Ext.extend(Ext.grid.GridPanel, {
{
name: 'discussion',
mapping: 'detail.vulnDiscussion'
},
{
name: 'ccis'
}
]
const exportBtn = new Ext.ux.ExportButton({
Expand Down Expand Up @@ -161,6 +164,17 @@ SM.Library.ChecklistGrid = Ext.extend(Ext.grid.GridPanel, {
renderer: columnWrap,
sortable: true,
filter: { type: 'string' }
},
{
header: "CCIs",
width: 100,
dataIndex: 'ccis',
renderer: function (v) {
v = v.map(v => v.cci).join('\n')
return columnWrap.apply(this, arguments)
},
sortable: false,
filter: { type: 'string' }
}
]
const view = new SM.ColumnFilters.GridView({
Expand Down Expand Up @@ -218,7 +232,7 @@ SM.Library.ChecklistGrid = Ext.extend(Ext.grid.GridPanel, {
url: `${STIGMAN.Env.apiBase}/stigs/${benchmarkId}/revisions/${revisionStr}/rules`,
method: 'GET',
params: {
projection: ['check', 'fix', 'detail']
projection: ['check', 'fix', 'detail', 'ccis']
}
})
return JSON.parse(result.response.responseText)
Expand Down

0 comments on commit 1cbd538

Please sign in to comment.