index.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  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></span>
  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">
  159. <span ng-repeat="n in repo.Nodes">
  160. {{nodeName(findNode(n.NodeID))}}<span ng-if="!$last">, </span>
  161. </span>
  162. </td>
  163. </tr>
  164. </tbody>
  165. </table>
  166. </div>
  167. <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>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. </div>
  173. <!-- Node list (top right) -->
  174. <div class="col-md-6">
  175. <div class="panel-group" id="nodes">
  176. <div class="panel panel-default" ng-repeat="nodeCfg in [thisNode()]">
  177. <div class="panel-heading">
  178. <h3 class="panel-title">
  179. <a data-toggle="collapse" data-parent="#nodes" href="#node-{{nodeCfg.NodeID}}"><span class="glyphicon glyphicon-home"></span> {{nodeName(nodeCfg)}}</a>
  180. </h3>
  181. </div>
  182. <div id="node-{{nodeCfg.NodeID}}" class="panel-collapse collapse in">
  183. <div class="panel-body">
  184. <div class="table-responsive">
  185. <table class="table table-condensed table-striped">
  186. <tbody>
  187. <tr>
  188. <th><span class="glyphicon glyphicon-th"></span>&emsp;RAM Utilization</th>
  189. <td class="text-right">{{system.sys | binary}}B</td>
  190. </tr>
  191. <tr>
  192. <th><span class="glyphicon glyphicon-tasks"></span>&emsp;CPU Utilization</th>
  193. <td class="text-right">{{system.cpuPercent | alwaysNumber | natural:1}}%</td>
  194. </tr>
  195. <tr>
  196. <th><span class="glyphicon glyphicon-cloud-download"></span>&emsp;Download Rate</th>
  197. <td class="text-right">{{inbps | metric}}bps</td>
  198. </tr>
  199. <tr>
  200. <th><span class="glyphicon glyphicon-cloud-upload"></span>&emsp;Upload Rate</th>
  201. <td class="text-right">{{outbps | metric}}bps </td>
  202. </tr>
  203. <tr ng-if="system.extAnnounceOK != undefined">
  204. <th><span class="glyphicon glyphicon-bullhorn"></span>&emsp;Announce Server</th>
  205. <td class="text-right">
  206. <span class="data text-success" ng-if="system.extAnnounceOK">Online</span>
  207. <span class="data text-danger" ng-if="!system.extAnnounceOK">Offline</span>
  208. </td>
  209. </tr>
  210. <tr>
  211. <th><span class="glyphicon glyphicon-tag"></span>&emsp;Version</th>
  212. <td class="text-right">{{version}}</td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. </div>
  217. <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>
  218. </div>
  219. </div>
  220. </div>
  221. <div class="panel panel-{{nodeClass(nodeCfg)}}" ng-repeat="nodeCfg in otherNodes()">
  222. <div class="panel-heading">
  223. <h3 class="panel-title">
  224. <a data-toggle="collapse" data-parent="#nodes" href="#node-{{nodeCfg.NodeID}}">
  225. <span class="glyphicon glyphicon-retweet"></span>
  226. {{nodeName(nodeCfg)}}
  227. <span class="pull-right hidden-xs">{{nodeStatus(nodeCfg)}}</span>
  228. </a>
  229. </h3>
  230. </div>
  231. <div id="node-{{nodeCfg.NodeID}}" class="panel-collapse collapse">
  232. <div class="panel-body">
  233. <div class="table-responsive">
  234. <table class="table table-condensed table-striped">
  235. <tbody>
  236. <tr>
  237. <th><span class="glyphicon glyphicon-link"></span>&emsp;Address</th>
  238. <td class="text-right">{{nodeAddr(nodeCfg)}}</td>
  239. </tr>
  240. <tr>
  241. <th><span class="glyphicon glyphicon-comment"></span>&emsp;Synchronization</th>
  242. <td class="text-right">{{nodeStatus(nodeCfg)}}</td>
  243. </tr>
  244. <tr>
  245. <th><span class="glyphicon glyphicon-cloud-download"></span>&emsp;Download Rate</th>
  246. <td class="text-right">{{connections[nodeCfg.NodeID].inbps | metric}}bps</td>
  247. </tr>
  248. <tr>
  249. <th><span class="glyphicon glyphicon-cloud-upload"></span>&emsp;Upload Rate</th>
  250. <td class="text-right">{{connections[nodeCfg.NodeID].outbps | metric}}bps </td>
  251. </tr>
  252. <tr>
  253. <th><span class="glyphicon glyphicon-tag"></span>&emsp;Version</th>
  254. <td class="text-right">{{nodeVer(nodeCfg)}}</td>
  255. </tr>
  256. </tbody>
  257. </table>
  258. </div>
  259. <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>
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. </div> <!-- /row -->
  265. <!-- Errors -->
  266. <div ng-if="errorList().length > 0" class="row">
  267. <div class="col-md-12">
  268. <div class="panel panel-warning">
  269. <div class="panel-heading"><h3 class="panel-title">Notice</h3></div>
  270. <div class="panel-body">
  271. <p ng-repeat="err in errorList()"><small>{{err.Time | date:"H:mm:ss"}}:</small> {{friendlyNodes(err.Error)}}</p>
  272. </div>
  273. <div class="panel-footer">
  274. <button type="button" class="pull-right btn btn-sm btn-default" ng-click="clearErrors()"><span class="glyphicon glyphicon-ok"></span>&emsp;OK</button>
  275. <div class="clearfix"></div>
  276. </div>
  277. </div>
  278. </div>
  279. </div>
  280. </div> <!-- /container -->
  281. <!-- Bottom bar -->
  282. <nav class="navbar navbar-default navbar-fixed-bottom hidden-xs">
  283. <div class="container">
  284. <ul class="nav navbar-nav">
  285. <li><a class="navbar-link" href="http://discourse.syncthing.net/">Support / Forum</a></li>
  286. <li><a class="navbar-link" href="https://github.com/calmh/syncthing/releases">Latest Release</a></li>
  287. <li><a class="navbar-link" href="http://discourse.syncthing.net/category/documentation">Documentation</a></li>
  288. <li><a class="navbar-link" href="https://github.com/calmh/syncthing/issues">Bugs</a></li>
  289. <li><a class="navbar-link" href="https://github.com/calmh/syncthing">Source Code</a></li>
  290. </ul>
  291. </div>
  292. </nav>
  293. <!-- Network error modal -->
  294. <div id="networkError" class="modal fade">
  295. <div class="modal-dialog">
  296. <div class="modal-content">
  297. <div class="modal-header alert alert-danger">
  298. <h4 class="modal-title">
  299. <span class="glyphicon glyphicon-exclamation-sign"></span>
  300. Connection Error
  301. </h4>
  302. </div>
  303. <div class="modal-body">
  304. <p>
  305. Syncthing seems to be down, or there is a problem with your Internet connection.
  306. Retrying&hellip;
  307. </p>
  308. </div>
  309. </div>
  310. </div>
  311. </div>
  312. <!-- Restarting modal -->
  313. <div id="restarting" class="modal fade">
  314. <div class="modal-dialog">
  315. <div class="modal-content">
  316. <div class="modal-header alert alert-info">
  317. <h4 class="modal-title">
  318. <span class="glyphicon glyphicon-refresh"></span>
  319. Restarting
  320. </h4>
  321. </div>
  322. <div class="modal-body">
  323. <p>
  324. Syncthing is restarting. Please hold&hellip;
  325. </p>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. <!-- Shutdown modal -->
  331. <div id="shutdown" class="modal fade">
  332. <div class="modal-dialog">
  333. <div class="modal-content">
  334. <div class="modal-header alert alert-success">
  335. <h4 class="modal-title">
  336. <span class="glyphicon glyphicon-off"></span>
  337. Shutdown Complete
  338. </h4>
  339. </div>
  340. <div class="modal-body">
  341. <p>
  342. Syncthing has been shut down.
  343. </p>
  344. </div>
  345. </div>
  346. </div>
  347. </div>
  348. <!-- ID modal -->
  349. <div id="idqr" class="modal fade">
  350. <div class="modal-dialog modal-lg">
  351. <div class="modal-content">
  352. <div class="modal-header">
  353. <h4 class="modal-title">
  354. <span class="glyphicon glyphicon-qrcode"></span>
  355. Node Identification &mdash; {{nodeName(thisNode())}}
  356. </h4>
  357. </div>
  358. <div class="modal-body">
  359. <div class="well well-sm text-monospace text-center">
  360. {{myID | chunkID}}
  361. </div>
  362. <img ng-if="myID" class="center-block img-thumbnail" src="qr/{{myID | chunkID}}"/>
  363. </div>
  364. <div class="modal-footer">
  365. <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>
  366. </div>
  367. </div>
  368. </div>
  369. </div>
  370. <!-- Node editor modal -->
  371. <div id="editNode" class="modal fade">
  372. <div class="modal-dialog modal-lg">
  373. <div class="modal-content">
  374. <div class="modal-header">
  375. <h4 ng-show="!editingExisting" class="modal-title">Add Node</h4>
  376. <h4 ng-show="editingExisting" class="modal-title">Edit Node</h4>
  377. </div>
  378. <div class="modal-body">
  379. <form role="form" name="nodeEditor">
  380. <div class="form-group" ng-class="{'has-error': nodeEditor.nodeID.$invalid && nodeEditor.nodeID.$dirty}">
  381. <label for="nodeID">Node ID</label>
  382. <input ng-if="!editingExisting" name="nodeID" id="nodeID" class="form-control text-monospace" type="text" ng-model="currentNode.NodeID" required></input>
  383. <div ng-if="editingExisting" class="well well-sm text-monospace">{{currentNode.NodeID | chunkID}}</div>
  384. <p class="help-block">
  385. <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).
  386. <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>
  387. </span>
  388. <span ng-if="nodeEditor.nodeID.$error.required && nodeEditor.nodeID.$dirty">The node ID cannot be blank.</span>
  389. </p>
  390. </div>
  391. <div class="form-group">
  392. <label for="name">Name</label>
  393. <input placeholder="Home Server" id="name" class="form-control" type="text" ng-model="currentNode.Name"></input>
  394. <p class="help-block">Shown instead of Node ID in the cluster status.</p>
  395. </div>
  396. <div class="form-group">
  397. <label for="addresses">Addresses</label>
  398. <input placeholder="dynamic" ng-disabled="currentNode.NodeID == myID" id="addresses" class="form-control" type="text" ng-model="currentNode.AddressesStr"></input>
  399. <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>
  400. </div>
  401. </form>
  402. </div>
  403. <div class="modal-footer">
  404. <button type="button" class="btn btn-primary" ng-click="saveNode()" ng-disabled="nodeEditor.$invalid"><span class="glyphicon glyphicon-ok"></span>&emsp;Save</button>
  405. <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>
  406. <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>
  407. </div>
  408. </div>
  409. </div>
  410. </div>
  411. <!-- Repo editor modal -->
  412. <div id="editRepo" class="modal fade">
  413. <div class="modal-dialog modal-lg">
  414. <div class="modal-content">
  415. <div class="modal-header">
  416. <h4 ng-show="!editingExisting" class="modal-title">Add Repository</h4>
  417. <h4 ng-show="editingExisting" class="modal-title">Edit Repository</h4>
  418. </div>
  419. <div class="modal-body">
  420. <form role="form" name="repoEditor">
  421. <div class="form-group" ng-class="{'has-error': repoEditor.repoID.$invalid && repoEditor.repoID.$dirty}">
  422. <label for="repoID">Repository ID</label>
  423. <input name="repoID" placeholder="documents" ng-disabled="editingExisting" id="repoID" class="form-control" type="text" ng-model="currentRepo.ID" required unique-repo></input>
  424. <p class="help-block">
  425. <span ng-if="repoEditor.repoID.$valid || repoEditor.repoID.$pristine">Short identifier for the repository. Must be the same on all cluster nodes.</span>
  426. <span ng-if="repoEditor.repoID.$error.uniqueRepo">The repository ID must be unique.</span>
  427. <span ng-if="repoEditor.repoID.$error.required && repoEditor.repoID.$dirty">The repository ID cannot be blank.</span>
  428. </p>
  429. </div>
  430. <div class="form-group" ng-class="{'has-error': repoEditor.repoPath.$invalid && repoEditor.repoPath.$dirty}">
  431. <label for="repoPath">Repository Path</label>
  432. <input name="repoPath" placeholder="~/Documents" id="repoPath" class="form-control" type="text" ng-model="currentRepo.Directory" required></input>
  433. <p class="help-block">
  434. <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>
  435. <span ng-if="repoEditor.repoPath.$error.required && repoEditor.repoPath.$dirty">The repository path cannot be blank.</span>
  436. </p>
  437. </div>
  438. <div class="form-group">
  439. <div class="checkbox">
  440. <label>
  441. <input type="checkbox" ng-model="currentRepo.ReadOnly"> Repository Master
  442. </label>
  443. </div>
  444. <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>
  445. </div>
  446. <div class="form-group">
  447. <div class="checkbox">
  448. <label>
  449. <input type="checkbox" ng-model="currentRepo.IgnorePerms"> Ignore Permissions
  450. </label>
  451. </div>
  452. <p class="help-block">File permission bits are ignored when looking for changes. Use on FAT filesystems.</p>
  453. </div>
  454. <div class="form-group">
  455. <label for="nodes">Nodes</label>
  456. <div class="checkbox" ng-repeat="node in otherNodes()">
  457. <label>
  458. <input type="checkbox" ng-model="currentRepo.selectedNodes[node.NodeID]"> {{nodeName(node)}}
  459. </label>
  460. </div>
  461. <p class="help-block">Select the nodes to share this repository with.</p>
  462. </div>
  463. </form>
  464. <div ng-show="!editingExisting">
  465. 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.
  466. </div>
  467. </div>
  468. <div class="modal-footer">
  469. <button type="button" class="btn btn-primary" ng-click="saveRepo()" ng-disabled="repoEditor.$invalid"><span class="glyphicon glyphicon-ok"></span>&emsp;Save</button>
  470. <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>
  471. <button ng-if="editingExisting" type="button" class="btn btn-danger pull-left" ng-click="deleteRepo()"><span class="glyphicon glyphicon-minus"></span>&emsp;Delete</button>
  472. </div>
  473. </div>
  474. </div>
  475. </div>
  476. <!-- Settings modal -->
  477. <div id="settings" class="modal fade">
  478. <div class="modal-dialog modal-lg">
  479. <div class="modal-content">
  480. <div class="modal-header">
  481. <h4 class="modal-title"> Settings</h4>
  482. </div>
  483. <div class="modal-body">
  484. <form role="form">
  485. <div class="row">
  486. <div class="col-md-6">
  487. <div class="form-group" ng-repeat="setting in settings">
  488. <div ng-if="setting.type == 'text' || setting.type == 'number'">
  489. <label for="{{setting.id}}">{{setting.descr}}</label>
  490. <input id="{{setting.id}}" class="form-control" type="{{setting.type}}" ng-model="config.workingOptions[setting.id]"></input>
  491. </div>
  492. <div class="checkbox" ng-if="setting.type == 'bool'">
  493. <label>
  494. {{setting.descr}} <input id="{{setting.id}}" type="checkbox" ng-model="config.workingOptions[setting.id]"></input>
  495. </label>
  496. </div>
  497. </div>
  498. </div>
  499. <div class="col-md-6">
  500. <div class="form-group" ng-repeat="setting in guiSettings">
  501. <div ng-if="setting.type == 'text' || setting.type == 'number' || setting.type == 'password'">
  502. <label for="{{setting.id}}">{{setting.descr}}</label>
  503. <input id="{{setting.id}}" class="form-control" type="{{setting.type}}" ng-model="config.workingGUI[setting.id]"></input>
  504. </div>
  505. <div class="checkbox" ng-if="setting.type == 'bool'">
  506. <label>
  507. {{setting.descr}} <input id="{{setting.id}}" type="checkbox" ng-model="config.workingGUI[setting.id]"></input>
  508. </label>
  509. </div>
  510. </div>
  511. </div>
  512. </div>
  513. </form>
  514. </div>
  515. <div class="modal-footer">
  516. <button type="button" class="btn btn-primary" ng-click="saveSettings()"><span class="glyphicon glyphicon-ok"></span>&emsp;Save</button>
  517. <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>
  518. </div>
  519. </div>
  520. </div>
  521. </div>
  522. <script src="angular.min.js"></script>
  523. <script src="jquery-2.0.3.min.js"></script>
  524. <script src="bootstrap/js/bootstrap.min.js"></script>
  525. <script src="app.js"></script>
  526. </body>
  527. </html>