|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
// Generated by CoffeeScript 1.10.0
|
|
|
|
|
// Generated by CoffeeScript 1.12.7
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
LemonLDAP::NG Manager client |
|
|
|
@ -23,7 +23,7 @@ This file contains: |
|
|
|
|
|
|
|
|
|
llapp.controller('TreeCtrl', [ |
|
|
|
|
'$scope', '$http', '$location', '$q', '$uibModal', '$translator', '$cookies', '$htmlParams', function($scope, $http, $location, $q, $uibModal, $translator, $cookies, $htmlParams) { |
|
|
|
|
var _checkSaveResponse, _download, _getAll, _stoggle, c, id, pathEvent, readError, setHelp; |
|
|
|
|
var _checkSaveResponse, _download, _getAll, _stoggle, c, id, pathEvent, readError, setDefault, setHelp; |
|
|
|
|
$scope.links = window.links; |
|
|
|
|
$scope.menu = $htmlParams.menu; |
|
|
|
|
$scope.menulinks = window.menulinks; |
|
|
|
@ -405,21 +405,10 @@ This file contains: |
|
|
|
|
field: 'hostname' |
|
|
|
|
}; |
|
|
|
|
return $scope.showModal('prompt.html', name).then(function() { |
|
|
|
|
var n, node; |
|
|
|
|
var n; |
|
|
|
|
n = $scope.result; |
|
|
|
|
if (n) { |
|
|
|
|
node = $scope.addTemplateNode(n, 'virtualHost'); |
|
|
|
|
delete node.nodes[0].cnodes; |
|
|
|
|
return node.nodes[0].nodes = [ |
|
|
|
|
{ |
|
|
|
|
id: "virtualHosts/new__" + n + "/locationRules/default", |
|
|
|
|
type: "rule", |
|
|
|
|
title: "default", |
|
|
|
|
comment: "", |
|
|
|
|
re: "default", |
|
|
|
|
data: "deny" |
|
|
|
|
} |
|
|
|
|
]; |
|
|
|
|
return $scope.addTemplateNode(n, 'virtualHost'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
@ -479,10 +468,27 @@ This file contains: |
|
|
|
|
type: type, |
|
|
|
|
nodes: templates(type, "new__" + name) |
|
|
|
|
}; |
|
|
|
|
setDefault(t.nodes); |
|
|
|
|
cs.$modelValue.nodes.push(t); |
|
|
|
|
cs.expand(); |
|
|
|
|
return t; |
|
|
|
|
}; |
|
|
|
|
setDefault = function(node) { |
|
|
|
|
var len, n, o; |
|
|
|
|
for (o = 0, len = node.length; o < len; o++) { |
|
|
|
|
n = node[o]; |
|
|
|
|
if (n.cnodes && n["default"]) { |
|
|
|
|
delete n.cnodes; |
|
|
|
|
n._nodes = n["default"]; |
|
|
|
|
} |
|
|
|
|
if (n._nodes) { |
|
|
|
|
setDefault(n._nodes); |
|
|
|
|
} else if (n["default"] || n["default"] === 0) { |
|
|
|
|
n.data = n["default"]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return node; |
|
|
|
|
}; |
|
|
|
|
_getAll = function(node) { |
|
|
|
|
var d, d2; |
|
|
|
|
d = $q.defer(); |
|
|
|
|