Added all DNS functionality
This commit is contained in:
36
dns/domain_import/domain_import.css
vendored
Normal file
36
dns/domain_import/domain_import.css
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* This file is part of Linode Manager Classic.
|
||||
*
|
||||
* Linode Manager Classic is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Linode Manager Classic is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import url('/global.css');
|
||||
|
||||
#domain-import {
|
||||
padding: 0px 15px 15px;
|
||||
}
|
||||
|
||||
#domain-import p {
|
||||
background-color: #8BCBEA;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr:last-of-type {
|
||||
border: none;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
}
|
72
dns/domain_import/domain_import.js
Normal file
72
dns/domain_import/domain_import.js
Normal file
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* This file is part of Linode Manager Classic.
|
||||
*
|
||||
* Linode Manager Classic is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Linode Manager Classic is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { settings, elements, apiPost, parseParams, setupHeader } from "/global.js";
|
||||
|
||||
(function()
|
||||
{
|
||||
// Element names specific to this page
|
||||
elements.domain = "domain";
|
||||
elements.importButton = "import-button";
|
||||
elements.nameserver = "nameserver";
|
||||
|
||||
// Data recieved from API calls
|
||||
var data = {};
|
||||
|
||||
// Static references to UI elements
|
||||
var ui = {};
|
||||
ui.domain = {};
|
||||
ui.importButton = {};
|
||||
ui.nameserver = {};
|
||||
|
||||
// Click handler for import button
|
||||
var handleImport = function(event)
|
||||
{
|
||||
if (event.currentTarget.disabled)
|
||||
return;
|
||||
|
||||
var req = {
|
||||
"domain": ui.domain.value,
|
||||
"remote_nameserver": ui.nameserver.value
|
||||
};
|
||||
|
||||
apiPost("/domains/import", req, function(response)
|
||||
{
|
||||
location.href = "/dns/domain?did=" + response.id;
|
||||
});
|
||||
};
|
||||
|
||||
// Initial setup
|
||||
var setup = function()
|
||||
{
|
||||
// Parse URL parameters
|
||||
data.params = parseParams();
|
||||
|
||||
setupHeader();
|
||||
|
||||
// Get element references
|
||||
ui.domain = document.getElementById(elements.domain);
|
||||
ui.importButton = document.getElementById(elements.importButton);
|
||||
ui.nameserver = document.getElementById(elements.nameserver);
|
||||
|
||||
// Attach event handlers
|
||||
ui.importButton.addEventListener("click", handleImport);
|
||||
};
|
||||
|
||||
// Attach onload handler
|
||||
window.addEventListener("load", setup);
|
||||
})();
|
56
dns/domain_import/index.shtml
Normal file
56
dns/domain_import/index.shtml
Normal file
@ -0,0 +1,56 @@
|
||||
<!--
|
||||
This file is part of Linode Manager Classic.
|
||||
|
||||
Linode Manager Classic is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Linode Manager Classic is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>LMC - Import a Zone</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="domain_import.css" />
|
||||
<script src="domain_import.js" type="module"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/dns">DNS Manager</a> » <span class="top-links-title">Import a Zone</span></div>
|
||||
<div id="domain-import">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="2">Import a zone from a remote nameserver</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="lmc-tr3">
|
||||
<td>Domain</td>
|
||||
<td><input id="domain" type="text" size="30" /></td>
|
||||
</tr>
|
||||
<tr class="lmc-tr3">
|
||||
<td>Remote Nameserver</td>
|
||||
<td><input id="nameserver" type="text" size="30" /></td>
|
||||
</tr>
|
||||
<tr class="lmc-tr3">
|
||||
<td></td>
|
||||
<td><button id="import-button" type="button">Import Zone »</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Your nameserver must allow zone transfers (AXFR) from 96.126.114.97, 96.126.114.98, 2600:3c00::5e, and 2600:3c00::5f</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user