Skip to content

Commit

Permalink
Merge pull request devsecopsmaturitymodel#326 from 0x41head/teams-evi…
Browse files Browse the repository at this point in the history
…dence-on-excel

added teamsEvidence to excel
  • Loading branch information
wurstbrot authored Sep 17, 2024
2 parents 62f20a9 + e986d0a commit 6a7244b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 46 deletions.
84 changes: 43 additions & 41 deletions src/app/component/mapping/mapping.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,114 +164,116 @@
<th>Usefulness</th>
<th>Implementation</th>
<th>Assessment</th>
<th>Evidence</th>
<th>Comments</th>
<th>Depends On</th>
<th>SAMM</th>
<th>ISO 27001:2017</th>
<th>ISO 27001:2022</th>
<th *ngFor="let team of allTeams">
{{ team }}
{{ team + '- Implemented' }}
</th>
<th *ngFor="let team of allTeams">
{{ team + '- Evidence' }}
</th>
</tr>
<tr *ngFor="let item of allMappingDataSortedByISO17">
<!-- checking if item is defined and set & truncating at 32767 characters per cell to fit to excel limitations-->
<td>
<ng-container *ngIf="item.dimension && item.dimension.length > 0">
{{ item.dimension | slice : 0 : 32767 }}</ng-container
>
{{ item.dimension | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.subDimension && item.subDimension.length > 0">
{{ item.subDimension | slice : 0 : 32767 }}</ng-container
>
{{ item.subDimension | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.activityName && item.activityName.length > 0">
{{ item.activityName | slice : 0 : 32767 }}</ng-container
>
{{ item.activityName | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.description && item.description.length > 0">
{{ item.description | slice : 0 : 32767 }}</ng-container
>
{{ item.description | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.risk && item.risk.length > 0">
{{ item.risk | slice : 0 : 32767 }}</ng-container
>
{{ item.risk | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.measure && item.measure.length > 0">
{{ item.measure | slice : 0 : 32767 }}</ng-container
>
{{ item.measure | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.knowledge && item.knowledge.length > 0">
{{ item.knowledge | slice : 0 : 32767 }}</ng-container
>
{{ item.knowledge | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.resources && item.resources.length > 0">
{{ item.resources | slice : 0 : 32767 }}</ng-container
>
{{ item.resources | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.time && item.time.length > 0">
{{ item.time | slice : 0 : 32767 }}</ng-container
>
{{ item.time | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.usefulness && item.usefulness.length > 0">
{{ item.usefulness | slice : 0 : 32767 }}</ng-container
>
{{ item.usefulness | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container
*ngIf="item.implementation && item.implementation.length > 0">
{{ item.implementation | slice : 0 : 32767 }}</ng-container
>
{{ item.implementation | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.assessment && item.assessment.length > 0">
{{ item.assessment | slice : 0 : 32767 }}</ng-container
>
</td>
<td>
<ng-container *ngIf="item.evidence && item.evidence.length > 0">
{{ item.evidence | slice : 0 : 32767 }}</ng-container
>
{{ item.assessment | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.comments && item.comments.length > 0">
{{ item.comments | slice : 0 : 32767 }}</ng-container
>
{{ item.comments | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.dependsOn && item.dependsOn.length > 0">
{{ item.dependsOn | slice : 0 : 32767 }}</ng-container
>
{{ item.dependsOn | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.samm2 && item.samm2.length > 0">
{{ item.samm2 | slice : 0 : 32767 }}</ng-container
>
{{ item.samm2 | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.ISO17 && item.ISO17.length > 0">
{{ item.ISO17 | slice : 0 : 32767 }}</ng-container
>
{{ item.ISO17 | slice : 0 : 32767 }}
</ng-container>
</td>
<td>
<ng-container *ngIf="item.ISO22 && item.ISO22.length > 0">
{{ item.ISO22 | slice : 0 : 32767 }}</ng-container
>
{{ item.ISO22 | slice : 0 : 32767 }}
</ng-container>
</td>
<td *ngFor="let key of allTeams">
<ng-container>
{{ item.teamImplementation[key] }}
</ng-container>
</td>
<td *ngFor="let key of allTeams">
<ng-container *ngIf="item.teamsEvidence">
{{ item.teamsEvidence[key] }}
</ng-container>
</td>
</tr>
</table>
</div>
12 changes: 7 additions & 5 deletions src/app/component/mapping/mapping.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ export interface MappingElementSortedByISO17 {
time: string;
usefulness: string;
dependsOn: string[];
evidence: string;
comments: string;
assessment: string;
implementation: any;
teamImplementation: {
[key: string]: boolean;
};
teamsEvidence: {
[key: string]: string;
};
}

export interface MappingElementSortedByISO22 {
Expand Down Expand Up @@ -317,9 +319,6 @@ export class MappingComponent implements OnInit {
var CurrentUsefulness: string =
this.generalLabels[this.YamlObject[dim][subDim][activity]['usefulness']];

var CurrentEvidence: string =
this.YamlObject[dim][subDim][activity]['evidence'];

var CurrentComments: string =
this.YamlObject[dim][subDim][activity]['comments'];

Expand All @@ -343,6 +342,9 @@ export class MappingComponent implements OnInit {
var CurrentTeamsAndImplementation =
this.YamlObject[dim][subDim][activity]['teamsImplemented'];

var CurrentTeamsEvidence =
this.YamlObject[dim][subDim][activity]['teamsEvidence'];

this.temporaryMappingElement = {
dimension: dim,
subDimension: subDim,
Expand All @@ -359,10 +361,10 @@ export class MappingComponent implements OnInit {
usefulness: CurrentUsefulness,
dependsOn: CurrentDependsOn,
implementation: CurrentImplementation,
evidence: CurrentEvidence,
comments: CurrentComments,
assessment: CurrentAssessment,
teamImplementation: CurrentTeamsAndImplementation,
teamsEvidence: CurrentTeamsEvidence,
};

console.log(this.temporaryMappingElement);
Expand Down

0 comments on commit 6a7244b

Please sign in to comment.