-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresults.html.tpl
More file actions
67 lines (67 loc) · 1.72 KB
/
Copy pathresults.html.tpl
File metadata and controls
67 lines (67 loc) · 1.72 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
61
62
63
64
65
66
67
<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: Arial, Helvetica, sans-serif;
background-color: #EEEEEE;
border-collapse: collapse;
width: 100%;
}
table td, table th {
border: 1px solid #ddd;
padding: 3px 3px;
}
table th {
font-size: 15px;
font-weight: bold;
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #1C6EA4;
color: white;
}
</style>
</head>
{{- $userPermissionMap := . }}
{{- range $user, $objmap := $userPermissionMap }}
<h1 style="font-size: 2em">{{ $user }}</h1>
{{- range $object, $descriptor := $objmap.ObjectDesc }}
<table>
<tr>
<th>{{ $object | Title }}/Permissions</th>
{{- range $_, $perm := index $objmap.Permissions $object }}
<th>{{ $perm }}</th>
{{- end }}
</tr>
{{- range $item, $_ := $descriptor }}
<tr>
<td>{{ $item }}</td>
{{- range $_, $status := index $objmap.Permissions $object }}
{{- $flag := index $descriptor $item $status }}
{{- if $flag }}
<td style="background-color: green"> {{ $flag }}</td>
{{- else }}
<td style="background-color: red"> {{ $flag }}</td>
{{- end }}
{{- end }}
</tr>
{{- end }}
</table>
<table>
<tr>
<th>{{ $object | Title }}/Failed to check</th>
</tr>
{{- range $skipped_item_name, $skipped_item_type := $objmap.FailedToCheck }}
{{- if eq $skipped_item_type $object }}
<tr>
<td style="background-color: yellow">{{ $skipped_item_name }}</td>
</tr>
{{- end }}
{{- end }}
<br>
</table>
<br>
{{- end }}
{{- end }}
</html>