dnet-applications/apps/dnet-is-application/src/main/resources/static/js/is_simple_ctrls.js

37 lines
990 B
JavaScript

app.controller('isMenuController', function($scope, $http) {
$scope.resTypes = [];
call_http_get($http, './ajax/resourceTypes' , function(res) {
$scope.resTypes = res.data;
});
});
// ----------------------------------------------------
app.controller('infoController', function($scope, $http) {
$scope.info = [];
call_http_get($http, './ajax/info/?' + $.now(), function(res) {
angular.forEach(res.data, function(section) {
if (section.name != 'Modules') {
angular.forEach(section.data, function(r) {
if (r.k.toLowerCase().endsWith('path') || r.k.toLowerCase().endsWith('.dirs')) {
r.v = r.v.replaceAll(':', ':\n');
}
});
}
});
$scope.info = res.data;
});
});
// ----------------------------------------------------
app.controller('protocolsController', function($scope, $http) {
$scope.protocols = [];
call_http_get($http, './ajax/protocols/?' + $.now(), function(res) {
$scope.protocols = res.data;
});
});