Skip to content

Commit

Permalink
<fix>(admin): remove unnecessary controller
Browse files Browse the repository at this point in the history
related to CAM-6537
  • Loading branch information
Mariusz Sielski committed Sep 9, 2016
1 parent dce2266 commit ac9b4b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 37 deletions.
36 changes: 0 additions & 36 deletions ui/admin/client/scripts/camunda-admin-ui.js
Expand Up @@ -70,42 +70,6 @@ module.exports = function(pluginDependencies) {

appNgModule.config(ModuleConfig);


appNgModule.controller('camAdminAppCtrl', [
'$scope',
'$route',
'UserResource',
function(
$scope,
$route,
UserResource
) {
function getUserProfile(auth) {
if (!auth || !auth.name) {
$scope.userFullName = null;
return;
}

UserResource.profile({
userId: auth.name
}).$promise.then(function(info) {
$scope.userFullName = info.firstName + ' ' + info.lastName;
});
}

$scope.$on('authentication.changed', function(ev, auth) {
if (auth) {
getUserProfile(auth);
}
else {
$route.reload();
}
});

getUserProfile($scope.authentication);
}]);


if (typeof window.adminConf !== 'undefined' && window.adminConf.polyfills) {
var polyfills = window.adminConf.polyfills;

Expand Down
2 changes: 1 addition & 1 deletion ui/admin/client/scripts/index.html
Expand Up @@ -51,7 +51,7 @@
sizes="114x114"
href="$APP_ROOT/app/admin/assets/images/camunda.114.png" />
</head>
<body ng-controller="camAdminAppCtrl" ng-class="{'no-breadcrumbs': !$root.showBreadcrumbs}">
<body ng-class="{'no-breadcrumbs': !$root.showBreadcrumbs}">
<!-- navigation -->
<div cam-widget-header
authentication="authentication"
Expand Down

0 comments on commit ac9b4b5

Please sign in to comment.