files.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  7. <link href="/css/fonts.css" rel="stylesheet">
  8. <link rel="stylesheet" href="/css/bulma.min.css" />
  9. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous">
  10. <script src="/js/jquery.min.js"></script>
  11. <link rel="stylesheet" type="text/css" href="/css/dt.min.css">
  12. <script type="text/javascript" charset="utf8" src="/js/dt.min.js"></script>
  13. <script src="/js/dt.js"></script>
  14. <script src="/js/common.js"></script>
  15. <link rel="stylesheet" type="text/css" href="/css/style.css">
  16. <script src="/js/clipboard.min.js"></script>
  17. <title>EdgeVPN - Files index</title>
  18. </head>
  19. <body>
  20. <nav class="navbar is-light is-spaced has-shadow" role="navigation" aria-label="main navigation">
  21. <div class="navbar-brand">
  22. <a class="navbar-item" href="/">
  23. <img src="/images/logo.png" > &nbsp;
  24. EdgeVPN
  25. </a>
  26. <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="menu">
  27. <span aria-hidden="true"></span>
  28. <span aria-hidden="true"></span>
  29. <span aria-hidden="true"></span>
  30. </a>
  31. </div>
  32. <div id="menu" class="navbar-menu">
  33. <div class="navbar-start">
  34. <a class="navbar-item" href="/machines.html">
  35. <i class="fas fa-server"></i>&nbsp;
  36. Machines
  37. </a>
  38. <a class="navbar-item" href="/services.html">
  39. <i class="fas fa-project-diagram"></i>&nbsp;
  40. Services
  41. </a>
  42. <a class="navbar-item" href="/files.html">
  43. <i class="fas fa-file-upload"></i>&nbsp;
  44. Files
  45. </a>
  46. <a class="navbar-item" href="/users.html">
  47. <i class="fas fa-user-clock"></i>&nbsp;
  48. Users
  49. </a>
  50. <a class="navbar-item" href="/blockchain.html">
  51. <i class="fas fa-dice-d20"></i>&nbsp;
  52. Blockchain
  53. </a>
  54. </div>
  55. <div class="navbar-end">
  56. <div class="navbar-item">
  57. <div class="buttons">
  58. <a class="button is-link" href="https://github.com/mudler/edgevpn" target=_blank>
  59. <strong><i class="fab fa-github-alt"></i> GitHub</strong>
  60. </a>
  61. <a class="button is-light" href="https://github.com/mudler/edgevpn/issues/new" target=_blank>
  62. <i class="fas fa-bug"></i>&nbsp; Report issue
  63. </a>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </nav>
  69. <section class="hero">
  70. <div class="hero-body">
  71. <div class="container">
  72. <h1 class="title">
  73. <i class="fas fa-file-upload"></i> Served files
  74. </h1>
  75. <h2 class="subtitle">
  76. Accessible via api at <a href="/api/files" target=_blank><code> /api/files </code></a><br>
  77. </h2>
  78. <div class="notification is-info is-light">
  79. <h1>Send files</h1>
  80. <div class="field has-addons">
  81. <div class="control has-icons-left">
  82. <input id="sendfile" type="text" class="input is-info is-small" size=40 value='edgevpn file-send --name "file_name" --path /src/file'>
  83. <span class="icon is-small is-left">
  84. <i class="fas fa-terminal"></i>
  85. </span>
  86. </div>
  87. <div class="control">
  88. <button class="btn button is-dark is-small" data-clipboard-target="#sendfile"> Copy to clipboard</button>
  89. </div>
  90. </div>
  91. <hr>
  92. <h1>Receive files</h1>
  93. <div class="field has-addons">
  94. <div class="control has-icons-left">
  95. <input id="receivefile" type="text" class="input is-info is-small" size=40 value='edgevpn file-receive --name "file_name" --path /dst/file'>
  96. <span class="icon is-small is-left">
  97. <i class="fas fa-terminal"></i>
  98. </span>
  99. </div>
  100. <div class="control">
  101. <button class="btn button is-dark is-small" data-clipboard-target="#receivefile"> Copy to clipboard</button>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </section>
  107. <section class="section">
  108. <div class="container">
  109. <table data-toggle="table"
  110. data-search="true"
  111. data-show-columns="true"
  112. id="table" >
  113. <thead>
  114. <tr>
  115. <th ><abbr title="ip">Name</abbr></th>
  116. <th ><abbr title="peer">PeerID</abbr></th>
  117. </tr>
  118. </thead>
  119. </table>
  120. </div>
  121. </section>
  122. <script type="text/javascript">
  123. $(document).ready(function() {
  124. var btn = new ClipboardJS('.btn');
  125. var table = $('#table').DataTable( {
  126. "processing": true,
  127. "ajax": {
  128. "url": "/api/files",
  129. "type": "GET",
  130. "dataSrc": '',
  131. },
  132. 'language':{
  133. "loadingRecords": "",
  134. "processing": ""
  135. },
  136. "columns": [
  137. { "data": "Name" },
  138. { "data": "PeerID" },
  139. ],
  140. } );
  141. setInterval( function () {
  142. table.ajax.reload();
  143. }, 5000 ); // 5 s
  144. } );
  145. </script>
  146. <footer class="footer">
  147. <div class="content has-text-centered">
  148. <p>
  149. <strong>EdgeVPN</strong> by <a href="https://github.com/mudler/edgevpn">Ettore Di Giacinto</a>. The source code is licensed
  150. <a href="https://github.com/mudler/edgevpn/blob/master/LICENSE">GPLv3</a>.
  151. Logo originally made by <a href="https://www.flaticon.com/authors/uniconlabs" title="Uniconlabs">Uniconlabs</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
  152. </p>
  153. </div>
  154. </footer>
  155. </body>
  156. </html>