forked from cidrblock/dci_test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
60 lines (59 loc) · 1.92 KB
/
index.html
File metadata and controls
60 lines (59 loc) · 1.92 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
60
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.6.1/js-yaml.js"></script>
<script src="http://code.jquery.com/jquery-1.12.3.js"></script>
<script src="http://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css">
<script>
jQuery.get('tests.yaml', function(data) {
var array = []
var obj = jsyaml.load(data);
for (value in obj.tests){
var entry = obj.tests[value]
tempArray = [ parseInt(value) + 1,
entry.title,
entry.prerequisites,
entry.action,
entry.actionBy,
entry.additionalResources,
entry.additionalActions,
entry.expectedOutcome,
entry.measurement,
entry.dateTime,
entry.actualOutcome,
entry.passFail,
entry.remediation
]
array.push(tempArray)
}
$('#example').DataTable( {
data: array,
columns: [
{ title: "ID" },
{ title: "Title" },
{ title: "Prerequisites" },
{ title: "Action" },
{ title: "Action By" },
{ title: "Additional Resource" },
{ title: "Additional Actions" },
{ title: "Expected Outcome" },
{ title: "Measurement" },
{ title: "Date/Time" },
{ title: "Actual Outcome" },
{ title: "Pass Fail" },
{ title: "Remediation" }
]
} );
});
</script>
</head>
<body>
<style>
* {
font-family: Verdana, Arial, 'sans-serif';
font-size: .95em;
}
</style>
<table id="example" class="display" width="100%"></table>
</body>
</html>