summaryrefslogtreecommitdiff
path: root/sflow-rt/resources/api/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'sflow-rt/resources/api/index.html')
-rw-r--r--sflow-rt/resources/api/index.html71
1 files changed, 71 insertions, 0 deletions
diff --git a/sflow-rt/resources/api/index.html b/sflow-rt/resources/api/index.html
new file mode 100644
index 0000000..79e24ad
--- /dev/null
+++ b/sflow-rt/resources/api/index.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title>REST API</title>
+ <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+ <link rel="icon" type="image/png" href="./favicon.png">
+ <style>
+ html
+ {
+ box-sizing: border-box;
+ overflow: -moz-scrollbars-vertical;
+ overflow-y: scroll;
+ }
+
+ *,
+ *:before,
+ *:after
+ {
+ box-sizing: inherit;
+ }
+
+ body
+ {
+ margin:0;
+ background: #fafafa;
+ }
+ </style>
+ </head>
+
+ <body>
+ <div id="swagger-ui"></div>
+
+ <script src="./swagger-ui-bundle.js"> </script>
+ <script src="./swagger-ui-standalone-preset.js"> </script>
+ <script>
+ window.onload = function() {
+ function HideTopbarPlugin() {
+ // this plugin overrides the Topbar component to return nothing
+ return {
+ components: {
+ Topbar: function() { return null; }
+ }
+ };
+ }
+
+ // Build a system
+ const ui = SwaggerUIBundle({
+ url: "../api-docs",
+ validatorUrl: null,
+ dom_id: '#swagger-ui',
+ deepLinking: true,
+ docExpansion: 'none',
+ presets: [
+ SwaggerUIBundle.presets.apis,
+ SwaggerUIStandalonePreset
+ ],
+ plugins: [
+ SwaggerUIBundle.plugins.DownloadUrl,
+ HideTopbarPlugin
+ ],
+ layout: "StandaloneLayout",
+ tagsSorter: "alpha",
+ operationsSorter: "alpha"
+ });
+
+ window.ui = ui;
+ };
+ </script>
+ </body>
+</html>