Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bib.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
error_reporting(E_ERROR);

define(NUMBER_LEVELS, 4);
function readCSV($filename, $delimiter)
{
if (!file_exists($filename) || !is_readable($filename))
Expand Down Expand Up @@ -35,4 +35,5 @@ function getCsv() {
$csvFile = 'selectedData.csv';
$csv= readCSV($csvFile, ",");
return $csv;
}
}

8 changes: 7 additions & 1 deletion head.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
$url = "https://dsomm.timo-pagel.de{$_SERVER['SCRIPT_NAME']}";
echo "<link rel='canonical' href=$url>";
?>
<script>
$(function () {
$('[data-toggle="popover"]').popover({placement: "bottom", trigger: "hover"}).on('click', function () {
$(this).popover('toggle');
});
})</script>
</head>

<?php
Expand Down Expand Up @@ -113,7 +119,7 @@ function getTable($dimensions) {
$tableContent .= "$subdimension";
$tableContent .= "</td>";

for($i = 1; $i <= 4; $i ++) {
for($i = 1; $i <= NUMBER_LEVELS; $i ++) {
$tableContent .= "<td><ul>";
foreach ( $element as $elementName => $content ) {
$content = getContentForLevelFromSubdimensions ( $i, $content, $elementName );
Expand Down
7 changes: 1 addition & 6 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@
echo "<h1>Activtities per Dimension</h1>";
echo '<div class="extra">'.getInfos($dimensions) . '</div>';
?>
<script>
$(function () {
$('[data-toggle="popover"]').popover({placement: "bottom", trigger: "hover"}).on('click', function () {
$(this).popover('toggle');
});
})</script>

59 changes: 59 additions & 0 deletions mappings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,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);
5 changes: 3 additions & 2 deletions navi.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
$nav = array(
"index.php" => "Matrix",
"spiderweb.php" => "Implementation Levels",
"scutter.php" => "Ease and Value of Implementation",
"scutter.php" => "Ease and Value",
"mappings.php" => "Mappings",
"graph.php" => "Dependencies",
"report.php" => "Full Report",
//"usefulnessHardness.php" => "Heatmap",
Expand All @@ -13,7 +14,7 @@
?>
<ul class="nav nav-tabs">

<a class="navbar-brand" href="https://dsomm.timo-pagel.de">
<a class="navbar-brand" href="#">
<img height="100%" src="/assets/images/logo.png" alt="OWASP DevSecOps Maturity Model">
</a>
<?php
Expand Down