mirror of
https://github.com/portainer/portainer.git
synced 2025-07-28 09:49:40 +02:00
revert(azure): revert removal (#3890)
* Revert "fix(sidebar): show docker sidebar when needed (#3852)" This reverts commit59da17dde4
. * Revert "refactor(azure): remove Azure ACI endpoint support (#3803)" This reverts commit493de20540
.
This commit is contained in:
parent
25ca036070
commit
b58c2facfe
65 changed files with 1793 additions and 50 deletions
29
app/azure/services/locationService.js
Normal file
29
app/azure/services/locationService.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { LocationViewModel } from '../models/location';
|
||||
|
||||
angular.module('portainer.azure').factory('LocationService', [
|
||||
'$q',
|
||||
'Location',
|
||||
function LocationServiceFactory($q, Location) {
|
||||
'use strict';
|
||||
var service = {};
|
||||
|
||||
service.locations = function (subscriptionId) {
|
||||
var deferred = $q.defer();
|
||||
|
||||
Location.query({ subscriptionId: subscriptionId })
|
||||
.$promise.then(function success(data) {
|
||||
var locations = data.value.map(function (item) {
|
||||
return new LocationViewModel(item);
|
||||
});
|
||||
deferred.resolve(locations);
|
||||
})
|
||||
.catch(function error(err) {
|
||||
deferred.reject({ msg: 'Unable to retrieve locations', err: err });
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
return service;
|
||||
},
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue