mirror of
https://github.com/portainer/portainer.git
synced 2025-08-09 15:55:23 +02:00
feat(app/package): upgrade angularjs to 1.8 (#4073)
* chore(yarn): upgrade angularjs * refactor(app): use $onInit instead of initComponent * feat(app/package): remove angular-cookies dependency Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
adf33385ce
commit
43bbc14c58
8 changed files with 32 additions and 49 deletions
|
@ -44,7 +44,8 @@ angular.module('portainer.app').controller('porAccessControlFormController', [
|
|||
});
|
||||
}
|
||||
|
||||
function initComponent() {
|
||||
this.$onInit = $onInit;
|
||||
function $onInit() {
|
||||
var isAdmin = Authentication.isAdmin();
|
||||
ctrl.isAdmin = isAdmin;
|
||||
|
||||
|
@ -79,7 +80,5 @@ angular.module('portainer.app').controller('porAccessControlFormController', [
|
|||
Notifications.error('Failure', err, 'Unable to retrieve access control information');
|
||||
});
|
||||
}
|
||||
|
||||
initComponent();
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -86,7 +86,8 @@ angular.module('portainer.app').controller('porAccessControlPanelController', [
|
|||
});
|
||||
}
|
||||
|
||||
function initComponent() {
|
||||
this.$onInit = $onInit;
|
||||
function $onInit() {
|
||||
var userDetails = Authentication.getUserDetails();
|
||||
var isAdmin = Authentication.isAdmin();
|
||||
var userId = userDetails.ID;
|
||||
|
@ -138,7 +139,5 @@ angular.module('portainer.app').controller('porAccessControlPanelController', [
|
|||
Notifications.error('Failure', err, 'Unable to retrieve access control information');
|
||||
});
|
||||
}
|
||||
|
||||
initComponent();
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -2,7 +2,8 @@ angular.module('portainer.app').controller('porEndpointSecurityController', [
|
|||
function () {
|
||||
var ctrl = this;
|
||||
|
||||
function initComponent() {
|
||||
this.$onInit = $onInit;
|
||||
function $onInit() {
|
||||
if (ctrl.endpoint) {
|
||||
var endpoint = ctrl.endpoint;
|
||||
var TLS = endpoint.TLSConfig.TLS;
|
||||
|
@ -27,7 +28,5 @@ angular.module('portainer.app').controller('porEndpointSecurityController', [
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
initComponent();
|
||||
},
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue