mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
refactor(app): move storidge to new 'integrations' module (#2905)
* refactor(app): move storidge to new 'integrations' module * style(storidge): revert TODO note removal
This commit is contained in:
parent
67de71a18f
commit
144e0ae07e
59 changed files with 32 additions and 29 deletions
|
@ -0,0 +1,8 @@
|
|||
<div class="form-group">
|
||||
<label for="storidge_profile" class="col-sm-2 col-lg-1 control-label text-left">Profile</label>
|
||||
<div class="col-sm-10 col-lg-11">
|
||||
<select id="storidge_profile" ng-model="$ctrl.storidgeProfile" ng-options="profile.Name for profile in $ctrl.profiles" class="form-control">
|
||||
<option selected disabled hidden value="">Select a profile</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
angular.module('portainer.integrations.storidge').component('storidgeProfileSelector', {
|
||||
templateUrl: './storidgeProfileSelector.html',
|
||||
controller: 'StoridgeProfileSelectorController',
|
||||
bindings: {
|
||||
'storidgeProfile': '='
|
||||
}
|
||||
});
|
|
@ -0,0 +1,17 @@
|
|||
angular.module('portainer.integrations.storidge')
|
||||
.controller('StoridgeProfileSelectorController', ['StoridgeProfileService', 'Notifications',
|
||||
function (StoridgeProfileService, Notifications) {
|
||||
var ctrl = this;
|
||||
|
||||
function initComponent() {
|
||||
StoridgeProfileService.profiles()
|
||||
.then(function success(data) {
|
||||
ctrl.profiles = data;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to retrieve Storidge profiles');
|
||||
});
|
||||
}
|
||||
|
||||
initComponent();
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue