<!-- ========================= CONTENT ========================= -->
<div class="topbar">
- <label>API Key: <input type="password" id="password" value=""></label>
- <button>Submit</button><!-- Just a trick to make the user click outside of the input field -->
- <span id="connection-status" style="display:none">No server connection or incorrect key</span>
+ <span id="connection-status" style="display:none">No server connection</span>
<span id="connection-error"></span>
</div>
$('#' + name).html(h);
};
- var password = $("#password").val();
- $("#password").change(function (e) {
- password = $("#password").val();
- update();
- });
-
var qpsgraph = new Rickshaw.Graph({
element: document.getElementById("qpschart"),
width: 400,
var jsonstatParams = function (command, name, filtered) {
var d = {
- 'api-key': password,
'command': command,
'name': name
};
function update() {
$.ajax({
- url: 'api/v1/servers/localhost/statistics?api-key=' + password,
+ url: 'api/v1/servers/localhost/statistics',
type: 'GET',
dataType: 'json',
success: function (adata, x, y) {
if (!version) {
$.ajax({
- url: 'api/v1/servers/localhost?api-key=' + password, type: 'GET', dataType: 'json',
+ url: 'api/v1/servers/localhost', type: 'GET', dataType: 'json',
success: function (data) {
version = "PowerDNS " + data["daemon_type"] + " " + data["version"];
}