forked from devsecopsmaturitymodel/DevSecOps-MaturityModel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmappings.php
More file actions
59 lines (55 loc) · 1.55 KB
/
mappings.php
File metadata and controls
59 lines (55 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
include_once "head.php";
?>
<body>
<?php
include_once "navi.php";
?>
<?php
include_once "data.php";
include_once "detail.php";
$mappingExists = array();
$noMappingExists = array();
?>
<table class="table">
<thead>
<tr>
<th scope="col">Dimension</th>
<th scope="col">Subdimension</th>
<th scope="col">Actvity</th>
<th scope="col">SAMM 2</th>
<th scope="col">ISO 27001</th>
</tr>
</thead>
<tbody>
<?php
function getFlattenedArray($array, $index) {
if(!array_key_exists($index, $array)) {
return "TODO";
}
$return = "";
$potentialArray = $array[$index];
if(is_array($potentialArray)) {
foreach($potentialArray as $element => $content) {
$return .= "$content";
}
}else {
$return .= $potentialArray;
}
return $return;
}
foreach ($dimensions as $dimension => $subdimensions) {
foreach ($subdimensions as $subdimension => $activity) {
foreach ($activity as $activityName => $content) {
echo "<tr>";
echo "<td>$dimension</td>";
echo "<td>$subdimension</td>";
$tooltip = "<div class='popoverdetails'>" . build_table_tooltip ( $content ) . "</div>";
echo "<td><div data-toggle=\"popover\" data-title=\"$activityName\" data-content=\"$tooltip\" type=\"button\" data-html=\"true \">" . $activityName . "</div></td>";
echo "<td>" . getFlattenedArray($content, "samm2") . "</td>";
echo "<td>" . getFlattenedArray($content, "iso27001-2017") . "</td>";
}
}
}
echo "</table>";
//var_dump($noMappingExists);