Skip to content

Commit

Permalink
Fix light mode view (#24)
Browse files Browse the repository at this point in the history
* Fix light mode

* Add table hover effects
  • Loading branch information
Starttoaster authored Apr 30, 2024
1 parent 5898fa1 commit 2a2bcf6
Show file tree
Hide file tree
Showing 14 changed files with 185 additions and 140 deletions.
24 changes: 12 additions & 12 deletions static/clusteraudit.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/static/css/output.css" rel="stylesheet">
</head>
<body class="min-h-screen bg-indigo-900">
<body class="min-h-screen bg-gray-200 dark:bg-indigo-900">

<!-- Sidebar -->
{{template "sidebar.html"}}
Expand All @@ -27,7 +27,7 @@
</nav>

<!-- Table content -->
<div class="p-4 sm:ml-64 bg-indigo-900">
<div class="p-4 sm:ml-64 bg-gray-200 dark:bg-indigo-900">
<div class="relative overflow-x-auto shadow-md rounded-lg">
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
<thead class="rounded-lg text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
Expand All @@ -51,30 +51,30 @@
</thead>
<tbody>
{{ range $data := .Checks }}
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600">
<th scope="row" class="px-6 py-4 font-medium text-black whitespace-nowrap dark:text-white">
<a href="{{ $data.URL }}" >
<span class="ms-3">{{ $data.ID }}</span>
</a>
</th>
<td class="px-6 py-4">
<td class="px-6 py-4 text-black dark:text-white">
{{if eq $data.Severity "CRITICAL"}}
<span class="bg-red-100 text-red-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-red-900 dark:text-red-100">{{ $data.Severity }}</span>
<span class="bg-red-200 text-black text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-red-900 dark:text-red-100">{{ $data.Severity }}</span>
{{else if eq $data.Severity "HIGH"}}
<span class="bg-orange-100 text-orange-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-orange-900 dark:text-orange-100">{{ $data.Severity }}</span>
<span class="bg-orange-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-orange-900 dark:text-orange-100">{{ $data.Severity }}</span>
{{else if eq $data.Severity "MEDIUM"}}
<span class="bg-yellow-100 text-yellow-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-yellow-900 dark:text-yellow-100">{{ $data.Severity }}</span>
<span class="bg-yellow-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-yellow-900 dark:text-yellow-100">{{ $data.Severity }}</span>
{{else if eq $data.Severity "LOW"}}
<span class="bg-blue-100 text-blue-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-blue-900 dark:text-blue-100">{{ $data.Severity }}</span>
<span class="bg-blue-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-blue-900 dark:text-blue-100">{{ $data.Severity }}</span>
{{end}}
</td>
<td class="px-6 py-4">
<td class="px-6 py-4 text-black dark:text-white">
{{ $data.Title }}
</td>
<td class="px-6 py-4">
<td class="px-6 py-4 text-black dark:text-white">
{{ $data.Description }}
</td>
<td class="px-6 py-4">
<td class="px-6 py-4 text-black dark:text-white">
{{ $data.Remediation }}
</td>
</tr>
Expand Down
18 changes: 9 additions & 9 deletions static/clusteraudits.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<link href="/static/css/output.css" rel="stylesheet">
<link href="/static/css/extra.css" rel="stylesheet">
</head>
<body class="min-h-screen bg-indigo-900">
<body class="min-h-screen bg-gray-200 dark:bg-indigo-900">

<!-- Sidebar -->
{{template "sidebar.html"}}

<!-- Table content -->
<div class="p-4 sm:ml-64 bg-indigo-900">
<div class="p-4 sm:ml-64 bg-gray-200 dark:bg-indigo-900">
<div class="relative overflow-x-auto shadow-md rounded-lg">
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
<!-- Table headers -->
Expand All @@ -32,37 +32,37 @@
<!-- Table body -->
<tbody>
{{ range $data := . }}
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600">
<!-- Cluster audit column -->
<td scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
<td scope="row" class="px-6 py-4 font-medium text-black whitespace-nowrap dark:text-white">
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}">
{{ $data.Name }}
</a>
</td>
<td scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
<td scope="row" class="px-6 py-4 font-medium text-black whitespace-nowrap dark:text-white">
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}">
{{ $data.Kind }}
</a>
</td>
<!-- Checks column -->
<td class="px-6 py-4">
{{ if $data.CriticalChecks }}
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}&severity=Critical" title="Critical" class="bg-red-100 text-red-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-red-900 dark:text-red-100">
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}&severity=Critical" title="Critical" class="bg-red-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-red-900 dark:text-red-100">
{{ len $data.CriticalChecks }}
</a>
{{ end }}
{{ if $data.HighChecks }}
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}&severity=High" title="High" class="bg-orange-100 text-orange-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-orange-900 dark:text-orange-100">
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}&severity=High" title="High" class="bg-orange-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-orange-900 dark:text-orange-100">
{{ len $data.HighChecks }}
</a>
{{ end }}
{{ if $data.MediumChecks }}
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}&severity=Medium" title="Medium" class="bg-yellow-100 text-yellow-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-yellow-900 dark:text-yellow-100">
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}&severity=Medium" title="Medium" class="bg-yellow-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-yellow-900 dark:text-yellow-100">
{{ len $data.MediumChecks }}
</a>
{{ end }}
{{ if $data.LowChecks }}
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}&severity=Low" title="Low" class="bg-blue-100 text-blue-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-blue-900 dark:text-blue-100">
<a href="/clusteraudit?name={{ $data.Name }}&kind={{ $data.Kind }}&severity=Low" title="Low" class="bg-blue-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-blue-900 dark:text-blue-100">
{{ len $data.LowChecks }}
</a>
{{ end }}
Expand Down
22 changes: 11 additions & 11 deletions static/clusterrole.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/static/css/output.css" rel="stylesheet">
</head>
<body class="min-h-screen bg-indigo-900">
<body class="min-h-screen bg-gray-200 dark:bg-indigo-900">

<!-- Sidebar -->
{{template "sidebar.html"}}
Expand All @@ -24,7 +24,7 @@
</nav>

<!-- Table content -->
<div class="p-4 sm:ml-64 bg-indigo-900">
<div class="p-4 sm:ml-64 bg-gray-200 dark:bg-indigo-900">
<div class="relative overflow-x-auto shadow-md rounded-lg">
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
<thead class="rounded-lg text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
Expand All @@ -45,27 +45,27 @@
</thead>
<tbody>
{{ range $data := .Vulnerabilities }}
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600">
<th scope="row" class="px-6 py-4 font-medium text-black whitespace-nowrap dark:text-white">
<a href="{{ $data.URL }}" >
<span class="ms-3">{{ $data.ID }}</span>
</a>
</th>
<td class="px-6 py-4">
<td class="px-6 py-4 text-black dark:text-white">
{{if eq $data.Severity "CRITICAL"}}
<span class="bg-red-100 text-red-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-red-900 dark:text-red-100">{{ $data.Severity }}</span>
<span class="bg-red-200 text-black text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-red-900 dark:text-red-100">{{ $data.Severity }}</span>
{{else if eq $data.Severity "HIGH"}}
<span class="bg-orange-100 text-orange-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-orange-900 dark:text-orange-100">{{ $data.Severity }}</span>
<span class="bg-orange-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-orange-900 dark:text-orange-100">{{ $data.Severity }}</span>
{{else if eq $data.Severity "MEDIUM"}}
<span class="bg-yellow-100 text-yellow-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-yellow-900 dark:text-yellow-100">{{ $data.Severity }}</span>
<span class="bg-yellow-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-yellow-900 dark:text-yellow-100">{{ $data.Severity }}</span>
{{else if eq $data.Severity "LOW"}}
<span class="bg-blue-100 text-blue-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-blue-900 dark:text-blue-100">{{ $data.Severity }}</span>
<span class="bg-blue-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-blue-900 dark:text-blue-100">{{ $data.Severity }}</span>
{{end}}
</td>
<td class="px-6 py-4">
<td class="px-6 py-4 text-black dark:text-white">
{{ $data.Title }}
</td>
<td class="px-6 py-4">
<td class="px-6 py-4 text-black dark:text-white">
{{ $data.Description }}
</td>
</tr>
Expand Down
18 changes: 9 additions & 9 deletions static/clusterroles.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<link href="/static/css/output.css" rel="stylesheet">
<link href="/static/css/extra.css" rel="stylesheet">
</head>
<body class="min-h-screen bg-indigo-900">
<body class="min-h-screen bg-gray-200 dark:bg-indigo-900">

<!-- Sidebar -->
{{template "sidebar.html"}}

<!-- Table content -->
<div class="p-4 sm:ml-64 bg-indigo-900">
<div class="p-4 sm:ml-64 bg-gray-200 dark:bg-indigo-900">
<div class="relative overflow-x-auto shadow-md rounded-lg">
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
<!-- Table headers -->
Expand All @@ -32,35 +32,35 @@
<!-- Table body -->
<tbody>
{{ range $data := . }}
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600">
<!-- Roles column -->
<td scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
<td scope="row" class="px-6 py-4 font-medium text-black whitespace-nowrap dark:text-white">
<a href="/clusterrole?name={{ $data.Name }}">
{{ $data.Name }}
</a>
</td>
<td scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
<td scope="row" class="px-6 py-4 font-medium text-black whitespace-nowrap dark:text-white">
{{ $data.Kind }}
</td>
<!-- Checks column -->
<td class="px-6 py-4">
{{ if $data.CriticalVulnerabilities }}
<a href="/clusterrole?name={{ $data.Name }}&severity=Critical" title="Critical" class="bg-red-100 text-red-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-red-900 dark:text-red-100">
<a href="/clusterrole?name={{ $data.Name }}&severity=Critical" title="Critical" class="bg-red-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-red-900 dark:text-red-100">
{{ len $data.CriticalVulnerabilities }}
</a>
{{ end }}
{{ if $data.HighVulnerabilities }}
<a href="/clusterrole?name={{ $data.Name }}&severity=High" title="High" class="bg-orange-100 text-orange-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-orange-900 dark:text-orange-100">
<a href="/clusterrole?name={{ $data.Name }}&severity=High" title="High" class="bg-orange-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-orange-900 dark:text-orange-100">
{{ len $data.HighVulnerabilities }}
</a>
{{ end }}
{{ if $data.MediumVulnerabilities }}
<a href="/clusterrole?name={{ $data.Name }}&severity=Medium" title="Medium" class="bg-yellow-100 text-yellow-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-yellow-900 dark:text-yellow-100">
<a href="/clusterrole?name={{ $data.Name }}&severity=Medium" title="Medium" class="bg-yellow-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-yellow-900 dark:text-yellow-100">
{{ len $data.MediumVulnerabilities }}
</a>
{{ end }}
{{ if $data.LowVulnerabilities }}
<a href="/clusterrole?name={{ $data.Name }}&severity=Low" title="Low" class="bg-blue-100 text-blue-800 text-xs font-medium me-1 px-2 py-2 rounded dark:bg-blue-900 dark:text-blue-100">
<a href="/clusterrole?name={{ $data.Name }}&severity=Low" title="Low" class="bg-blue-200 text-black text-xs font-medium me-1 px-2 py-2 rounded dark:bg-blue-900 dark:text-blue-100">
{{ len $data.LowVulnerabilities }}
</a>
{{ end }}
Expand Down
Loading

0 comments on commit 2a2bcf6

Please sign in to comment.