|
@@ -1,140 +1,256 @@
|
|
-<!DOCTYPE html>
|
|
|
|
-<html lang="zh">
|
|
|
|
|
|
+<!doctype html>
|
|
|
|
+<html lang="zh-cn">
|
|
<head>
|
|
<head>
|
|
- <meta charset="utf-8" />
|
|
|
|
- <title>ApiDoc</title>
|
|
|
|
-
|
|
|
|
- <link rel="stylesheet" href="Scripts/editormd/css/editormd.css" />
|
|
|
|
- <script src="Scripts/editormd/examples/js/jquery.min.js"></script>
|
|
|
|
- <script src="Scripts/editormd/lib/marked.min.js"></script>
|
|
|
|
- <script src="Scripts/editormd/lib/prettify.min.js"></script>
|
|
|
|
- <script src="Scripts/editormd/lib/raphael.min.js"></script>
|
|
|
|
- <script src="Scripts/editormd/lib/underscore.min.js"></script>
|
|
|
|
- <script src="Scripts/editormd/lib/sequence-diagram.min.js"></script>
|
|
|
|
- <script src="Scripts/editormd/lib/flowchart.min.js"></script>
|
|
|
|
- <script src="Scripts/editormd/lib/jquery.flowchart.min.js"></script>
|
|
|
|
- <script src="Scripts/editormd/editormd.js"></script>
|
|
|
|
-
|
|
|
|
- <script src="Scripts/util/lith.js"></script>
|
|
|
|
-
|
|
|
|
- <script src="Scripts/Sers/sers.apiClient.js"></script>
|
|
|
|
- <script src="Scripts/Sers/sers.ssApiDescToMd.js"></script>
|
|
|
|
- <script src="Scripts/Sers/sers.ssModel.js"></script>
|
|
|
|
-
|
|
|
|
- <script src="Scripts/Sers/sers.SaveFile.js"></script>
|
|
|
|
- <script src="Scripts/Sers/sers.postman.js"></script>
|
|
|
|
-
|
|
|
|
- <style type="text/css">
|
|
|
|
- #title a {
|
|
|
|
- text-decoration: none;
|
|
|
|
- }
|
|
|
|
- </style>
|
|
|
|
|
|
+ <title>Sers Dashboard</title>
|
|
|
|
+
|
|
|
|
+ <meta charset="utf-8">
|
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <script src="Scripts/jquery/jquery.min.js"></script>
|
|
|
|
+
|
|
|
|
+ <!-- Main CSS -->
|
|
|
|
+ <link rel="stylesheet" href="Scripts/blog/css/style.css">
|
|
|
|
+
|
|
|
|
+ <!-- Font Awesome -->
|
|
|
|
+ <link href="Scripts/blog/css/font-awesome.min.css" rel="stylesheet">
|
|
</head>
|
|
</head>
|
|
|
|
+
|
|
<body>
|
|
<body>
|
|
- <div id="title">
|
|
|
|
- <h1>ApiDoc-all</h1>
|
|
|
|
- apiStation: <span id="apiStation"> <a href="?" title="所有">所有</a> | </span>
|
|
|
|
- <br />
|
|
|
|
- postman导入文件:
|
|
|
|
- <a id="postmanCollection" href="#" title="download postman collection File">下载postmanCollection</a> |
|
|
|
|
- <a id="postmanEnvironment" href="#" title="download postman environment File">下载postmanEnvironment</a>
|
|
|
|
- <br />
|
|
|
|
- postmanWeb:
|
|
|
|
- <a href="#" onclick="openPostmanWeb(false)">打开postmanWeb</a> |
|
|
|
|
- <a href="#" onclick="openPostmanWeb(true)">打开postmanWeb并加载当前api</a>
|
|
|
|
- <br />
|
|
|
|
- markdown文档:<a id="mdDownload" href="#" title="download markdown document File">下载markdown文档</a>
|
|
|
|
- <br />
|
|
|
|
-
|
|
|
|
- 操作:
|
|
|
|
- <a href="#" onclick="removeOfflineApiService()">移除离线接口</a>
|
|
|
|
|
|
+ <style>
|
|
|
|
+ .container {
|
|
|
|
+ max-width: 1920px !important;
|
|
|
|
+ }
|
|
|
|
+ </style>
|
|
|
|
+
|
|
|
|
+ <!-- Header -->
|
|
|
|
+ <div class="container">
|
|
|
|
+ <div class="header-wrap d-none d-md-block">
|
|
|
|
+ <div class="row">
|
|
|
|
+
|
|
|
|
+ <!-- Left header box -->
|
|
|
|
+ <header class="col-6 text-left">
|
|
|
|
+ <h1><span> Sers </span> Dashboard </h1>
|
|
|
|
+ </header>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- Main navigation -->
|
|
|
|
+ <div class="container navbar-container">
|
|
|
|
+ <nav class="navbar navbar-expand-md navbar-light">
|
|
|
|
+
|
|
|
|
+ <!-- Company name shown on mobile -->
|
|
|
|
+ <a class="navbar-brand d-md-none d-lg-none d-xl-none" href="#"><span> Sers </span> Dashboard </a>
|
|
|
|
+
|
|
|
|
+ <!-- Mobile menu toggle -->
|
|
|
|
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainNavbar" aria-controls="mainNavbar" aria-expanded="false" aria-label="Toggle navigation">
|
|
|
|
+ <span class="navbar-toggler-icon"></span>
|
|
|
|
+ </button>
|
|
|
|
+
|
|
|
|
+ <!-- Main navigation items -->
|
|
|
|
+ <div class="collapse navbar-collapse" id="mainNavbar">
|
|
|
|
+ <ul class="navbar-nav mr-auto">
|
|
|
|
+ <li class="nav-item active">
|
|
|
|
+ <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ <li class="nav-item">
|
|
|
|
+ <a class="nav-link" target="_blank" href="/_gover_/ActiveApiDoc.html">ActiveApiDoc</a>
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ <li class="nav-item">
|
|
|
|
+ <a class="nav-link" target="_blank" href="/_gover_/ApiDoc.html">ApiDoc</a>
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ <li class="nav-item">
|
|
|
|
+ <a class="nav-link" target="_blank" href="/_gover_/ApiStation.html">ApiStation</a>
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ <li class="nav-item">
|
|
|
|
+ <a class="nav-link" target="_blank" href="/_gover_/ServiceStation.html">ServiceStation</a>
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ <li class="nav-item">
|
|
|
|
+ <a class="nav-link" target="_blank" href="/_gover_/RateLimit.html">RateLimit</a>
|
|
|
|
+ </li>
|
|
|
|
|
|
|
|
+ <li class="nav-item">
|
|
|
|
+ <a class="nav-link" target="_blank" href="/_gover_/Health.html">Health</a>
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <li class="nav-item dropdown">
|
|
|
|
+ <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Ext</a>
|
|
|
|
+ <div class="dropdown-menu navbar-dark bg-primary">
|
|
|
|
+ <a class="dropdown-item" target="_blank" href="/JsStation/JsStation.html">JsStation</a>
|
|
|
|
+ <a class="dropdown-item" target="_blank" href="/MicroControl/mc.html">MicroControl</a>
|
|
|
|
+ <a class="dropdown-item" target="_blank" href="/_robot_/TaskMng.html">Robot</a>
|
|
|
|
+ </div>
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ </ul>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </nav>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div id="test-editormd-view" style="width: 95%;">
|
|
|
|
|
|
+ <!-- Jumbtron / Slider -->
|
|
|
|
+ <div class="jumbotron-wrap">
|
|
|
|
+ <div class="container">
|
|
|
|
+ <div class="jumbotron jumbotron-narrow static-slider">
|
|
|
|
+
|
|
|
|
+ apiStation:
|
|
|
|
+ <br />
|
|
|
|
+ <span id="apiStation"> <a href="?" title="所有">所有</a> | </span>
|
|
|
|
+ <br />
|
|
|
|
+
|
|
|
|
+ postman导入文件(用以导入接口至postman):
|
|
|
|
+ <br />
|
|
|
|
+ <a id="postmanCollection" href="#" title="download postman collection File">下载postmanCollection</a> |
|
|
|
|
+ <a id="postmanEnvironment" href="#" title="download postman environment File">下载postmanEnvironment</a>
|
|
|
|
+ <br />
|
|
|
|
+
|
|
|
|
+ postmanWeb:
|
|
|
|
+ <br />
|
|
|
|
+ <a href="#" onclick="openPostmanWeb(false)">打开postmanWeb</a> |
|
|
|
|
+ <a href="#" onclick="openPostmanWeb(true)">打开postmanWeb并加载当前api</a>
|
|
|
|
+ <br />
|
|
|
|
+
|
|
|
|
+ markdown文档:
|
|
|
|
+ <br />
|
|
|
|
+ <a id="mdDownload" href="#" title="download markdown document file">下载markdown文档</a>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- Main content area -->
|
|
|
|
+ <main class="container">
|
|
|
|
+ <div class="row">
|
|
|
|
|
|
- <script type="text/javascript">
|
|
|
|
- //加载apiStation
|
|
|
|
- sers.apiClient.apiStation_getAll(function (apiRet) {
|
|
|
|
- if (!apiRet.success) return;
|
|
|
|
-
|
|
|
|
- var html = '<a href="?" title="所有">所有</a> | ';
|
|
|
|
- var data = apiRet.data;
|
|
|
|
- for (var t in data) {
|
|
|
|
- var stationName = data[t].stationName;
|
|
|
|
- html += '<a href="?r=' + stationName + '" title="' + stationName + '">' + stationName + '</a> | ';
|
|
|
|
- }
|
|
|
|
- $('#apiStation').html(html);
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //加载ApiDesc
|
|
|
|
- var apiDescs;
|
|
|
|
- var r = lith.document.url_GetArg('r');
|
|
|
|
- sers.apiClient.apiDesc_getAll({ r: r }, function (apiReturn) {
|
|
|
|
- apiDescs = apiReturn.data;
|
|
|
|
- var mdDoc = sers.ssApiDescsToMd(apiDescs);
|
|
|
|
-
|
|
|
|
- mdDoc = "[TOC]\n\n" + mdDoc
|
|
|
|
-
|
|
|
|
- editormd.markdownToHTML("test-editormd-view", {
|
|
|
|
- markdown: mdDoc,
|
|
|
|
- htmlDecode: true
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- function openPostmanWeb(loadApi) {
|
|
|
|
-
|
|
|
|
- if (loadApi) {
|
|
|
|
- var context = sers.postman.apiDescToPostmanConfig(apiDescs);
|
|
|
|
- context = JSON.stringify(context, null, 2);
|
|
|
|
- localStorage.postmanCollection = context;
|
|
|
|
-
|
|
|
|
- context = sers.postman.environmentConfig.value;
|
|
|
|
- context = JSON.stringify(context, null, 2);
|
|
|
|
- localStorage.postmanEnvironment = context;
|
|
|
|
- }
|
|
|
|
- window.open('Scripts/PostmanWeb/postman.html');
|
|
|
|
- }
|
|
|
|
|
|
+ <!-- Main content -->
|
|
|
|
+ <div class="col">
|
|
|
|
+ <!--内容区-->
|
|
|
|
+ <article>
|
|
|
|
+ <h1 style="text-align:center;">Api接口文档(含离线接口)</h1>
|
|
|
|
|
|
|
|
+ <link rel="stylesheet" href="Scripts/editormd/css/editormd.css" />
|
|
|
|
+ <script src="Scripts/editormd/examples/js/jquery.min.js"></script>
|
|
|
|
+ <script src="Scripts/editormd/lib/marked.min.js"></script>
|
|
|
|
+ <script src="Scripts/editormd/lib/prettify.min.js"></script>
|
|
|
|
+ <script src="Scripts/editormd/lib/raphael.min.js"></script>
|
|
|
|
+ <script src="Scripts/editormd/lib/underscore.min.js"></script>
|
|
|
|
+ <script src="Scripts/editormd/lib/sequence-diagram.min.js"></script>
|
|
|
|
+ <script src="Scripts/editormd/lib/flowchart.min.js"></script>
|
|
|
|
+ <script src="Scripts/editormd/lib/jquery.flowchart.min.js"></script>
|
|
|
|
+ <script src="Scripts/editormd/editormd.js"></script>
|
|
|
|
|
|
- //postman file
|
|
|
|
- $('#postmanCollection').click(function () {
|
|
|
|
- var context = sers.postman.apiDescToPostmanConfig(apiDescs);
|
|
|
|
- context = JSON.stringify(context);
|
|
|
|
- sers.SaveFile(context, sers.postman.collectionConfig.fileName);
|
|
|
|
- });
|
|
|
|
|
|
+ <script src="Scripts/util/lith.js"></script>
|
|
|
|
|
|
- $('#postmanEnvironment').click(function () {
|
|
|
|
- var context = sers.postman.environmentConfig.value;
|
|
|
|
- context = JSON.stringify(context);
|
|
|
|
- sers.SaveFile(context, sers.postman.environmentConfig.fileName);
|
|
|
|
- });
|
|
|
|
|
|
+ <script src="Scripts/Sers/sers.apiClient.js"></script>
|
|
|
|
+ <script src="Scripts/Sers/sers.ssApiDescToMd.js"></script>
|
|
|
|
+ <script src="Scripts/Sers/sers.ssModel.js"></script>
|
|
|
|
|
|
- //mdDownload
|
|
|
|
- $('#mdDownload').click(function () {
|
|
|
|
- sers.SaveFile(mdDoc, 'SersApiDoc(' + new Date().toJSON().slice(0, 10) + ').md');
|
|
|
|
- });
|
|
|
|
|
|
+ <script src="Scripts/Sers/sers.SaveFile.js"></script>
|
|
|
|
+ <script src="Scripts/Sers/sers.postman.js"></script>
|
|
|
|
|
|
|
|
+ <style type="text/css">
|
|
|
|
+ #title a {
|
|
|
|
+ text-decoration: none;
|
|
|
|
+ }
|
|
|
|
+ </style>
|
|
|
|
+ <div id="test-editormd-view" style="width: 95%;">
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+ //加载apiStation
|
|
|
|
+ sers.apiClient.apiStation_getAll(function (apiRet) {
|
|
|
|
+ if (!apiRet.success) return;
|
|
|
|
|
|
|
|
+ var html = '<a href="?" title="所有">所有</a> | ';
|
|
|
|
+ var data = apiRet.data;
|
|
|
|
+ for (var t in data) {
|
|
|
|
+ var stationName = data[t].stationName;
|
|
|
|
+ html += '<a href="?r=' + stationName + '" title="' + stationName + '">' + stationName + '</a> | ';
|
|
|
|
+ }
|
|
|
|
+ $('#apiStation').html(html);
|
|
|
|
+ });
|
|
|
|
|
|
- function removeOfflineApiService() {
|
|
|
|
|
|
|
|
- if (!confirm('移除离线接口,移除后不可恢复,确定继续移除吗?')) return;
|
|
|
|
|
|
+ //加载ApiDesc
|
|
|
|
+ var apiDescs;
|
|
|
|
+ var r = lith.document.url_GetArg('r');
|
|
|
|
+ sers.apiClient.apiDesc_getAll({ r: r }, function (apiReturn) {
|
|
|
|
+ apiDescs = apiReturn.data;
|
|
|
|
+ var mdDoc = sers.ssApiDescsToMd(apiDescs);
|
|
|
|
|
|
- sers.apiClient.apiDesc_removeOffline(function (apiRet) {
|
|
|
|
- if (!apiRet.success) {
|
|
|
|
- alert('操作失败,请重试。' + ((apiRet.error || {}).errorMessage || ''));
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- location.reload();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ mdDoc = "[TOC]\n\n" + mdDoc
|
|
|
|
+
|
|
|
|
+ editormd.markdownToHTML("test-editormd-view", {
|
|
|
|
+ markdown: mdDoc,
|
|
|
|
+ htmlDecode: true
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ function openPostmanWeb(loadApi) {
|
|
|
|
+
|
|
|
|
+ if (loadApi) {
|
|
|
|
+ var context = sers.postman.apiDescToPostmanConfig(apiDescs);
|
|
|
|
+ context = JSON.stringify(context, null, 2);
|
|
|
|
+ localStorage.postmanCollection = context;
|
|
|
|
+
|
|
|
|
+ context = sers.postman.environmentConfig.value;
|
|
|
|
+ context = JSON.stringify(context, null, 2);
|
|
|
|
+ localStorage.postmanEnvironment = context;
|
|
|
|
+ }
|
|
|
|
+ window.open('Scripts/PostmanWeb/postman.html');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //postman file
|
|
|
|
+ $('#postmanCollection').click(function () {
|
|
|
|
+ var context = sers.postman.apiDescToPostmanConfig(apiDescs);
|
|
|
|
+ context = JSON.stringify(context);
|
|
|
|
+ sers.SaveFile(context, sers.postman.collectionConfig.fileName);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $('#postmanEnvironment').click(function () {
|
|
|
|
+ var context = sers.postman.environmentConfig.value;
|
|
|
|
+ context = JSON.stringify(context);
|
|
|
|
+ sers.SaveFile(context, sers.postman.environmentConfig.fileName);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ //mdDownload
|
|
|
|
+ $('#mdDownload').click(function () {
|
|
|
|
+ sers.SaveFile(mdDoc, 'SersApiDoc(' + new Date().toJSON().slice(0, 10) + ').md');
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ </script>
|
|
|
|
+ </article>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </main>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- Footer -->
|
|
|
|
+ <div class="container footer-container">
|
|
|
|
+ <footer class="footer">
|
|
|
|
+ <div class="footer-bottom">
|
|
|
|
+ <p class="text-center"> <a target="_blank" href="https://github.com/serset/Sers">github</a> <a target="_blank" href="https://serset.github.io">online doc</a> email: serset@yeah.net </p>
|
|
|
|
+ <p class="text-center"><a href="#">Back to top</a></p>
|
|
|
|
+ </div>
|
|
|
|
+ </footer>
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
- </script>
|
|
|
|
|
|
+ <!-- Bootcamp JavaScript -->
|
|
|
|
+ <!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
|
|
|
+ <!--<script src="Scripts/blog/js/jquery-3.2.1.slim.min.js"></script>-->
|
|
|
|
+ <script src="Scripts/blog/js/popper.min.js"></script>
|
|
|
|
+ <script src="Scripts/blog/js/bootstrap.min.js"></script>
|
|
|
|
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|