last state
This commit is contained in:
parent
b768f442cb
commit
62c2c86868
|
@ -21,5 +21,6 @@
|
|||
span.glyphicon.glyphicon-floppy-disk(aria-hidden="true")
|
||||
| Save
|
||||
span.btn.btn-default(ng-click="gps()")
|
||||
span.glyphicon.glyphicon-screenshot(ng-if="loadingGPS")
|
||||
span.glyphicon.glyphicon-map-marker(aria-hidden="true")
|
||||
| GPS
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
angular.module('ffhb')
|
||||
.controller('NodeCtrl',function($stateParams,$scope,store,config,leafletData){
|
||||
$scope.nodeid = $stateParams.nodeid;
|
||||
$scope.loadingGPS = false;
|
||||
$scope.node = {};
|
||||
angular.extend($scope, {
|
||||
center: config.map.view,
|
||||
|
@ -50,6 +51,7 @@ angular.module('ffhb')
|
|||
}
|
||||
});
|
||||
var setToGps = function(position){
|
||||
$scope.loadingGPS = false;
|
||||
var pos = [position.coords.latitude,position.coords.longitude];
|
||||
if($scope.node !== undefined && $scope.node.nodeinfo !== undefined){
|
||||
$scope.node.nodeinfo.location = {
|
||||
|
@ -67,6 +69,7 @@ angular.module('ffhb')
|
|||
$scope.gps = function() {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(setToGps);
|
||||
$scope.loadingGPS = true;
|
||||
}else{
|
||||
window.alert('No Permission for location');
|
||||
}
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
angular.module('ffhb')
|
||||
.controller('NodesGroupCtrl',function(NgTableParams,$scope,store){
|
||||
$scope.tableParams = new NgTableParams({
|
||||
sorting: { hostname: 'asc' },
|
||||
sorting: { 'nodeinfo.hostname': 'asc' },
|
||||
group: 'nodeinfo.owner.contact',
|
||||
total: 0,
|
||||
count: 50
|
||||
count: 100
|
||||
}, {
|
||||
dataset: []
|
||||
});
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
angular.module('ffhb')
|
||||
.controller('NodesSortCtrl',function(NgTableParams,$scope,store){
|
||||
$scope.tableParams = new NgTableParams({
|
||||
sorting: { hostname: 'asc' },
|
||||
sorting: { 'nodeinfo.hostname': 'asc' },
|
||||
total: 0,
|
||||
count: 50
|
||||
count: 100
|
||||
}, {
|
||||
dataset: []
|
||||
});
|
||||
|
|
|
@ -36,7 +36,7 @@ angular.module('config', [])
|
|||
}
|
||||
}
|
||||
},
|
||||
geojson: 'https://meshviewer.breminale.ffhb.de/data/meshviewer.geojson',
|
||||
refresh: 60000
|
||||
geojson: 'https://mgmt.ffhb.de/meshviewer.geojson',
|
||||
refresh: false
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue