
js.drivers.driverDataService.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openmuc-webui-channelconfigurator Show documentation
Show all versions of openmuc-webui-channelconfigurator Show documentation
Channel Configurator plug-in for the WebUI of the OpenMUC framework.
The newest version!
(function(){
var injectParams = ['$http', 'SETTINGS', 'RestServerAuthService'];
var DriverDataService = function($http, SETTINGS, RestServerAuthService) {
this.getDriverData = function(driver) {
var req = {
method: 'GET',
url: SETTINGS.API_URL + SETTINGS.DRIVERS_URL + driver.id,
headers: {
'Authorization': RestServerAuthService.getAuthHash(),
},
};
return $http(req).then(function(response){
return response.data;
});
};
this.getDriverConfigs = function(driver) {
var req = {
method: 'GET',
url: SETTINGS.API_URL + SETTINGS.DRIVERS_URL + driver.id + SETTINGS.CONFIGS_URL,
headers: {
'Authorization': RestServerAuthService.getAuthHash(),
},
};
return $http(req).then(function(response){
return response.data.configs;
});
};
};
DriverDataService.$inject = injectParams;
angular.module('openmuc.drivers').service('DriverDataService', DriverDataService);
})();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy