Add option
This commit is contained in:
parent
a9e8c8e664
commit
4daec471a3
2 changed files with 180 additions and 174 deletions
|
@ -136,6 +136,10 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
|
|||
return elements.concat(links);
|
||||
}
|
||||
|
||||
// On user login
|
||||
$scope.$on('updateGraphEvent', function () {
|
||||
// call update graph
|
||||
});
|
||||
//Return a new link linking the parent and child elements with the interfaces names given in parameters
|
||||
function makeLink(parentElementLabel, childElementLabel, Iparent, Ichild) {
|
||||
|
||||
|
@ -153,7 +157,9 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
|
|||
function makeElement(vm) {
|
||||
var label = vm[0];
|
||||
|
||||
var maxLineLength = _.max(label.split('\n'), function(l) { return l.length; }).length;
|
||||
var maxLineLength = _.max(label.split('\n'), function (l) {
|
||||
return l.length;
|
||||
}).length;
|
||||
|
||||
// Compute width/height of the rectangle based on the number
|
||||
// of lines in the label and the letter size. 0.6 * letterSize is
|
||||
|
|
|
@ -42,7 +42,7 @@ mainApp.controller('machineDetailsCtrl', ['$scope', 'Compute', '$rootScope', '$t
|
|||
};
|
||||
|
||||
$scope.deleteMachine=function(){
|
||||
Compute.deleteMachine(function(){Compute.pullData(function(){});},$scope.machine.id);
|
||||
Compute.deleteMachine(function(){Compute.pullData(function(){$rootScope.$broadcast("updateGraphEvent")});},$scope.machine.id);
|
||||
}
|
||||
|
||||
}]);
|
||||
|
|
Loading…
Add table
Reference in a new issue