Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ead3c9043d | |||
| 317dd9aedf | |||
| 7f22302859 |
@@ -28,8 +28,13 @@ CREATE TABLE IF NOT EXISTS sla_policies (
|
||||
);
|
||||
|
||||
INSERT OR IGNORE INTO sla_policies (domain, severity, days_to_triage, days_to_remediate, max_extensions) VALUES
|
||||
('Vulnerability', 'Critical', 3, 14, 1), ('Vulnerability', 'High', 3, 30, 2),
|
||||
('Privacy', 'Critical', 3, 3, 0), ('Privacy', 'High', 3, 7, 1),
|
||||
('Vulnerability', 'Critical', 3, 14, 1),
|
||||
('Vulnerability', 'High', 3, 30, 2),
|
||||
('Vulnerability', 'Medium', 7, 60, 2),
|
||||
('Vulnerability', 'Low', 14, 90, 3),
|
||||
('Vulnerability', 'Info', 30, 180, 5),
|
||||
('Privacy', 'Critical', 3, 3, 0),
|
||||
('Privacy', 'High', 3, 7, 1),
|
||||
('Incident', 'Critical', 3, 1, 0);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
|
||||
@@ -3,16 +3,22 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>RiskRancher OSS</title>
|
||||
<title>RiskRancher {{if isProActive}}PRO{{else}}OSS{{end}}</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header style="display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: white; border-bottom: 1px solid #e2e8f0;">
|
||||
<div class="logo">
|
||||
<h2 style="margin: 0;"><a href="/dashboard" style="color: #0f172a; text-decoration: none;">🐴 RiskRancher</a></h2>
|
||||
<h2 style="margin: 0;">
|
||||
<a href="/dashboard" style="color: #0f172a; text-decoration: none;">
|
||||
🐴 RiskRancher{{if isProActive}}{{with getCompanyName}} | {{.}}{{end}}{{end}}
|
||||
</a>
|
||||
</h2>
|
||||
</div>
|
||||
<nav style="display: flex; align-items: center; gap: 15px;">
|
||||
<span style="color: #475569; font-size: 0.9rem; font-family: monospace; padding-left: 15px; margin-left: 5px;">Community Edition</span>
|
||||
<span style="color: {{if isProActive}}#059669{{else}}#475569{{end}}; font-size: 0.9rem; font-family: monospace; padding-left: 15px; margin-left: 5px; font-weight: {{if isProActive}}bold{{else}}normal{{end}};">
|
||||
{{if isProActive}}PRO Edition{{else}}Community Edition{{end}}
|
||||
</span>
|
||||
<button onclick="logout()" style="background: #f1f5f9; color: #dc2626; border: 1px solid #e2e8f0; padding: 6px 12px; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 0.85rem;">Log Out</button>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -29,7 +35,7 @@
|
||||
{{template "content" .}}
|
||||
</main>
|
||||
<footer style="text-align: center; padding: 20px; margin-top: 40px; border-top: 1px solid #e2e8f0; color: #94a3b8; font-size: 0.85rem;">
|
||||
🐴 RiskRancher Core Edition | Version: <strong>{{.Version}}</strong> | Build: <strong>{{.Commit}}</strong>
|
||||
🐴 RiskRancher {{if isProActive}}PRO Edition{{else}}Core Edition{{end}} | Version: <strong>{{.Version}}</strong> | Build: <strong>{{.Commit}}</strong>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -83,20 +83,6 @@
|
||||
<h3 style="margin: 0 0 15px 0;">⚙️ Operations</h3>
|
||||
|
||||
{{block "pro_backups" .}}
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label style="font-weight: bold; display: flex; justify-content: space-between;">
|
||||
Automated Backups
|
||||
<span style="font-size: 0.75rem; color: #8b5cf6; font-weight: normal;">Pro Feature</span>
|
||||
</label>
|
||||
<div style="display: flex; gap: 10px; margin-top: 5px;">
|
||||
<select disabled style="flex: 1; padding: 6px; background: #f1f5f9; color: #94a3b8; cursor: not-allowed; border: 1px solid #cbd5e1;">
|
||||
<option>Manual Only (Free Core)</option>
|
||||
<option>Daily Automated</option>
|
||||
<option>Weekly Automated</option>
|
||||
</select>
|
||||
<button class="btn btn-secondary" style="color: #94a3b8; border-color: #cbd5e1;" onclick="showUpsell('Automated DB Backups')">🔒 Apply</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div style="margin-bottom: 20px;">
|
||||
|
||||
@@ -36,7 +36,11 @@ func SetVersionInfo(version, commit string) {
|
||||
}
|
||||
|
||||
func init() {
|
||||
funcMap := template.FuncMap{"lower": strings.ToLower}
|
||||
funcMap := template.FuncMap{
|
||||
"lower": strings.ToLower,
|
||||
"isProActive": func() bool { return false },
|
||||
"getCompanyName": func() string { return "" },
|
||||
}
|
||||
Pages = make(map[string]*template.Template)
|
||||
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user