goldilocks.js/admin/public/index.html

108 lines
3.8 KiB
HTML

<!DOCTYPE html>
<html ng-app="com.daplie.cloud" ng-strict>
<head>
<link type="text/css" rel="stylesheet" href="/assets/com.bootstrapcdn/spacelab/bootstrap.css">
</head>
<body class="fade" ng-class="[ 'in' ]">
<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>
<div class="container" ng-controller="LoginController as vm" ng-init="vm.setSimple()">
<h1 ng-if="!vm.authnUpdated">Initializing... {{vm.hello}}</h1>
<div ng-if="!vm.authnUpdated">
<button
type="button"
class="btn btn-link"
ng-if="!vm.advanced"
ng-click="vm.setAdvanced()"
>advanced</button>
<button
type="button"
class="btn btn-link"
ng-if="vm.advanced"
ng-click="vm.setSimple();"
>simple</button>
<input
type="text"
ng-if="vm.advanced"
ng-change="vm.checkProviderUri(vm.myProviderUri)"
ng-model="vm.myProviderUri">
<button
type="button"
class="btn btn-default"
ng-disabled="vm.advanced && !vm.providerUri"
ng-click="vm.authenticate()"
>Login</button>
</div>
<div ng-if="vm.config">
<div class="input-group" ng-init="siteconf = vm.config.global">
<h1>Global Settings:</h1>
<br/>
<div ng-repeat="path in siteconf.paths">Pathname:
<input class="form-control" ng-model="path.$id" />
<div ng-repeat="module in path.modules">Modulename: {{module.$id}}
<div ng-repeat="(key, value) in module">{{key}}:
<input class="form-control" ng-model="value" />
</div>
</div>
</div>
</div>
<h1>Per-Domain Settings:</h1>
<div class="input-group" ng-repeat="siteconf in vm.config.sites">
<label>Hostname:</label> <input class="form-control" ng-model="sitename" />
<br/>
<div ng-repeat="path in siteconf.paths">Pathname:
<input class="form-control" ng-model="path.$id" />
<div ng-repeat="module in path.modules">Modulename: {{module.$id}}
<div ng-repeat="(key, value) in module">{{key}}:
<input class="form-control" ng-model="value" />
</div>
</div>
</div>
</div>
<div class="input-group" ng-init="defaultsconf = vm.config.defaults">
<h1>Fallback Settings:</h1>
<br/>
<div ng-repeat="path in defaultsconf.paths">Pathname:
<input class="form-control" ng-model="path.$id" />
<div ng-repeat="module in path.modules">Modulename: {{module.$id}}
<div ng-repeat="(key, value) in module">{{key}}:
<input class="form-control" ng-model="value" />
</div>
</div>
</div>
</div>
<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>
</div>
<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>
<script src="/assets/org.oauth3/oauth3.ng.js"></script>
<script src="/assets/org.oauth3/oauth3.domains.js"></script>
<script src="/js/app.js"></script>
</body>
</html>