Skip to content

Commit d4001c2

Browse files
committed
add dist
1 parent a02be54 commit d4001c2

13 files changed

+290
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ __pycache__/
1111
.Python
1212
build/
1313
develop-eggs/
14-
dist/
14+
#dist/
1515
downloads/
1616
eggs/
1717
.eggs/

static/dist/favicon-16x16.png

445 Bytes
Loading

static/dist/favicon-32x32.png

1.11 KB
Loading

static/dist/index.html

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!-- HTML for static distribution bundle build -->
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Swagger UI</title>
7+
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
8+
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
9+
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
10+
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
11+
<style>
12+
html
13+
{
14+
box-sizing: border-box;
15+
overflow: -moz-scrollbars-vertical;
16+
overflow-y: scroll;
17+
}
18+
19+
*,
20+
*:before,
21+
*:after
22+
{
23+
box-sizing: inherit;
24+
}
25+
26+
body
27+
{
28+
margin:0;
29+
background: #fafafa;
30+
}
31+
</style>
32+
</head>
33+
34+
<body>
35+
<div id="swagger-ui"></div>
36+
37+
<script src="./swagger-ui-bundle.js"> </script>
38+
<script src="./swagger-ui-standalone-preset.js"> </script>
39+
<script>
40+
window.onload = function() {
41+
42+
// Build a system
43+
const ui = SwaggerUIBundle({
44+
url: "http://127.0.0.1:5000/static/swagger.json",
45+
dom_id: '#swagger-ui',
46+
deepLinking: true,
47+
presets: [
48+
SwaggerUIBundle.presets.apis,
49+
SwaggerUIStandalonePreset
50+
],
51+
plugins: [
52+
SwaggerUIBundle.plugins.DownloadUrl
53+
],
54+
layout: "StandaloneLayout"
55+
})
56+
57+
window.ui = ui
58+
}
59+
</script>
60+
</body>
61+
</html>

static/dist/oauth2-redirect.html

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!doctype html>
2+
<html lang="en-US">
3+
<body onload="run()">
4+
</body>
5+
</html>
6+
<script>
7+
'use strict';
8+
function run () {
9+
var oauth2 = window.opener.swaggerUIRedirectOauth2;
10+
var sentState = oauth2.state;
11+
var redirectUrl = oauth2.redirectUrl;
12+
var isValid, qp, arr;
13+
14+
if (/code|token|error/.test(window.location.hash)) {
15+
qp = window.location.hash.substring(1);
16+
} else {
17+
qp = location.search.substring(1);
18+
}
19+
20+
arr = qp.split("&")
21+
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
22+
qp = qp ? JSON.parse('{' + arr.join() + '}',
23+
function (key, value) {
24+
return key === "" ? value : decodeURIComponent(value)
25+
}
26+
) : {}
27+
28+
isValid = qp.state === sentState
29+
30+
if ((
31+
oauth2.auth.schema.get("flow") === "accessCode"||
32+
oauth2.auth.schema.get("flow") === "authorizationCode"
33+
) && !oauth2.auth.code) {
34+
if (!isValid) {
35+
oauth2.errCb({
36+
authId: oauth2.auth.name,
37+
source: "auth",
38+
level: "warning",
39+
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
40+
});
41+
}
42+
43+
if (qp.code) {
44+
delete oauth2.state;
45+
oauth2.auth.code = qp.code;
46+
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
47+
} else {
48+
let oauthErrorMsg
49+
if (qp.error) {
50+
oauthErrorMsg = "["+qp.error+"]: " +
51+
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
52+
(qp.error_uri ? "More info: "+qp.error_uri : "");
53+
}
54+
55+
oauth2.errCb({
56+
authId: oauth2.auth.name,
57+
source: "auth",
58+
level: "error",
59+
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
60+
});
61+
}
62+
} else {
63+
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
64+
}
65+
window.close();
66+
}
67+
</script>

static/dist/swagger-ui-bundle.js

+131
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/dist/swagger-ui-bundle.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/dist/swagger-ui-standalone-preset.js

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/dist/swagger-ui-standalone-preset.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/dist/swagger-ui.css

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/dist/swagger-ui.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/dist/swagger-ui.js

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/dist/swagger-ui.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)