mirror of
https://github.com/portainer/portainer.git
synced 2025-08-10 00:05:24 +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
|
@ -14,7 +14,6 @@ angular.module('portainer', [
|
|||
'ui.router',
|
||||
'ui.select',
|
||||
'isteven-multi-select',
|
||||
'ngCookies',
|
||||
'ngSanitize',
|
||||
'ngFileUpload',
|
||||
'ngMessages',
|
||||
|
|
|
@ -22,7 +22,8 @@ angular.module('portainer.docker').controller('NetworkMacvlanFormController', [
|
|||
return !ctrl.data.SelectedNetworkConfig;
|
||||
};
|
||||
|
||||
function initComponent() {
|
||||
this.$onInit = $onInit;
|
||||
function $onInit() {
|
||||
var isAdmin = Authentication.isAdmin();
|
||||
ctrl.isAdmin = isAdmin;
|
||||
|
||||
|
@ -44,7 +45,5 @@ angular.module('portainer.docker').controller('NetworkMacvlanFormController', [
|
|||
Notifications.error('Failure', err, 'Unable to retrieve informations for macvlan');
|
||||
});
|
||||
}
|
||||
|
||||
initComponent();
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -4,7 +4,8 @@ angular.module('portainer.integrations.storidge').controller('StoridgeProfileSel
|
|||
function (StoridgeProfileService, Notifications) {
|
||||
var ctrl = this;
|
||||
|
||||
function initComponent() {
|
||||
this.$onInit = $onInit;
|
||||
function $onInit() {
|
||||
StoridgeProfileService.profiles()
|
||||
.then(function success(data) {
|
||||
ctrl.profiles = data;
|
||||
|
@ -13,7 +14,5 @@ angular.module('portainer.integrations.storidge').controller('StoridgeProfileSel
|
|||
Notifications.error('Failure', err, 'Unable to retrieve Storidge profiles');
|
||||
});
|
||||
}
|
||||
|
||||
initComponent();
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -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