Skip to content

Commit 1debbff

Browse files
committed
feat: add openCRE
1 parent e3eefee commit 1debbff

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

src/app/component/activity-description/activity-description.component.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,20 @@ <h1>
183183
<li>{{ iso22 }}</li>
184184
</ul>
185185
</mat-expansion-panel>
186+
<mat-expansion-panel>
187+
<mat-expansion-panel-header>
188+
<mat-panel-title>
189+
<b>{{ openCREVersion }}</b>
190+
</mat-panel-title>
191+
</mat-expansion-panel-header>
192+
<ul *ngFor="let openCRE of currentActivity.openCRE">
193+
<li>
194+
<a target="_blank" href="{{ openCRE }}">
195+
<div [innerHTML]="currentActivity.uuid"></div>
196+
</a>
197+
</li>
198+
</ul>
199+
</mat-expansion-panel>
186200
</mat-accordion>
187201
</p>
188202
</mat-expansion-panel>

src/app/component/activity-description/activity-description.component.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ describe('ActivityDescriptionComponent', () => {
128128
const testSAMM = [' Sample SAMM '];
129129
const testISO = [' Sample ISO'];
130130
const testISO22 = [' Sample ISO22'];
131+
const testOpenCRE = [' Sample openCRE'];
131132
component.currentActivity.samm = testSAMM;
132133
component.currentActivity.iso = testISO;
133134
component.currentActivity.iso22 = testISO22;
135+
component.currentActivity.openCRE = testOpenCRE;
134136
fixture.detectChanges();
135137
const HTMLElement: HTMLElement = fixture.nativeElement;
136138
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
@@ -140,7 +142,9 @@ describe('ActivityDescriptionComponent', () => {
140142
component.ISOVersion +
141143
testISO[0] +
142144
component.ISO22Version +
143-
testISO22[0]
145+
testISO22[0] +
146+
component.openCRE +
147+
testOpenCRE[0]
144148
);
145149
});
146150
});

src/app/component/activity-description/activity-description.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export interface activityDescription {
2424
iso: string[];
2525
iso22: string[];
2626
samm: string[];
27+
openCRE: string[];
2728
knowledge: number;
2829
resources: number;
2930
time: number;
@@ -57,6 +58,7 @@ export class ActivityDescriptionComponent implements OnInit {
5758
samm: [''],
5859
iso: [''],
5960
iso22: [''],
61+
openCRE: [''],
6062
knowledge: -1,
6163
resources: -1,
6264
time: -1,
@@ -78,6 +80,7 @@ export class ActivityDescriptionComponent implements OnInit {
7880
SAMMVersion: string = 'OWASP SAMM VERSION 2';
7981
ISOVersion: string = 'ISO 27001:2017';
8082
ISO22Version: string = 'ISO 27001:2022';
83+
openCREVersion: string = 'OpenCRE';
8184
@ViewChildren(MatAccordion) accordion!: QueryList<MatAccordion>;
8285
constructor(private route: ActivatedRoute, private yaml: ymlService) {}
8386

@@ -170,6 +173,10 @@ export class ActivityDescriptionComponent implements OnInit {
170173
data['references']['samm2'],
171174
[]
172175
);
176+
this.currentActivity.openCRE = this.defineStringArrayValues(
177+
data['references']['openCRE'],
178+
[]
179+
);
173180
} catch {
174181
console.log('references does not exist');
175182
}

0 commit comments

Comments
 (0)