763 lines
42 KiB
HTML
763 lines
42 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Loading...</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="robots" content="noindex">
|
|
<meta insert_dynamic_content_here>
|
|
<script>
|
|
/* global XMLHttpRequest */
|
|
(function(a) {
|
|
var r;
|
|
/* Some browsers fail localStorage access due to corruption, preventing Cockpit login */ try {
|
|
r = window.localStorage;
|
|
window.localStorage.removeItem("url-root");
|
|
window.localStorage.removeItem("standard-login");
|
|
} catch (e) {
|
|
r = window.sessionStorage;
|
|
a.warn(String(e));
|
|
}
|
|
var s;
|
|
var l = window.environment || {};
|
|
var u = l.OAuth || null;
|
|
if (u) {
|
|
if (!u.TokenParam) u.TokenParam = "access_token";
|
|
if (!u.ErrorParam) u.ErrorParam = "error_description";
|
|
}
|
|
var t = /\$\{([^}]+)\}|\$([a-zA-Z0-9_]+)/g;
|
|
function d(e /* ... */) {
|
|
var o = Array.prototype.slice.call(arguments, 1);
|
|
return e.replace(t, function(e, t, n) {
|
|
return o[t || n] || "";
|
|
});
|
|
}
|
|
function n(e) {
|
|
if (window.cockpit_po) {
|
|
var t = window.cockpit_po[e];
|
|
if (t && t[1]) return t[1];
|
|
}
|
|
return e;
|
|
}
|
|
function c() {
|
|
if (!document.querySelectorAll) return;
|
|
var e = document.querySelectorAll("[translate]");
|
|
for (var t = 0; t < e.length; t++) e[t].textContent = n(e[t].textContent);
|
|
}
|
|
var f = n;
|
|
var p, w, g, v;
|
|
var o = /[?&]?([^=]+)=([^&]*)/g;
|
|
var m = null;
|
|
function y(e) {
|
|
e = e.split("+").join(" ");
|
|
var t = {};
|
|
var n;
|
|
for (;;) {
|
|
n = o.exec(e);
|
|
if (!n) break;
|
|
t[decodeURIComponent(n[1])] = decodeURIComponent(n[2]);
|
|
}
|
|
return t;
|
|
}
|
|
if (!a) a = function() {};
|
|
function h(e) {
|
|
return document.getElementById(e);
|
|
}
|
|
function b(e) {
|
|
if (window.console) a.warn("fatal:", e);
|
|
h("login-again").style.display = "none";
|
|
h("login-wait-validating").style.display = "none";
|
|
if (m) {
|
|
h("login-again").href = m;
|
|
h("login-again").style.display = "block";
|
|
}
|
|
h("login").style.display = "none";
|
|
h("login-details").style.display = "none";
|
|
h("login-fatal").style.display = "block";
|
|
var t = h("login-fatal-message");
|
|
t.textContent = "";
|
|
t.appendChild(document.createTextNode(e));
|
|
}
|
|
function k(e, t) {
|
|
var n;
|
|
var o = h(e);
|
|
if (o && window.getComputedStyle) n = window.getComputedStyle(o, ":before");
|
|
if (!n) return;
|
|
var i;
|
|
var r = n.content;
|
|
if (r && r != "none" && r != "normal") {
|
|
i = r.length;
|
|
if ((r[0] === '"' || r[0] === "'") && i > 2 && r[i - 1] === r[0]) r = r.substr(1, i - 2);
|
|
o.innerHTML = r || t;
|
|
} else {
|
|
o.removeAttribute("class");
|
|
}
|
|
}
|
|
function x() {
|
|
function o(e) {
|
|
if (window.console) a.warn(d(f("This web browser is too old to run Cockpit (missing $0)"), e));
|
|
h("login").style.display = "none";
|
|
h("login-details").style.display = "none";
|
|
h("unsupported-browser").style.display = "block";
|
|
document.body.className += " brand-unsupported-browser";
|
|
}
|
|
function e(t, e) {
|
|
var n;
|
|
try {
|
|
n = e[t];
|
|
} catch (e) {
|
|
b(d(f("The web browser configuration prevents Cockpit from running (inaccessible $0)"), t));
|
|
throw e;
|
|
}
|
|
if (n === undefined) {
|
|
o(t);
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
function t() {
|
|
/*
|
|
* Be certain to use parenthesis when checking CSS strings
|
|
* as Edge is oddly particular.
|
|
*
|
|
* Instead of "display: inline", use:
|
|
* "(display: inline)"
|
|
* or
|
|
* "display", "inline"
|
|
*/
|
|
var e = [].join.call(arguments, ": ");
|
|
if (!window.CSS.supports.apply(this, arguments)) {
|
|
b(d(f("The web browser configuration prevents Cockpit from running (inaccessible $0)"), e));
|
|
o(e);
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
return ("MozWebSocket" in window || e("WebSocket", window)) && e("XMLHttpRequest", window) && e("sessionStorage", window) && e("JSON", window) && e("defineProperty", Object) && e("console", window) && e("pushState", window.history) && e("textContent", document) && e("CSS", window) && e("supports", window.CSS) && t("display", "flex") && t("display", "grid");
|
|
}
|
|
function S(e) {
|
|
return e.replace(/^\s+|\s+$/g, "");
|
|
}
|
|
/* Sets values for application, url_root and login_path */ function C(e) {
|
|
var t = document.createElement("a");
|
|
var n = document.baseURI;
|
|
var o;
|
|
/* Some IEs don't support baseURI */ if (!n) {
|
|
o = document.getElementsByTagName("base");
|
|
if (o.length > 0) n = o[0].href; else n = "/";
|
|
}
|
|
e = e || "/";
|
|
t.href = n;
|
|
if (t.pathname != "/") {
|
|
s = t.pathname.replace(/^\/+|\/+$/g, "");
|
|
r.setItem("url-root", s);
|
|
if (s && e.indexOf("/" + s) === 0) e = e.replace("/" + s, "") || "/";
|
|
}
|
|
if (e.indexOf("/=") === 0) {
|
|
l.hostname = e.substring(2);
|
|
e = "/cockpit+" + e.split("/")[1];
|
|
} else if (e.indexOf("/cockpit/") !== 0 && e.indexOf("/cockpit+") !== 0) {
|
|
e = "/cockpit";
|
|
}
|
|
w = e.split("/")[1];
|
|
p = "/" + w + "/login";
|
|
if (s) p = "/" + s + p;
|
|
v = w;
|
|
g = p;
|
|
}
|
|
function T(e, t) {
|
|
// On keypress, only accept spacebar (enter acts as a click)
|
|
if (e && e.type === "keypress" && e.key !== " ") return;
|
|
// Stop the <a>'s click handler, otherwise it causes a page reload
|
|
if (e && e.type === "click") e.preventDefault();
|
|
if (t === undefined) t = h("server-group").style.display === "none";
|
|
h("option-group").setAttribute("data-state", t);
|
|
if (t) {
|
|
h("server-group").style.display = "block";
|
|
h("option-caret").setAttribute("class", "caret caret-down");
|
|
h("option-caret").setAttribute("className", "caret caret-down");
|
|
} else {
|
|
h("server-group").style.display = "none";
|
|
h("option-caret").setAttribute("class", "caret caret-right");
|
|
h("option-caret").setAttribute("className", "caret caret-right");
|
|
}
|
|
}
|
|
function e() {
|
|
window.onload = null;
|
|
c();
|
|
if (window.cockpit_po && window.cockpit_po[""]) document.documentElement.lang = window.cockpit_po[""].language || "en-us";
|
|
C(window.location.pathname);
|
|
/* Determine if we are nested or not, and switch styles */ if (window.location.pathname.indexOf("/" + s + "/cockpit/") === 0 || window.location.pathname.indexOf("/" + s + "/cockpit+") === 0) document.documentElement.setAttribute("class", "inline");
|
|
// Setup title
|
|
var e = l.page.title;
|
|
if (!e || w.indexOf("cockpit+=") === 0) e = l.hostname;
|
|
document.title = e;
|
|
if (w.indexOf("cockpit+=") === 0) {
|
|
h("brand").style.display = "none";
|
|
h("badge").style.visibility = "hidden";
|
|
} else {
|
|
k("badge", "");
|
|
k("brand", "Cockpit");
|
|
}
|
|
if (!x()) return;
|
|
if (l.banner) {
|
|
h("banner").classList.remove("group-hidden");
|
|
h("banner-message").textContent = l.banner.trimEnd();
|
|
}
|
|
h("show-other-login-options").addEventListener("click", T);
|
|
h("show-other-login-options").addEventListener("keypress", T);
|
|
h("server-clear").addEventListener("click", function() {
|
|
var e = h("server-field");
|
|
e.value = "";
|
|
e.focus();
|
|
});
|
|
/* Setup the user's last choice about the authorized button */ var t = r.getItem("authorized-default");
|
|
if (t === null || t.indexOf("password") !== -1) h("authorized-input").checked = true;
|
|
var n = l["os-release"];
|
|
if (n) r.setItem("os-release", JSON.stringify(n));
|
|
var o = window.sessionStorage.getItem("logout-intent") == "explicit";
|
|
if (o) window.sessionStorage.removeItem("logout-intent");
|
|
var i = window.sessionStorage.getItem("logout-reason");
|
|
if (i) window.sessionStorage.removeItem("logout-reason");
|
|
/* Try automatic/kerberos authentication? */ if (u) {
|
|
h("login-details").style.display = "none";
|
|
h("login").style.display = "none";
|
|
if (o) {
|
|
L();
|
|
h("login-again").textContent = f("Login Again");
|
|
b(f("Logout Successful"));
|
|
} else {
|
|
O();
|
|
}
|
|
} else if (o) {
|
|
q(i);
|
|
} else {
|
|
I();
|
|
}
|
|
}
|
|
function I() {
|
|
var e = new XMLHttpRequest();
|
|
e.open("GET", p, true);
|
|
e.onreadystatechange = function() {
|
|
if (e.readyState == 4) {
|
|
if (e.status == 200) {
|
|
D(JSON.parse(e.responseText));
|
|
} else if (e.status == 401) {
|
|
q();
|
|
} else if (e.statusText) {
|
|
b(decodeURIComponent(e.statusText));
|
|
} else if (e.status === 0) {
|
|
q();
|
|
} else {
|
|
b(d(f("$0 error"), e.status));
|
|
}
|
|
}
|
|
};
|
|
e.send();
|
|
}
|
|
function L() {
|
|
var e = window.location.href.split("#", 2);
|
|
m = u.URL;
|
|
if (u.URL.indexOf("?") > -1) m += "&"; else m += "?";
|
|
m += "redirect_uri=" + encodeURIComponent(e[0]);
|
|
}
|
|
function O() {
|
|
var e = document.createElement("a");
|
|
if (!u.URL) return b(f("Cockpit authentication is configured incorrectly."));
|
|
var t = y(window.location.search);
|
|
if (!window.location.search && window.location.hash) t = y(window.location.hash.slice(1));
|
|
/* Not all providers allow hashes in redirect urls */ var n, o, i;
|
|
L();
|
|
if (t[u.TokenParam]) {
|
|
if (window.sessionStorage.getItem("login-wanted")) {
|
|
e.href = window.sessionStorage.getItem("login-wanted");
|
|
C(e.pathname);
|
|
}
|
|
n = t[u.TokenParam];
|
|
h("login-wait-validating").style.display = "block";
|
|
i = new XMLHttpRequest();
|
|
i.open("GET", p, true);
|
|
i.setRequestHeader("Authorization", "Bearer " + n);
|
|
i.onreadystatechange = function() {
|
|
if (i.readyState == 4) {
|
|
if (i.status == 200) {
|
|
D(JSON.parse(i.responseText));
|
|
} else {
|
|
o = J(i.getResponseHeader("WWW-Authenticate"), i.responseText);
|
|
if (o) $(o); else b(decodeURIComponent(i.statusText));
|
|
}
|
|
}
|
|
};
|
|
i.send();
|
|
} else if (t[u.ErrorParam]) {
|
|
b(t[u.ErrorParam]);
|
|
} else {
|
|
/* Store url we originally wanted in case we
|
|
* had to strip a hash or query params
|
|
*/
|
|
window.sessionStorage.setItem("login-wanted", window.location.href);
|
|
window.location = m;
|
|
}
|
|
}
|
|
function i() {
|
|
h("error-group").classList.add("group-hidden");
|
|
h("login-error-message").textContent = "";
|
|
}
|
|
function E() {
|
|
h("info-group").classList.add("group-hidden");
|
|
h("login-info-message").textContent = "";
|
|
}
|
|
function A(e, t) {
|
|
i();
|
|
if (e) {
|
|
/* OAuth failures are always fatal */
|
|
if (u) {
|
|
b(e);
|
|
} else {
|
|
P(t);
|
|
h("login-error-message").textContent = e;
|
|
h("error-group").classList.remove("group-hidden");
|
|
}
|
|
}
|
|
}
|
|
function R(e) {
|
|
E();
|
|
if (e) {
|
|
h("login-info-message").textContent = e;
|
|
h("info-group").classList.remove("group-hidden");
|
|
}
|
|
}
|
|
function U(e) {
|
|
var t = h("server-field").value;
|
|
if (!t) {
|
|
A(e, false);
|
|
} else {
|
|
i();
|
|
h("login-error-message").textContent = e;
|
|
h("error-group").classList.remove("group-hidden");
|
|
T(null, true);
|
|
P();
|
|
}
|
|
}
|
|
function H(e) {
|
|
var t = h("login-note");
|
|
if (e) {
|
|
t.style.display = "block";
|
|
t.textContent = e;
|
|
} else {
|
|
t.innerHTML = " ";
|
|
}
|
|
}
|
|
function N() {
|
|
return l.page.require_host && v.indexOf("cockpit+=") === -1;
|
|
}
|
|
function z() {
|
|
A(null);
|
|
var e;
|
|
var t = S(h("login-user-input").value);
|
|
if (t === "") {
|
|
A(f("User name cannot be empty"));
|
|
} else if (N() && h("server-field").value === "") {
|
|
A(f("Please specify the host to connect to"));
|
|
} else {
|
|
e = h("server-field").value;
|
|
if (e) {
|
|
w = "cockpit+=" + e;
|
|
p = g.replace("/" + v + "/", "/" + w + "/");
|
|
} else {
|
|
w = v;
|
|
p = g;
|
|
}
|
|
h("server-name").textContent = e || l.hostname;
|
|
h("login-button").removeEventListener("click", z);
|
|
/* When checked we tell the server to keep authentication */ var n = h("authorized-input").checked ? "password" : "";
|
|
var o = h("login-password-input").value;
|
|
r.setItem("authorized-default", n);
|
|
/* Keep information if login page was used */ r.setItem("standard-login", true);
|
|
var i = {
|
|
Authorization: "Basic " + window.btoa(_(t + ":" + o)),
|
|
"X-Authorize": n
|
|
};
|
|
// allow unknown remote hosts with interactive logins with "Connect to:"
|
|
if (e) i["X-SSH-Connect-Unknown-Hosts"] = "yes";
|
|
W("GET", i, false);
|
|
}
|
|
}
|
|
function P(e) {
|
|
var t = l.page.connect;
|
|
var n = h("option-group").getAttribute("data-state");
|
|
h("login-wait-validating").style.display = "none";
|
|
h("login").style.visibility = "visible";
|
|
h("login").style.display = "block";
|
|
h("user-group").style.display = e ? "none" : "block";
|
|
h("password-group").style.display = e ? "none" : "block";
|
|
h("conversation-group").style.display = e ? "block" : "none";
|
|
h("login-button-text").textContent = f("Log In");
|
|
h("login-password-input").value = "";
|
|
if (N()) {
|
|
h("option-group").style.display = "none";
|
|
n = true;
|
|
} else {
|
|
h("option-group").style.display = !t || e ? "none" : "block";
|
|
}
|
|
if (!t || e) {
|
|
h("server-group").style.display = "none";
|
|
} else {
|
|
h("server-group").style.display = n ? "block" : "none";
|
|
}
|
|
h("login-button").removeAttribute("disabled");
|
|
if (!e) h("login-button").addEventListener("click", z);
|
|
}
|
|
function q(e) {
|
|
/* Show the login screen */
|
|
R(e);
|
|
h("server-name").textContent = document.title;
|
|
H(f("Log in with your server user account."));
|
|
h("login-user-input").addEventListener("keydown", function(e) {
|
|
A(null);
|
|
E();
|
|
if (e.which == 13) h("login-password-input").focus();
|
|
}, false);
|
|
var t = function(e) {
|
|
A(null);
|
|
if (e.which == 13) z();
|
|
};
|
|
h("login-password-input").addEventListener("keydown", t);
|
|
h("authorized-input").addEventListener("keydown", t);
|
|
P();
|
|
h("login-user-input").focus();
|
|
}
|
|
function $(e) {
|
|
var t = e.echo ? "text" : "password";
|
|
h("conversation-prompt").textContent = e.prompt;
|
|
var n = h("conversation-message");
|
|
var o = e.error || e.message;
|
|
if (o) {
|
|
n.textContent = o;
|
|
n.style.display = "block";
|
|
} else {
|
|
n.style.display = "none";
|
|
}
|
|
var i = h("conversation-input");
|
|
i.value = "";
|
|
if (e.default) i.value = e.default;
|
|
i.setAttribute("type", t);
|
|
A("");
|
|
function r() {
|
|
h("conversation-input").removeEventListener("keydown", s);
|
|
h("login-button").removeEventListener("click", r);
|
|
A(null, true);
|
|
M(e.id, h("conversation-input").value);
|
|
}
|
|
function s(e) {
|
|
A(null, true);
|
|
if (e.which == 13) {
|
|
r();
|
|
}
|
|
}
|
|
h("conversation-input").addEventListener("keydown", s);
|
|
h("login-button").addEventListener("click", r);
|
|
P(true);
|
|
i.focus();
|
|
}
|
|
function _(e) {
|
|
return window.unescape(encodeURIComponent(e));
|
|
}
|
|
function J(e, t) {
|
|
var n;
|
|
var o;
|
|
var i;
|
|
var r;
|
|
if (!e) return null;
|
|
n = e.split(" ");
|
|
if (n[0].toLowerCase() !== "x-conversation" && n.length != 3) return null;
|
|
r = n[1];
|
|
try {
|
|
o = window.atob(n[2]);
|
|
} catch (e) {
|
|
if (window.console) a.error("Invalid prompt data", e);
|
|
return null;
|
|
}
|
|
try {
|
|
i = JSON.parse(t);
|
|
} catch (e) {
|
|
if (window.console) a.log("Got invalid JSON response for prompt data", e);
|
|
i = {};
|
|
}
|
|
i.id = r;
|
|
i.prompt = o;
|
|
return i;
|
|
}
|
|
function W(e, t, n) {
|
|
h("login-button").setAttribute("disabled", "true");
|
|
var o = new XMLHttpRequest();
|
|
o.open("GET", p, true);
|
|
var i;
|
|
var r;
|
|
var s;
|
|
for (s in t) o.setRequestHeader(s, t[s]);
|
|
o.onreadystatechange = function() {
|
|
if (o.readyState != 4) {
|
|
return;
|
|
} else if (o.status == 200) {
|
|
var e = JSON.parse(o.responseText);
|
|
D(e);
|
|
} else if (o.status == 401) {
|
|
r = o.getResponseHeader("WWW-Authenticate");
|
|
if (r && r.toLowerCase().indexOf("x-conversation") === 0) {
|
|
i = J(r, o.responseText);
|
|
if (i) $(i); else b(f("Internal Error: Invalid challenge header"));
|
|
} else {
|
|
if (window.console) a.log(o.statusText);
|
|
if (o.statusText.indexOf("authentication-not-supported") > -1) {
|
|
var t = S(h("login-user-input").value);
|
|
b(d(f("The server refused to authenticate '$0' using password authentication, and no other supported authentication methods are available."), t));
|
|
} else if (o.statusText.indexOf("terminated") > -1) {
|
|
A(f("Authentication Failed: Server closed connection"));
|
|
} else if (o.statusText.indexOf("no-host") > -1) {
|
|
U(f("Unable to connect to that address"));
|
|
} else if (o.statusText.indexOf("unknown-hostkey") > -1) {
|
|
U(f("Refusing to connect. Hostkey is unknown"));
|
|
} else if (o.statusText.indexOf("unknown-host") > -1) {
|
|
U(f("Refusing to connect. Host is unknown"));
|
|
} else if (o.statusText.indexOf("invalid-hostkey") > -1) {
|
|
U(f("Refusing to connect. Hostkey does not match"));
|
|
} else if (n) {
|
|
A(f("Authentication failed"));
|
|
} else {
|
|
A(f("Wrong user name or password"));
|
|
}
|
|
}
|
|
} else if (o.status == 403) {
|
|
A(decodeURIComponent(o.statusText) || f("Permission denied"));
|
|
} else if (o.statusText) {
|
|
b(decodeURIComponent(o.statusText));
|
|
} else {
|
|
b(d(f("$0 error"), o.status));
|
|
}
|
|
h("login-button").removeAttribute("disabled");
|
|
};
|
|
o.send();
|
|
}
|
|
function M(e, t) {
|
|
var n = {
|
|
Authorization: "X-Conversation " + e + " " + window.btoa(_(t))
|
|
};
|
|
W("GET", n, true);
|
|
}
|
|
function X(e) {
|
|
// Force a reload if not triggered below
|
|
// because only the hash part of the url
|
|
// changed
|
|
var t = window.setTimeout(function() {
|
|
t = null;
|
|
window.location.reload(true);
|
|
}, 100);
|
|
if (e && e != window.location.href) window.location = e;
|
|
// cancel forced reload if we are reloading
|
|
window.onbeforeunload = function() {
|
|
if (t) window.clearTimeout(t);
|
|
t = null;
|
|
};
|
|
}
|
|
function G(n) {
|
|
var e = "/" + w + "/@localhost/";
|
|
if (s) e = "/" + s + e;
|
|
var o = e + "shell/index.html";
|
|
var i = new XMLHttpRequest();
|
|
i.open("GET", e + "manifests.json", true);
|
|
i.onreadystatechange = function() {
|
|
if (i.readyState == 4) {
|
|
if (i.status == 200) {
|
|
var e = JSON.parse(i.responseText);
|
|
var t = e ? e.base1 : {};
|
|
if (!t.version || t.version < "119.x") {
|
|
X(o);
|
|
} else X(n);
|
|
} else {
|
|
X(o);
|
|
}
|
|
}
|
|
};
|
|
i.send();
|
|
}
|
|
function j(e, t, n) {
|
|
var o = 0;
|
|
while (o < e.length) {
|
|
var i = e.key(o);
|
|
if (n && i.indexOf("cockpit") !== 0) e.removeItem(i); else if (i.indexOf(t) === 0) e.removeItem(i); else o++;
|
|
}
|
|
}
|
|
function B(e) {
|
|
/* Clear anything not prefixed with
|
|
* different application from sessionStorage
|
|
*/
|
|
j(window.sessionStorage, w, true);
|
|
/* Clear anything prefixed with our application
|
|
* and login-data, but not other non-application values.
|
|
*/ r.removeItem("login-data");
|
|
j(r, w, false);
|
|
var t;
|
|
if (e && e["login-data"]) {
|
|
t = JSON.stringify(e["login-data"]);
|
|
/* login-data is tied to the auth cookie, since
|
|
* cookies are available after the page
|
|
* session ends login-data should be too.
|
|
*/ r.setItem(w + "login-data", t);
|
|
/* Backwards compatbility for packages that aren't application prefixed */ r.setItem("login-data", t);
|
|
}
|
|
/* URL Root is set by cockpit ws and shouldn't be prefixed
|
|
* by application
|
|
*/ if (s) r.setItem("url-root", s);
|
|
var n = l.CACertUrl;
|
|
if (n) window.sessionStorage.setItem("CACertUrl", n);
|
|
}
|
|
function D(e) {
|
|
var t = window.sessionStorage.getItem("login-wanted");
|
|
var n = h("server-field").value;
|
|
if (n && w != v) {
|
|
t = "/=" + n;
|
|
if (s) t = "/" + s + t;
|
|
}
|
|
/* clean up sessionStorage. clear anything that isn't prefixed
|
|
* with an application and anything prefixed with our application.
|
|
*/ j(window.sessionStorage, w, false);
|
|
B(e);
|
|
/* Make sure that the base1 version is new enough to handle
|
|
* urls that reference machines.
|
|
*/ if (w.indexOf("cockpit+=") === 0) {
|
|
G(t);
|
|
} else {
|
|
X(t);
|
|
}
|
|
}
|
|
window.onload = e;
|
|
})(window.console);
|
|
//# sourceMappingURL=login.min.js.map </script>
|
|
<style>
|
|
*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-tap-highlight-color:transparent}body{margin:0;font-family:RedHatText,Helvetica,Arial,sans-serif;background-color:#333;color:#fff;line-height:1.5}.pf-c-button,label{font-weight:600}.pf-c-button,img{vertical-align:middle}#login-wait-validating div,.col-xs-12{float:left}#option-group,.cross,.pf-c-button,button{cursor:pointer}#option-group svg,.cross{opacity:.7}a{color:inherit;text-decoration:none}.pf-c-button:focus,a:focus{outline:-webkit-focus-ring-color auto 5px;outline:dotted thin;outline-offset:-2px}a:active,a:hover{outline:0}a:focus,a:hover{color:#fff;text-decoration:underline}img{border:0}button,input,select,textarea{font-family:inherit;margin:0;font-size:inherit;line-height:inherit}button{-webkit-appearance:button;overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}p{margin:0 0 10px}.container{margin-right:auto;margin-left:auto}#option-group{margin-top:2rem;margin-bottom:2rem}#server-group{margin-top:-1rem;margin-bottom:2rem}.container:after,.container:before,.form-group:after,.form-group:before,.row:after,.row:before{content:" ";display:table}.container:after,.row:after{clear:both}.col-lg-5,.col-lg-7,.col-md-10,.col-md-2,.col-md-6,.col-sm-1,.col-sm-10,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-5,.col-sm-6,.col-sm-7,.col-xs-12{position:relative;min-height:1px;padding-left:20px;padding-right:20px}.col-xs-12{width:100%}label{display:inline-block}#option-group,.control-label{font-size:.875rem}[role=form] .control-label,form .control-label{display:flex;align-items:center;min-height:2rem}.form-control{color:#151515}.form-control[type=password],.form-control[type=text]{display:block;width:100%;padding:.25rem .5rem;background-color:#fff;background-image:none;border:1px solid #ededed;border-bottom-color:#72767b;border-radius:1px;transition:border-color .15s ease-in-out;color:#151515}.form-control[type=password]:focus,.form-control[type=password]:hover,.form-control[type=text]:focus,.form-control[type=text]:hover{border-bottom-color:#06c}.form-control[type=password]:focus,.form-control[type=text]:focus{padding-bottom:calc(.25rem - 1px);border-bottom-width:2px}.form-control:focus{outline:0}.form-control:-moz-placeholder{color:#999;font-style:italic}.form-control::-moz-placeholder{color:#999;font-style:italic;opacity:1}.form-control:-ms-input-placeholder{color:#999;font-style:italic}.form-control::-webkit-input-placeholder{color:#999;font-style:italic}.checkbox-row{margin:1rem 0 0;display:flex;align-items:baseline}.checkbox-row>input[type=checkbox]{width:16px;height:16px;align-self:start;margin-top:calc((1.5rem - 16px)/ 2);margin-right:.5rem}label.checkbox{font:inherit}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}.caret,.pf-c-button{display:inline-block}#login-button[disabled] .spinner{display:inline-flex}.control-label,.pf-c-button{margin-bottom:0}.control-label{margin-top:0;padding-top:3px}.form-group:after{clear:both;margin-bottom:15px}.pf-c-button{text-align:center;background-image:none;border:1px solid transparent;white-space:nowrap;padding:2px 6px;border-radius:1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.pf-c-button:focus,.pf-c-button:hover{color:#4d5258;text-decoration:none}.pf-c-button:active{outline:0;background-image:none}@-ms-viewport{width:device-width}.pf-c-button{padding:.25rem .5rem;border-radius:1px;font-size:inherit}.pf-m-primary{background-color:#06c;border-color:#06c;color:#fff}.pf-m-primary:active,.pf-m-primary:focus,.pf-m-primary:hover{background-color:#004080;border-color:#004080;color:#fff}.pf-m-primary:active{background-image:none}@font-face{font-family:RedHatText;font-style:normal;font-weight:400;src:url(cockpit/static/fonts/RedHatText-Regular.woff2) format('woff2')}@font-face{font-family:RedHatText;font-style:normal;font-weight:700;src:url(cockpit/static/fonts/RedHatText-Medium.woff2) format('woff2')}.login-pf{height:100%}.login-pf #brand{position:relative;top:-70px}.login-pf #brand img{display:block;margin:0 auto;max-width:100%}.login-pf #badge{display:block;margin:20px auto 70px;position:relative;text-align:center}.login-pf #banner{margin-top:20px}.login-pf .container{background-color:rgba(255,255,255,.055);clear:right;padding-bottom:40px;padding-top:20px;width:auto}.login-pf .container .details p:first-child{border-top:1px solid #474747;padding-top:25px;margin-top:25px}.login-pf .container .details p{margin-bottom:2px}.login-pf .container .control-label{font-weight:600}.login-pf .container .help-block{color:#fff}.login-pf .container .form-group:last-child,.login-pf .container .form-group:last-child .help-block:last-child{margin-bottom:0}.spinner{-webkit-animation:.6s linear infinite rotation;animation:.6s linear infinite rotation;border-bottom:4px solid rgba(0,0,0,.25);border-left:4px solid rgba(0,0,0,.25);border-right:4px solid rgba(0,0,0,.25);border-radius:100%;border-top:4px solid rgba(0,0,0,.75);height:1.5rem;width:1.5rem}.group-hidden{display:none!important}.pf-c-alert{color:#151515;position:relative;grid-template-columns:repeat(2,max-content) 1fr max-content;grid-template-rows:1fr auto;grid-template-areas:"icon title action" ". content content";background-color:#fff;margin:0 0 1.5rem;align-items:center;display:grid}.pf-c-alert.pf-m-inline{border:solid #ededed;border-width:1px 1px 1px 0}.pf-c-alert.pf-m-inline::before{position:absolute;top:-1px;bottom:-1px;left:0;width:3px;content:""}.pf-c-alert>svg{grid-area:icon;height:18px;width:18px;margin:1rem 0 1rem 1rem}.pf-c-alert__title{grid-area:title;font-size:1rem;margin:1rem;background-color:#fff}.pf-c-alert.pf-m-inline.pf-m-danger::before{background-color:#c9190b}.pf-c-alert.pf-m-danger>svg{color:#c9190b}.pf-c-alert.pf-m-danger .pf-c-alert__title{color:#a30000}.pf-c-alert.pf-m-inline.pf-m-info::before{background-color:#73bcf7}.pf-c-alert.pf-m-info>svg{color:#73bcf7}.pf-c-alert.pf-m-info .pf-c-alert__title{color:#004368}#server-group:before{clear:both;margin-top:5px}.login-fatal{font-size:130%}.unsupported-browser ul{color:#aaa;display:inline-block;margin:0 auto;text-align:left}.unsupported-browser a{color:#fff;font-weight:700;text-decoration:underline}.cross,.inline .container .help-block{color:#000}.login-browser-recommendations{margin-top:6rem}.caret,.server-box{position:relative}.conversation-prompt{white-space:normal;word-wrap:break-word}.control-label{white-space:nowrap}.spinner{border-color:rgba(255,255,255,.75) rgba(255,255,255,.25) rgba(255,255,255,.25)}#login-button .spinner,#login-button[disabled] #login-button-text,.hide-before:before{display:none}.inline #badge,.inline #brand,.inline #login-details{display:none}.inline body{background:0 0!important;color:#000}.caret{top:4px}.caret-down{-moz-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg);-moz-transform-origin:8px 8px;-webkit-transform-origin:8px 8px;transform-origin:8px 8px}.cross{align-items:center;bottom:0;display:flex;font-size:14px;font-weight:700;justify-content:center;position:absolute;right:20px;top:0;width:2rem}#option-group:hover svg,.cross:hover{opacity:1}#option-group div{margin-left:-3px;margin-top:3px;margin-bottom:10px}#login-button{display:flex;align-items:center;justify-content:center;height:2.5rem;padding:.5rem}#login-button[disabled]{background-color:#333;background-image:none;border-color:#555}@media (min-width:1024px){.container{width:760px}.col-sm-1,.col-sm-10,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-5,.col-sm-6,.col-sm-7{float:left}.col-sm-12{width:100%}.col-sm-10{width:83.33333333333334%}.col-sm-7{width:58.333333333333336%}.col-sm-6{width:50%}.col-sm-5{width:41.66666666666667%}.col-sm-3{width:25%}.col-sm-2{width:16.666666666666664%}.col-sm-1{width:8.333333333333332%}.col-sm-offset-2{margin-left:16.666666666666664%}}@media (min-width:1024px){.container{width:980px}.col-md-10,.col-md-2,.col-md-6{float:left}.col-md-10{width:83.33333333333334%}.col-md-6{width:50%}.col-md-2{width:16.666666666666664%}}@media (min-width:1200px){.container{width:1180px}.col-lg-5,.col-lg-7{float:left}.col-lg-7{width:58.333333333333336%}.col-lg-5{width:41.66666666666667%}}@media (max-width:480px){.unsupported-browser .container>.row>.col-sm-12{position:static}.login-pf{display:flex;flex-direction:column-reverse;height:auto;position:relative}.row{display:flex;flex-direction:column}.login-pf .container{width:100%}.login-pf #badge{max-width:33vw;margin:3rem auto;height:8rem;padding:0;background-position:50% 100%}.container>.row>.col-sm-12{order:1;position:absolute;bottom:0;left:0;width:100%;text-align:center}.login-pf #brand{position:static;font-size:inherit;background-position:50% 50%}.details{text-align:center}}@media (min-width:481px){.brand-unsupported-browser #brand{margin-left:-40px;position:absolute;text-align:center;width:100%}.unsupported-browser{font-size:140%;margin-left:-30px;text-align:center}.unsupported-browser-heading{font-size:3rem;left:50%;margin:0 0 0 -32rem;position:absolute;text-align:center;top:-16rem;width:64rem}.login-browser-recommendations h3{font-weight:400;margin-top:0}}@media (min-width:1024px){.control-label{text-align:right}[role=form] .control-label,form .control-label{padding:0}.login-pf #brand img{margin:0;text-align:left}.login-pf #badge{float:right;margin-right:64px;margin-top:50px}.login-pf .container{bottom:13%;padding-left:80px;position:absolute;width:100%}.login-pf .container .login-area{border-right:1px solid #474747}.login-pf .container .details{padding-left:40px}.login-pf .container .details p:first-child{border-top:0;padding-top:0;margin-top:0}}@-webkit-keyframes rotation{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(359deg)}}@keyframes rotation{from{transform:rotate(0)}to{transform:rotate(359deg)}}@supports (display:grid){[class*=col-]{padding:0}.col-sm-12{padding:3rem 3rem 0}.row{display:flex;flex-flow:column;margin:0}body.login-pf{color:#151515;display:grid;grid-template-areas:"alert" "login" "logo";grid-template-columns:1fr;grid-template-rows:minmax(min-content,max-content);background-position:0 0!important;height:100vh;grid-gap:0 4rem;padding:0}.login-pf .container .details p:first-child{border-top:0;padding-top:0;margin-top:0}.container>.row>.col-sm-12{order:inherit;position:static;text-align:left}.login-button{width:100%}.login-pf .container{position:static;background:#fff;color:#333;grid-area:login;margin:0;padding:0}.login-pf #badge{grid-area:logo;margin:0!important}.login-pf .container .login-area{border:none;width:auto;padding:0 3rem 1.5rem}.login-pf .container .details{padding:1.5rem 3rem;width:auto!important;background:#ededed}.login-pf #brand{font-size:1.75rem;line-height:1.3;padding:0 0 2rem;position:static;text-transform:initial}.unsupported-browser a,a{color:#06c}.unsupported-browser a:focus,.unsupported-browser a:hover,a:focus,a:hover{color:#004080}.caret polygon{fill:#06c}[role=form] .col-md-10,form .col-md-10{display:flex}.cross{right:0}@media (max-width:1023px){body.login-pf{justify-items:center;grid-gap:.5rem}#badge{background-position:center}}@media (min-width:1024px){.container::before{background:rgba(0,0,0,.3);content:"";position:absolute;height:100%;width:370px;top:0;left:0;z-index:-1}body.login-pf{grid-template-areas:". alert alert ." ". . . ." ". login logo ." ". . . . ";grid-template-rows:auto 1fr minmax(min-content,max-content) 1fr;grid-template-columns:minmax(0,2.125rem) 35rem 1fr minmax(0,2.125rem)}}body.login-pf.brand-unsupported-browser{grid-template-columns:auto 1fr;grid-template-rows:auto}.unsupported-browser{padding:2rem;margin:0;font-size:inherit}.unsupported-browser ul{color:#555;margin:0 0 2rem}.login-browser-recommendations{margin:0;display:flex;justify-content:space-around}}.dialog-error{grid-area:alert;margin:0}#banner-message{white-space:pre-wrap;max-height:12em;overflow:auto;padding:1.5em 1em;margin:0}
|
|
/*# sourceMappingURL=login.min.css.map */ </style>
|
|
<link href="cockpit/static/branding.css" type="text/css" rel="stylesheet">
|
|
</head>
|
|
<body class="login-pf">
|
|
<div id="banner" class="pf-c-alert pf-m-info pf-m-inline dialog-error group-hidden" aria-label="inline danger alert">
|
|
<svg fill="currentColor" viewBox="0 0 448 512" aria-hidden="true"><path d="M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z"/></svg>
|
|
<pre id="banner-message" class="pf-c-alert__title"></pre>
|
|
</div>
|
|
|
|
<span id="badge">
|
|
</span>
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div id="brand" class="hide-before">
|
|
</div><!--/#brand-->
|
|
</div><!--/.col-*-->
|
|
|
|
<div id="login" class="login-area" style="visibility: hidden;">
|
|
<div role="form">
|
|
|
|
<div id="error-group" class="pf-c-alert pf-m-danger pf-m-inline dialog-error group-hidden" aria-label="inline danger alert">
|
|
<svg fill="currentColor" viewBox="0 0 512 512" aria-hidden="true"><path d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg>
|
|
<h4 id="login-error-message" class="pf-c-alert__title"></h4>
|
|
</div>
|
|
|
|
<div id="info-group" class="pf-c-alert pf-m-info pf-m-inline dialog-error group-hidden" aria-label="inline danger alert">
|
|
<svg fill="currentColor" viewBox="0 0 512 512" aria-hidden="true"><path d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"/></svg>
|
|
<h4 id="login-info-message" class="pf-c-alert__title"></h4>
|
|
</div>
|
|
|
|
<div id="conversation-group" class="form-group" hidden>
|
|
<div id="conversation-message"></div>
|
|
<label id="conversation-prompt" for="conversation-input"></label>
|
|
<input type="password" class="form-control" id="conversation-input">
|
|
</div>
|
|
|
|
<div id="user-group" class="form-group">
|
|
<label for="login-user-input" class="control-label" translate>User name</label>
|
|
<input type="text" class="form-control" id="login-user-input" autocorrect="off" autocapitalize="none" autofocus>
|
|
</div>
|
|
|
|
<div id="password-group" class="form-group">
|
|
<label for="login-password-input" class="control-label" translate>Password</label>
|
|
<input type="password" class="form-control" id="login-password-input">
|
|
<div class="checkbox-row">
|
|
<input type="checkbox" class="form-control" id="authorized-input">
|
|
<label for="authorized-input" class="checkbox" translate>Reuse my password for privileged tasks</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="option-group">
|
|
<i id="option-caret" class="caret caret-right" aria-hidden="true">
|
|
<svg height="16" width="16" viewBox="0 0 16 16">
|
|
<polygon fill="#ffffff" points="4,0 4,14 12,7">
|
|
</polygon>
|
|
</svg>
|
|
</i>
|
|
<a href="#" id="show-other-login-options" translate>Other Options</a>
|
|
</div>
|
|
|
|
<div id="server-group" class="form-group" hidden>
|
|
<label title="Log in to another system. Leave blank to log in to the local system." for="server-field" class="control-label" translate>Connect to</label>
|
|
<div class="server-box">
|
|
<input type="text" class="form-control" id="server-field">
|
|
<span class="cross" id="server-clear" aria-hidden="true">❌</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<button class="pc-c-button pf-m-primary login-button" id="login-button" type="submit">
|
|
<span class="spinner"></span>
|
|
<span id="login-button-text" translate>Log In</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div><!--/.col-*-->
|
|
|
|
<div class="details" id="login-details">
|
|
<p>
|
|
<label class="control-label"><span translate>Server</span>: <b id="server-name"></b></label>
|
|
</p>
|
|
<p id="login-note" class="login-note"></p>
|
|
</div><!--/.col-*-->
|
|
|
|
<div class="" id="login-wait-validating" hidden>
|
|
<div class="col-sm-4">
|
|
<span class="help-block" translate>Validating authentication token</span>
|
|
</div>
|
|
<div class="col-sm-1">
|
|
<div class="spinner col-xs-15">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-12" id="login-fatal" hidden>
|
|
<span id="login-fatal-message"></span>
|
|
<a id="login-again" translate hidden>Try Again</a>
|
|
</div>
|
|
|
|
<div class="unsupported-browser col-sm-12" id="unsupported-browser" hidden>
|
|
<h2 class="unsupported-browser-heading" translate>A modern browser is required for security, reliability, and performance.</h2>
|
|
<div class="login-browser-recommendations">
|
|
<div class="col-sm-6">
|
|
<h3 translate>Download a new browser for free</h3>
|
|
<ul>
|
|
<li><a href="https://firefox.com/">Mozilla Firefox</a> / Linux, Windows, macOS</li>
|
|
<li><a href="https://google.com/chrome">Google Chrome</a> / Linux, Windows, macOS</li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<h3 translate>Or use a bundled browser</h3>
|
|
<ul>
|
|
<li><a href="https://microsoftedge.com/">Microsoft Edge</a> / Windows 10+</li>
|
|
<li><a href="https://apple.com/safari/">Apple Safari</a> / macOS</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div><!--/.row-->
|
|
</div><!--/.container-->
|
|
</body>
|
|
</html>
|