index.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. <!DOCTYPE html>
  2. <html lang="en" ng-app="syncthing" ng-controller="SyncthingCtrl" class="ng-cloak">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="">
  8. <meta name="author" content="">
  9. <link rel="shortcut icon" href="favicon.png">
  10. <title>Syncthing | {{thisNodeName()}}</title>
  11. <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
  12. <style type="text/css">
  13. body {
  14. padding-bottom: 70px;
  15. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  16. }
  17. ul+h5 {
  18. margin-top: 1.5em;
  19. }
  20. .text-monospace {
  21. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  22. }
  23. .table-condensed>thead>tr>th, .table-condensed>tbody>tr>th, .table-condensed>tfoot>tr>th, .table-condensed>thead>tr>td, .table-condensed>tbody>tr>td, .table-condensed>tfoot>tr>td {
  24. border-top: none;
  25. }
  26. .logo {
  27. margin: 0;
  28. padding: 0;
  29. top: -5px;
  30. position: relative;
  31. }
  32. .list-no-bullet {
  33. list-style-type: none
  34. }
  35. .li-column {
  36. display: inline-block;
  37. min-width: 7em;
  38. margin-right: 1em;
  39. background-color: rgb(236, 240, 241);
  40. border-radius: 3px;
  41. padding: 1px 4px;
  42. margin: 2px 2px;
  43. }
  44. .li-column span.data {
  45. margin-left: 0.5em;
  46. min-width: 10em;
  47. text-align: right;
  48. display: inline-block;
  49. }
  50. .ng-cloak {
  51. display: none !important;
  52. }
  53. .table th {
  54. font-weight: 400;
  55. }
  56. .table td {
  57. padding-left: 20px !important;
  58. }
  59. </style>
  60. </head>
  61. <body>
  62. <!-- Top bar -->
  63. <nav class="navbar navbar-top navbar-default" role="navigation">
  64. <div class="container">
  65. <span class="navbar-brand"><img class="logo" src="st-logo-128.png" width="32" height="32" /> Syncthing<small class="hidden-xs"> <span class="text-muted">|</span> {{thisNodeName()}}</small></span>
  66. <ul class="nav navbar-nav navbar-right">
  67. <li class="dropdown">
  68. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Edit&nbsp;<b class="caret"></b></a>
  69. <ul class="dropdown-menu">
  70. <li><a href="" ng-click="addRepo()"><span class="glyphicon glyphicon-hdd"></span>&emsp;Add Repository</a></li>
  71. <li><a href="" ng-click="addNode()"><span class="glyphicon glyphicon-retweet"></span>&emsp;Add Node</a></li>
  72. <li class="divider"></li>
  73. <li><a href="" ng-click="editSettings()"><span class="glyphicon glyphicon-cog"></span>&emsp;Settings</a></li>
  74. <li><a href="" ng-click="idNode()"><span class="glyphicon glyphicon-qrcode"></span>&emsp;Show ID</a></li>
  75. <li class="divider"></li>
  76. <li><a href="" ng-click="shutdown()"><span class="glyphicon glyphicon-off"></span>&emsp;Shutdown</a></li>
  77. <li><a href="" ng-click="restart()"><span class="glyphicon glyphicon-refresh"></span>&emsp;Restart</a></li>
  78. </ul>
  79. </li>
  80. </ul>
  81. </div>
  82. </nav>
  83. <div class="container">
  84. <!-- First row, only shown if necessary; Restart warning -->
  85. <div ng-if="!configInSync" class="row">
  86. <div class="col-md-12">
  87. <div class="panel panel-warning">
  88. <div class="panel-heading"><h3 class="panel-title">Restart Needed</h3></div>
  89. <div class="panel-body">
  90. <p>The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.</p>
  91. </div>
  92. <div class="panel-footer">
  93. <button type="button" class="btn btn-sm btn-default pull-right" ng-click="restart()"><span class="glyphicon glyphicon-refresh"></span>&emsp;Restart</button>
  94. <div class="clearfix"></div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <!-- First regular row -->
  100. <div class="row">
  101. <!-- Repository list (top left) -->
  102. <div class="col-md-6">
  103. <div class="panel-group" id="repositories">
  104. <div class="panel panel-{{repoClass(repo.ID)}}" ng-repeat="repo in repoList()">
  105. <div class="panel-heading">
  106. <h3 class="panel-title">
  107. <a data-toggle="collapse" data-parent="#repositories" href="#repo-{{repo.ID}}">
  108. <span class="glyphicon glyphicon-hdd"></span> {{repo.Directory | shortPath}}
  109. <span class="pull-right hidden-xs">{{repoStatus(repo.ID)}}</span>
  110. </a>
  111. </h3>
  112. </div>
  113. <div id="repo-{{repo.ID}}" class="panel-collapse collapse">
  114. <div class="panel-body">
  115. <div class="table-responsive">
  116. <table class="table table-condensed table-striped">
  117. <tbody>
  118. <tr>
  119. <th><span class="glyphicon glyphicon-tag"></span>&emsp;Repository ID</th>
  120. <td class="text-right">{{repo.ID}}</td>
  121. </tr>
  122. <tr>
  123. <th><span class="glyphicon glyphicon-folder-open"></span>&emsp;Folder</th>
  124. <td class="text-right">{{repo.Directory}}</td>
  125. </tr>
  126. <tr>
  127. <th><span class="glyphicon glyphicon-comment"></span>&emsp;Synchronization</th>
  128. <td class="text-right">{{repoStatus(repo.ID)}}</td>
  129. </tr>
  130. <tr>
  131. <th><span class="glyphicon glyphicon-globe"></span>&emsp;Global Repository</th>
  132. <td class="text-right">{{model[repo.ID].globalFiles | alwaysNumber}} files, {{model[repo.ID].globalBytes | binary}}B</td>
  133. </tr>
  134. <tr>
  135. <th><span class="glyphicon glyphicon-home"></span>&emsp;Local Repository</th>
  136. <td class="text-right">{{model[repo.ID].localFiles | alwaysNumber}} files, {{model[repo.ID].localBytes | binary}}B</td>
  137. </tr>
  138. <tr>
  139. <th><span class="glyphicon glyphicon-cloud-download"></span>&emsp;Out of Sync</th>
  140. <td class="text-right">{{model[repo.ID].needFiles | alwaysNumber}} files, {{model[repo.ID].needBytes | binary}}B</td>
  141. </tr>
  142. <tr>
  143. <th><span class="glyphicon glyphicon-lock"></span>&emsp;Master Repository</th>
  144. <td class="text-right">
  145. <span ng-if="repo.ReadOnly">Yes</span>
  146. <span ng-if="!repo.ReadOnly">No</span>
  147. </td>
  148. </tr>
  149. <tr>
  150. <th><span class="glyphicon glyphicon-unchecked"></span>&emsp;Ignore Permissions</th>
  151. <td class="text-right">
  152. <span ng-if="repo.IgnorePerms">Yes</span>
  153. <span ng-if="!repo.IgnorePerms">No</span>
  154. </td>
  155. </tr>
  156. <tr>
  157. <th><span class="glyphicon glyphicon-share-alt"></span>&emsp;Shared With</th>
  158. <td class="text-right">{{sharesRepo(repo)}}</td>
  159. </tr>
  160. </tbody>
  161. </table>
  162. </div>
  163. <span class="pull-right"><a class="btn btn-sm btn-primary" href="" ng-click="editRepo(repo)"><span class="glyphicon glyphicon-pencil"></span>&emsp;Edit</a></span>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <!-- Node list (top right) -->
  170. <div class="col-md-6">
  171. <div class="panel-group" id="nodes">
  172. <div class="panel panel-default" ng-repeat="nodeCfg in [thisNode()]">
  173. <div class="panel-heading">
  174. <h3 class="panel-title">
  175. <a data-toggle="collapse" data-parent="#nodes" href="#node-{{nodeCfg.NodeID}}"><span class="glyphicon glyphicon-home"></span> {{nodeName(nodeCfg)}}</a>
  176. </h3>
  177. </div>
  178. <div id="node-{{nodeCfg.NodeID}}" class="panel-collapse collapse in">
  179. <div class="panel-body">
  180. <div class="table-responsive">
  181. <table class="table table-condensed table-striped">
  182. <tbody>
  183. <tr>
  184. <th><span class="glyphicon glyphicon-th"></span>&emsp;RAM Utilization</th>
  185. <td class="text-right">{{system.sys | binary}}B</td>
  186. </tr>
  187. <tr>
  188. <th><span class="glyphicon glyphicon-tasks"></span>&emsp;CPU Utilization</th>
  189. <td class="text-right">{{system.cpuPercent | alwaysNumber | natural:1}}%</td>
  190. </tr>
  191. <tr>
  192. <th><span class="glyphicon glyphicon-cloud-download"></span>&emsp;Download Rate</th>
  193. <td class="text-right">{{connections['total'].inbps | metric}}bps ({{connections['total'].InBytesTotal | binary}}B)</td>
  194. </tr>
  195. <tr>
  196. <th><span class="glyphicon glyphicon-cloud-upload"></span>&emsp;Upload Rate</th>
  197. <td class="text-right">{{connections['total'].outbps | metric}}bps ({{connections['total'].OutBytesTotal | binary}}B)</td>
  198. </tr>
  199. <tr ng-if="system.extAnnounceOK != undefined">
  200. <th><span class="glyphicon glyphicon-bullhorn"></span>&emsp;Announce Server</th>
  201. <td class="text-right">
  202. <span class="data text-success" ng-if="system.extAnnounceOK">Online</span>
  203. <span class="data text-danger" ng-if="!system.extAnnounceOK">Offline</span>
  204. </td>
  205. </tr>
  206. <tr>
  207. <th><span class="glyphicon glyphicon-tag"></span>&emsp;Version</th>
  208. <td class="text-right">{{version}}</td>
  209. </tr>
  210. </tbody>
  211. </table>
  212. </div>
  213. <span class="pull-right"><a class="btn btn-sm btn-primary" href="" ng-click="editNode(nodeCfg)"><span class="glyphicon glyphicon-pencil"></span>&emsp;Edit</a></span>
  214. </div>
  215. </div>
  216. </div>
  217. <div class="panel panel-{{nodeClass(nodeCfg)}}" ng-repeat="nodeCfg in otherNodes()">
  218. <div class="panel-heading">
  219. <h3 class="panel-title">
  220. <a data-toggle="collapse" data-parent="#nodes" href="#node-{{nodeCfg.NodeID}}">
  221. <span class="glyphicon glyphicon-retweet"></span>
  222. {{nodeName(nodeCfg)}}
  223. <span class="pull-right hidden-xs">{{nodeStatus(nodeCfg)}}</span>
  224. </a>
  225. </h3>
  226. </div>
  227. <div id="node-{{nodeCfg.NodeID}}" class="panel-collapse collapse">
  228. <div class="panel-body">
  229. <div class="table-responsive">
  230. <table class="table table-condensed table-striped">
  231. <tbody>
  232. <tr>
  233. <th><span class="glyphicon glyphicon-link"></span>&emsp;Address</th>
  234. <td class="text-right">{{nodeAddr(nodeCfg)}}</td>
  235. </tr>
  236. <tr>
  237. <th><span class="glyphicon glyphicon-comment"></span>&emsp;Synchronization</th>
  238. <td class="text-right">{{nodeStatus(nodeCfg)}}</td>
  239. </tr>
  240. <tr>
  241. <th><span class="glyphicon glyphicon-cloud-download"></span>&emsp;Download Rate</th>
  242. <td class="text-right">{{connections[nodeCfg.NodeID].inbps | metric}}bps ({{connections[nodeCfg.NodeID].InBytesTotal | binary}}B)</td>
  243. </tr>
  244. <tr>
  245. <th><span class="glyphicon glyphicon-cloud-upload"></span>&emsp;Upload Rate</th>
  246. <td class="text-right">{{connections[nodeCfg.NodeID].outbps | metric}}bps ({{connections[nodeCfg.NodeID].OutBytesTotal | binary}}B)</td>
  247. </tr>
  248. <tr>
  249. <th><span class="glyphicon glyphicon-tag"></span>&emsp;Version</th>
  250. <td class="text-right">{{nodeVer(nodeCfg)}}</td>
  251. </tr>
  252. </tbody>
  253. </table>
  254. </div>
  255. <span class="pull-right"><a class="btn btn-sm btn-primary" href="" ng-click="editNode(nodeCfg)"><span class="glyphicon glyphicon-pencil"></span>&emsp;Edit</a></span>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. </div> <!-- /row -->
  262. <!-- Errors -->
  263. <div ng-if="errorList().length > 0" class="row">
  264. <div class="col-md-12">
  265. <div class="panel panel-warning">
  266. <div class="panel-heading"><h3 class="panel-title">Notice</h3></div>
  267. <div class="panel-body">
  268. <p ng-repeat="err in errorList()"><small>{{err.Time | date:"H:mm:ss"}}:</small> {{friendlyNodes(err.Error)}}</p>
  269. </div>
  270. <div class="panel-footer">
  271. <button type="button" class="pull-right btn btn-sm btn-default" ng-click="clearErrors()"><span class="glyphicon glyphicon-ok"></span>&emsp;OK</button>
  272. <div class="clearfix"></div>
  273. </div>
  274. </div>
  275. </div>
  276. </div>
  277. </div> <!-- /container -->
  278. <!-- Bottom bar -->
  279. <nav class="navbar navbar-default navbar-fixed-bottom hidden-xs">
  280. <div class="container">
  281. <ul class="nav navbar-nav">
  282. <li><a class="navbar-link" href="http://discourse.syncthing.net/">Support / Forum</a></li>
  283. <li><a class="navbar-link" href="https://github.com/calmh/syncthing/releases">Latest Release</a></li>
  284. <li><a class="navbar-link" href="http://discourse.syncthing.net/category/documentation">Documentation</a></li>
  285. <li><a class="navbar-link" href="https://github.com/calmh/syncthing/issues">Bugs</a></li>
  286. <li><a class="navbar-link" href="https://github.com/calmh/syncthing">Source Code</a></li>
  287. </ul>
  288. </div>
  289. </nav>
  290. <!-- Network error modal -->
  291. <div id="networkError" class="modal fade">
  292. <div class="modal-dialog">
  293. <div class="modal-content">
  294. <div class="modal-header alert alert-danger">
  295. <h4 class="modal-title">
  296. <span class="glyphicon glyphicon-exclamation-sign"></span>
  297. Connection Error
  298. </h4>
  299. </div>
  300. <div class="modal-body">
  301. <p>
  302. Syncthing seems to be down, or there is a problem with your Internet connection.
  303. Retrying&hellip;
  304. </p>
  305. </div>
  306. </div>
  307. </div>
  308. </div>
  309. <!-- Restarting modal -->
  310. <div id="restarting" class="modal fade">
  311. <div class="modal-dialog">
  312. <div class="modal-content">
  313. <div class="modal-header alert alert-info">
  314. <h4 class="modal-title">
  315. <span class="glyphicon glyphicon-refresh"></span>
  316. Restarting
  317. </h4>
  318. </div>
  319. <div class="modal-body">
  320. <p>
  321. Syncthing is restarting. Please hold&hellip;
  322. </p>
  323. </div>
  324. </div>
  325. </div>
  326. </div>
  327. <!-- Shutdown modal -->
  328. <div id="shutdown" class="modal fade">
  329. <div class="modal-dialog">
  330. <div class="modal-content">
  331. <div class="modal-header alert alert-success">
  332. <h4 class="modal-title">
  333. <span class="glyphicon glyphicon-off"></span>
  334. Shutdown Complete
  335. </h4>
  336. </div>
  337. <div class="modal-body">
  338. <p>
  339. Syncthing has been shut down.
  340. </p>
  341. </div>
  342. </div>
  343. </div>
  344. </div>
  345. <!-- ID modal -->
  346. <div id="idqr" class="modal fade">
  347. <div class="modal-dialog modal-lg">
  348. <div class="modal-content">
  349. <div class="modal-header">
  350. <h4 class="modal-title">
  351. <span class="glyphicon glyphicon-qrcode"></span>
  352. Node Identification &mdash; {{nodeName(thisNode())}}
  353. </h4>
  354. </div>
  355. <div class="modal-body">
  356. <div class="well well-sm text-monospace text-center">
  357. {{myID | chunkID}}
  358. </div>
  359. <img ng-if="myID" class="center-block img-thumbnail" src="qr/{{myID | chunkID}}"/>
  360. </div>
  361. <div class="modal-footer">
  362. <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>
  363. </div>
  364. </div>
  365. </div>
  366. </div>
  367. <!-- Node editor modal -->
  368. <div id="editNode" class="modal fade">
  369. <div class="modal-dialog modal-lg">
  370. <div class="modal-content">
  371. <div class="modal-header">
  372. <h4 ng-show="!editingExisting" class="modal-title">Add Node</h4>
  373. <h4 ng-show="editingExisting" class="modal-title">Edit Node</h4>
  374. </div>
  375. <div class="modal-body">
  376. <form role="form" name="nodeEditor">
  377. <div class="form-group" ng-class="{'has-error': nodeEditor.nodeID.$invalid && nodeEditor.nodeID.$dirty}">
  378. <label for="nodeID">Node ID</label>
  379. <input ng-if="!editingExisting" name="nodeID" id="nodeID" class="form-control text-monospace" type="text" ng-model="currentNode.NodeID" required></input>
  380. <div ng-if="editingExisting" class="well well-sm text-monospace">{{currentNode.NodeID | chunkID}}</div>
  381. <p class="help-block">
  382. <span ng-if="nodeEditor.nodeID.$valid || nodeEditor.nodeID.$pristine">The node ID to enter here can be found in the "Edit > Show ID" dialog on the other node. Spaces and dashes are optional (ignored).
  383. <span ng-show="!editingExisting">When adding a new node, keep in mind that <em>this node</em> must be added on the other side too.</span>
  384. </span>
  385. <span ng-if="nodeEditor.nodeID.$error.required && nodeEditor.nodeID.$dirty">The node ID cannot be blank.</span>
  386. </p>
  387. </div>
  388. <div class="form-group">
  389. <label for="name">Name</label>
  390. <input placeholder="Home Server" id="name" class="form-control" type="text" ng-model="currentNode.Name"></input>
  391. <p class="help-block">Shown instead of Node ID in the cluster status.</p>
  392. </div>
  393. <div class="form-group">
  394. <label for="addresses">Addresses</label>
  395. <input placeholder="dynamic" ng-disabled="currentNode.NodeID == myID" id="addresses" class="form-control" type="text" ng-model="currentNode.AddressesStr"></input>
  396. <p class="help-block">Enter comma separated <span class="text-monospace">ip:port</span> addresses or <span class="text-monospace">dynamic</span> to perform automatic discovery of the address.</p>
  397. </div>
  398. </form>
  399. </div>
  400. <div class="modal-footer">
  401. <button type="button" class="btn btn-primary" ng-click="saveNode()" ng-disabled="nodeEditor.$invalid"><span class="glyphicon glyphicon-ok"></span>&emsp;Save</button>
  402. <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>
  403. <button ng-if="editingExisting && !editingSelf" type="button" class="btn btn-danger pull-left" ng-click="deleteNode()"><span class="glyphicon glyphicon-minus"></span>&emsp;Delete</button>
  404. </div>
  405. </div>
  406. </div>
  407. </div>
  408. <!-- Repo editor modal -->
  409. <div id="editRepo" class="modal fade">
  410. <div class="modal-dialog modal-lg">
  411. <div class="modal-content">
  412. <div class="modal-header">
  413. <h4 ng-show="!editingExisting" class="modal-title">Add Repository</h4>
  414. <h4 ng-show="editingExisting" class="modal-title">Edit Repository</h4>
  415. </div>
  416. <div class="modal-body">
  417. <form role="form" name="repoEditor">
  418. <div class="row">
  419. <div class="col-md-12">
  420. <div class="form-group" ng-class="{'has-error': repoEditor.repoID.$invalid && repoEditor.repoID.$dirty}">
  421. <label for="repoID">Repository ID</label>
  422. <input name="repoID" placeholder="documents" ng-disabled="editingExisting" id="repoID" class="form-control" type="text" ng-model="currentRepo.ID" required unique-repo></input>
  423. <p class="help-block">
  424. <span ng-if="repoEditor.repoID.$valid || repoEditor.repoID.$pristine">Short identifier for the repository. Must be the same on all cluster nodes.</span>
  425. <span ng-if="repoEditor.repoID.$error.uniqueRepo">The repository ID must be unique.</span>
  426. <span ng-if="repoEditor.repoID.$error.required && repoEditor.repoID.$dirty">The repository ID cannot be blank.</span>
  427. </p>
  428. </div>
  429. <div class="form-group" ng-class="{'has-error': repoEditor.repoPath.$invalid && repoEditor.repoPath.$dirty}">
  430. <label for="repoPath">Repository Path</label>
  431. <input name="repoPath" placeholder="~/Documents" id="repoPath" class="form-control" type="text" ng-model="currentRepo.Directory" required></input>
  432. <p class="help-block">
  433. <span ng-if="repoEditor.repoPath.$valid || repoEditor.repoPath.$pristine">Path to the repository on the local computer. Will be created if it does not exist. The tilde character <code>~</code> can be used as a shortcut for <code>{{system.tilde}}</code>.</span>
  434. <span ng-if="repoEditor.repoPath.$error.required && repoEditor.repoPath.$dirty">The repository path cannot be blank.</span>
  435. </p>
  436. </div>
  437. </div>
  438. </div>
  439. <div class="row">
  440. <div class="col-md-6">
  441. <div class="form-group">
  442. <div class="checkbox">
  443. <label>
  444. <input type="checkbox" ng-model="currentRepo.ReadOnly"> Repository Master
  445. </label>
  446. </div>
  447. <p class="help-block">Files are protected from changes made on other nodes, but changes made on <em>this</em> node will be sent to the rest of the cluster.</p>
  448. </div>
  449. <div class="form-group">
  450. <div class="checkbox">
  451. <label>
  452. <input type="checkbox" ng-model="currentRepo.IgnorePerms"> Ignore Permissions
  453. </label>
  454. </div>
  455. <p class="help-block">File permission bits are ignored when looking for changes. Use on FAT filesystems.</p>
  456. </div>
  457. <div class="form-group">
  458. <label for="nodes">Nodes</label>
  459. <div class="checkbox" ng-repeat="node in otherNodes()">
  460. <label>
  461. <input type="checkbox" ng-model="currentRepo.selectedNodes[node.NodeID]"> {{nodeName(node)}}
  462. </label>
  463. </div>
  464. <p class="help-block">Select the nodes to share this repository with.</p>
  465. </div>
  466. </div>
  467. <div class="col-md-6">
  468. <div class="form-group">
  469. <div class="checkbox">
  470. <label>
  471. <input type="checkbox" ng-model="currentRepo.simpleFileVersioning"> File Versioning
  472. </label>
  473. </div>
  474. <p class="help-block">Files are moved to date stamped versions in a <code>.stversions</code> folder when replaced or deleted by syncthing.</p>
  475. </div>
  476. <div class="form-group" ng-if="currentRepo.simpleFileVersioning" ng-class="{'has-error': repoEditor.simpleKeep.$invalid && repoEditor.simpleKeep.$dirty}">
  477. <label for="simpleKeep">Keep Versions</label>
  478. <input name="simpleKeep" id="simpleKeep" class="form-control" type="number" ng-model="currentRepo.simpleKeep" required min="1"></input>
  479. <p class="help-block">
  480. <span ng-if="repoEditor.simpleKeep.$valid || repoEditor.simpleKeep.$pristine">The number of old versions to keep, per file.</span>
  481. <span ng-if="repoEditor.simpleKeep.$error.required && repoEditor.simpleKeep.$dirty">The number of versions must be a number and cannot be blank.</span>
  482. <span ng-if="repoEditor.simpleKeep.$error.min && repoEditor.simpleKeep.$dirty">You must keep at least one version.</span>
  483. </p>
  484. </div>
  485. </div>
  486. </div>
  487. </form>
  488. <div ng-show="!editingExisting">
  489. When adding a new repository, keep in mind that the Repository ID is used to tie repositories together between nodes. They are case sensitive and must match exactly between all nodes.
  490. </div>
  491. </div>
  492. <div class="modal-footer">
  493. <button type="button" class="btn btn-primary" ng-click="saveRepo()" ng-disabled="repoEditor.$invalid"><span class="glyphicon glyphicon-ok"></span>&emsp;Save</button>
  494. <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>
  495. <button ng-if="editingExisting" type="button" class="btn btn-danger pull-left" ng-click="deleteRepo()"><span class="glyphicon glyphicon-minus"></span>&emsp;Delete</button>
  496. </div>
  497. </div>
  498. </div>
  499. </div>
  500. <!-- Settings modal -->
  501. <div id="settings" class="modal fade">
  502. <div class="modal-dialog modal-lg">
  503. <div class="modal-content">
  504. <div class="modal-header">
  505. <h4 class="modal-title"> Settings</h4>
  506. </div>
  507. <div class="modal-body">
  508. <form role="form">
  509. <div class="row">
  510. <div class="col-md-6">
  511. <div class="form-group" ng-repeat="setting in settings">
  512. <div ng-if="setting.type == 'text' || setting.type == 'number'">
  513. <label for="{{setting.id}}">{{setting.descr}}</label>
  514. <input id="{{setting.id}}" class="form-control" type="{{setting.type}}" ng-model="config.workingOptions[setting.id]"></input>
  515. </div>
  516. <div class="checkbox" ng-if="setting.type == 'bool'">
  517. <label>
  518. {{setting.descr}} <input id="{{setting.id}}" type="checkbox" ng-model="config.workingOptions[setting.id]"></input>
  519. </label>
  520. </div>
  521. </div>
  522. </div>
  523. <div class="col-md-6">
  524. <div class="form-group" ng-repeat="setting in guiSettings">
  525. <div ng-if="setting.type == 'text' || setting.type == 'number' || setting.type == 'password'">
  526. <label for="{{setting.id}}">{{setting.descr}}</label>
  527. <input id="{{setting.id}}" class="form-control" type="{{setting.type}}" ng-model="config.workingGUI[setting.id]"></input>
  528. </div>
  529. <div class="checkbox" ng-if="setting.type == 'bool'">
  530. <label>
  531. {{setting.descr}} <input id="{{setting.id}}" type="checkbox" ng-model="config.workingGUI[setting.id]"></input>
  532. </label>
  533. </div>
  534. </div>
  535. </div>
  536. </div>
  537. </form>
  538. </div>
  539. <div class="modal-footer">
  540. <button type="button" class="btn btn-primary" ng-click="saveSettings()"><span class="glyphicon glyphicon-ok"></span>&emsp;Save</button>
  541. <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>
  542. </div>
  543. </div>
  544. </div>
  545. </div>
  546. <script src="angular.min.js"></script>
  547. <script src="jquery-2.0.3.min.js"></script>
  548. <script src="bootstrap/js/bootstrap.min.js"></script>
  549. <script src="app.js"></script>
  550. </body>
  551. </html>