diff --git a/docs/swagger-ui/index.css b/docs/swagger-ui/index.css
new file mode 100644
index 00000000000..f2376fdaa84
--- /dev/null
+++ b/docs/swagger-ui/index.css
@@ -0,0 +1,16 @@
+html {
+ box-sizing: border-box;
+ overflow: -moz-scrollbars-vertical;
+ overflow-y: scroll;
+}
+
+*,
+*:before,
+*:after {
+ box-sizing: inherit;
+}
+
+body {
+ margin: 0;
+ background: #fafafa;
+}
diff --git a/docs/swagger-ui/index.html b/docs/swagger-ui/index.html
index 8de1e14ec36..f367bee9126 100644
--- a/docs/swagger-ui/index.html
+++ b/docs/swagger-ui/index.html
@@ -5,33 +5,13 @@
Swagger UI
+
-
+
-
diff --git a/docs/swagger-ui/oauth2-redirect.html b/docs/swagger-ui/oauth2-redirect.html
index 64b171f7de5..56409171811 100644
--- a/docs/swagger-ui/oauth2-redirect.html
+++ b/docs/swagger-ui/oauth2-redirect.html
@@ -13,7 +13,7 @@
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
- qp = window.location.hash.substring(1);
+ qp = window.location.hash.substring(1).replace('?', '&');
} else {
qp = location.search.substring(1);
}
@@ -38,7 +38,7 @@
authId: oauth2.auth.name,
source: "auth",
level: "warning",
- message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
+ message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
});
}
@@ -58,7 +58,7 @@
authId: oauth2.auth.name,
source: "auth",
level: "error",
- message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
+ message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
});
}
} else {
@@ -67,9 +67,13 @@
window.close();
}
- window.addEventListener('DOMContentLoaded', function () {
- run();
- });
+ if (document.readyState !== 'loading') {
+ run();
+ } else {
+ document.addEventListener('DOMContentLoaded', function () {
+ run();
+ });
+ }