Skip to content
Snippets Groups Projects
Commit 68b06be7 authored by Release Webservice's avatar Release Webservice
Browse files

Finished release 0.7.

parents 5d10fd9d 74afd725
No related branches found
No related tags found
No related merge requests found
...@@ -159,7 +159,7 @@ Any non-empty responses are JSON formatted messages. ...@@ -159,7 +159,7 @@ Any non-empty responses are JSON formatted messages.
} }
``` ```
* /jobs/interfaces/*`hostname`* * /data/interfaces/*`hostname`*
The response will be a list of information about The response will be a list of information about
the interfaces present on the requested host the interfaces present on the requested host
...@@ -181,7 +181,7 @@ Any non-empty responses are JSON formatted messages. ...@@ -181,7 +181,7 @@ Any non-empty responses are JSON formatted messages.
} }
``` ```
* /jobs/snmp/*`hostname`* * /data/snmp/*`hostname`*
The response will be a list of information about The response will be a list of information about
the interfaces discovered through snmp the interfaces discovered through snmp
...@@ -204,7 +204,7 @@ Any non-empty responses are JSON formatted messages. ...@@ -204,7 +204,7 @@ Any non-empty responses are JSON formatted messages.
} }
``` ```
* /jobs/bgp/*`hostname`* * /data/bgp/*`hostname`*
The response will be a list of information about The response will be a list of information about
the bgp peerings configured for the requested host the bgp peerings configured for the requested host
......
...@@ -6,4 +6,5 @@ ...@@ -6,4 +6,5 @@
added snmp index to interface data to support sensu, prometheus added snmp index to interface data to support sensu, prometheus
increased unit test coverage to 78% increased unit test coverage to 78%
0.6: added a static demo of juniper stuff 0.6: added a static demo of juniper stuff
added some route docs to README added some route docs to README
\ No newline at end of file 0.7: added static/* to release
\ No newline at end of file
<!doctype html>
<html ng-app="inventoryApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.5/angular.min.js"></script>
<script src="interfaces.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<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>
STATUS: {{status}}
</div>
</div>
</body>
</html>
\ No newline at end of file
var myApp = angular.module('inventoryApp', []);
myApp.controller('interfaces', function($scope, $http) {
$scope.routers = [];
$scope.router = '';
$scope.interfaces = [];
$scope.interface = '';
$scope.status = 'not yet loaded';
$http({
method: 'GET',
url: window.location.origin + "/data/routers"
}).then(
function(rsp) {$scope.routers = rsp.data;},
function(rsp) {$scope.routers = ['error'];}
);
$scope.update_interfaces = function() {
$http({
method: 'GET',
url: window.location.origin + "/data/interfaces/" + $scope.router
}).then(
function(rsp) {
$scope.interfaces = rsp.data.map(function(x){
return x.name
});
},
function(rsp) {$scope.interfaces = ['error'];}
);
}
$scope.update_status = function() {
$http({
method: 'GET',
url: window.location.origin
+ "/alarmsdb/interface-status?equipment="
+ $scope.router
+ "&interface="
+ $scope.interface
}).then(
function(rsp) {$scope.status = rsp.data.status;},
function(rsp) {$scope.interfaces = 'query error';}
);
}
});
\ No newline at end of file
...@@ -2,21 +2,12 @@ ...@@ -2,21 +2,12 @@
<html ng-app="inventoryApp"> <html ng-app="inventoryApp">
<head> <head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.5/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.5/angular.min.js"></script>
<script src="inventoryProvider.js"></script> <script src="juniper.js"></script>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
</head> </head>
<body> <body>
<!-- <div ng-controller="juniper">
<h2>Routers</h2>
<div ng-controller="inventoryProvider">
<ul name="routers" class="unstyled">
<li ng-repeat="r in routers">{{r}}</li>
</ul>
</div>
-->
<div ng-controller="inventoryProvider">
<h2>Interfaces</h2> <h2>Interfaces</h2>
<div> <div>
<select <select
...@@ -27,15 +18,33 @@ ...@@ -27,15 +18,33 @@
<div class="column"> <div class="column">
<p><b>interfaces</b></p> <p><b>interfaces</b></p>
{{interfaces}} <ul>
<li ng-repeat="i in interfaces">{{i.name}}
<ul><li>{{i.description}}</li></ul>
</li>
</ul>
<div class="raw">{{interfaces}}</div>
</div> </div>
<div class="column"> <div class="column">
<p><b>bgp</b></p> <p><b>bgp</b></p>
{{bgp}} <ul>
<li ng-repeat="p in bgp">{{p.description}}
<ul>
<li>local as: {{p.as.local}}</li>
<li>peer as: {{p.as.peer}}</li>
</ul>
</li>
</ul>
<div class="raw">{{bgp}}</div>
</div> </div>
<div class="column"> <div class="column">
<p><b>snmp</b></p> <p><b>snmp</b></p>
{{snmp}} <ul>
<li ng-repeat="i in snmp">{{i.name}}
<ul><li>index: {{i.index}}</li></ul>
</li>
</ul>
<div class="raw">{{snmp}}</div>
</div> </div>
</div> </div>
</body> </body>
......
var myApp = angular.module('inventoryApp', []); var myApp = angular.module('inventoryApp', []);
myApp.controller('inventoryProvider', function($scope, $http) { myApp.controller('juniper', function($scope, $http) {
$scope.routers = []; $scope.routers = [];
$scope.router = ''; $scope.router = '';
......
...@@ -8,4 +8,10 @@ ...@@ -8,4 +8,10 @@
content: ""; content: "";
display: table; display: table;
clear: both; clear: both;
}
.raw {
font-style: italic;
font-size: 10px;
font-family: Courier
} }
\ No newline at end of file
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='inventory-provider', name='inventory-provider',
version="0.6", version="0.7",
author='GEANT', author='GEANT',
author_email='swd@geant.org', author_email='swd@geant.org',
description='Dashboard inventory provider', description='Dashboard inventory provider',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment