commit
8c4d463f1e
96 files changed
+3319
No files matched your search
@@ -0,0 +1,39 @@
|
||||
/* EasyDNS operator UI — OLED palette inspired by the RustProxy control room.
|
||||
Flat surfaces, no gradients, compact controls, measured chart emphasis. */
|
||||
:root,[data-bs-theme=dark]{
|
||||
color-scheme:dark;
|
||||
--bg:#050807;--sidebar:#060908;--panel:#111614;--panel-alt:#151b17;--field:#0b100e;
|
||||
--line:#323b37;--row:#29312d;--text:#eff3ed;--muted:#a5b1aa;--subtle:#7f9087;
|
||||
--green:#a6d79d;--cyan:#6fcde0;--amber:#f2b42f;--red:#e88a8a;
|
||||
--nav-active:#202b22;--sans:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
|
||||
--mono:ui-monospace,"SFMono-Regular",Consolas,"Liberation Mono",monospace;
|
||||
--bs-body-bg:var(--bg);--bs-body-color:var(--text);--bs-link-color:var(--text);
|
||||
}
|
||||
*{box-sizing:border-box}html{scroll-behavior:auto}body{margin:0;background:var(--bg);color:var(--text);font:13px/1.45 var(--sans);min-height:100vh;overflow-x:hidden}a{color:inherit;text-decoration:none}a:hover{color:var(--green)}button,input,select,textarea{font:inherit}h1,h2,h3,p{margin:0}h2{font-size:14px;font-weight:650;letter-spacing:-.1px}h3{font-size:13px;font-weight:620}.mono{font-family:var(--mono);font-size:.94em}.upper{text-transform:uppercase}.muted{color:var(--muted)}.subtle{color:var(--subtle)}.success,.ok{color:var(--green)!important}.warning,.warn{color:var(--amber)!important}.danger{color:var(--red)!important}.tiny{font-size:11px}.break-any{overflow-wrap:anywhere}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.inline{display:inline}.right{text-align:right!important}.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:380px}.small-text{font-size:12px!important}.w-100{width:100%}.mt-panel{margin-top:13px!important}.mt-3{margin-top:12px!important}.mt-4{margin-top:19px!important}.mb-3{margin-bottom:12px!important}.mb-4{margin-bottom:18px!important}
|
||||
.shell{display:grid;grid-template-columns:208px minmax(0,1fr);min-height:100vh}
|
||||
.sidebar{background:var(--sidebar);border-right:1px solid var(--line);position:sticky;top:0;height:100vh;display:flex;flex-direction:column;z-index:21;padding:0 12px 14px}
|
||||
.brand{height:66px;display:flex;align-items:center;padding:0 12px;border-bottom:1px solid var(--line);flex-shrink:0}
|
||||
.brand a{color:#f4f8f4;font-size:24px;font-weight:720;letter-spacing:-.8px}
|
||||
.sidebar-content{padding-top:16px;overflow:auto;scrollbar-width:thin;scrollbar-color:#39453d transparent}
|
||||
.nav-section{font:10px/1.4 var(--mono);letter-spacing:.55px;color:#a1b5ad;padding:8px 12px 10px;margin-top:18px}.nav-section:first-child{margin-top:0}
|
||||
.sidenav{display:flex;flex-direction:column;gap:2px}.sidenav>a{min-height:33px;display:flex;align-items:center;padding:7px 12px 7px 14px;color:#dbe2dc;border-left:2px solid transparent;transition:none;font-size:13px}.sidenav>a:hover{background:#161e19;color:#fff}.sidenav>a.active{border-left-color:#aadd9b;background:var(--nav-active);color:#fff;font-weight:620}
|
||||
.sidebar-foot{margin-top:auto;padding:15px 12px 4px;color:#bdcbc1;border-top:1px solid var(--line);font-size:11px}.sidebar-foot small{display:block;color:var(--subtle);padding-left:13px;margin-top:3px}.indicator,.dot{display:inline-block;width:7px;height:7px;background:var(--green);border-radius:100%;margin-right:7px;vertical-align:1px;flex-shrink:0}.dot.warn{background:var(--amber)}.dot.danger{background:var(--red)}.dot.ok{background:var(--green)}
|
||||
.workspace{min-width:0}.topbar{height:48px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 22px;background:#080b0a}
|
||||
.breadcrumbs{font:11px/1.2 var(--mono);color:#c7d3ca;letter-spacing:.35px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}.tool-button,.btn-ui{background:transparent;border:1px solid #49534c;color:#e0e7e0;min-height:31px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:6px 11px;border-radius:3px;font-size:12px;font-weight:510;text-decoration:none;line-height:1.2;cursor:pointer;white-space:nowrap;transition:none}.tool-button:hover,.btn-ui:hover{border-color:#97ada0;color:#fff;background:#1a211e}.tool-button:focus-visible,.btn-ui:focus-visible,.field:focus-visible,.sidenav a:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.ico{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.btn-primary-ui{border-color:#94c488;background:var(--green);color:#10200e;font-weight:690}.btn-primary-ui:hover{background:#b2e6a9;border-color:#b2e6a9;color:#10200e}.btn-danger-ui{border-color:#955651;color:#ffb5ad;background:#251612}.btn-danger-ui:hover{background:#3c2420;border-color:#d18a85;color:#fff}.btn-small{min-height:25px;padding:3px 8px;font-size:11px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;color:#d5dfd7;border:1px solid transparent;border-radius:2px}.icon-button:hover{background:#242f29;color:#fff;border-color:#556256}.icon-button.danger-hover:hover{color:var(--red);border-color:#9d5955}.row-actions{display:flex;gap:3px;justify-content:flex-end}.mobile-menu{display:none}
|
||||
.content{padding:17px 25px 26px;max-width:2220px;margin:0 auto;min-width:0}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:19px}.eyebrow{font:10px/1.4 var(--mono);color:#a4d291;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px}.page-head h1{font-size:27px;line-height:1.15;font-weight:660;letter-spacing:-.65px}.page-subtitle{font-size:12px;color:#aebdb2;margin-top:4px}.page-head-right{align-self:flex-start;margin-top:5px}.operator-label{font:10px var(--mono);color:#a2ada5;border:1px solid var(--line);padding:6px 9px;border-radius:2px}
|
||||
.panel{background:var(--panel);border:1px solid var(--line);border-radius:3px;min-width:0;box-shadow:none}.panel-head{padding:12px 14px;border-bottom:1px solid var(--row);display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px}.panel-head p{font-size:11px;color:var(--muted);margin-top:2px}.panel-body{padding:16px}.panel-body.compact{padding:12px 14px}.panel-head.border-top{border-top:1px solid var(--line)}.text-link{font-size:11px;color:#9bcce0}.text-link:hover{text-decoration:underline}
|
||||
.status-strip{display:grid;grid-template-columns:1.65fr repeat(4,1fr);align-items:stretch;min-height:70px;padding:10px 0;gap:0}.status-main{display:flex;flex-direction:column;justify-content:center;padding:0 20px}.status-heading{font-size:15px;display:flex;align-items:center;gap:6px;margin-bottom:3px}.status-heading .dot{width:9px;height:9px;margin-right:2px}.strip-cell{display:flex;flex-direction:column;gap:4px;justify-content:center;padding:0 17px;border-left:1px solid var(--line);min-width:0}.strip-cell:first-child{border-left:none}.strip-cell>span:first-child,.metric-label{color:#a9b7ac;font:10px/1.3 var(--mono);text-transform:uppercase;letter-spacing:.3px}.strip-cell strong{font-size:13px;line-height:1.3;font-weight:580;overflow-wrap:anywhere}.strip-cell small{color:var(--subtle);font-size:10px}.compact-strip{grid-template-columns:repeat(4,minmax(0,1fr))}.compact-strip .strip-cell:first-child{border:none}.zone-strip{grid-template-columns:repeat(6,minmax(0,1fr));min-height:76px}.zone-strip .strip-cell:first-child{border:none}
|
||||
.metrics-grid{display:grid;gap:9px;margin:13px 0}.metrics-grid.six{grid-template-columns:repeat(6,minmax(0,1fr))}.metrics-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.metric{min-height:93px;display:flex;flex-direction:column;justify-content:center;padding:12px 14px}.metric strong{font-size:24px;font-weight:650;line-height:1.3;letter-spacing:.2px;margin-top:4px;white-space:nowrap}.metric small{font-size:11px;color:var(--muted);margin-top:3px}.metric-row{max-width:290px}
|
||||
.chart-grid{display:grid;gap:10px;margin-top:12px}.chart-grid.triple{grid-template-columns:repeat(3,minmax(0,1fr))}.chart-card{padding-bottom:8px;min-height:256px}.chart-card .panel-head{border-bottom:none;padding:12px 14px 6px;align-items:flex-start}.chart-card canvas{display:block;width:calc(100% - 24px);height:169px;margin:7px 12px 0;image-rendering:auto}.chart-foot{padding:8px 14px 1px;font:10px var(--mono);color:#bdcbc0;display:flex;align-items:center;gap:7px;flex-wrap:wrap}.legend-dot{display:inline-block;width:13px;height:2px;background:#aaa;vertical-align:middle}.legend-dot.cyan{background:var(--cyan)}.legend-dot.amber{background:var(--amber)}.legend-dot.red{background:var(--red)}.live-mark{font:9px var(--mono);color:#789c83;white-space:nowrap}
|
||||
.dashboard-lower{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.dashboard-lower.three-cards{margin-top:14px}.dashboard-lower>.panel{min-height:185px}.data-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--row);padding:9px 0;min-height:34px;font-size:12px}.data-row:first-child{padding-top:4px}.data-row:last-child{border-bottom:none}.data-row span{color:#bac4bc;flex-shrink:0}.data-row strong{font-weight:550;text-align:right;color:#ecf2ed;max-width:67%;min-width:0;word-break:break-word}.data-row.mono{justify-content:flex-start}.barline{display:grid;grid-template-columns:100px minmax(0,1fr) 90px;align-items:center;gap:12px;padding:8px 0;font-size:11px}.barline strong{text-align:right;font:11px var(--mono)}.bar-track{display:block;height:8px;background:#29352f;border-radius:0;overflow:hidden}.bar-fill{display:block;height:100%;background:var(--green);width:0}.bar-fill.warn{background:var(--amber)}.bar-fill.danger{background:var(--red)}.bars-large{margin-top:15px}.bars-large .barline{padding:10px 0}.notice-inline{font-size:11px;color:#adbfae;background:#14201a;border-left:2px solid #739c71;padding:11px 14px;line-height:1.5}.notice{padding:11px 15px;border:1px solid #576951;background:#1b281e;color:#ddf0d8;border-radius:2px;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;line-height:1.5}.notice.danger{background:#2b1c1c;color:#ffd2cb;border-color:#855a56}.notice.warn{background:#2d2519;color:#efd1a2;border-color:#756346}.notice-dismiss{border:none;background:none;color:inherit;font-size:18px;line-height:1;cursor:pointer}.empty{padding:28px 16px;text-align:center;color:var(--muted);font-size:12px}
|
||||
.table-scroll{overflow-x:auto;scrollbar-color:#425049 transparent;scrollbar-width:thin}.data-table{border-collapse:collapse;table-layout:auto;width:100%;white-space:nowrap;font-size:12px}.data-table th{background:#121915;color:#a8b6ab;font:10px/1.35 var(--mono);text-transform:uppercase;letter-spacing:.45px;font-weight:500;text-align:left;padding:12px 13px;border-bottom:1px solid #455149}.data-table td{padding:9px 13px;border-bottom:1px solid var(--row);color:#d9e1da;height:38px;vertical-align:middle;max-width:630px;overflow-wrap:anywhere}.data-table tbody tr:hover td{background:#17211b}.data-table tbody tr:last-child td{border-bottom:none}.data-table .empty{text-align:center;padding:26px;white-space:normal}.data-table .entity,.entity{color:#f1f7f1;font-weight:610}.entity:hover{color:var(--green)}.data-table td.rdata{max-width:560px;white-space:normal;word-break:break-word}.tag{display:inline-block;font:10px/1.35 var(--mono);border:1px solid #647b55;color:#bbddac;padding:2px 6px;border-radius:2px;text-transform:uppercase;letter-spacing:.2px}.tag.blue{border-color:#597e8d;color:#9ccfe1}.tag.red{border-color:#915c58;color:#eda9a2}.tag.amber{border-color:#917245;color:#f2cb84}.tag.muted-tag{border-color:#546158;color:#a3b0a5}.table-footer{border-top:1px solid var(--row);padding:12px 14px;display:flex;gap:10px;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px;min-height:49px}.pagination-ui{display:flex;align-items:center;gap:6px}
|
||||
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 13px;border-bottom:1px solid var(--line);min-height:55px}.toolbar-form{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.toolbar-end{display:flex;align-items:center;gap:8px;flex-shrink:0}.toolbar-title h2{margin-bottom:3px}.toolbar-title p{color:var(--muted);font-size:11px}.field{width:100%;min-height:33px;border:1px solid #48564c;border-radius:2px;color:#f0f4ed;background:var(--field);padding:7px 11px;outline:none;box-shadow:none}.field:focus{border-color:#a4c493;box-shadow:0 0 0 1px #456d51}.field::placeholder{color:#77857c;opacity:1}.field[type=number]{appearance:textfield}.field[type=number]::-webkit-inner-spin-button{-webkit-appearance:none}.field-search{width:290px}.field-select{width:145px;cursor:pointer;padding-right:20px}.toolbar .field{min-height:31px}.field-label{font-size:12px;font-weight:570;color:#cfd8cd;display:block;margin-bottom:7px}textarea.field{resize:vertical;line-height:1.6}select.field{background-color:#0d120f}.required{color:var(--amber)}
|
||||
.form-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.78fr);gap:13px;align-items:start}.policy-layout{grid-template-columns:minmax(0,1.5fr) minmax(270px,1fr)}.form-body{padding:18px}.form-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field-row{margin-bottom:18px}.field-row:last-child{margin-bottom:0}.field-row small{font-size:11px;color:var(--subtle);display:block;margin-top:6px}.form-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;padding-top:18px;margin-top:11px;border-top:1px solid var(--row)}.form-actions .btn-ui{min-width:90px}.readout{display:flex;align-items:center;background:#19211b;color:#c7d1c7}.guide .panel-body p{font-size:12px;line-height:1.6;color:#b6c3b8}.guide .panel-body .data-row{font-size:11px}.guide h3{font-size:12px;margin-bottom:9px}.mode-tabs{display:flex;border-bottom:1px solid var(--line);padding:0 14px}.code-input{min-height:250px;font:12px/1.65 var(--mono)}.code-block{background:#090f0b;border:1px solid #313f33;border-radius:2px;padding:13px;overflow:auto;max-width:100%}.code-block pre,pre.code-block{margin:0;color:#bfdbc7;font:11px/1.6 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere}.code-example{padding:10px;background:#0e1711;border:1px solid #314138;font-size:11px;line-height:2!important;color:#cbe3cd!important}.target-summary{border:1px solid #465147;background:#151e16;padding:10px 15px;margin:15px 0 20px}.confirmation-box{max-width:720px;margin:12px auto}.confirmation-box .panel-body>p{color:#becabf;line-height:1.7;margin:8px 0 20px}.confirmation-box .field{max-width:100%}.border-top{border-top:1px solid var(--line)!important}.operations-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(250px,.9fr);gap:13px;margin-top:14px}.operation{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 4px;border-bottom:1px solid var(--row)}.operation:last-child{border:0}.operation strong{display:block;font-size:12px}.operation small{display:block;font-size:11px;color:#9eada3;margin-top:4px}.operation .btn-ui{flex-shrink:0}.tabs{display:flex;align-items:center;gap:5px;margin:12px 0 14px;border-bottom:1px solid #374039;overflow-x:auto;white-space:nowrap}.tab{padding:11px 18px;display:inline-block;border-bottom:2px solid transparent;color:#bfc9bf;font-size:12px}.tab:hover{color:#fff;background:#171f1a}.tab.active{border-bottom-color:var(--green);color:#f6fff2;font-weight:640}.section-actions{display:flex;gap:9px;margin-top:14px}.pool-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;background:#171e19;border-bottom:1px solid var(--line)}.pool-head h3{margin-bottom:3px}.pool-head+.table-scroll{margin-bottom:5px}.response-summary{display:flex;padding:15px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:0 16px;gap:0}.response-summary .strip-cell{flex:1}.response-summary .strip-cell:first-child{border-left:none}.danger-panel{border-color:#65413d}
|
||||
.footer{display:flex;gap:18px;justify-content:space-between;border-top:1px solid #202a23;color:#697b6e;font-size:10px;padding-top:17px;margin-top:22px}.footer span{color:#68766c}
|
||||
.mobile-menu{border:1px solid var(--line);background:#142019;color:#fff;padding:5px 9px;border-radius:2px}.sidebar-overlay{display:none}
|
||||
.login-body{display:grid;place-items:center;min-height:100vh;background:#060908;padding:20px}.login-panel{width:min(440px,100%);background:#111613;border:1px solid #354237;border-radius:3px;padding:32px}.login-brand{font-size:29px;letter-spacing:-1px;font-weight:750;padding-bottom:24px;border-bottom:1px solid var(--line)}.overline{font:10px var(--mono);letter-spacing:1px;color:var(--green);margin-top:23px;margin-bottom:9px}.login-panel h1{font-size:27px;margin-bottom:8px}.login-panel .muted{color:var(--muted);line-height:1.6}.login-help{font-size:11px;color:#829185;line-height:1.6;margin:23px 0 0}
|
||||
@media(max-width:1570px){.metrics-grid.six{grid-template-columns:repeat(3,minmax(0,1fr))}.chart-card canvas{height:160px}.barline{grid-template-columns:75px minmax(0,1fr) 72px}.strip-cell{padding-left:12px;padding-right:12px}}
|
||||
@media(max-width:1130px){.shell{grid-template-columns:190px minmax(0,1fr)}.dashboard-lower{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-grid.triple{grid-template-columns:repeat(2,minmax(0,1fr))}.form-layout{grid-template-columns:1fr}.toolbar{flex-wrap:wrap}.status-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.status-main{min-height:53px}.zone-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.operations-grid{grid-template-columns:1fr}}
|
||||
@media(max-width:820px){.shell{grid-template-columns:1fr}.sidebar{position:fixed;transform:translateX(-100%);width:235px;transition:transform .12s ease;box-shadow:0 0 0 transparent}.sidebar.open{transform:translateX(0)}.sidebar-overlay.open{display:block;position:fixed;inset:0;background:#000b;z-index:20}.mobile-menu{display:block}.top-actions .tool-button span{display:none}.tool-button{padding:6px}.topbar{padding:0 12px}.content{padding:16px 13px}.page-head-right{display:none}.metrics-grid.six{grid-template-columns:repeat(2,minmax(0,1fr))}.status-strip,.compact-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.status-main{grid-column:span 2}.status-strip .strip-cell:nth-child(2n){border-left:0}.field-search{width:180px}.footer span{display:none}}
|
||||
@media(max-width:540px){.page-head h1{font-size:23px}.dashboard-lower,.chart-grid.triple,.metrics-grid.four,.metrics-grid.six,.form-columns{grid-template-columns:1fr}.toolbar-form{width:100%}.field-search{flex:1;min-width:150px}.toolbar-end{width:100%;justify-content:flex-end}.status-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.zone-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.strip-cell{padding:9px 12px}.status-main{padding:8px 12px}.page-subtitle{font-size:11px}.operator-label,.desktop-only{display:none}.chart-card canvas{height:165px}}
|
||||
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
|
||||
@@ -0,0 +1,18 @@
|
||||
/* EasyDNS UI progressive enhancements. No secrets, auth state or API tokens in JS. */
|
||||
(() => {
|
||||
'use strict';
|
||||
const side = document.getElementById('sidebar');
|
||||
const toggle = document.getElementById('menuToggle');
|
||||
const cover = document.getElementById('sidebarOverlay');
|
||||
const close = () => { side?.classList.remove('open'); cover?.classList.remove('open'); toggle?.setAttribute('aria-expanded', 'false'); };
|
||||
toggle?.addEventListener('click', () => {const on = side.classList.toggle('open');cover?.classList.toggle('open', on);toggle.setAttribute('aria-expanded', String(on));});
|
||||
cover?.addEventListener('click', close);
|
||||
document.addEventListener('keydown', e => {if(e.key === 'Escape') close();});
|
||||
document.querySelectorAll('.notice-dismiss').forEach(el => el.addEventListener('click', () => el.closest('.notice')?.remove()));
|
||||
document.querySelectorAll('.bar-fill[data-count]').forEach(bar => {
|
||||
const count = Number(bar.dataset.count), total = Number(bar.dataset.total);
|
||||
const ratio = Number.isFinite(count) && Number.isFinite(total) && total > 0 ? 100 * count / total : 0;
|
||||
bar.style.width = Math.max(0, Math.min(100, ratio)) + '%';
|
||||
bar.title = ratio.toFixed(1) + '% of total';
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,55 @@
|
||||
/* Small, dependency-free canvas telemetry renderer.
|
||||
* Draws only measured, non-synthetic EasyDNS API sample history.
|
||||
* A 15-second backend poll stores samples in process memory. */
|
||||
(() => {
|
||||
'use strict';
|
||||
const COLORS={cyan:'#72cfe1',amber:'#f1b42b',red:'#ec8588',grid:'#303a34',muted:'#8d9d91',text:'#dce6df'};
|
||||
const chartTypes={
|
||||
queries:{series:[['queryRate','Queries / s','cyan']],unit:'/s'},
|
||||
cache:{series:[['cacheHitRate','Cache hit %','cyan']],unit:'%',range:[0,100]},
|
||||
latency:{series:[['p50ms','p50','cyan'],['p95ms','p95','amber'],['p99ms','p99','red']],unit:'ms'},
|
||||
blocked:{series:[['blocked','Blocked / s','amber']],unit:'/s'},
|
||||
responses:{series:[['noerror','NOERROR','cyan'],['nxdomain','NXDOMAIN','amber'],['servfail','SERVFAIL','red']],unit:'/s'}
|
||||
};
|
||||
let samples=[];let lastPoll='';
|
||||
function render(c){
|
||||
const type=chartTypes[c.dataset.dnsChart];if(!type)return;
|
||||
const dpr=Math.min(2,window.devicePixelRatio||1);
|
||||
const box=c.getBoundingClientRect();if(box.width<30)return;
|
||||
const width=box.width,height=box.height;
|
||||
c.width=Math.round(width*dpr);c.height=Math.round(height*dpr);
|
||||
const ctx=c.getContext('2d');if(!ctx)return;ctx.setTransform(dpr,0,0,dpr,0,0);ctx.clearRect(0,0,width,height);
|
||||
const pad={left:49,right:12,top:10,bottom:25};const pw=Math.max(5,width-pad.left-pad.right),ph=Math.max(5,height-pad.top-pad.bottom);
|
||||
const series=type.series.map(([key,label,color])=>({key,label,color:COLORS[color],vals:samples.map(s=>typeof s[key]==='number'&&Number.isFinite(s[key])?s[key]:null)}));
|
||||
const observed=series.flatMap(x=>x.vals.filter(v=>v!==null));
|
||||
ctx.font='10px ui-monospace,Consolas,monospace';ctx.textBaseline='middle';
|
||||
if(samples.length<2||observed.length<2){ctx.fillStyle=COLORS.muted;ctx.textAlign='center';ctx.fillText('Collecting live samples…',width/2,height/2-2);ctx.fillText('First rate after 2 successful polls',width/2,height/2+15);return;}
|
||||
let min=type.range?type.range[0]:0,max=type.range?type.range[1]:Math.max(...observed,0.001)*1.16;
|
||||
if(!Number.isFinite(max)||max===min)max=min+1;
|
||||
const x=i=>pad.left+pw*(i/Math.max(1,samples.length-1));
|
||||
const y=v=>pad.top+ph*(1-(v-min)/(max-min));
|
||||
ctx.textAlign='right';ctx.lineWidth=1;for(let tick=0;tick<=4;tick++){
|
||||
const value=min+(max-min)*tick/4,py=y(value);
|
||||
ctx.strokeStyle=COLORS.grid;ctx.setLineDash([2,4]);ctx.beginPath();ctx.moveTo(pad.left,py);ctx.lineTo(width-pad.right,py);ctx.stroke();
|
||||
ctx.fillStyle=COLORS.muted;const label=max<=10?value.toFixed(1):Math.round(value).toString();ctx.fillText(label+type.unit,pad.left-8,py);
|
||||
}
|
||||
ctx.setLineDash([]);ctx.textAlign='center';ctx.fillStyle=COLORS.muted;
|
||||
[0,.25,.5,.75,1].forEach(p=>{const idx=Math.min(samples.length-1,Math.round(p*(samples.length-1)));const t=new Date(samples[idx].time);if(!Number.isNaN(t.getTime()))ctx.fillText(t.toLocaleTimeString(undefined,{hour:'2-digit',minute:'2-digit'}),x(idx),height-9);});
|
||||
series.forEach(s=>{ctx.beginPath();ctx.strokeStyle=s.color;ctx.lineWidth=1.65;ctx.lineJoin='round';let connected=false;
|
||||
s.vals.forEach((v,i)=>{if(v===null){connected=false;return;}const px=x(i),py=y(v);if(!connected){ctx.moveTo(px,py);connected=true;}else{ctx.lineTo(px,py);}});ctx.stroke();
|
||||
});
|
||||
}
|
||||
async function poll(){
|
||||
try{
|
||||
const r=await fetch('/ui/telemetry',{credentials:'same-origin',cache:'no-store',headers:{Accept:'application/json'}});
|
||||
if(!r.ok||!(r.headers.get('content-type')||'').includes('json'))return;
|
||||
const data=await r.json();samples=Array.isArray(data.samples)?data.samples:[];lastPoll=data.lastPoll;
|
||||
document.querySelectorAll('canvas[data-dns-chart]').forEach(render);
|
||||
}catch(_){/* Missing data stays empty; never fabricate data. */}
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded',()=>{
|
||||
const canvases=document.querySelectorAll('canvas[data-dns-chart]');if(!canvases.length)return;
|
||||
const observer=new ResizeObserver(()=>canvases.forEach(render));canvases.forEach(c=>observer.observe(c));
|
||||
poll();setInterval(poll,15000);
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="9" fill="#080b09"/><circle cx="32" cy="32" r="19" fill="none" stroke="#9bc992" stroke-width="3"/><circle cx="32" cy="32" r="5" fill="#b7d8a0"/><path d="M13 32h38M32 13v38" fill="none" stroke="#536f5a" stroke-width="2"/></svg>
|
||||
|
After Width: | Height: | Size: 319 B |
@@ -0,0 +1,15 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"><defs>
|
||||
<symbol id="book" viewBox="0 0 24 24"><path d="M4 4.5h5.5A2.5 2.5 0 0 1 12 7v13a3 3 0 0 0-3-3H4V4.5ZM20 4.5h-5.5A2.5 2.5 0 0 0 12 7v13a3 3 0 0 1 3-3h5V4.5Z"/></symbol>
|
||||
<symbol id="list" viewBox="0 0 24 24"><path d="M9 6h11M9 12h11M9 18h11"/><circle cx="4.5" cy="6" r=".8"/><circle cx="4.5" cy="12" r=".8"/><circle cx="4.5" cy="18" r=".8"/></symbol>
|
||||
<symbol id="settings" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="m10 2-.5 2.5-2 .9-2-1.5L3 6.5 4.5 8l-1 2L1 11v3l2.5.5 1 2L3 18l2.5 2.5 2-1.5 2 .9.5 2.1h4l.5-2.1 2-.9 2 1.5L21 18l-1.5-2 1-2L23 13v-2l-2.5-.5-1-2 1.5-2L18.5 4l-2 1.5-2-.9L14 2Z"/></symbol>
|
||||
<symbol id="logout" viewBox="0 0 24 24"><path d="M9 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h3M16 8l4 4-4 4M20 12H9"/></symbol>
|
||||
<symbol id="search" viewBox="0 0 24 24"><circle cx="10.5" cy="10.5" r="6.5"/><path d="m15.5 15.5 5 5"/></symbol>
|
||||
<symbol id="plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
|
||||
<symbol id="upload" viewBox="0 0 24 24"><path d="M12 16V4m0 0-4 4m4-4 4 4M4 20h16"/></symbol>
|
||||
<symbol id="refresh" viewBox="0 0 24 24"><path d="M20 7v5h-5M4 17v-5h5M18.5 9A7 7 0 0 0 6 6M5.5 15a7 7 0 0 0 12 3"/></symbol>
|
||||
<symbol id="edit" viewBox="0 0 24 24"><path d="M4 20h4l11-11-4-4L4 16v4ZM13.5 6.5l4 4"/></symbol>
|
||||
<symbol id="trash" viewBox="0 0 24 24"><path d="M4 7h16M9 3h6l1 4H8l1-4ZM7 7l1 14h8l1-14M10 11v6M14 11v6"/></symbol>
|
||||
<symbol id="save" viewBox="0 0 24 24"><path d="M5 4h12l2 2v14H5V4ZM8 4v6h8V4M8 20v-6h8v6"/></symbol>
|
||||
<symbol id="bell" viewBox="0 0 24 24"><path d="M18 8a6 6 0 0 0-12 0c0 7-3 8-3 9h18c0-1-3-2-3-9M10 20h4"/></symbol>
|
||||
<symbol id="arrow-right" viewBox="0 0 24 24"><path d="M5 12h14m-6-6 6 6-6 6"/></symbol>
|
||||
</defs></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,6 @@
|
||||
@charset "UTF-8";/*!
|
||||
* Bootstrap v5.3.6 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2025 The Bootstrap Authors
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/:root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222,226,230;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255,255,255;--bs-secondary-color:rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb:222,226,230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb:222,226,230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherLine truncated
|
||||
/*# sourceMappingURL=bootstrap.min.css.map */
|
||||
@@ -0,0 +1,36 @@
|
||||
{{define "base"}}<!doctype html>
|
||||
<html lang="en" data-bs-theme="dark"><head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="dark"><meta name="theme-color" content="#050706">
|
||||
<title>{{.Title}} · EasyDNS</title>
|
||||
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="/static/vendor/bootstrap.min.css"><link rel="stylesheet" href="/static/app.css">
|
||||
<script defer src="/static/app.js"></script><script defer src="/static/charts.js"></script>
|
||||
</head><body>
|
||||
<div class="shell">
|
||||
<aside class="sidebar" id="sidebar" aria-label="Primary navigation">
|
||||
<div class="brand"><a href="/" aria-label="EasyDNS Overview">EasyDNS</a></div>
|
||||
<div class="sidebar-content">
|
||||
<div class="nav-section">DNS</div>
|
||||
<nav class="sidenav" aria-label="DNS"><a {{if eq .Active "overview"}}class="active" aria-current="page"{{end}} href="/">Overview</a><a {{if eq .Active "zones"}}class="active" aria-current="page"{{end}} href="/zones">Zones</a><a {{if eq .Active "query"}}class="active" aria-current="page"{{end}} href="/query">DNS lookup</a></nav>
|
||||
<div class="nav-section">RESOLUTION & POLICY</div>
|
||||
<nav class="sidenav" aria-label="Resolution and policy"><a {{if eq .Active "upstreams"}}class="active" aria-current="page"{{end}} href="/upstreams">Upstreams</a><a {{if eq .Active "policies"}}class="active" aria-current="page"{{end}} href="/policies">Policies</a><a {{if eq .Active "views"}}class="active" aria-current="page"{{end}} href="/views">Views</a><a {{if eq .Active "acl"}}class="active" aria-current="page"{{end}} href="/acl">ACL</a><a {{if eq .Active "rate"}}class="active" aria-current="page"{{end}} href="/rate-limiting">Rate limiting</a><a {{if eq .Active "blocklists"}}class="active" aria-current="page"{{end}} href="/blocklists">Blocklists</a></nav>
|
||||
<div class="nav-section">MONITORING & SYSTEM</div>
|
||||
<nav class="sidenav" aria-label="Monitoring"><a {{if eq .Active "cache"}}class="active" aria-current="page"{{end}} href="/cache">Cache</a><a {{if eq .Active "metrics"}}class="active" aria-current="page"{{end}} href="/metrics">Metrics</a><a {{if eq .Active "audit"}}class="active" aria-current="page"{{end}} href="/audit">Audit log</a><a {{if eq .Active "status"}}class="active" aria-current="page"{{end}} href="/status">Server status</a><a {{if eq .Active "configuration"}}class="active" aria-current="page"{{end}} href="/configuration">Configuration</a></nav>
|
||||
</div>
|
||||
<div class="sidebar-foot"><span class="indicator"></span> Local control panel <small>EasyDNS API connection</small></div>
|
||||
</aside>
|
||||
<div class="workspace">
|
||||
<header class="topbar"><button class="mobile-menu" type="button" id="menuToggle" aria-controls="sidebar" aria-expanded="false" aria-label="Open navigation">☰</button><div class="breadcrumbs">{{.Breadcrumb}}</div>
|
||||
<div class="top-actions"><a href="https://git.linuxiarz.pl/gru/EasyDNS" target="_blank" rel="noopener noreferrer" class="tool-button"><svg class="ico"><use href="/static/icons.svg#book"/></svg><span>Documentation</span></a><a href="/audit" class="tool-button"><svg class="ico"><use href="/static/icons.svg#list"/></svg><span>Audit</span></a><a href="/configuration" class="tool-button"><svg class="ico"><use href="/static/icons.svg#settings"/></svg><span>Configuration</span></a><form method="post" action="/logout" class="inline"><input type="hidden" name="_csrf" value="{{.CSRF}}"><button type="submit" class="tool-button"><svg class="ico"><use href="/static/icons.svg#logout"/></svg><span>Sign out</span></button></form></div>
|
||||
</header>
|
||||
<main class="content" id="main">
|
||||
<div class="page-head"><div class="page-head-left"><p class="eyebrow"><span class="indicator"></span> EasyDNS control room</p><h1>{{.Title}}</h1><p class="page-subtitle">{{.Subtitle}}</p></div><div class="page-head-right"><span class="operator-label">{{.User}}</span></div></div>
|
||||
{{if .Message}}<div class="notice {{.MessageType}}" role="alert"><span>{{.Message}}</span><button class="notice-dismiss" type="button" aria-label="Dismiss notice">×</button></div>{{end}}
|
||||
{{template "content" .}}
|
||||
<footer class="footer">EasyDNS · independent management panel <span>Only verified EasyDNS API operations are available</span></footer>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebarOverlay" class="sidebar-overlay" aria-hidden="true"></div>
|
||||
</body></html>{{end}}
|
||||
@@ -0,0 +1,2 @@
|
||||
{{define "content"}}<section class="panel"><div class="toolbar"><div class="toolbar-title"><h2>Administrative events</h2><p>Most recent administrative operations</p></div><form method="get" action="/audit" class="toolbar-form"><label class="field-label" for="auditN">Tail length</label><select class="field field-select" id="auditN" name="n">{{range auditSizes}}<option value="{{.}}" {{if eq (selectval $.Data.Filter "n") (string .)}}selected{{end}}>{{.}}</option>{{end}}</select><button type="submit" class="btn-ui">Load events</button></form></div>
|
||||
<div class="table-scroll"><table class="data-table"><thead><tr><th>TIMESTAMP</th><th>ACTOR</th><th>ACTION</th><th>TARGET</th><th>RESULT</th><th>DETAILS</th></tr></thead><tbody>{{range .Data.Audit}}<tr><td class="mono subtle">{{when .TimeUnix}}</td><td class="mono">{{.Actor}}</td><td>{{.Action}}</td><td class="mono">{{.Target}}</td><td><span class="dot {{statusclass .Result}}"></span>{{.Result}}</td><td class="break-any">{{.Detail}}</td></tr>{{else}}<tr><td colspan="6" class="empty">No audit events returned by EasyDNS.</td></tr>{{end}}</tbody></table></div><div class="table-footer"><span>{{len .Data.Audit}} entries returned · maximum supported by API: 10,000</span></div></section><div class="notice-inline mt-panel">The audit endpoint records management operations. It is not a DNS query log and does not provide date-range filters or pagination.</div>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>New block rule</h2><p>One validated policy rule per request.</p></div></div><form method="post" action="/blocklists" class="form-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><div class="field-row"><label class="field-label" for="blockRule">Rule <span class="required">*</span></label><input class="field mono" id="blockRule" name="rule" required value="{{selectval .Data.Form "rule"}}" placeholder="malware.example.org"><small>A single line. EasyDNS validates syntax and writes to its API overlay.</small></div><div class="form-actions"><a href="/blocklists" class="btn-ui">Cancel</a><button class="btn-ui btn-primary-ui" type="submit">Add rule</button></div></form></section><aside class="panel guide"><div class="panel-head"><h2>API boundaries</h2></div><div class="panel-body"><p>The REST API returns the number of loaded rules, but not their complete list. Editing or removing an individual rule is not supported.</p><div class="data-row"><span>Invalid rule</span><strong>400</strong></div><div class="data-row"><span>Rejected reload</span><strong>422</strong></div></div></aside></div>{{end}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{define "content"}}<div class="status-strip panel compact-strip"><div class="strip-cell"><span>CONFIGURED LISTS</span><strong>{{len .Data.Blocklists.Lists}}</strong></div><div class="strip-cell"><span>LOADED LISTS</span><strong>{{len .Data.Blocklists.Loaded}}</strong></div><div class="strip-cell"><span>ACTIVE RULES</span><strong>{{int .Data.Blocklists.Rules}}</strong></div><div class="strip-cell"><span>UPDATE INTERVAL</span><strong>{{.Data.Blocklists.UpdateInterval}}</strong></div></div>
|
||||
<section class="panel mt-panel"><div class="toolbar"><div class="toolbar-title"><h2>Configured feeds</h2><p>Rule sources and their effective enablement.</p></div><a class="btn-ui btn-primary-ui" href="/blocklists/new"><svg class="ico"><use href="/static/icons.svg#plus"/></svg>Add rule</a></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>CATEGORY</th><th>SOURCE FILE</th><th>REMOTE URL</th><th>ENABLED</th><th>UPDATE INTERVAL</th></tr></thead><tbody>{{range .Data.Blocklists.Lists}}<tr><td class="entity">{{string (get . "name")}}</td><td>{{string (get . "category")}}</td><td class="mono">{{string (get . "file")}}</td><td class="mono break-any">{{string (get . "url")}}</td><td>{{string (get . "enabled")}}</td><td class="mono">{{string (get . "update_interval")}}</td></tr>{{else}}<tr><td class="empty" colspan="6">No blocklist feeds configured.</td></tr>{{end}}</tbody></table></div></section>
|
||||
<section class="panel mt-panel"><div class="panel-head"><div><h2>Remote list sync state</h2><p>Read-only update and download results</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>LAST SUCCESS</th><th>LAST ATTEMPT</th><th>RESULT</th><th>MESSAGE</th></tr></thead><tbody>{{range $key,$v:=.Data.Blocklists.State}}<tr><td class="mono">{{$key}}</td><td class="mono">{{string (get $v "last_success")}}</td><td class="mono">{{string (get $v "last_attempt")}}</td><td>{{string (get $v "ok")}}</td><td>{{string (get $v "message")}}</td></tr>{{else}}<tr><td class="empty" colspan="5">No remote feed sync state available.</td></tr>{{end}}</tbody></table></div></section><div class="notice-inline mt-panel">REST can add individual block rules, but cannot list/remove them individually or force a remote feed download.</div>{{end}}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{define "content"}}<div class="metrics-grid four"><div class="panel metric"><span class="metric-label">CACHE ENTRIES</span><strong>{{int .Data.Cache.Entries}}</strong><small>Capacity {{int .Data.Cache.Capacity}}</small></div><div class="panel metric"><span class="metric-label">HITS</span><strong>{{int .Data.Cache.Hits}}</strong><small>Cumulative hits</small></div><div class="panel metric"><span class="metric-label">MISSES</span><strong>{{int .Data.Cache.Misses}}</strong><small>Cumulative misses</small></div><div class="panel metric"><span class="metric-label">EVICTIONS</span><strong>{{int .Data.Cache.Evictions}}</strong><small>Cumulative evictions</small></div></div>
|
||||
<div class="dashboard-lower mt-panel"><section class="panel"><div class="panel-head"><h2>Cache counters</h2></div><div class="panel-body compact"><div class="data-row"><span>Entries</span><strong>{{int .Data.Cache.Entries}}</strong></div><div class="data-row"><span>Inserts</span><strong>{{int .Data.Cache.Inserts}}</strong></div><div class="data-row"><span>Expired</span><strong>{{int .Data.Cache.Expired}}</strong></div><div class="data-row"><span>Stale served</span><strong>{{int .Data.Cache.StaleServed}}</strong></div><div class="data-row"><span>Prefetches</span><strong>{{int .Data.Cache.Prefetches}}</strong></div></div></section>
|
||||
<section class="panel"><div class="panel-head"><h2>Flush domain suffix</h2></div><form method="post" action="/cache/flush" class="panel-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="scope" value="domain"><p>Invalidate entries under a domain suffix. Cache contents cannot be enumerated over REST.</p><label class="field-label" for="flushDomain">Domain suffix</label><input class="field mono" id="flushDomain" name="domain" required placeholder="example.org"><button class="btn-ui mt-3" type="submit">Flush domain</button></form></section>
|
||||
<section class="panel danger-panel"><div class="panel-head"><h2>Flush entire cache</h2></div><form method="post" action="/cache/flush" class="panel-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="scope" value="all"><p>Remove all DNS cache entries. This is a destructive action without an undo endpoint.</p><label class="field-label" for="flushConfirm">Type FLUSH ALL to confirm</label><input class="field mono" name="confirm" id="flushConfirm" required pattern="FLUSH ALL" autocomplete="off" placeholder="FLUSH ALL"><button class="btn-ui btn-danger-ui mt-3" type="submit">Flush all cache entries</button></form></section></div>{{end}}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{define "content"}}<div class="form-layout policy-layout"><section class="panel"><div class="panel-head"><div><h2>Visible runtime configuration</h2><p>Selected runtime parameters exposed by EasyDNS</p></div></div><div class="panel-body compact"><div class="data-row"><span>Server mode</span><strong>{{.Data.Status.Mode}}</strong></div><div class="data-row"><span>Version</span><strong>{{.Data.Status.Version}}</strong></div><div class="data-row"><span>Default resolution</span><strong>{{.Data.Status.Roles.DefaultResolution}}</strong></div><div class="data-row"><span>DNSSEC validation</span><strong>{{string .Data.Status.DNSSECValidation}}</strong></div><div class="data-row"><span>Block action</span><strong>{{string (get .Data.Policies.Policy "block_action")}}</strong></div><div class="data-row"><span>API allowed clients</span><strong>{{join .Data.Policies.APIAllowedClients ", "}}</strong></div><div class="data-row"><span>Recursion allowed clients</span><strong>{{join .Data.Policies.RecursionAllowedClients ", "}}</strong></div></div>
|
||||
<div class="panel-head border-top"><div><h2>Hot reload</h2><p>Reload configuration from disk. EasyDNS reports errors and preserves prior active configuration.</p></div></div>
|
||||
<form method="post" action="/configuration/reload" class="form-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><label class="field-label" for="reloadConfirm">Type RELOAD to confirm</label><input class="field mono" id="reloadConfirm" name="confirm" required pattern="RELOAD" autocomplete="off" placeholder="RELOAD"><div class="form-actions"><button class="btn-ui btn-primary-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#refresh"/></svg>Reload EasyDNS configuration</button></div></form></section>
|
||||
<aside class="panel guide"><div class="panel-head"><h2>What this panel cannot change</h2></div><div class="panel-body"><p>The REST API does not expose arbitrary configuration file editing, token rotation, server restarts, listener updates, ACL edits or rate limiter changes.</p><div class="notice-inline">EasyDNS creates <span class="mono">control.token</span> itself when its TCP API is enabled. The Go process reads that file server-side. It is never sent to your browser.</div><p class="mt-3 muted">This page never displays the token or pretends to modify local configuration.</p></div></aside></div>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
{{define "content"}}<div class="confirmation-box panel"><div class="panel-head"><div><h2>Stale zone serial</h2><p>The operation was not applied.</p></div><span class="tag amber">HTTP 412</span></div><div class="panel-body"><p>EasyDNS rejected the request because the zone changed after the form was opened. Review the latest records and start a new edit. This panel will not silently overwrite another administrator's modifications.</p><div class="form-actions"><a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records">Reload records</a><a class="btn-ui" href="{{.Data.ZoneURL}}">Zone details</a></div></div></div>{{end}}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{define "content"}}<div class="confirmation-box panel"><div class="panel-head"><div><h2>Confirm permanent deletion</h2><p>This operation cannot be undone through EasyDNS REST.</p></div><span class="tag red">DESTRUCTIVE</span></div><div class="panel-body">
|
||||
{{if eq .Data.Action "record"}}<p>You are about to remove the following DNS record:</p><div class="target-summary"><div class="data-row"><span>Name</span><strong class="mono">{{.Data.Record.Name}}</strong></div><div class="data-row"><span>Type</span><strong>{{.Data.Record.Type}}</strong></div><div class="data-row"><span>RDATA</span><strong class="mono">{{.Data.Record.Data}}</strong></div></div><form method="post" action="{{.Data.ZoneURL}}/records/{{.Data.Record.ID}}/delete"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="etag" value="{{.Data.ETag}}"><label class="field-label" for="confirmDelete">Type DELETE <span class="required">*</span></label><input id="confirmDelete" class="field mono" name="confirm" required pattern="DELETE" autocomplete="off" placeholder="DELETE"><div class="form-actions"><a class="btn-ui" href="{{.Data.ZoneURL}}/records">Cancel</a><button type="submit" class="btn-ui btn-danger-ui">Delete record</button></div></form>
|
||||
{{else}}<p>Zone <strong class="mono">{{.Data.Zone.Name}}</strong> will be removed if it was created via the REST API overlay. File-configured zones cannot be removed using this endpoint (409).</p><form method="post" action="{{.Data.ZoneURL}}/delete"><input type="hidden" name="_csrf" value="{{.CSRF}}"><label class="field-label" for="confirmZone">Type the complete zone name <span class="required">*</span></label><input id="confirmZone" class="field mono" name="confirm" required autocomplete="off" placeholder="{{.Data.Zone.Name}}"><div class="form-actions"><a class="btn-ui" href="{{.Data.ZoneURL}}">Cancel</a><button type="submit" class="btn-ui btn-danger-ui">Delete zone</button></div></form>{{end}}
|
||||
</div></div>{{end}}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{define "login"}}<!doctype html><html lang="en" data-bs-theme="dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Sign in · EasyDNS</title><link rel="stylesheet" href="/static/vendor/bootstrap.min.css"><link rel="stylesheet" href="/static/app.css"></head>
|
||||
<body class="login-body"><main class="login-panel"><div class="login-brand">EasyDNS</div><p class="overline">LOCAL CONTROL ROOM</p><h1>Sign in</h1><p class="muted mb-4">Access the EasyDNS administration panel. The EasyDNS bearer token stays on the server.</p>
|
||||
{{with index . "Error"}}{{if .}}<div class="notice danger" role="alert">{{.}}</div>{{end}}{{end}}
|
||||
<form method="post" action="/login" autocomplete="on"><label class="field-label" for="username">Username</label><input class="field" id="username" name="username" autocomplete="username" value="{{index . "Username"}}" required><label class="field-label mt-3" for="password">Password</label><input class="field" type="password" id="password" name="password" autocomplete="current-password" required><button class="btn-ui btn-primary-ui w-100 mt-4" type="submit">Sign in</button></form><p class="login-help">Panel authentication is separate from EasyDNS REST API credentials.</p></main></body></html>{{end}}
|
||||
@@ -0,0 +1,11 @@
|
||||
{{define "content"}}<div class="metrics-grid six"><div class="panel metric"><span class="metric-label">DNS QUERIES</span><strong>{{int .Data.Stats.QueriesTotal}}</strong><small>Cumulative counter</small></div><div class="panel metric"><span class="metric-label">CACHE HIT RATE</span><strong class="success">{{pct .Data.Stats.CacheHitRate}}</strong><small>Latest cache ratio</small></div><div class="panel metric"><span class="metric-label">P50 LATENCY</span><strong>{{ms .Data.Stats.LatencyP50S}}</strong><small>Live histogram</small></div><div class="panel metric"><span class="metric-label">P95 LATENCY</span><strong>{{ms .Data.Stats.LatencyP95S}}</strong><small>Live histogram</small></div><div class="panel metric"><span class="metric-label">P99 LATENCY</span><strong>{{ms .Data.Stats.LatencyP99S}}</strong><small>Live histogram</small></div><div class="panel metric"><span class="metric-label">RATE LIMITED</span><strong class="warning">{{int .Data.Stats.RateLimited}}</strong><small>Cumulative count</small></div></div>
|
||||
<div class="chart-grid triple"><section class="panel chart-card"><div class="panel-head"><div><h2>DNS query throughput</h2><p>Measured requests per second</p></div></div><canvas data-dns-chart="queries" role="img" aria-label="DNS query rate"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> DNS queries / s</div></section>
|
||||
<section class="panel chart-card"><div class="panel-head"><div><h2>Response codes</h2><p>Rates from cumulative result counters</p></div></div><canvas data-dns-chart="responses" role="img" aria-label="DNS responses over time"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> NOERROR <span class="legend-dot amber"></span> NXDOMAIN <span class="legend-dot red"></span> SERVFAIL</div></section>
|
||||
<section class="panel chart-card"><div class="panel-head"><div><h2>Cache efficiency</h2><p>Hit share calculated per poll</p></div></div><canvas data-dns-chart="cache" role="img" aria-label="Cache hit ratio"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> Cache hit %</div></section></div>
|
||||
<div class="chart-grid triple"><section class="panel chart-card"><div class="panel-head"><div><h2>Resolver latency</h2><p>p50 / p95 / p99 snapshot history</p></div></div><canvas data-dns-chart="latency" role="img" aria-label="Latency percentiles"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> p50 <span class="legend-dot amber"></span> p95 <span class="legend-dot red"></span> p99</div></section>
|
||||
<section class="panel chart-card"><div class="panel-head"><div><h2>Blocked query rate</h2><p>Derived from blocked counter</p></div></div><canvas data-dns-chart="blocked" role="img" aria-label="Blocked DNS query rate"></canvas><div class="chart-foot"><span class="legend-dot amber"></span> Blocked / s</div></section>
|
||||
<section class="panel chart-card"><div class="panel-head"><div><h2>Response count mix</h2><p>Actual cumulative EasyDNS counters</p></div></div><div class="panel-body compact bars-large">{{range $key,$v:=.Data.Stats.Responses}}<div class="barline"><span class="mono upper">{{$key}}</span><div class="bar-track"><span class="bar-fill {{statusclass $key}}" data-count="{{$v}}" data-total="{{$.Data.Stats.QueriesTotal}}"></span></div><strong>{{int $v}}</strong></div>{{else}}<div class="empty">No response counts available.</div>{{end}}</div></section></div>
|
||||
<div class="dashboard-lower mt-panel"><section class="panel"><div class="panel-head"><h2>Query sources</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>SOURCE</th><th>COUNT (CUMULATIVE)</th></tr></thead><tbody>{{range $key,$v:=.Data.Stats.Sources}}<tr><td class="mono">{{$key}}</td><td class="mono right">{{int $v}}</td></tr>{{else}}<tr><td class="empty" colspan="2">No query source counters.</td></tr>{{end}}</tbody></table></div></section>
|
||||
<section class="panel"><div class="panel-head"><h2>Cache counters</h2></div><div class="panel-body compact"><div class="data-row"><span>Entries</span><strong>{{int .Data.Stats.Cache.Entries}}</strong></div><div class="data-row"><span>Hits</span><strong>{{int .Data.Stats.Cache.Hits}}</strong></div><div class="data-row"><span>Misses</span><strong>{{int .Data.Stats.Cache.Misses}}</strong></div><div class="data-row"><span>Evictions</span><strong>{{int .Data.Stats.Cache.Evictions}}</strong></div></div></section>
|
||||
<section class="panel"><div class="panel-head"><h2>Telemetry sampling</h2></div><div class="panel-body compact"><div class="data-row"><span>Samples stored in UI memory</span><strong>{{.Data.SamplingCount}}</strong></div><div class="data-row"><span>Polling frequency</span><strong>15 s</strong></div><div class="data-row"><span>Last sample</span><strong>{{if .Data.SamplingTime.IsZero}}—{{else}}{{.Data.SamplingTime.Format "15:04:05"}}{{end}}</strong></div><div class="notice-inline">No artificial 24-hour chart data. Samples are collected only while the Go service runs, and reset on restart.</div></div></section></div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,34 @@
|
||||
{{define "content"}}
|
||||
<div class="status-strip panel">
|
||||
<div class="status-main"><div class="status-heading"><span class="dot {{statusclass .Data.Health.Status}}"></span><strong>{{if eq .Data.Health.Status "ok"}}DNS service operational{{else if eq .Data.Health.Status "degraded"}}DNS service degraded{{else}}Status unavailable{{end}}</strong></div><div class="tiny muted">Health: {{if .Data.Health.Status}}{{.Data.Health.Status}}{{else}}Unknown{{end}} · {{if .Data.Status.Roles.Recursive}}Resolver enabled{{else}}No recursive resolver{{end}}</div></div>
|
||||
<div class="strip-cell"><span>SERVER MODE</span><strong>{{if .Data.Status.Mode}}{{.Data.Status.Mode}}{{else}}—{{end}}</strong></div>
|
||||
<div class="strip-cell"><span>UPTIME</span><strong>{{uptime .Data.Status.UptimeSeconds}}</strong></div>
|
||||
<div class="strip-cell"><span>ZONES</span><strong>{{int .Data.Status.Roles.Primary}} primary / {{int .Data.Status.Roles.Secondary}} secondary</strong></div>
|
||||
<div class="strip-cell"><span>VERSION</span><strong>{{if .Data.Status.Version}}{{.Data.Status.Version}}{{else}}—{{end}}</strong></div>
|
||||
</div>
|
||||
<div class="metrics-grid six">
|
||||
<div class="metric panel"><span class="metric-label">DNS QUERIES</span><strong>{{int .Data.Stats.QueriesTotal}}</strong><small>Cumulative since startup</small></div>
|
||||
<div class="metric panel"><span class="metric-label">CACHE HIT RATIO</span><strong class="success">{{pct .Data.Stats.CacheHitRate}}</strong><small>Hits / (hits + misses)</small></div>
|
||||
<div class="metric panel"><span class="metric-label">RESOLVER LATENCY P95</span><strong>{{ms .Data.Stats.LatencyP95S}}</strong><small>Latest API histogram</small></div>
|
||||
<div class="metric panel"><span class="metric-label">BLOCKED QUERIES</span><strong class="warning">{{int .Data.Stats.Blocked}}</strong><small>Cumulative policy count</small></div>
|
||||
<div class="metric panel"><span class="metric-label">RATE LIMITED</span><strong>{{int .Data.Stats.RateLimited}}</strong><small>Cumulative count</small></div>
|
||||
<div class="metric panel"><span class="metric-label">ZONE HEALTH</span><strong class="{{statusclass .Data.Health.Status}}">{{if eq .Data.Health.Status "ok"}}Healthy{{else if eq .Data.Health.Status "degraded"}}Degraded{{else}}Unknown{{end}}</strong><small>{{len .Data.Health.ExpiredZones}} expired zones</small></div>
|
||||
</div>
|
||||
<div class="chart-grid triple">
|
||||
<section class="panel chart-card"><div class="panel-head"><div><h2>Query rate</h2><p>Calculated from real /stats counter deltas.</p></div><span class="live-mark">PANEL SAMPLES</span></div><canvas data-dns-chart="queries" aria-label="Queries per second, measured by panel" role="img"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> Queries / s</div></section>
|
||||
<section class="panel chart-card"><div class="panel-head"><div><h2>Cache hit ratio</h2><p>Derived from cache hit/miss deltas.</p></div></div><canvas data-dns-chart="cache" aria-label="Cache hit percentage" role="img"></canvas><div class="chart-foot"><span class="legend-dot cyan"></span> Hits / all lookups</div></section>
|
||||
<section class="panel chart-card"><div class="panel-head"><div><h2>Resolver latency</h2><p>Live p50 and p95, milliseconds.</p></div></div><canvas data-dns-chart="latency" aria-label="Resolver latency p50 p95" role="img"></canvas><div class="chart-foot"><span class="legend-dot amber"></span> p95 <span class="legend-dot cyan"></span> p50</div></section>
|
||||
</div>
|
||||
<div class="dashboard-lower">
|
||||
<section class="panel"><div class="panel-head"><div><h2>Response codes</h2><p>Cumulative DNS results since startup</p></div><a href="/metrics" class="text-link">Metrics →</a></div><div class="panel-body compact">
|
||||
{{range $key,$v := .Data.Stats.Responses}}<div class="barline"><span class="mono upper">{{$key}}</span><div class="bar-track"><span class="bar-fill {{statusclass $key}}" style="width:0" data-count="{{$v}}" data-total="{{$.Data.Stats.QueriesTotal}}"></span></div><strong>{{int $v}}</strong></div>{{else}}<div class="empty">No response statistics available.</div>{{end}}
|
||||
</div></section>
|
||||
<section class="panel"><div class="panel-head"><div><h2>Zone state</h2><p>Reported by EasyDNS</p></div><a href="/zones" class="text-link">View zones →</a></div><div class="panel-body compact">
|
||||
<div class="data-row"><span>Primary zones</span><strong>{{int .Data.Status.Roles.Primary}}</strong></div><div class="data-row"><span>Secondary zones</span><strong>{{int .Data.Status.Roles.Secondary}}</strong></div><div class="data-row"><span>Recursive resolver</span><strong>{{if .Data.Status.Roles.Recursive}}Enabled{{else}}Disabled{{end}}</strong></div><div class="data-row"><span>Forwarder</span><strong>{{if .Data.Status.Roles.Forwarder}}Enabled{{else}}Disabled{{end}}</strong></div><div class="data-row"><span>Expired zones</span><strong class="{{if .Data.Health.ExpiredZones}}danger{{else}}success{{end}}">{{len .Data.Health.ExpiredZones}}</strong></div>
|
||||
</div></section>
|
||||
<section class="panel"><div class="panel-head"><div><h2>Polling status</h2><p>UI sampling, not server-side history</p></div></div><div class="panel-body compact"><div class="data-row"><span>Samples</span><strong>{{.Data.SamplingCount}}</strong></div><div class="data-row"><span>Interval</span><strong>15 seconds</strong></div><div class="data-row"><span>Most recent</span><strong>{{if .Data.SamplingTime.IsZero}}No sample{{else}}{{.Data.SamplingTime.Format "15:04:05"}}{{end}}</strong></div><div class="notice-inline">Charts populate only after successful live polls.</div></div></section>
|
||||
</div>
|
||||
<section class="panel mt-panel"><div class="panel-head"><div><h2>Recent audit events</h2><p>Changes and administration activity</p></div><a class="text-link" href="/audit">Audit log →</a></div><div class="table-scroll"><table class="data-table"><thead><tr><th>TIME</th><th>ACTION</th><th>TARGET</th><th>RESULT</th><th>DETAIL</th></tr></thead><tbody>
|
||||
{{range .Data.Audit}}<tr><td class="mono subtle">{{when .TimeUnix}}</td><td>{{.Action}}</td><td class="mono">{{.Target}}</td><td><span class="dot {{statusclass .Result}}"></span>{{.Result}}</td><td class="ellipsis">{{.Detail}}</td></tr>{{else}}<tr><td colspan="5" class="empty">No audit events returned by EasyDNS.</td></tr>{{end}}
|
||||
</tbody></table></div></section>
|
||||
{{end}}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{define "content"}}<div class="form-layout policy-layout"><section class="panel"><div class="panel-head"><div><h2>Blocking policy</h2><p>Only allowlist and block action can be changed here.</p></div></div>
|
||||
<form class="form-body" method="post" action="/policies"><input type="hidden" name="_csrf" value="{{.CSRF}}"><div class="field-row"><label for="blockAction" class="field-label">Block action <span class="required">*</span></label><select id="blockAction" name="block_action" class="field" required>{{range blockActions}}<option value="{{.}}" {{if eq . (selectval $.Data.Form "block_action")}}selected{{end}}>{{.}}</option>{{end}}</select><small>Configured action for matching block rules; NXDOMAIN/REFUSED/NULL/ADDRESS/NODATA.</small></div>
|
||||
<div class="field-row"><label class="field-label" for="allowlist">Allowlist entries</label><textarea id="allowlist" name="allowlist" class="field mono" rows="10" placeholder="good.example.org">{{selectval .Data.Form "allowlist"}}</textarea><small>One entry per line. Empty list explicitly clears the allowlist.</small></div>
|
||||
<div class="form-actions"><button type="reset" class="btn-ui">Discard local edits</button><button type="submit" class="btn-ui btn-primary-ui">Save supported settings</button></div></form></section>
|
||||
<aside class="panel guide"><div class="panel-head"><h2>Other policy fields</h2></div><div class="panel-body"><p>All other fields are read-only in the REST API. View them here; edit the EasyDNS configuration file outside this panel.</p>
|
||||
{{range $key,$v := .Data.Policies.Policy}}{{if and (ne $key "allowlist") (ne $key "block_action")}}<div class="data-row"><span>{{$key}}</span><strong class="break-any">{{string $v}}</strong></div>{{end}}{{end}}</div></aside></div>{{end}}
|
||||
@@ -0,0 +1,5 @@
|
||||
{{define "content"}}<div class="notice-inline mb-3"><strong>Read-only.</strong> EasyDNS REST API does not expose create/update/delete methods for {{if eq .Data.Tab "views"}}views{{else if eq .Data.Tab "acl"}}named ACLs{{else}}DNS rate limits{{end}}.</div>
|
||||
{{if eq .Data.Tab "views"}}<section class="panel"><div class="panel-head"><div><h2>Configured split-horizon views</h2><p>Active split-horizon configuration</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>VIEW</th><th>CLIENTS</th><th>RESOLUTION</th><th>RECURSION</th><th>DETAILS</th></tr></thead><tbody>{{range .Data.Policies.Views}}<tr><td class="entity">{{string (get . "name")}}</td><td class="mono">{{string (get . "clients")}}</td><td>{{string (get . "resolution")}}</td><td>{{string (get . "recursion")}}</td><td><details><summary>Show config</summary><pre class="code-block">{{asjson .}}</pre></details></td></tr>{{else}}<tr><td class="empty" colspan="5">No views returned by the API.</td></tr>{{end}}</tbody></table></div></section>
|
||||
{{else if eq .Data.Tab "acl"}}<div class="dashboard-lower"><section class="panel"><div class="panel-head"><h2>Named ACLs</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>CLIENT NETWORKS / REFERENCES</th></tr></thead><tbody>{{range $key,$v:=.Data.Policies.ACLs}}<tr><td class="mono entity">{{$key}}</td><td class="mono">{{string $v}}</td></tr>{{else}}<tr><td colspan="2" class="empty">No named ACLs configured.</td></tr>{{end}}</tbody></table></div></section><section class="panel"><div class="panel-head"><h2>Allowed clients</h2></div><div class="panel-body compact"><h3>Recursion</h3>{{range .Data.Policies.RecursionAllowedClients}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No entries returned.</p>{{end}}<h3 class="mt-4">REST API</h3>{{range .Data.Policies.APIAllowedClients}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No entries returned.</p>{{end}}</div></section></div>
|
||||
{{else}}<section class="panel"><div class="panel-head"><div><h2>DNS response rate limiting</h2><p>Not the TCP REST API request throttle.</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>PARAMETER</th><th>EFFECTIVE VALUE</th></tr></thead><tbody>{{range $key,$v:=.Data.Policies.RateLimit}}<tr><td class="mono">{{$key}}</td><td class="mono break-any">{{string $v}}</td></tr>{{else}}<tr><td colspan="2" class="empty">No rate limiting config returned.</td></tr>{{end}}</tbody></table></div></section><div class="metric-row mt-panel"><div class="panel metric"><span class="metric-label">RATE-LIMITED RESPONSES</span><strong>{{int .Data.Stats.RateLimited}}</strong><small>Cumulative /stats counter</small></div></div>{{end}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>DNS resolver diagnostic</h2><p>One-shot DNS query through this EasyDNS server</p></div></div><form method="get" action="/query" class="form-body"><div class="form-columns"><div class="field-row"><label for="qname" class="field-label">Domain name <span class="required">*</span></label><input id="qname" class="field mono" name="name" value="{{selectval .Data.Form "name"}}" required placeholder="example.org"></div><div class="field-row"><label for="qtype" class="field-label">Record type</label><select id="qtype" class="field" name="type">{{range recordTypes}}<option value="{{.}}" {{if eq . (selectval $.Data.Form "type")}}selected{{end}}>{{.}}</option>{{end}}</select></div></div><div class="form-actions"><button class="btn-ui btn-primary-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#search"/></svg>Run lookup</button></div></form>
|
||||
{{if .Data.Query}}<div class="response-summary"><div class="strip-cell"><span>RESPONSE CODE</span><strong class="{{statusclass .Data.Query.RCode}}">{{.Data.Query.RCode}}</strong></div><div class="strip-cell"><span>AUTHORITATIVE</span><strong>{{if .Data.Query.AA}}Yes{{else}}No{{end}}</strong></div><div class="strip-cell"><span>TIME</span><strong>{{float .Data.Query.ElapsedMS}} ms</strong></div></div><div class="panel-head"><h2>Answer section</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>TYPE</th><th>TTL</th><th>RDATA</th></tr></thead><tbody>{{range .Data.Query.Answers}}<tr><td class="mono">{{.Name}}</td><td><span class="tag green">{{.Type}}</span></td><td>{{.TTL}}</td><td class="mono">{{.Data}}</td></tr>{{else}}<tr><td class="empty" colspan="4">No answer records.</td></tr>{{end}}</tbody></table></div><div class="panel-head"><h2>Authority section</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>TYPE</th><th>TTL</th><th>RDATA</th></tr></thead><tbody>{{range .Data.Query.Authority}}<tr><td class="mono">{{.Name}}</td><td><span class="tag blue">{{.Type}}</span></td><td>{{.TTL}}</td><td class="mono">{{.Data}}</td></tr>{{else}}<tr><td class="empty" colspan="4">No authority records returned.</td></tr>{{end}}</tbody></table></div>{{end}}</section>
|
||||
<aside class="panel guide"><div class="panel-head"><h2>Diagnostics</h2></div><div class="panel-body"><p>The query is sent through the actual EasyDNS listener using the server API. It is not an external DNS testing service.</p><div class="data-row"><span>Query history</span><strong>Unavailable</strong></div><div class="data-row"><span>Live lookup</span><strong class="success">Supported</strong></div><div class="notice-inline mt-panel">The EasyDNS API defaults an unrecognized type to A. This UI limits the type selector to recognized values.</div></div></aside></div>{{end}}
|
||||
@@ -0,0 +1,8 @@
|
||||
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>{{if eq .Data.Action "edit"}}Edit existing record{{else}}New DNS record{{end}}</h2><p>Zone <span class="mono">{{.Data.Zone.Name}}</span> · serial guarded by ETag</p></div><a href="{{.Data.ZoneURL}}/records" class="btn-ui btn-small">Back to records</a></div>
|
||||
{{if .Data.IsPrimary}}<form class="form-body" method="post" action="{{if eq .Data.Action "edit"}}{{.Data.ZoneURL}}/records/{{.Data.Record.ID}}{{else}}{{.Data.ZoneURL}}/records{{end}}"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="etag" value="{{.Data.ETag}}">
|
||||
<div class="form-columns"><div class="field-row"><label class="field-label" for="recordName">Record name <span class="required">*</span></label><input class="field mono" id="recordName" name="name" required value="{{selectval .Data.Form "name"}}" placeholder="www or @"><small>@ for zone apex; relative names are allowed.</small></div><div class="field-row"><label class="field-label" for="recordType">Record type <span class="required">*</span></label><select class="field" name="type" id="recordType" required><option value="">Select record type</option>{{range recordTypes}}<option value="{{.}}" {{if eq (selectval $.Data.Form "type") .}}selected{{end}} {{if eq . "SOA"}}disabled{{end}}>{{.}}</option>{{end}}</select><small>SOA changes require whole-zone replacement.</small></div></div>
|
||||
<div class="field-row"><label class="field-label" for="recordData">Record data (RDATA) <span class="required">*</span></label><textarea id="recordData" class="field mono" name="data" rows="4" required placeholder="192.0.2.10">{{selectval .Data.Form "data"}}</textarea><small>Use the syntax expected for the selected RR type; Rust validates exact RDATA format.</small></div>
|
||||
<div class="form-columns"><div class="field-row"><label class="field-label" for="recordTTL">TTL in seconds <span class="required">*</span></label><input class="field mono" id="recordTTL" name="ttl" type="number" min="0" max="4294967295" required value="{{selectval .Data.Form "ttl"}}"><small>0–4,294,967,295. Default: 3600.</small></div><div class="field-row"><label class="field-label">Current zone serial</label><div class="field readout mono">{{.Data.Zone.SerialText}}</div><small>Changes to the serial may trigger HTTP 412.</small></div></div>
|
||||
<div class="form-actions"><a href="{{.Data.ZoneURL}}/records" class="btn-ui">Cancel</a><button class="btn-ui btn-primary-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#save"/></svg>{{if eq .Data.Action "edit"}}Save changes{{else}}Add record{{end}}</button></div></form>{{else}}<div class="panel-body"><div class="notice-inline">This zone is secondary or unavailable. Record modifications are not allowed.</div></div>{{end}}</section>
|
||||
<aside class="panel guide"><div class="panel-head"><h2>Write behavior</h2></div><div class="panel-body"><p>This form uses an existing EasyDNS operation. There is no record-details endpoint; edits are populated from the record list.</p><div class="data-row"><span>Change conflict</span><strong>412</strong></div><div class="data-row"><span>Validation error</span><strong>400 / 422</strong></div><div class="data-row"><span>Secondary zone</span><strong>409</strong></div><div class="notice-inline mt-panel">The server may assign a different record ID after changing the name, type or value.</div></div></aside>
|
||||
</div>{{end}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>Full zone-file replacement</h2><p>{{.Data.Zone.Name}} · submit complete replacement content</p></div></div><div class="panel-body"><div class="notice danger"><strong>Destructive replacement.</strong> The EasyDNS API does not return original zone file text. Paste a complete replacement file that you already possess.</div></div>
|
||||
<form class="form-body" method="post" action="{{.Data.ZoneURL}}/replace"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="etag" value="{{.Data.ETag}}"><div class="field-row"><label class="field-label" for="zoneFull">Complete zone file <span class="required">*</span></label><textarea class="field code-input mono" id="zoneFull" rows="15" spellcheck="false" name="zone_file" required placeholder="Paste the full zone file here. Nothing is preloaded.">{{selectval .Data.Form "zone_file"}}</textarea></div><div class="field-row"><label class="field-label" for="replaceConfirm">Type REPLACE to confirm <span class="required">*</span></label><input id="replaceConfirm" name="confirm" class="field mono" required pattern="REPLACE" autocomplete="off" placeholder="REPLACE"></div><div class="form-actions"><a class="btn-ui" href="{{.Data.ZoneURL}}">Cancel</a><button class="btn-ui btn-danger-ui" type="submit">Replace zone contents</button></div></form></section>
|
||||
<aside class="panel guide"><div class="panel-head"><h2>Before you continue</h2></div><div class="panel-body"><p>Back up the original zone from its source outside this panel. The API validates the full replacement, calculates the diff, updates the serial and sends NOTIFY where configured.</p><div class="data-row"><span>Current serial</span><strong class="mono">{{.Data.Zone.SerialText}}</strong></div><div class="data-row"><span>Conflict</span><strong>412</strong></div><div class="data-row"><span>Invalid content</span><strong>422</strong></div></div></aside></div>{{end}}
|
||||
@@ -0,0 +1,5 @@
|
||||
{{define "content"}}<div class="status-strip panel compact-strip"><div class="strip-cell"><span>HEALTH</span><strong class="{{statusclass .Data.Health.Status}}">{{if .Data.Health.Status}}{{.Data.Health.Status}}{{else}}Unavailable{{end}}</strong></div><div class="strip-cell"><span>READINESS</span><strong>{{selectval .Data.Filter "ready"}}</strong></div><div class="strip-cell"><span>MODE</span><strong>{{.Data.Status.Mode}}</strong></div><div class="strip-cell"><span>UPTIME</span><strong>{{uptime .Data.Status.UptimeSeconds}}</strong></div><div class="strip-cell"><span>VERSION</span><strong>{{.Data.Status.Version}}</strong></div></div>
|
||||
<div class="dashboard-lower mt-panel"><section class="panel"><div class="panel-head"><h2>DNS roles</h2></div><div class="panel-body compact"><div class="data-row"><span>Primary zones</span><strong>{{int .Data.Status.Roles.Primary}}</strong></div><div class="data-row"><span>Secondary zones</span><strong>{{int .Data.Status.Roles.Secondary}}</strong></div><div class="data-row"><span>Recursive role</span><strong>{{.Data.Status.Roles.Recursive}}</strong></div><div class="data-row"><span>Forwarder role</span><strong>{{.Data.Status.Roles.Forwarder}}</strong></div><div class="data-row"><span>Forward zones</span><strong>{{.Data.Status.Roles.ForwardZones}}</strong></div><div class="data-row"><span>Default resolution</span><strong>{{.Data.Status.Roles.DefaultResolution}}</strong></div></div></section>
|
||||
<section class="panel"><div class="panel-head"><h2>Bound listeners</h2></div><div class="panel-body compact">{{range $key,$v:=.Data.Status.Listeners}}<div class="data-row"><span>{{$key}}</span><strong class="mono break-any">{{string $v}}</strong></div>{{else}}<div class="empty">No listener information.</div>{{end}}</div></section>
|
||||
<section class="panel"><div class="panel-head"><h2>Health / expired zones</h2></div><div class="panel-body compact"><div class="data-row"><span>Health</span><strong class="{{statusclass .Data.Health.Status}}">{{.Data.Health.Status}}</strong></div><div class="data-row"><span>Expired zones</span><strong>{{len .Data.Health.ExpiredZones}}</strong></div>{{range .Data.Health.ExpiredZones}}<div class="data-row mono danger">{{.}}</div>{{else}}<p class="muted mt-3">No expired zones returned.</p>{{end}}</div></section></div>
|
||||
<section class="panel mt-panel"><div class="panel-head"><h2>Per-zone runtime state</h2></div><div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>ROLE</th><th>LOADED</th><th>EXPIRED</th><th>SERIAL</th><th>RECORDS</th><th>LAST SYNC</th></tr></thead><tbody>{{range .Data.Status.Zones}}<tr><td><a class="entity mono" href="{{zoneurl .Name}}">{{.Name}}</a></td><td>{{.Kind}}</td><td>{{.Loaded}}</td><td>{{.Expired}}</td><td class="mono">{{.SerialText}}</td><td>{{.Records}}</td><td class="mono">{{.LastSync}}</td></tr>{{else}}<tr><td colspan="7" class="empty">No zones in status response.</td></tr>{{end}}</tbody></table></div></section>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>New upstream server</h2><p>EasyDNS validates the transport URI and reloads its configuration.</p></div></div><form method="post" action="/upstreams" class="form-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><div class="field-row"><label class="field-label" for="address">Upstream address <span class="required">*</span></label><input class="field mono" id="address" name="address" required value="{{selectval .Data.Form "address"}}" placeholder="1.1.1.1"><small>IP address or IP:port. For encrypted transports use a protocol scheme and TLS server name.</small></div><div class="form-actions"><a class="btn-ui" href="/upstreams">Cancel</a><button class="btn-ui btn-primary-ui" type="submit">Add upstream</button></div></form></section><aside class="panel guide"><div class="panel-head"><h2>Accepted formats</h2></div><div class="panel-body"><p class="mono code-example">1.1.1.1<br>1.1.1.1:53<br>tcp://1.1.1.1<br>tls://1.1.1.1#cloudflare-dns.com<br>https://1.1.1.1/dns-query#cloudflare-dns.com</p><p>Encrypted transports require the certificate's DNS name. No server deletion endpoint exists.</p></div></aside></div>{{end}}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{define "content"}}<section class="panel"><div class="toolbar"><div class="toolbar-title"><h2>Resolver pools</h2><p>Runtime upstream health and forwarding strategy.</p></div><a class="btn-ui btn-primary-ui" href="/upstreams/new"><svg class="ico"><use href="/static/icons.svg#plus"/></svg>Add upstream</a></div>
|
||||
{{range .Data.Upstreams}}<div class="pool-head"><div><h3>{{.Group}}</h3><span class="subtle">Strategy: {{.Strategy}}</span></div><span class="tag blue">{{len .Servers}} servers</span></div><div class="table-scroll"><table class="data-table"><thead><tr><th>ADDRESS</th><th>HEALTH</th><th>QUERIES</th><th>FAILURES</th><th>EWMA RTT</th><th>CIRCUIT</th><th>LAST ERROR</th></tr></thead><tbody>
|
||||
{{range .Servers}}<tr><td class="mono entity">{{.Address}}</td><td><span class="dot {{if .Stats.Healthy}}ok{{else}}warn{{end}}"></span>{{if .Stats.Healthy}}Healthy{{else}}Unavailable{{end}}</td><td class="mono">{{int .Stats.Queries}}</td><td class="mono">{{int .Stats.Failures}}</td><td class="mono">{{if .Stats.EWMARTTMS}}{{float .Stats.EWMARTTMS}} ms{{else}}—{{end}}</td><td class="mono">{{if .Stats.CircuitOpenForMS}}Open{{else}}Closed / unknown{{end}}</td><td class="muted">{{if .Stats.LastError}}{{.Stats.LastError}}{{else}}—{{end}}</td></tr>{{else}}<tr><td class="empty" colspan="7">No servers in this pool.</td></tr>{{end}}
|
||||
</tbody></table></div>{{else}}<div class="empty">No upstream groups returned by EasyDNS.</div>{{end}}</section><div class="notice-inline mt-panel">The API supports adding an upstream address, but does not provide a REST method to edit or remove upstreams or reorder pools.</div>{{end}}
|
||||
@@ -0,0 +1,9 @@
|
||||
{{define "content"}}<div class="form-layout"><section class="panel"><div class="panel-head"><div><h2>{{if eq .Data.Action "import"}}Import complete zone file{{else}}Create from nameservers{{end}}</h2><p>Primary zones only · validated before activation</p></div></div>
|
||||
<div class="mode-tabs"><a class="tab {{if ne .Data.Action "import"}}active{{end}}" href="/zones/new">From nameservers</a><a class="tab {{if eq .Data.Action "import"}}active{{end}}" href="/zones/import">From zone file</a></div>
|
||||
<form method="post" action="/zones" class="form-body"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="mode" value="{{.Data.Action}}">
|
||||
<div class="field-row"><label class="field-label" for="zoneName">Zone name <span class="required">*</span></label><input id="zoneName" class="field" type="text" name="name" required placeholder="example.org" value="{{selectval .Data.Form "name"}}"><small>Use a full DNS zone name. Creating a secondary is not supported by this API.</small></div>
|
||||
{{if eq .Data.Action "import"}}<div class="field-row"><label class="field-label" for="zoneFile">Complete zone file <span class="required">*</span></label><textarea id="zoneFile" class="field mono code-input" name="zone_file" rows="13" spellcheck="false" required placeholder="$TTL 3600 @ IN SOA ns1.example.org. hostmaster.example.org. 1 3600 900 1209600 300 @ IN NS ns1.example.org.">{{selectval .Data.Form "zone_file"}}</textarea><small>Paste original zone file content you own. EasyDNS does not expose zone files for download via REST.</small></div>
|
||||
{{else}}<div class="field-row"><label class="field-label" for="zoneNS">Nameservers <span class="required">*</span></label><textarea id="zoneNS" class="field mono" name="ns" rows="4" placeholder="ns1.example.org. ns2.example.org." required>{{selectval .Data.Form "ns"}}</textarea><small>One FQDN per line; the API generates a minimal SOA/NS zone.</small></div><div class="field-row"><label class="field-label" for="hostmaster">SOA hostmaster</label><input id="hostmaster" class="field mono" name="hostmaster" value="{{selectval .Data.Form "hostmaster"}}" placeholder="hostmaster.example.org."></div>{{end}}
|
||||
<div class="form-columns"><div class="field-row"><label class="field-label" for="transferAcl">Transfer ACL (optional)</label><textarea class="field mono" id="transferAcl" name="transfer_acl" rows="3" placeholder="192.0.2.0/24">{{selectval .Data.Form "transfer_acl"}}</textarea><small>Networks, one per line.</small></div><div class="field-row"><label class="field-label" for="notify">NOTIFY targets (optional)</label><textarea class="field mono" id="notify" name="notify" rows="3" placeholder="192.0.2.20:53">{{selectval .Data.Form "notify"}}</textarea><small>IP:port socket addresses, one per line.</small></div></div>
|
||||
<div class="form-actions"><a href="/zones" class="btn-ui">Cancel</a><button class="btn-ui btn-primary-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#plus"/></svg>Create primary zone</button></div>
|
||||
</form></section><aside class="panel guide"><div class="panel-head"><h2>Creation details</h2></div><div class="panel-body"><p>This is a configuration-changing operation. EasyDNS validates the zone, persists it in the API overlay and reloads the runtime.</p><div class="data-row"><span>Already exists</span><strong>409</strong></div><div class="data-row"><span>Invalid zone file</span><strong>422</strong></div><div class="data-row"><span>Invalid request</span><strong>400</strong></div><div class="notice-inline mt-panel">The nameservers/hostmaster form does not create secondary zones.</div></div></aside></div>{{end}}
|
||||
@@ -0,0 +1,44 @@
|
||||
{{define "content"}}
|
||||
<div class="status-strip panel zone-strip">
|
||||
<div class="strip-cell"><span>ZONE STATE</span><strong><span class="dot {{statusclass .Data.Zone.StateText}}"></span>{{.Data.Zone.StateText}}</strong></div>
|
||||
<div class="strip-cell"><span>SERIAL</span><strong class="mono">{{.Data.Zone.SerialText}}</strong></div>
|
||||
<div class="strip-cell"><span>TYPE</span><strong>{{.Data.Zone.Kind}}</strong></div>
|
||||
<div class="strip-cell"><span>RECORDS</span><strong>{{.Data.Zone.Records}}</strong></div>
|
||||
<div class="strip-cell"><span>TRANSFER / SYNC</span><strong>{{if .Data.Zone.IsSecondary}}{{.Data.Zone.SyncText}}{{else}}—{{end}}</strong></div>
|
||||
<div class="strip-cell"><span>LAST SYNC</span><strong class="small-text">{{.Data.Zone.LastSync}}</strong></div>
|
||||
</div>
|
||||
<div class="tabs" role="navigation" aria-label="Zone views">
|
||||
<a {{if eq .Data.Tab "overview"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}">Overview</a>
|
||||
<a {{if eq .Data.Tab "records"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}/records">Records</a>
|
||||
<a {{if eq .Data.Tab "transfers"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}/transfers">Transfers / History</a>
|
||||
<a {{if eq .Data.Tab "dnssec"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}/dnssec">DNSSEC</a>
|
||||
<a {{if eq .Data.Tab "operations"}}class="tab active" aria-current="page"{{else}}class="tab"{{end}} href="{{.Data.ZoneURL}}/operations">Operations</a>
|
||||
</div>
|
||||
{{if eq .Data.Tab "overview"}}
|
||||
<div class="dashboard-lower three-cards">
|
||||
<section class="panel"><div class="panel-head"><div><h2>Zone status</h2><p>Live authoritative store state</p></div></div><div class="panel-body compact"><div class="data-row"><span>Zone name</span><strong class="mono">{{.Data.Zone.Name}}</strong></div><div class="data-row"><span>Loaded</span><strong>{{if .Data.Zone.Loaded}}Yes{{else}}No{{end}}</strong></div><div class="data-row"><span>Expired</span><strong class="{{if .Data.Zone.Expired}}danger{{else}}success{{end}}">{{if .Data.Zone.Expired}}Yes{{else}}No{{end}}</strong></div><div class="data-row"><span>Journal entries</span><strong>{{.Data.Zone.JournalEntries}}</strong></div><div class="data-row"><span>View associations</span><strong>{{if .Data.Zone.Views}}{{join .Data.Zone.Views ", "}}{{else}}Default{{end}}</strong></div></div></section>
|
||||
<section class="panel"><div class="panel-head"><div><h2>Transfer & notification</h2><p>Configured values from zone detail</p></div></div><div class="panel-body compact"><div class="data-row"><span>NOTIFY targets</span><strong>{{len .Data.Zone.Config.Notify}}</strong></div><div class="data-row"><span>Transfer ACL entries</span><strong>{{len .Data.Zone.Config.TransferACL}}</strong></div><div class="data-row"><span>Primaries</span><strong>{{len .Data.Zone.Config.Primaries}}</strong></div><div class="data-row"><span>NOTIFY sent</span><strong>{{int .Data.Zone.Status.NotifiesSent}}</strong></div><div class="data-row"><span>NOTIFY failed</span><strong>{{int .Data.Zone.Status.NotifiesFailed}}</strong></div></div></section>
|
||||
<section class="panel"><div class="panel-head"><div><h2>Secondary refresh</h2><p>Only applicable to secondary zones</p></div></div><div class="panel-body compact"><div class="data-row"><span>Last successful</span><strong class="small-text">{{.Data.Zone.LastSync}}</strong></div><div class="data-row"><span>Last error</span><strong class="danger">{{if .Data.Zone.Status.LastError}}{{.Data.Zone.Status.LastError}}{{else}}—{{end}}</strong></div><div class="data-row"><span>Serial</span><strong>{{.Data.Zone.SerialText}}</strong></div></div></section>
|
||||
</div>
|
||||
<div class="section-actions"><a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records">View DNS records</a><a class="btn-ui" href="{{.Data.ZoneURL}}/transfers">Transfer history</a><a class="btn-ui" href="{{.Data.ZoneURL}}/operations">Zone operations</a></div>
|
||||
{{else if eq .Data.Tab "records"}}
|
||||
<section class="panel"><div class="toolbar"><form class="toolbar-form" method="get" action="{{.Data.ZoneURL}}/records"><input class="field field-search" name="name" placeholder="Record name begins with..." aria-label="Filter record names" value="{{selectval .Data.Filter "name"}}"><select class="field field-select" aria-label="Record type" name="type"><option value="">All types</option>{{range $type := recordTypes}}<option value="{{$type}}" {{if eq (selectval $.Data.Filter "type") $type}}selected{{end}}>{{$type}}</option>{{end}}</select><button type="submit" class="btn-ui"><svg class="ico"><use href="/static/icons.svg#search"/></svg>Filter</button></form>
|
||||
<div class="toolbar-end"><span class="subtle desktop-only">{{.Data.Pagination.Total}} records</span>{{if .Data.IsPrimary}}<a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records/new"><svg class="ico"><use href="/static/icons.svg#plus"/></svg>Add record</a>{{else}}<span class="tag muted-tag">Secondary · read-only</span>{{end}}</div></div>
|
||||
<div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>TYPE</th><th>RDATA</th><th>TTL</th>{{if .Data.IsPrimary}}<th class="right">ACTIONS</th>{{end}}</tr></thead><tbody>
|
||||
{{range .Data.Records}}<tr><td class="mono entity">{{.Name}}</td><td><span class="tag green">{{.Type}}</span></td><td class="mono rdata">{{.Data}}</td><td class="mono">{{.TTL}}</td>{{if $.Data.IsPrimary}}<td class="right">{{if ne .Type "SOA"}}<div class="row-actions"><a href="{{$.Data.ZoneURL}}/records/{{.ID}}/edit?page={{$.Data.Pagination.Page}}" class="icon-button" aria-label="Edit record {{.Name}}" title="Edit"><svg class="ico"><use href="/static/icons.svg#edit"/></svg></a><a href="{{$.Data.ZoneURL}}/records/{{.ID}}/delete?page={{$.Data.Pagination.Page}}" class="icon-button danger-hover" aria-label="Delete record {{.Name}}" title="Delete"><svg class="ico"><use href="/static/icons.svg#trash"/></svg></a></div>{{else}}<span class="subtle" title="SOA is managed by zone replacement">Managed</span>{{end}}</td>{{end}}</tr>{{else}}<tr><td class="empty" colspan="5">No records returned for this filter.</td></tr>{{end}}
|
||||
</tbody></table></div><div class="table-footer"><span>{{len .Data.Records}} / {{.Data.Pagination.Total}} records · page {{.Data.Pagination.Page}}</span><div class="pagination-ui">{{if gt .Data.Pagination.Page 1}}<a class="btn-ui btn-small" href="{{.Data.ZoneURL}}/records?page={{dec .Data.Pagination.Page}}&name={{selectval .Data.Filter "name"}}&type={{selectval .Data.Filter "type"}}">Previous</a>{{end}}{{if lt (multiply .Data.Pagination.Page .Data.Pagination.PerPage) .Data.Pagination.Total}}<a class="btn-ui btn-small" href="{{.Data.ZoneURL}}/records?page={{inc .Data.Pagination.Page}}&name={{selectval .Data.Filter "name"}}&type={{selectval .Data.Filter "type"}}">Next</a>{{end}}</div></div></section>
|
||||
<div class="notice-inline mt-panel">Writes are protected with the zone serial ETag. SOA records are managed through whole-zone replacement; secondaries are read-only.</div>
|
||||
{{else if eq .Data.Tab "transfers"}}
|
||||
<section class="panel"><div class="panel-head"><div><h2>Zone transfer history</h2><p>Recorded inbound and outbound AXFR / IXFR events</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>TIME</th><th>DIRECTION</th><th>TYPE</th><th>PEER</th><th>SERIAL</th><th>RECORDS</th><th>DURATION</th><th>RESULT</th></tr></thead><tbody>{{range .Data.Transfers}}<tr><td class="mono subtle">{{when .TimeUnix}}</td><td>{{.Direction}}</td><td><span class="tag green">{{.Kind}}</span></td><td class="mono">{{.Peer}}</td><td class="mono">{{if .Serial}}{{.Serial}}{{else}}—{{end}}</td><td>{{.Records}}</td><td class="mono">{{.DurationMS}} ms</td><td><span class="dot {{if .OK}}ok{{else}}danger{{end}}"></span>{{if .OK}}Completed{{else}}{{if .Error}}{{.Error}}{{else}}Failed{{end}}{{end}}</td></tr>{{else}}<tr><td class="empty" colspan="8">No recorded transfers. This API provides history, not a live transfer queue.</td></tr>{{end}}</tbody></table></div></section>
|
||||
{{else if eq .Data.Tab "dnssec"}}
|
||||
<section class="panel"><div class="panel-head"><div><h2>DNSSEC status</h2><p>Inspection only. Key lifecycle and signing changes are not exposed through REST.</p></div></div><div class="panel-body">{{if .Data.Zone.DNSSEC}}<div class="code-block"><pre>{{asjson .Data.Zone.DNSSEC}}</pre></div>{{else}}<div class="empty">No DNSSEC status returned for this zone.</div>{{end}}</div></section>
|
||||
{{else if eq .Data.Tab "operations"}}
|
||||
<div class="operations-grid"><section class="panel"><div class="panel-head"><div><h2>Supported zone actions</h2><p>Available operations depend on the zone role and configuration</p></div></div><div class="panel-body">
|
||||
{{if .Data.Zone.IsSecondary}}<form method="post" action="{{.Data.ZoneURL}}/sync" class="operation"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="confirm" value="yes"><div><strong>Synchronize secondary</strong><small>Request an immediate refresh from its primary.</small></div><button class="btn-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#refresh"/></svg>Sync now</button></form>{{end}}
|
||||
{{if .Data.Zone.Config.Notify}}<form method="post" action="{{.Data.ZoneURL}}/notify" class="operation"><input type="hidden" name="_csrf" value="{{.CSRF}}"><input type="hidden" name="confirm" value="yes"><div><strong>Send DNS NOTIFY</strong><small>{{len .Data.Zone.Config.Notify}} configured targets · HTTP 202 means accepted, not delivered</small></div><button class="btn-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#bell"/></svg>Send NOTIFY</button></form>{{end}}
|
||||
{{if .Data.Zone.IsPrimary}}<div class="operation"><div><strong>Replace zone contents</strong><small>Submit a complete operator-provided zone file. No original file download.</small></div><a href="{{.Data.ZoneURL}}/replace" class="btn-ui">Replace zone</a></div>{{end}}
|
||||
<div class="operation"><div><strong>Delete API-created zone</strong><small>Only zones created in the API overlay are deletable; others return HTTP 409.</small></div><a href="{{.Data.ZoneURL}}/delete" class="btn-ui btn-danger-ui">Delete zone</a></div>
|
||||
{{if and (not .Data.Zone.IsSecondary) (not .Data.Zone.IsPrimary)}}<div class="empty">Zone operations require a loaded zone.</div>{{end}}
|
||||
</div></section><section class="panel"><div class="panel-head"><div><h2>Configured transfer access</h2><p>Read-only zone configuration</p></div></div><div class="panel-body"><h3>Transfer ACL</h3>{{range .Data.Zone.Config.TransferACL}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No transfer ACL entries.</p>{{end}}<h3 class="mt-4">NOTIFY targets</h3>{{range .Data.Zone.Config.Notify}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No NOTIFY targets.</p>{{end}}<h3 class="mt-4">Primary servers</h3>{{range .Data.Zone.Config.Primaries}}<div class="data-row mono">{{.}}</div>{{else}}<p class="muted">No primary servers in this zone configuration.</p>{{end}}</div></section></div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,11 @@
|
||||
{{define "content"}}
|
||||
<div class="status-strip panel compact-strip"><div class="strip-cell"><span>TOTAL ZONES (CURRENT FILTER)</span><strong>{{int .Data.Pagination.Total}}</strong></div><div class="strip-cell"><span>ITEMS PER PAGE</span><strong>{{.Data.Pagination.PerPage}}</strong></div><div class="strip-cell"><span>CURRENT PAGE</span><strong>{{.Data.Pagination.Page}}</strong></div><div class="strip-cell"><span>ZONE TYPES</span><strong>Primary · Secondary</strong></div></div>
|
||||
<section class="panel mt-panel"><div class="toolbar">
|
||||
<form action="/zones" method="get" class="toolbar-form"><label class="sr-only" for="searchZones">Search zones</label><input class="field field-search" id="searchZones" name="name" placeholder="Search zones by name" value="{{selectval .Data.Filter "name"}}"><select class="field field-select" name="kind" aria-label="Zone type"><option value="">All types</option><option value="primary" {{if eq (selectval .Data.Filter "kind") "primary"}}selected{{end}}>Primary</option><option value="secondary" {{if eq (selectval .Data.Filter "kind") "secondary"}}selected{{end}}>Secondary</option></select><button class="btn-ui" type="submit"><svg class="ico"><use href="/static/icons.svg#search"/></svg> Search</button></form>
|
||||
<div class="toolbar-end"><a class="btn-ui" href="/zones/import"><svg class="ico"><use href="/static/icons.svg#upload"/></svg> Import zone file</a><a class="btn-ui btn-primary-ui" href="/zones/new"><svg class="ico"><use href="/static/icons.svg#plus"/></svg> Add zone</a></div></div>
|
||||
<div class="table-scroll"><table class="data-table"><thead><tr><th>ZONE NAME</th><th>TYPE</th><th>SERIAL</th><th>RECORDS</th><th>STATE</th><th>TRANSFER / SYNC</th><th>LAST SUCCESSFUL SYNC</th><th class="right">ACTION</th></tr></thead><tbody>
|
||||
{{range .Data.Zones}}<tr><td><a class="entity" href="{{zoneurl .Name}}">{{.Name}}</a></td><td><span class="tag {{if .IsSecondary}}blue{{else}}green{{end}}">{{.Kind}}</span></td><td class="mono">{{.SerialText}}</td><td class="mono">{{.Records}}</td><td><span class="dot {{if .Loaded}}{{if .Expired}}danger{{else}}ok{{end}}{{else}}warn{{end}}"></span>{{.StateText}}</td><td>{{if .IsSecondary}}<span class="dot {{statusclass .SyncText}}"></span>{{.SyncText}}{{else}}<span class="subtle">—</span>{{end}}</td><td class="mono subtle">{{if .IsSecondary}}{{.LastSync}}{{else}}—{{end}}</td><td class="right"><a class="btn-ui btn-small" href="{{zoneurl .Name}}">Open <svg class="ico"><use href="/static/icons.svg#arrow-right"/></svg></a></td></tr>{{else}}<tr><td class="empty" colspan="8">No zones match the current filter, or the API is not available.</td></tr>{{end}}
|
||||
</tbody></table></div>
|
||||
<div class="table-footer"><span>Showing {{len .Data.Zones}} of {{int .Data.Pagination.Total}} zones · page {{.Data.Pagination.Page}}</span><div class="pagination-ui"><a class="btn-ui btn-small" href="/zones?page=1&name={{selectval .Data.Filter "name"}}&kind={{selectval .Data.Filter "kind"}}">First</a>{{if gt .Data.Pagination.Page 1}}<a class="btn-ui btn-small" href="/zones?page={{dec .Data.Pagination.Page}}&name={{selectval .Data.Filter "name"}}&kind={{selectval .Data.Filter "kind"}}">Previous</a>{{end}}{{if lt (multiply .Data.Pagination.Page .Data.Pagination.PerPage) .Data.Pagination.Total}}<a class="btn-ui btn-small" href="/zones?page={{inc .Data.Pagination.Page}}&name={{selectval .Data.Filter "name"}}&kind={{selectval .Data.Filter "kind"}}">Next</a>{{end}}</div></div>
|
||||
</section><div class="notice-inline mt-panel">Primary zones can be created through REST. Secondary zone creation and general zone configuration editing are not exposed by EasyDNS.</div>
|
||||
{{end}}
|
||||
Reference in new issue
Block a user