Skip to content
Snippets Groups Projects
Commit 3a7ee682 authored by Erik Reid's avatar Erik Reid
Browse files

use /data/interfaces (no hostname)

parent a9671156
No related branches found
No related tags found
No related merge requests found
......@@ -9,18 +9,19 @@
<body>
<div ng-controller="interfaces">
<h2>Interfaces</h2>
<div>
<select
ng-options="r for r in routers"
ng-change="update_interfaces()"
ng-model="router"></select>
<select
ng-options="i for i in interfaces"
ng-change="update_status()"
ng-model="interface">
</select>
</div>
<div class="column">
<p><strong>interfaces</strong></p>
<ul>
<li ng-repeat="i in interfaces">{{i.router}}:{{i.name}}
<ul>
<li>{{i.description}}</li>
<li ng-repeat="v4 in i.ipv4">v4: {{v4}}</li>
<li ng-repeat="v6 in i.ipv6">v6: {{v6}}</li>
</ul>
</li>
</ul>
<!--div class="raw">{{interfaces}}</div-->
</div>
<div>
STATUS: {{status}}
......
......@@ -12,12 +12,13 @@ myApp.controller('interfaces', function($scope, $http) {
$http({
method: 'GET',
url: window.location.origin + "/data/routers"
url: window.location.origin + "/data/interfaces"
}).then(
function(rsp) {$scope.routers = rsp.data;},
function(rsp) {$scope.interfaces = rsp.data;},
function(rsp) {$scope.routers = ['error'];}
);
/*
$scope.update_interfaces = function() {
$http({
......@@ -47,5 +48,6 @@ myApp.controller('interfaces', function($scope, $http) {
function(rsp) {$scope.interfaces = 'query error';}
);
}
*/
});
\ No newline at end of file
.column {
float: left;
width: 33.33%;
width: 100%%;
}
/* Clear floats after the columns */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment