You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/services/endpointProvider.js

24 lines
590 B

angular.module('portainer.services')
.factory('EndpointProvider', ['LocalStorage', function EndpointProviderFactory(LocalStorage) {
'use strict';
var endpoint = {};
var service = {};
service.initialize = function() {
var endpointID = LocalStorage.getEndpointID();
if (endpointID) {
endpoint.ID = endpointID;
}
};
service.clean = function() {
endpoint = {};
};
service.endpointID = function() {
return endpoint.ID;
};
service.setEndpointID = function(id) {
endpoint.ID = id;
LocalStorage.storeEndpointID(id);
};
return service;
}]);