goldilocks.js/admin/public/index.html

201 lines
6.7 KiB
HTML
Raw Normal View History

2017-02-23 01:48:34 +00:00
<!DOCTYPE html>
<html ng-app="com.daplie.cloud" ng-strict>
<head>
2017-02-28 01:22:25 +00:00
<link type="text/css" rel="stylesheet" href="/assets/com.bootstrapcdn/spacelab/bootstrap.css">
2017-02-23 01:48:34 +00:00
</head>
2017-02-28 01:22:25 +00:00
<body class="fade" ng-class="[ 'in' ]">
2017-02-23 01:48:34 +00:00
2017-03-04 07:25:20 +00:00
<ul>
<li>Change API format to verbose arrays and nested objects</li>
<li>Set Default Path, Module (dir, api)</li>
<li>Set Hostname, Path, Module (dir, api)</li>
<li>Show Device Name</li>
<li>Login to Daplie</li>
<li>Show domains (or ask purchase)</li>
<li>Tunnel On</li>
<li>Show configured domains</li>
</ul>
2017-03-02 07:58:45 +00:00
<div class="container" ng-controller="LoginController as vm" ng-init="vm.setSimple()">
2017-02-28 21:55:48 +00:00
<h1 ng-if="!vm.authnUpdated">Initializing... {{vm.hello}}</h1>
2017-03-15 09:40:35 +00:00
<div>
Configure Remote Server
<label>Configuration Address:</label>
<input type="text" placeholder="i.e. 192.168.1.100">
<label>Configuration Name:</label>
<input type="text" placeholder="i.e. localhost.daplie.invalid">
<label>Root Certificate Validation (optional):</label>
<textarea class="textarea" placeholder="paste the contents of a root.pem here"></textarea>
</div>
2017-02-28 21:55:48 +00:00
<div ng-if="!vm.authnUpdated">
2017-02-28 01:22:25 +00:00
<button
type="button"
class="btn btn-default"
ng-disabled="vm.advanced && !vm.providerUri"
ng-click="vm.authenticate()"
>Login</button>
2017-02-28 21:55:48 +00:00
</div>
2017-03-15 09:40:35 +00:00
<button
type="button"
class="btn btn-link"
ng-if="!vm.advanced"
ng-click="vm.setAdvanced()"
>advanced</button>
<div ng-if="vm.advanced">
<button
type="button"
class="btn btn-link"
ng-click="vm.setSimple();"
>simple</button>
<input
type="text"
ng-change="vm.checkProviderUri(vm.myProviderUri)"
ng-model="vm.myProviderUri">
<br/>
<small>todo: allow per-device authorization</small>
</div>
2017-02-23 01:48:34 +00:00
2017-03-02 07:58:45 +00:00
<div ng-if="vm.config">
2017-03-15 09:40:35 +00:00
<div ng-init="siteconf = vm.config.global">
<h1>Server Device Name: <span ng-bind="vm.config.device.hostname"></span></h1>
<!-- input class="form-control" ng-model="vm.config.device.hostname" / -->
2017-03-14 00:10:16 +00:00
<h1>Server Working Directory:</h1>
<input class="form-control" ng-model="vm.config.cwd" />
2017-03-15 09:40:35 +00:00
<h1>Addresses:</h1>
<table class="table">
<tr>
<th>Interface</th>
<th>Address</th>
<th>Family</th>
<th>Scope</th>
</tr>
<tr ng-repeat="addr in vm.config.addresses">
<td ng-bind="addr.iface"></td>
<td ng-bind="addr.address"></td>
<td ng-bind="addr.family"></td>
<td ng-bind="addr.range"></td>
</tr>
</table>
<h1>Managed Domains:</h1>
<div ng-if="!vm.domains.length">
You don't have any domains with this account.
<br/>
Try a different account?
<br/>
<input type="url" placeholder="https://daplie.domains">
<button type="button"
class="btn"
disabled
>Login</button>
</div>
<div ng-if="vm.domains.length">
<h2>Enable Tunnel</h2>
<input type="radio" ng-model="vm.config.tunnel.enabled" ng-value="true">
<input type="radio" ng-model="vm.config.tunnel.enabled" ng-value="false">
<table class="table">
<tr>
<th>Domain</th>
<th>Sub</th>
<th>Devices</th>
</tr>
<tr ng-repeat="d in vm.dns">
<td ng-bind="d.domain"></td>
<td ng-bind="d.name"></td>
<td>
<span ng-if="!d.domain">
<div ng-repeat="dev in d.devices">
<span ng-bind="dev"
></span> <button
type="button"
class="btn btn-danger"
ng-click="vm.removeDevice(d, dev)"
>x</button>
</div>
</span>
</td>
</tr>
</table>
</div>
2017-03-04 07:25:20 +00:00
<h1>Global Settings:</h1>
<br/>
2017-03-15 09:40:35 +00:00
<form class="form-inline">
<div ng-repeat="path in siteconf.paths">
<h2 ng-bind="path.$id"></h2>
<div ng-repeat="module in path.modules">
<h3>{{module.$id}}</h3>
<div ng-repeat="(key, value) in module">
<label>{{key}}</label>: <input class="form-control" ng-model="module[key]" />
2017-03-04 07:25:20 +00:00
</div>
</div>
2017-03-15 09:40:35 +00:00
<br/>
<br/>
<br/>
2017-03-04 07:25:20 +00:00
</div>
2017-03-15 09:40:35 +00:00
</form>
2017-03-04 07:25:20 +00:00
</div>
<h1>Per-Domain Settings:</h1>
2017-03-15 09:40:35 +00:00
<div ng-repeat="siteconf in vm.config.sites">
<h2 ng-bind="siteconf.$id"></h2>
<div ng-repeat="path in siteconf.paths">
<h2 ng-bind="path.$id"></h2>
<div ng-repeat="module in path.modules">
<h3>{{module.$id}}</h3>
<div ng-repeat="(key, value) in module">
<label>{{key}}</label>: <input class="form-control" ng-model="module[key]" />
2017-03-13 22:39:43 +00:00
</div>
</div>
2017-03-15 09:40:35 +00:00
<br/>
<br/>
<br/>
2017-03-13 22:39:43 +00:00
</div>
</div>
2017-03-15 09:40:35 +00:00
<div ng-init="defaultsconf = vm.config.defaults">
2017-03-13 22:39:43 +00:00
<h1>Fallback Settings:</h1>
<br/>
2017-03-15 09:40:35 +00:00
<div ng-repeat="path in siteconf.paths">
<h2 ng-bind="path.$id"></h2>
<div ng-repeat="module in path.modules">
<h3>{{module.$id}}</h3>
<div ng-repeat="(key, value) in module">
<label>{{key}}</label>: <input class="form-control" ng-model="module[key]" />
2017-03-02 07:58:45 +00:00
</div>
</div>
2017-03-15 09:40:35 +00:00
<br/>
<br/>
<br/>
2017-03-02 07:58:45 +00:00
</div>
</div>
2017-03-13 22:39:43 +00:00
<div ng-if="!vm._showvmconfig">
<button class="btn-link" ng-click="vm._showvmconfig = true">show config as json</button>
</div>
<div ng-if="vm._showvmconfig">
<button class="btn-link" ng-click="vm._showvmconfig = false">hide config</button>
<pre><code ng-bind="vm.config | json">{{vm.config}}</code></pre>
</div>
</div>
2017-03-02 07:58:45 +00:00
</div>
2017-02-23 01:48:34 +00:00
<script src="/assets/com.jquery/jquery-3.1.1.js"></script>
<script src="/assets/com.google/angular.1.6.2.min.js"></script>
<script src="/assets/org.oauth3/oauth3.core.js"></script>
2017-02-28 01:22:25 +00:00
<script src="/assets/org.oauth3/oauth3.ng.js"></script>
<script src="/assets/org.oauth3/oauth3.domains.js"></script>
2017-03-15 09:40:35 +00:00
<script src="/assets/org.oauth3/oauth3.dns.js"></script>
2017-02-23 01:48:34 +00:00
<script src="/js/app.js"></script>
</body>
</html>