-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path404.html
More file actions
197 lines (195 loc) · 9.92 KB
/
Copy path404.html
File metadata and controls
197 lines (195 loc) · 9.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="theme-color" content="#1565c0" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#0a0d12" media="(prefers-color-scheme: dark)">
<meta name="format-detection" content="telephone=no">
<meta name="robots" content="noindex, follow">
<title>404 - Page Not Found</title>
<style>
:root {
--bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--card-bg: white;
--text: #333;
--text-muted: #666;
--link-bg: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
}
[data-theme="dark"] {
--bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
--card-bg: #2d2d2d;
--text: #e0e0e0;
--text-muted: #b0b0b0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 0;
transition: background 0.3s;
}
.container {
background: var(--card-bg);
padding: 40px 60px;
border-radius: 12px;
text-align: center;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
max-width: 600px;
transition: background 0.3s;
}
h1 { color: #1e88e5; font-size: 48px; margin-bottom: 10px; }
p { color: var(--text-muted); font-size: 18px; margin-bottom: 20px; }
.main-link {
display: inline-block;
padding: 12px 24px;
background: var(--link-bg);
color: white;
text-decoration: none;
border-radius: 6px;
font-weight: 500;
margin-bottom: 24px;
}
.main-link:hover { opacity: 0.9; }
.quick-links {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: center;
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid rgba(0,0,0,0.1);
}
.quick-links a {
padding: 6px 14px;
border-radius: 20px;
font-size: 0.85rem;
text-decoration: none;
color: white;
transition: opacity 0.2s;
}
.quick-links a:hover { opacity: 0.8; }
</style>
<!-- BEGIN pwa (managed by scripts/inject_pwa.py) -->
<link rel="manifest" href="site.webmanifest">
<script src="assets/js/analytics-config.js"></script>
<script src="assets/js/sw-register.js" defer></script>
<script src="assets/js/analytics.js" defer></script>
<!-- END pwa -->
</head>
<body>
<main class="container">
<h1>404</h1>
<p id="msg">Page not found. The documentation you're looking for doesn't exist.</p>
<p id="redirectMsg" style="display:none; font-size:0.95rem; color:var(--text-muted);"></p>
<a href="index.html" class="main-link">← Back to Documentation Hub</a>
<div class="quick-links">
<a href="swagger-oper-model/index.html" style="background: #2196F3;">Oper</a>
<a href="swagger-cfg-model/index.html" style="background: #00BCD4;">Config</a>
<a href="swagger-native-config-model/index.html" style="background: #4CAF50;">Native</a>
<a href="swagger-rpc-model/index.html" style="background: #FFC107; color: #333;">RPC</a>
<a href="swagger-mib-model/index.html" style="background: #9C27B0;">MIB</a>
<a href="swagger-openconfig-model/index.html" style="background: #009688;">OpenConfig</a>
<a href="swagger-ietf-model/index.html" style="background: #FF5722;">IETF</a>
<a href="code-generator.html" style="background: #667eea;">Code Gen</a>
<a href="yang-trees/" style="background: #388E3C;">Trees</a>
<a href="telemetry.html" style="background: #1976D2;">Telemetry & Notifications</a>
<a href="yang-accountability.html" style="background: #5E35B1;">Accountability</a>
<a href="exports.html" style="background: #455A64;">Exports</a>
<a href="FAQ.md" style="background: #6D4C41;">FAQ</a>
</div>
</main>
<script>
const saved = localStorage.getItem('theme');
if (saved === 'dark') document.documentElement.setAttribute('data-theme', 'dark');
// Offline detection: if the browser is reporting offline, tweak the
// message + suggest reloading once back online. Helps users
// distinguish a real 404 from a "you tried to deep-link while your
// wifi is down" situation.
(function offlineHint() {
if (typeof navigator === 'undefined' || navigator.onLine !== false) return;
var msg = document.getElementById('msg');
if (msg) {
msg.innerHTML = 'You appear to be <strong>offline</strong>. The page may exist but couldn't be loaded.<br>' +
'Cached pages (Home, About, Accountability, Compare, Code Gen, Exports) should still work.';
}
window.addEventListener('online', function () {
var rm = document.getElementById('redirectMsg');
if (rm) {
rm.style.display = 'block';
rm.innerHTML = 'You\u2019re back online \u2014 try reloading this page.';
}
}, { once: true });
})();
// Hash-aware routing: if the failed URL carries a #spec=...&op=... or
// #ver=... fragment, try to route the user to a viewer that can
// resolve it instead of dropping them on a dead list. Works for
// typo'd paths like `/swagger-cfg-modle/index.html#spec=foo` or
// for old/renamed pages where someone pasted a deep link.
(function recoverDeepLink() {
try {
var raw = (window.location.hash || '').replace(/^#/, '');
if (!raw) return;
var params = {};
raw.split('&').forEach(function (s) {
var i = s.indexOf('=');
if (i > 0) {
try { params[s.substring(0, i)] = decodeURIComponent(s.substring(i + 1)); }
catch (_) { params[s.substring(0, i)] = s.substring(i + 1); }
}
});
if (!params.spec) return;
// The spec name uniquely identifies its viewer category by
// the YANG model's filename prefix. Use a small lookup so we
// don't need to fetch search-index.json from this static page.
var rules = [
{ match: /^Cisco-IOS-XE-mib/i, cat: 'swagger-mib-model' },
{ match: /^iana-/i, cat: 'swagger-other-model' },
{ match: /^cisco-iox$|^Cisco-IOS-XE-native/i, cat: 'swagger-native-config-model' },
{ match: /^openconfig-/i, cat: 'swagger-openconfig-model' },
{ match: /^ietf-/i, cat: 'swagger-ietf-model' },
{ match: /-rpc$|^Cisco-IOS-XE-.+-rpc/i, cat: 'swagger-rpc-model' },
{ match: /-oper$/i, cat: 'swagger-oper-model' },
{ match: /-cfg$/i, cat: 'swagger-cfg-model' },
];
var cat = null;
for (var i = 0; i < rules.length; i++) {
if (rules[i].match.test(params.spec)) { cat = rules[i].cat; break; }
}
if (!cat) return;
// Preserve ver= and op= so the destination viewer can deep-link.
var hashParts = [];
if (params.ver) hashParts.push('ver=' + encodeURIComponent(params.ver));
hashParts.push('spec=' + encodeURIComponent(params.spec));
if (params.op) hashParts.push('op=' + encodeURIComponent(params.op));
var target = cat + '/index.html#' + hashParts.join('&');
var msg = document.getElementById('redirectMsg');
if (msg) {
msg.style.display = 'block';
// Build the redirect notice with DOM nodes so the
// attacker-controlled fragment values (params.spec /
// params.op) can't break out of innerHTML and execute
// script. Reflected XSS otherwise possible via URLs
// like /#spec=<img src=x onerror=...>.
msg.textContent = '';
msg.appendChild(document.createTextNode('Redirecting you to '));
var cs = document.createElement('strong'); cs.textContent = cat; msg.appendChild(cs);
msg.appendChild(document.createTextNode(' for '));
var cc = document.createElement('code'); cc.textContent = params.spec; msg.appendChild(cc);
if (params.op) {
msg.appendChild(document.createTextNode(' (operation '));
var co = document.createElement('code'); co.textContent = params.op; msg.appendChild(co);
msg.appendChild(document.createTextNode(')'));
}
msg.appendChild(document.createTextNode('\u2026'));
}
setTimeout(function () { window.location.replace(target); }, 800);
} catch (_) { /* leave the 404 page intact */ }
})();
</script>
</body>
</html>